From 99a443fe24f2aecc22285fa63d65bc945f8aaa31 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Wed, 4 Nov 2020 17:28:59 +0100
Subject: [PATCH 001/308] add some extra (optional) probe positions to help
 debugging local<->global transforms

---
 .../InDetDetDescrExample/ReadSiDetectorElements.h          | 1 +
 .../InDetDetDescrExample/src/ReadSiDetectorElements.cxx    | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h
index abaed79fdf59..a1a09402e7e5 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/InDetDetDescrExample/ReadSiDetectorElements.h
@@ -66,6 +66,7 @@ public:
   const SCT_ID * m_sctIdHelper;
 
   bool m_first;
+  bool m_printProbePositions;
   
 
 };
diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
index f81ea8b6ad41..4233ef1d7837 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
@@ -53,6 +53,7 @@ ReadSiDetectorElements::ReadSiDetectorElements(const std::string& name, ISvcLoca
   declareProperty("DoInitialize", m_doInit = false);
   declareProperty("DoExecute",    m_doExec = true);
   declareProperty("UseConditionsTools", m_useConditionsTools = false);
+  declareProperty("PrintProbePositions", m_printProbePositions = true);
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
@@ -150,8 +151,12 @@ void ReadSiDetectorElements::printAllElements(const bool accessDuringInitializat
         // element->getIdHelper()->show(element->identify());
         //
   
-        ATH_MSG_ALWAYS(" center (x,y,z) = " << element->center().x() << "," << element->center().y() << "," << element->center().z());
+        ATH_MSG_ALWAYS(" center (x,y,z)   = " << element->center().x() << "," << element->center().y() << "," << element->center().z());
 	ATH_MSG_ALWAYS(" center (r,phi,z) = " << element->center().perp() << "," << element->center().phi() << "," <<element->center().z());
+	if(m_printProbePositions){
+	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (1,1)   = " <<element->globalPosition(Amg::Vector2D(1,1)).perp() << "," << element->globalPosition(Amg::Vector2D(1,1)).phi() <<","<< element->globalPosition(Amg::Vector2D(1,1)).z());
+	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (-1,-1) = " <<element->globalPosition(Amg::Vector2D(-1,-1)).perp() << "," << element->globalPosition(Amg::Vector2D(-1,-1)).phi() <<","<< element->globalPosition(Amg::Vector2D(-1,-1)).z());
+	}
         ATH_MSG_ALWAYS(" sin(tilt), sin(stereo) = " <<  element->sinTilt() << " " 
                        << element->sinStereo());
         ATH_MSG_ALWAYS(" width, minWidth, maxWidth, length (mm) = " 
-- 
GitLab


From d20c2e541911a201d65d7bbe8eae613b16f22887 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Thu, 5 Nov 2020 12:53:43 +0100
Subject: [PATCH 002/308] add global hit checks

---
 .../InDetDetDescrExample/src/ReadSiDetectorElements.cxx         | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
index 4233ef1d7837..9adf80bdef88 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
@@ -156,6 +156,8 @@ void ReadSiDetectorElements::printAllElements(const bool accessDuringInitializat
 	if(m_printProbePositions){
 	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (1,1)   = " <<element->globalPosition(Amg::Vector2D(1,1)).perp() << "," << element->globalPosition(Amg::Vector2D(1,1)).phi() <<","<< element->globalPosition(Amg::Vector2D(1,1)).z());
 	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (-1,-1) = " <<element->globalPosition(Amg::Vector2D(-1,-1)).perp() << "," << element->globalPosition(Amg::Vector2D(-1,-1)).phi() <<","<< element->globalPosition(Amg::Vector2D(-1,-1)).z());
+	  ATH_MSG_ALWAYS(" global (r,phi,z) hit position of (1,1,0)    = " <<element->globalPositionHit(Amg::Vector3D(1,1,0)).perp() << "," << element->globalPositionHit(Amg::Vector3D(1,1,0)).phi() <<","<< element->globalPositionHit(Amg::Vector3D(1,1,0)).z());
+	  ATH_MSG_ALWAYS(" global (r,phi,z) hit  position of (-1,-1,0) = " <<element->globalPositionHit(Amg::Vector3D(-1,-1,0)).perp() << "," << element->globalPositionHit(Amg::Vector3D(-1,-1,0)).phi() <<","<< element->globalPositionHit(Amg::Vector3D(-1,-1,0)).z()); 
 	}
         ATH_MSG_ALWAYS(" sin(tilt), sin(stereo) = " <<  element->sinTilt() << " " 
                        << element->sinStereo());
-- 
GitLab


From 9ba53eecda9984def9bcbaf5f9236486dcdbe4eb Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Thu, 5 Nov 2020 13:42:57 +0100
Subject: [PATCH 003/308] fix message alignment

---
 .../InDetDetDescrExample/src/ReadSiDetectorElements.cxx       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
index 9adf80bdef88..02f87a3cce5d 100755
--- a/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
+++ b/InnerDetector/InDetExample/InDetDetDescrExample/src/ReadSiDetectorElements.cxx
@@ -154,8 +154,8 @@ void ReadSiDetectorElements::printAllElements(const bool accessDuringInitializat
         ATH_MSG_ALWAYS(" center (x,y,z)   = " << element->center().x() << "," << element->center().y() << "," << element->center().z());
 	ATH_MSG_ALWAYS(" center (r,phi,z) = " << element->center().perp() << "," << element->center().phi() << "," <<element->center().z());
 	if(m_printProbePositions){
-	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (1,1)   = " <<element->globalPosition(Amg::Vector2D(1,1)).perp() << "," << element->globalPosition(Amg::Vector2D(1,1)).phi() <<","<< element->globalPosition(Amg::Vector2D(1,1)).z());
-	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (-1,-1) = " <<element->globalPosition(Amg::Vector2D(-1,-1)).perp() << "," << element->globalPosition(Amg::Vector2D(-1,-1)).phi() <<","<< element->globalPosition(Amg::Vector2D(-1,-1)).z());
+	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (1,1)          = " <<element->globalPosition(Amg::Vector2D(1,1)).perp() << "," << element->globalPosition(Amg::Vector2D(1,1)).phi() <<","<< element->globalPosition(Amg::Vector2D(1,1)).z());
+	  ATH_MSG_ALWAYS(" global (r,phi,z) position of (-1,-1)        = " <<element->globalPosition(Amg::Vector2D(-1,-1)).perp() << "," << element->globalPosition(Amg::Vector2D(-1,-1)).phi() <<","<< element->globalPosition(Amg::Vector2D(-1,-1)).z());
 	  ATH_MSG_ALWAYS(" global (r,phi,z) hit position of (1,1,0)    = " <<element->globalPositionHit(Amg::Vector3D(1,1,0)).perp() << "," << element->globalPositionHit(Amg::Vector3D(1,1,0)).phi() <<","<< element->globalPositionHit(Amg::Vector3D(1,1,0)).z());
 	  ATH_MSG_ALWAYS(" global (r,phi,z) hit  position of (-1,-1,0) = " <<element->globalPositionHit(Amg::Vector3D(-1,-1,0)).perp() << "," << element->globalPositionHit(Amg::Vector3D(-1,-1,0)).phi() <<","<< element->globalPositionHit(Amg::Vector3D(-1,-1,0)).z()); 
 	}
-- 
GitLab


From 7ab4e683d8571615e3f07022e76f353194890259 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Fri, 13 Nov 2020 10:46:04 +0100
Subject: [PATCH 004/308] Update MC16 pre-mixing tests

---
 .../test_Digi_tf_mc16a_premixing_for_MT.sh    | 83 +++++++++++++++++++
 .../test/test_Digi_tf_mc16a_qballs.sh         |  2 +-
 .../test/test_Digi_tf_mc16a_ttbar.sh          |  2 +-
 .../test/test_Digi_tf_mc16d_premixing.sh      |  2 +-
 .../test_Digi_tf_mc16d_premixing_for_MT.sh    |  7 +-
 .../test/test_Digi_tf_mc16d_ttbar.sh          |  2 +-
 .../test_Digi_tf_mc16e_premixing_for_MT.sh    | 83 +++++++++++++++++++
 .../test/test_Digi_tf_mc16e_ttbar.sh          |  8 +-
 8 files changed, 178 insertions(+), 11 deletions(-)
 create mode 100755 Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_premixing_for_MT.sh
 create mode 100755 Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_premixing_for_MT.sh

diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_premixing_for_MT.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_premixing_for_MT.sh
new file mode 100755
index 000000000000..269a9f584656
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_premixing_for_MT.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# art-description: Run MC16a pile-up pre-mixing with 2016a geometry and conditions, 25ns pile-up, MT output containers
+# art-type: grid
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+# art-output: mc16a_premixing_MT.RDO.pool.root
+
+DigiOutFileName="mc16a_premixing_MT.RDO.pool.root"
+
+HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*"
+LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*"
+
+
+Digi_tf.py \
+--PileUpPremixing True \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc16_valid.422075.ParticleGun_single_nu_Pt50.simul.HITS.e6739_e5984_s3126.HITS.14436922._003949.pool.root \
+--conditionsTag default:OFLCOND-MC16-SDR-16 \
+--digiSeedOffset1 170 --digiSeedOffset2 170 \
+--geometryVersion default:ATLAS-R2-2016-01-00-01 \
+--inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \
+--inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \
+--jobNumber 1 \
+--maxEvents 25 \
+--numberOfCavernBkg 0 \
+--numberOfHighPtMinBias 0.116075313 \
+--numberOfLowPtMinBias 44.3839246425 \
+--outputRDOFile ${DigiOutFileName} \
+--digiSteeringConf "StandardSignalOnlyTruth" \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postInclude 'default:PyJobTransforms/UseFrontier.py' \
+--pileupFinalBunch 6 \
+--preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' \
+'all:from Digitization.DigitizationFlags import digitizationFlags; digitizationFlags.experimentalDigi += ["OverlayMT"];' \
+--preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configEvtNbr_sequential.py,RunDependentSimData/configLumi_run284500_mc16a.py' \
+--skipEvents 0
+
+rc=$?
+echo  "art-result: $rc Digi_tf.py"
+rc1=-9999
+rc2=-9999
+rc3=-9999
+rc4=-9999
+
+# get reference directory
+source DigitizationCheckReferenceLocation.sh
+echo "Reference set being used: " ${DigitizationTestsVersion}
+
+if [ $rc -eq 0 ]
+then
+    # Do reference comparisons
+    art-diff.py ./$DigiOutFileName   /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ReferenceFiles/$DigitizationTestsVersion/$CMTCONFIG/$DigiOutFileName
+    rc1=$?
+fi
+echo  "art-result: $rc1 diff-pool"
+#
+#
+#
+if [ $rc -eq 0 ]
+then
+    art-diff.py ./$DigiOutFileName /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ReferenceFiles/$DigitizationTestsVersion/$CMTCONFIG/$DigiOutFileName --diff-type=diff-root --mode=semi-detailed
+    rc2=$?
+fi
+echo  "art-result: $rc2 diff-root"
+#
+if [ $rc -eq 0 ]
+then
+    checkFile ./$DigiOutFileName
+    rc3=$?
+fi
+echo "art-result: $rc3 checkFile"
+#
+#
+if [ $rc -eq 0 ]
+then
+    ArtPackage=$1
+    ArtJobName=$2
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed
+    rc4=$?
+fi
+echo  "art-result: $rc4 art-compare"
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_qballs.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_qballs.sh
index 4ce7e8140e04..b7d013eceaae 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_qballs.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_qballs.sh
@@ -29,7 +29,7 @@ Digi_tf.py \
 --numberOfLowPtMinBias 44.3839246425 \
 --outputRDOFile ${DigiOutFileName} \
 --digiSteeringConf "StandardSignalOnlyTruth" \
---postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --pileupFinalBunch 6 \
 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' \
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh
index e92b2a25b869..351a34c1420a 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16a_ttbar.sh
@@ -28,7 +28,7 @@ Digi_tf.py \
 --numberOfLowPtMinBias 44.3839246425 \
 --outputRDOFile ${DigiOutFileName} \
 --digiSteeringConf "StandardSignalOnlyTruth" \
---postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --pileupFinalBunch 6 \
 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' \
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing.sh
index d4648addc8a0..59838eb37dda 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing.sh
@@ -29,7 +29,7 @@ Digi_tf.py \
 --numberOfLowPtMinBias 80.290021063135 \
 --outputRDOFile ${DigiOutFileName} \
 --digiSteeringConf "StandardSignalOnlyTruth" \
---postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --pileupFinalBunch 6 \
 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' \
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing_for_MT.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing_for_MT.sh
index 9ba3b977fb5a..4d176802cfe3 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing_for_MT.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_premixing_for_MT.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# art-description: Run MC16 pile-up pre-mixing with 2016d geometry and conditions, 25ns pile-up, MT output containers
+# art-description: Run MC16d pile-up pre-mixing with 2016d geometry and conditions, 25ns pile-up, MT output containers
 # art-type: grid
 # art-include: 21.0/Athena
 # art-include: 21.3/Athena
@@ -29,10 +29,11 @@ Digi_tf.py \
 --numberOfLowPtMinBias 80.290021063135 \
 --outputRDOFile ${DigiOutFileName} \
 --digiSteeringConf "StandardSignalOnlyTruth" \
---postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --pileupFinalBunch 6 \
---preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' 'all:from Digitization.DigitizationFlags import digitizationFlags; digitizationFlags.experimentalDigi += ["OverlayMT"];' \
+--preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' \
+'all:from Digitization.DigitizationFlags import digitizationFlags; digitizationFlags.experimentalDigi += ["OverlayMT"];' \
 --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configEvtNbr_sequential.py,RunDependentSimData/configLumi_run300000_mc16d.py' \
 --skipEvents 0
 
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh
index 81c05acab1a2..a3177a680713 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16d_ttbar.sh
@@ -34,7 +34,7 @@ Digi_tf.py \
 --numberOfLowPtMinBias 80.290021063135 \
 --outputRDOFile ${DigiOutFileName} \
 --digiSteeringConf "StandardSignalOnlyTruth" \
---postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --pileupFinalBunch 6 \
 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' \
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_premixing_for_MT.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_premixing_for_MT.sh
new file mode 100755
index 000000000000..f11cf9391b6e
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_premixing_for_MT.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# art-description: Run MC16e pile-up pre-mixing with 2018 geometry and conditions, 25ns pile-up, MT output containers
+# art-type: grid
+# art-include: 21.0/Athena
+# art-include: 21.3/Athena
+# art-include: 21.9/Athena
+# art-include: master/Athena
+# art-output: mc16e_premixing_MT.RDO.pool.root
+
+DigiOutFileName="mc16e_premixing_MT.RDO.pool.root"
+
+HighPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*"
+LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/*"
+
+
+Digi_tf.py \
+--PileUpPremixing True \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc16_valid.422075.ParticleGun_single_nu_Pt50.simul.HITS.e6739_e5984_s3126.HITS.14436922._003949.pool.root \
+--conditionsTag default:OFLCOND-MC16-SDR-25 \
+--digiSeedOffset1 170 --digiSeedOffset2 170 \
+--geometryVersion default:ATLAS-R2-2016-01-00-01 \
+--inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \
+--inputLowPtMinbiasHitsFile ${LowPtMinbiasHitsFiles} \
+--jobNumber 1 \
+--maxEvents 25 \
+--numberOfCavernBkg 0 \
+--numberOfHighPtMinBias 0.2595392 \
+--numberOfLowPtMinBias 99.2404608 \
+--outputRDOFile ${DigiOutFileName} \
+--digiSteeringConf "StandardSignalOnlyTruth" \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postInclude 'default:PyJobTransforms/UseFrontier.py' \
+--pileupFinalBunch 6 \
+--preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' \
+'all:from Digitization.DigitizationFlags import digitizationFlags; digitizationFlags.experimentalDigi += ["OverlayMT"];' \
+--preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configEvtNbr_sequential.py,RunDependentSimData/configLumi_run310000.py' \
+--skipEvents 0
+
+rc=$?
+echo  "art-result: $rc Digi_tf.py"
+rc1=-9999
+rc2=-9999
+rc3=-9999
+rc4=-9999
+
+# get reference directory
+source DigitizationCheckReferenceLocation.sh
+echo "Reference set being used: " ${DigitizationTestsVersion}
+
+if [ $rc -eq 0 ]
+then
+    # Do reference comparisons
+    art-diff.py ./$DigiOutFileName   /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ReferenceFiles/$DigitizationTestsVersion/$CMTCONFIG/$DigiOutFileName
+    rc1=$?
+fi
+echo  "art-result: $rc1 diff-pool"
+#
+#
+#
+if [ $rc -eq 0 ]
+then
+    art-diff.py ./$DigiOutFileName /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ReferenceFiles/$DigitizationTestsVersion/$CMTCONFIG/$DigiOutFileName --diff-type=diff-root --mode=semi-detailed
+    rc2=$?
+fi
+echo  "art-result: $rc2 diff-root"
+#
+if [ $rc -eq 0 ]
+then
+    checkFile ./$DigiOutFileName
+    rc3=$?
+fi
+echo "art-result: $rc3 checkFile"
+#
+#
+if [ $rc -eq 0 ]
+then
+    ArtPackage=$1
+    ArtJobName=$2
+    art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --mode=semi-detailed
+    rc4=$?
+fi
+echo  "art-result: $rc4 art-compare"
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh
index 7f7edce02f2f..c81dbbded476 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc16e_ttbar.sh
@@ -22,7 +22,7 @@ LowPtMinbiasHitsFiles="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0Ch
 
 Digi_tf.py \
 --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
---conditionsTag default:OFLCOND-MC16-SDR-20 \
+--conditionsTag default:OFLCOND-MC16-SDR-25 \
 --digiSeedOffset1 170 --digiSeedOffset2 170 \
 --geometryVersion default:ATLAS-R2-2016-01-00-01 \
 --inputHighPtMinbiasHitsFile ${HighPtMinbiasHitsFiles} \
@@ -30,11 +30,11 @@ Digi_tf.py \
 --jobNumber 568 \
 --maxEvents 25 \
 --numberOfCavernBkg 0 \
---numberOfHighPtMinBias 0.2099789464 \
---numberOfLowPtMinBias 80.290021063135 \
+--numberOfHighPtMinBias 0.2595392 \
+--numberOfLowPtMinBias 99.2404608 \
 --outputRDOFile ${DigiOutFileName} \
 --digiSteeringConf "StandardSignalOnlyTruth" \
---postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
+--postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:condSeq.LArAutoCorrTotalCondAlg.deltaBunch=1' \
 --postInclude 'default:PyJobTransforms/UseFrontier.py' \
 --pileupFinalBunch 6 \
 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' \
-- 
GitLab


From 9ac17e2340157ab5046fca9cdcea486f595f6472 Mon Sep 17 00:00:00 2001
From: Ke Li <ke.li@cern.ch>
Date: Sun, 6 Dec 2020 19:38:37 +0100
Subject: [PATCH 005/308] add ID ART tests for data at 15, 16, 17 and 18

---
 .../test/test_data15_13TeV_1000evt.sh         | 74 +++++++++++++++++++
 .../test/test_data16_13TeV_1000evt.sh         | 74 +++++++++++++++++++
 .../test/test_data17_13TeV_1000evt.sh         | 73 ++++++++++++++++++
 .../test/test_data18_13TeV_1000evt.sh         | 73 ++++++++++++++++++
 4 files changed, 294 insertions(+)
 create mode 100755 InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data15_13TeV_1000evt.sh
 create mode 100755 InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data16_13TeV_1000evt.sh
 create mode 100755 InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data17_13TeV_1000evt.sh
 create mode 100755 InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data18_13TeV_1000evt.sh

diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data15_13TeV_1000evt.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data15_13TeV_1000evt.sh
new file mode 100755
index 000000000000..eb170383a419
--- /dev/null
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data15_13TeV_1000evt.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+# art-description: Standard test for 2015 data
+# art-type: grid
+# art-include: master/Athena
+# art-output: physval*.root
+# art-output: *.xml
+# art-output: dcube*
+
+# Fix ordering of output in logfile
+exec 2>&1
+run() { (set -x; exec "$@") }
+
+
+lastref_dir=last_results
+artdata=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art
+inputBS=${artdata}/RecJobTransformTests/data15_13TeV.00283429.physics_Main.daq.RAW._lb0154._SFO-1._0001.data 
+dcubeXml="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/dcube/config/IDPVMPlots_R22.xml"
+dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/ReferenceHistograms/physval_data15_1000evt_reco_r22.root"
+
+# Reco step based on test InDetPhysValMonitoring ART setup from Josh Moss.
+
+run  Reco_tf.py \
+  --inputBSFile "$inputBS" \
+  --maxEvents 1000 \
+  --autoConfiguration everything \
+  --conditionsTag="CONDBR2-BLKPA-2016-14" \
+  --outputAODFile   physval.AOD.root \
+  --outputNTUP_PHYSVALFile physval.ntuple.root \
+  --steering        doRAWtoALL \
+  --checkEventCount False \
+  --ignoreErrors    True \
+  --valid           True \
+  --validationFlags doInDet \
+  --preExec 'from InDetRecExample.InDetJobProperties import InDetFlags; \
+  InDetFlags.doSlimming.set_Value_and_Lock(False); rec.doTrigger.set_Value_and_Lock(False); \
+  from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; \
+  InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
+  InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
+  rec.doDumpProperties=True; rec.doCalo=True; rec.doEgamma=True; \
+  rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=True; \
+  rec.doLArg=True; rec.doLucid=True; rec.doMuon=True; rec.doMuonCombined=True; \
+  rec.doSemiDetailedPerfMon=True; rec.doTau=True; rec.doTile=True; \
+  from ParticleBuilderOptions.AODFlags import AODFlags; \
+  AODFlags.ThinGeantTruth.set_Value_and_Lock(False);  \
+  AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
+  AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
+  AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
+rec_tf_exit_code=$?
+echo "art-result: $rec_tf_exit_code reco"
+
+if [ $rec_tf_exit_code -eq 0 ]  ;then
+  echo "download latest result"
+  run art.py download --user=artprod --dst="$lastref_dir" "$ArtPackage" "$ArtJobName"
+  run ls -la "$lastref_dir"
+
+  echo "compare with R22 with nightly build at 2020-12-05"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube \
+    -c ${dcubeXml} \
+    -r ${dcubeRef} \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+  
+  echo "compare with last build"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube_last \
+    -c ${dcubeXml} \
+    -r ${lastref_dir}/physval.ntuple.root \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+fi
+
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data16_13TeV_1000evt.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data16_13TeV_1000evt.sh
new file mode 100755
index 000000000000..3efe0fede1c4
--- /dev/null
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data16_13TeV_1000evt.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+# art-description: Standard test for 2016 data
+# art-type: grid
+# art-include: master/Athena
+# art-output: physval*.root
+# art-output: *.xml
+# art-output: dcube*
+
+# Fix ordering of output in logfile
+exec 2>&1
+run() { (set -x; exec "$@") }
+
+
+lastref_dir=last_results
+artdata=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art
+inputBS=${artdata}/RecJobTransformTests/data16_13TeV.00310809.physics_Main.daq.RAW._lb1219._SFO-2._0001.data 
+dcubeXml="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/dcube/config/IDPVMPlots_R22.xml"
+dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/ReferenceHistograms/physval_data16_1000evt_reco_r22.root"
+
+# Reco step based on test InDetPhysValMonitoring ART setup from Josh Moss.
+
+run  Reco_tf.py \
+  --inputBSFile "$inputBS" \
+  --maxEvents 1000 \
+  --autoConfiguration everything \
+  --conditionsTag="CONDBR2-BLKPA-2016-19" \
+  --outputAODFile   physval.AOD.root \
+  --outputNTUP_PHYSVALFile physval.ntuple.root \
+  --steering        doRAWtoALL \
+  --checkEventCount False \
+  --ignoreErrors    True \
+  --valid           True \
+  --validationFlags doInDet \
+  --preExec 'from InDetRecExample.InDetJobProperties import InDetFlags; \
+  InDetFlags.doSlimming.set_Value_and_Lock(False); rec.doTrigger.set_Value_and_Lock(False); \
+  from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; \
+  InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
+  InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
+  rec.doDumpProperties=True; rec.doCalo=True; rec.doEgamma=True; \
+  rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=True; \
+  rec.doLArg=True; rec.doLucid=True; rec.doMuon=True; rec.doMuonCombined=True; \
+  rec.doSemiDetailedPerfMon=True; rec.doTau=True; rec.doTile=True; \
+  from ParticleBuilderOptions.AODFlags import AODFlags; \
+  AODFlags.ThinGeantTruth.set_Value_and_Lock(False);  \
+  AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
+  AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
+  AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
+rec_tf_exit_code=$?
+echo "art-result: $rec_tf_exit_code reco"
+
+if [ $rec_tf_exit_code -eq 0 ]  ;then
+  echo "download latest result"
+  run art.py download --user=artprod --dst="$lastref_dir" "$ArtPackage" "$ArtJobName"
+  run ls -la "$lastref_dir"
+
+  echo "compare with R22 with nightly build at 2020-12-05"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube \
+    -c ${dcubeXml} \
+    -r ${dcubeRef} \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+  
+  echo "compare with last build"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube_last \
+    -c ${dcubeXml} \
+    -r ${lastref_dir}/physval.ntuple.root \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+fi
+
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data17_13TeV_1000evt.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data17_13TeV_1000evt.sh
new file mode 100755
index 000000000000..679554938cd5
--- /dev/null
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data17_13TeV_1000evt.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+# art-description: Standard test for 2017 data
+# art-type: grid
+# art-include: master/Athena
+# art-output: physval*.root
+# art-output: *.xml
+# art-output: dcube*
+
+# Fix ordering of output in logfile
+exec 2>&1
+run() { (set -x; exec "$@") }
+
+
+lastref_dir=last_results
+artdata=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art
+inputBS=${artdata}/RecJobTransformTests/data17_13TeV.00324910.physics_Main.daq.RAW._lb0713._SFO-6._0001.data 
+dcubeXml="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/dcube/config/IDPVMPlots_R22.xml"
+dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/ReferenceHistograms/physval_data17_1000evt_reco_r22.root"
+
+# Reco step based on test InDetPhysValMonitoring ART setup from Josh Moss.
+
+run  Reco_tf.py \
+  --inputBSFile "$inputBS" \
+  --maxEvents 1000 \
+  --AMI=f1088 \
+  --outputAODFile   physval.AOD.root \
+  --outputNTUP_PHYSVALFile physval.ntuple.root \
+  --steering        doRAWtoALL \
+  --checkEventCount False \
+  --ignoreErrors    True \
+  --valid           True \
+  --validationFlags doInDet \
+  --preExec 'from InDetRecExample.InDetJobProperties import InDetFlags; \
+  InDetFlags.doSlimming.set_Value_and_Lock(False); rec.doTrigger.set_Value_and_Lock(False); \
+  from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; \
+  InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
+  InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
+  rec.doDumpProperties=True; rec.doCalo=True; rec.doEgamma=True; \
+  rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=True; \
+  rec.doLArg=True; rec.doLucid=True; rec.doMuon=True; rec.doMuonCombined=True; \
+  rec.doSemiDetailedPerfMon=True; rec.doTau=True; rec.doTile=True; \
+  from ParticleBuilderOptions.AODFlags import AODFlags; \
+  AODFlags.ThinGeantTruth.set_Value_and_Lock(False);  \
+  AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
+  AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
+  AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
+rec_tf_exit_code=$?
+echo "art-result: $rec_tf_exit_code reco"
+
+if [ $rec_tf_exit_code -eq 0 ]  ;then
+  echo "download latest result"
+  run art.py download --user=artprod --dst="$lastref_dir" "$ArtPackage" "$ArtJobName"
+  run ls -la "$lastref_dir"
+
+  echo "compare with R22 with nightly build at 2020-12-05"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube \
+    -c ${dcubeXml} \
+    -r ${dcubeRef} \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+  
+  echo "compare with last build"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube_last \
+    -c ${dcubeXml} \
+    -r ${lastref_dir}/physval.ntuple.root \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+fi
+
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data18_13TeV_1000evt.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data18_13TeV_1000evt.sh
new file mode 100755
index 000000000000..9decc003c2f3
--- /dev/null
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_data18_13TeV_1000evt.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+# art-description: Standard test for 2018 data
+# art-type: grid
+# art-include: master/Athena
+# art-output: physval*.root
+# art-output: *.xml
+# art-output: dcube*
+
+# Fix ordering of output in logfile
+exec 2>&1
+run() { (set -x; exec "$@") }
+
+
+lastref_dir=last_results
+artdata=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art
+inputBS=${artdata}/RecJobTransformTests/data18_13TeV/data18_13TeV.00348885.physics_Main.daq.RAW._lb0827._SFO-8._0002.data 
+dcubeXml="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/dcube/config/IDPVMPlots_R22.xml"
+dcubeRef="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/ReferenceHistograms/physval_data18_1000evt_reco_r22.root"
+
+# Reco step based on test InDetPhysValMonitoring ART setup from Josh Moss.
+
+run  Reco_tf.py \
+  --inputBSFile "$inputBS" \
+  --maxEvents 1000 \
+  --AMI=f1089 \
+  --outputAODFile   physval.AOD.root \
+  --outputNTUP_PHYSVALFile physval.ntuple.root \
+  --steering        doRAWtoALL \
+  --checkEventCount False \
+  --ignoreErrors    True \
+  --valid           True \
+  --validationFlags doInDet \
+  --preExec 'from InDetRecExample.InDetJobProperties import InDetFlags; \
+  InDetFlags.doSlimming.set_Value_and_Lock(False); rec.doTrigger.set_Value_and_Lock(False); \
+  from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; \
+  InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
+  InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
+  rec.doDumpProperties=True; rec.doCalo=True; rec.doEgamma=True; \
+  rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=True; \
+  rec.doLArg=True; rec.doLucid=True; rec.doMuon=True; rec.doMuonCombined=True; \
+  rec.doSemiDetailedPerfMon=True; rec.doTau=True; rec.doTile=True; \
+  from ParticleBuilderOptions.AODFlags import AODFlags; \
+  AODFlags.ThinGeantTruth.set_Value_and_Lock(False);  \
+  AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
+  AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
+  AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
+rec_tf_exit_code=$?
+echo "art-result: $rec_tf_exit_code reco"
+
+if [ $rec_tf_exit_code -eq 0 ]  ;then
+  echo "download latest result"
+  run art.py download --user=artprod --dst="$lastref_dir" "$ArtPackage" "$ArtJobName"
+  run ls -la "$lastref_dir"
+
+  echo "compare with R22 with nightly build at 2020-12-05"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube \
+    -c ${dcubeXml} \
+    -r ${dcubeRef} \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+  
+  echo "compare with last build"
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+    -p -x dcube_last \
+    -c ${dcubeXml} \
+    -r ${lastref_dir}/physval.ntuple.root \
+    physval.ntuple.root
+  echo "art-result: $? plots"
+fi
+
-- 
GitLab


From ea3ae9ac427891cb2cd32442d620dcdabb241399 Mon Sep 17 00:00:00 2001
From: David Shope <david.richard.shope@cern.ch>
Date: Tue, 8 Dec 2020 22:18:36 +0100
Subject: [PATCH 006/308] Add diagonal elements of track covariance matrix to
 smart slimming list

---
 .../python/InDetTrackParticlesCPContent.py                      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
index ecb463322a02..55b9bc2b90e4 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
@@ -2,5 +2,5 @@
 
 InDetTrackParticlesCPContent = [
 "InDetTrackParticles",
-"InDetTrackParticlesAux.phi.theta.qOverP.chiSquared.numberDoF.numberOfInnermostPixelLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors"
+"InDetTrackParticlesAux.phi.theta.qOverP.chiSquared.numberDoF.numberOfInnermostPixelLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors.definingParametersCovMatrixDiag"
 ]
-- 
GitLab


From 3747e1c9e93f9f4d59a61b45487c4f8c2720ee44 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Mon, 7 Dec 2020 19:19:30 +0100
Subject: [PATCH 007/308] PyJobTransforms: Fix input/output file parsing from
 AMI

---
 Tools/PyJobTransforms/python/trfAMI.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/Tools/PyJobTransforms/python/trfAMI.py b/Tools/PyJobTransforms/python/trfAMI.py
index 2c3fd4044963..de453eac1a75 100644
--- a/Tools/PyJobTransforms/python/trfAMI.py
+++ b/Tools/PyJobTransforms/python/trfAMI.py
@@ -356,13 +356,11 @@ def getTrfConfigFromPANDA(tag):
             if arg.lstrip('-').startswith('input') and arg.endswith('File'):
                 value=physics.pop(arg)
                 msg.debug("Found input file argument %s=%s.", arg, value ) 
-                fmt=arg.lstrip('-').replace('input','').replace('File','')
-                trf.inFiles[arg]=getInputFileName(arg)
+                trf.inFiles[arg]=value
             elif arg.lstrip('-').startswith('output') and arg.endswith('File'):
                 value=physics.pop(arg)
                 msg.debug("Found output file argument %s=%s.", arg, value )
-                fmt=arg.lstrip('-').replace('output','').replace('File','')
-                trf.outFiles[arg]=getOutputFileName(fmt)
+                trf.outFiles[arg]=value
 
         msg.debug("Checking for not set arguments...")
         for arg,value in listitems(physics):
@@ -490,13 +488,11 @@ def getTrfConfigFromAMI(tag, suppressNonJobOptions = True):
                 if arg.lstrip('-').startswith('input') and arg.endswith('File'):
                     value = physics.pop(arg)
                     msg.debug("Found input file argument %s=%s.", arg, value)
-                    fmt = arg.lstrip('-').replace('input', '').replace('File', '')
-                    trf.inFiles[arg] = getInputFileName(arg)
+                    trf.inFiles[arg] = value
                 elif arg.lstrip('-').startswith('output') and arg.endswith('File'):
                     value = physics.pop(arg)
                     msg.debug("Found output file argument %s=%s.", arg, value)
-                    fmt = arg.lstrip('-').replace('output', '').replace('File', '')
-                    trf.outFiles[arg] = getOutputFileName(fmt)
+                    trf.outFiles[arg] = value
 
             msg.debug("Checking for not set arguments...")
             for arg, value in listitems(physics):
-- 
GitLab


From d255b0e579bc09846710d23efdfc7ef4da1abba4 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 9 Dec 2020 13:38:42 +0100
Subject: [PATCH 008/308] PyJobTransforms: Ignore custom inputs/outputs flags
 from AMI as they can be useful for tests

---
 Tools/PyJobTransforms/python/trfAMI.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tools/PyJobTransforms/python/trfAMI.py b/Tools/PyJobTransforms/python/trfAMI.py
index de453eac1a75..8cbf661b2c92 100644
--- a/Tools/PyJobTransforms/python/trfAMI.py
+++ b/Tools/PyJobTransforms/python/trfAMI.py
@@ -469,7 +469,7 @@ def getTrfConfigFromAMI(tag, suppressNonJobOptions = True):
 
             if suppressNonJobOptions:
                 for k in list(physics):
-                    if k in ['productionStep', 'transformation', 'SWReleaseCache']:
+                    if k in ['inputs', 'outputs', 'productionStep', 'transformation', 'SWReleaseCache']:
                         physics.pop(k)
 
             for k, v in iteritems(physics):
-- 
GitLab


From e81f6e6efe6d977be3fcafca2934cbe61a8657aa Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Wed, 9 Dec 2020 16:38:20 +0100
Subject: [PATCH 009/308] change

---
 .../src/PixelConfigCondAlg.cxx                | 12 ++++++++
 .../src/PixelConfigCondAlg.h                  | 30 +++++++++++++++++++
 .../PixelConditionsData/PixelModuleData.h     |  8 +++++
 .../src/PixelModuleData.cxx                   | 10 +++++++
 .../src/PixelSiLorentzAngleCondAlg.cxx        | 20 +++++++++----
 .../src/PixelSiLorentzAngleCondAlg.h          |  6 +++-
 .../src/SensorSimPlanarTool.cxx               |  2 +-
 7 files changed, 81 insertions(+), 7 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx
index 6a8c82ca2f37..7555c3427d9d 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx
@@ -177,6 +177,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalkRUN1);
     writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancyRUN1);
     writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbabilityRUN1);
+    writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorrRUN1);
 
     writeCdo -> setEndcapToTThreshold(m_EndcapToTThresholdRUN1);
     writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatencyRUN1);
@@ -186,6 +187,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalkRUN1);
     writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancyRUN1);
     writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbabilityRUN1);
+    writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorrRUN1);
 
     // This is ad-hoc solution.
     for (size_t i=0; i<m_BLayerNoiseShapeRUN1.size(); i++) { writeCdo->setBarrelNoiseShape(0,m_BLayerNoiseShapeRUN1[i]); }
@@ -206,6 +208,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2016);
     writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2016);
     writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2016);
+    writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2016);
 
     writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2016);
     writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2016);
@@ -215,6 +218,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2016);
     writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2016);
     writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2016);
+    writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2016);
 
     writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2016);
     writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2016);
@@ -250,11 +254,13 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalkITK);
     writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancyITK);
     writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbabilityITK);
+    writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorrITK);
 
     writeCdo -> setEndcapToTThreshold(m_EndcapToTThresholdITK);
     writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalkITK);
     writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancyITK);
     writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbabilityITK);
+    writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorrITK);
 
     // This is ad-hoc solution.
     for (size_t i=0; i<m_InnermostNoiseShapeITK.size(); i++)     { writeCdo->setBarrelNoiseShape(0,m_InnermostNoiseShapeITK[i]); }
@@ -276,6 +282,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2016);
     writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2016);
     writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2016);
+    writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2016);
 
     writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2016);
     writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2016);
@@ -285,6 +292,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2016);
     writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2016);
     writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2016);
+    writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2016);
 
     writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2016);
     writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2016);
@@ -315,6 +323,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2017);
     writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2017);
     writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2017);
+    writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2017);
 
     writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2017);
     writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2017);
@@ -324,6 +333,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2017);
     writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2017);
     writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2017);
+    writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2017);
 
     writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2017);
     writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2017);
@@ -354,6 +364,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setBarrelCrossTalk(m_BarrelCrossTalk2018);
     writeCdo -> setBarrelNoiseOccupancy(m_BarrelNoiseOccupancy2018);
     writeCdo -> setBarrelDisableProbability(m_BarrelDisableProbability2018);
+    writeCdo -> setBarrelLorentzAngleCorr(m_BarrelLorentzAngleCorr2018);
 
     writeCdo -> setEndcapToTThreshold(m_EndcapToTThreshold2018);
     writeCdo -> setFEI3EndcapLatency(m_FEI3EndcapLatency2018);
@@ -363,6 +374,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     writeCdo -> setEndcapCrossTalk(m_EndcapCrossTalk2018);
     writeCdo -> setEndcapNoiseOccupancy(m_EndcapNoiseOccupancy2018);
     writeCdo -> setEndcapDisableProbability(m_EndcapDisableProbability2018);
+    writeCdo -> setEndcapLorentzAngleCorr(m_EndcapLorentzAngleCorr2018);
 
     writeCdo -> setDBMToTThreshold(m_DBMToTThreshold2018);
     writeCdo -> setDBMCrossTalk(m_DBMCrossTalk2018);
diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h
index 2f22aa8a4a8f..a833f65d8ad6 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h
@@ -170,6 +170,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_BarrelDisableProbability2016
     {this, "BarrelDisableProbability2016", {9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in 2015/2016"};
 
+    Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorr2016
+    {this, "BarrelLorentzAngleCorr2016", {1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in 2015/2016"};
+
 // So far, Gaudi::Property does not support 2D vector.
 //    Gaudi::Property<std::vector<std::vector<float>>> m_BarrelNoiseShape2016
 //    {this, "BarrelNoiseShape", {{0.0,1.0},{0.0,1.0},{0.0,1.0},{0.0,1.0}}, "Noise shape of barrel pixel layers"};
@@ -209,6 +212,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_EndcapDisableProbability2016
     {this, "EndcapDisableProbability2016", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in 2015/2016"};
 
+    Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorr2016
+    {this, "EndcapLorentzAngleCorr2016", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in 2015/2016"};
+
     // DBM RUN2 2015/2016
     Gaudi::Property<std::vector<int>> m_DBMToTThreshold2016
     {this, "DBMToTThreshold2016", {-1,-1,-1}, "ToT thresholds for DBM layers in 2015/2016"};
@@ -248,6 +254,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_BarrelDisableProbability2017
     {this, "BarrelDisableProbability2017", {9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in 2017"};
 
+    Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorr2017
+    {this, "BarrelLorentzAngleCorr2017", {1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in 2017"};
+
     // This is ad-hoc solution.
     Gaudi::Property<std::vector<float>> m_IBLNoiseShape2017
     {this, "IBLNoiseShape2017", {0.0,1.0}, "Noise shape for IBL in 2017"};
@@ -283,6 +292,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_EndcapDisableProbability2017
     {this, "EndcapDisableProbability2017", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in 2017"};
 
+    Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorr2017
+    {this, "EndcapLorentzAngleCorr2017", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in 2017"};
+
     // DBM RUN2 2017
     Gaudi::Property<std::vector<int>> m_DBMToTThreshold2017
     {this, "DBMToTThreshold2017", {-1,-1,-1}, "ToT thresholds for DBM layers in 2017"};
@@ -322,6 +334,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_BarrelDisableProbability2018
     {this, "BarrelDisableProbability2018", {9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in 2018"};
 
+    Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorr2018
+    {this, "BarrelLorentzAngleCorr2018", {1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in 2018"};
+
     // This is ad-hoc solution.
     Gaudi::Property<std::vector<float>> m_IBLNoiseShape2018
     {this, "IBLNoiseShape2018", {0.0,1.0}, "Noise shape for IBL in 2018"};
@@ -357,6 +372,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_EndcapDisableProbability2018
     {this, "EndcapDisableProbability2018", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in 2018"};
 
+    Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorr2018
+    {this, "EndcapLorentzAngleCorr2018", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in 2018"};
+
     // DBM RUN2 2018
     Gaudi::Property<std::vector<int>> m_DBMToTThreshold2018
     {this, "DBMToTThreshold2018", {-1,-1,-1}, "ToT thresholds for DBM layers in 2018"};
@@ -396,6 +414,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_BarrelDisableProbabilityRUN1
     {this, "BarrelDisableProbabilityRUN1", {9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in RUN1"};
 
+    Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorrRUN1
+    {this, "BarrelLorentzAngleCorrRUN1", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in RUN1"};
+
     // This is ad-hoc solution.
     Gaudi::Property<std::vector<float>> m_BLayerNoiseShapeRUN1
     {this, "BLayerNoiseShapeRUN1", {0.0,1.0}, "Noise shape for b-layer in RUN1"};
@@ -428,6 +449,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_EndcapDisableProbabilityRUN1
     {this, "EndcapDisableProbabilityRUN1", {9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in RUN1"};
 
+    Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorrRUN1
+    {this, "EndcapLorentzAngleCorrRUN1", {1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in RUN1"};
+
     //====================================================================================
     // Barrel ITK
     Gaudi::Property<std::vector<int>> m_BarrelToTThresholdITK
@@ -442,6 +466,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_BarrelDisableProbabilityITK
     {this, "BarrelDisableProbabilityITK", {9e-3,9e-3,9e-3,9e-3,9e-3}, "Disable probability of barrel pixel layers in ITK"};
 
+    Gaudi::Property<std::vector<double>> m_BarrelLorentzAngleCorrITK
+    {this, "BarrelLorentzAngleCorrITK", {1.0,1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of barrel pixel layers in ITK"};
+
     // This is ad-hoc solution.
     Gaudi::Property<std::vector<float>> m_InnermostNoiseShapeITK
     {this, "InnermostNoiseShapeITK", {0.0,1.0}, "Noise shape for IBL in ITK"};
@@ -465,6 +492,9 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     Gaudi::Property<std::vector<double>> m_EndcapDisableProbabilityITK
     {this, "EndcapDisableProbabilityITK", {9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3,9e-3}, "Disable probability of endcap pixel layers in ITK"};
 
+    Gaudi::Property<std::vector<double>> m_EndcapLorentzAngleCorrITK
+    {this, "EndcapLorentzAngleCorrITK", {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0}, "Scale factor for Lorentz angle of endcap pixel layers in ITK"};
+
     //====================================================================================
     // The following parameters are default values which will be overwritten by the one 
     // from the conditions DB. Otherwise the DB is not retrieved nor available, these 
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
index 06f32bd7addf..62c9f18125c9 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
@@ -136,6 +136,11 @@ class PixelModuleData {
     float getDefaultQ2TotE() const;
     float getDefaultQ2TotC() const;
 
+    // Lorentz angle correction
+    void setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr);
+    void setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr);
+    double getLorentzAngleCorr(const int bec, const int layer) const;
+
     // DCS parameters
     void setDefaultBiasVoltage(float biasVoltage);
     float getDefaultBiasVoltage() const;
@@ -258,6 +263,9 @@ class PixelModuleData {
     float m_paramE;
     float m_paramC;
 
+    std::vector<double> m_BarrelLorentzAngleCorr;
+    std::vector<double> m_EndcapLorentzAngleCorr;
+
     float m_biasVoltage;
     float m_temperature;
 
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
index 0877f64ae306..e68a927975af 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
@@ -280,6 +280,16 @@ float PixelModuleData::getDefaultQ2TotA() const { return m_paramA; }
 float PixelModuleData::getDefaultQ2TotE() const { return m_paramE; }
 float PixelModuleData::getDefaultQ2TotC() const { return m_paramC; }
 
+// Lorentz angle correction
+void PixelModuleData::setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr) { m_BarrelLorentzAngleCorr = BarrelLorentzAngleCorr; }
+void PixelModuleData::setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr) { m_EndcapLorentzAngleCorr = EndcapLorentzAngleCorr; }
+double PixelModuleData::getLorentzAngleCorr(const int bec, const int layer) const {
+  double LAcorr = 1.0;
+  if (std::abs(bec)==0 && layer<(int)m_BarrelLorentzAngleCorr.size()) { LAcorr=m_BarrelLorentzAngleCorr.at(layer); }
+  if (std::abs(bec)==2 && layer<(int)m_EndcapLorentzAngleCorr.size()) { LAcorr=m_EndcapLorentzAngleCorr.at(layer); }
+  return LAcorr;
+}
+
 // DCS parameters
 void PixelModuleData::setDefaultBiasVoltage(float biasVoltage) { m_biasVoltage=biasVoltage; }
 float PixelModuleData::getDefaultBiasVoltage() const { return m_biasVoltage; }
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index 5ad66b6dd641..e3fd0bba45b2 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -25,6 +25,7 @@ StatusCode PixelSiLorentzAngleCondAlg::initialize() {
 
   ATH_CHECK(m_condSvc.retrieve());
 
+  ATH_CHECK(m_moduleDataKey.initialize());
   ATH_CHECK(m_readKeyTemp.initialize());
   ATH_CHECK(m_readKeyHV.initialize());
   ATH_CHECK(m_writeKey.initialize());
@@ -56,6 +57,8 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     return StatusCode::SUCCESS;
   }
 
+  SG::ReadCondHandle<PixelModuleData>moduleData(m_moduleDataKey, ctx);
+
   // Read Cond Handle (temperature)
   SG::ReadCondHandle<PixelDCSTempData> readHandleTemp(m_readKeyTemp, ctx);
   const PixelDCSTempData* readCdoTemp(*readHandleTemp);
@@ -137,6 +140,13 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     }
 
     const InDetDD::PixelModuleDesign* p_design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design());
+
+    const PixelID* pixelId = static_cast<const PixelID *>(element->getIdHelper());
+    int barrel_ec   = pixelId->barrel_ec(element->identify());
+    int layerIndex  = pixelId->layer_disk(element->identify());
+
+    double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
+
     if (not p_design){
       ATH_MSG_FATAL("Dynamic cast to PixelModuleDesign* failed in PixelSiLorentzAngleCondAlg::execute");
       return StatusCode::FAILURE;
@@ -157,25 +167,25 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     // The hit depth axis is pointing from the readout side to the backside if  m_design->readoutSide() < 0
     // The hit depth axis is pointing from the backside to the readout side if  m_design->readoutSide() > 0
     double tanLorentzAnglePhi = forceLorentzToZero*element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis());
-    writeCdo->setTanLorentzAngle(elementHash, m_correctionFactor*tanLorentzAnglePhi);
+    writeCdo->setTanLorentzAngle(elementHash, LACorr*tanLorentzAnglePhi);
 
     // This gives the effective correction in the reconstruction frame hence the extra hitPhiDirection()
     // as the angle above is in the hit frame.
     double lorentzCorrectionPhi = -0.5*element->hitPhiDirection()*tanLorentzAnglePhi*depletionDepth;
-    writeCdo->setLorentzShift(elementHash, m_correctionFactor*lorentzCorrectionPhi);
+    writeCdo->setLorentzShift(elementHash, LACorr*lorentzCorrectionPhi);
  
     // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
     double tanLorentzAngleEta = forceLorentzToZero*element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis());
-    writeCdo->setTanLorentzAngleEta(elementHash, m_correctionFactor*tanLorentzAngleEta);
+    writeCdo->setTanLorentzAngleEta(elementHash, LACorr*tanLorentzAngleEta);
     double lorentzCorrectionEta = -0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth;
-    writeCdo->setLorentzShiftEta(elementHash, m_correctionFactor*lorentzCorrectionEta);
+    writeCdo->setLorentzShiftEta(elementHash, LACorr*lorentzCorrectionEta);
 
     // Monitoring value
     writeCdo->setBiasVoltage(elementHash, biasVoltage/CLHEP::volt);
     writeCdo->setTemperature(elementHash, temperature-273.15);
     writeCdo->setDepletionVoltage(elementHash, deplVoltage/CLHEP::volt);
 
-    ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << " Factor = " << m_correctionFactor << "Depletion depth = " << depletionDepth);
+    ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << " Factor = " << LACorr << " Depletion depth = " << depletionDepth);
     ATH_MSG_DEBUG("Hash = " << elementHash << " tanPhi = " << lorentzCorrectionPhi << " shiftPhi = " << writeCdo->getLorentzShift(elementHash) << "Depletion depth = " << depletionDepth);
     ATH_MSG_VERBOSE("Temperature (C), bias voltage, depletion voltage: " << temperature-273.15 << ", " << biasVoltage/CLHEP::volt << ", " << deplVoltage/CLHEP::volt);
     ATH_MSG_VERBOSE("Depletion depth: " << depletionDepth/CLHEP::mm);
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h
index 0ac808add498..3ecb7efcdec9 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h
@@ -18,6 +18,7 @@
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
+#include "PixelConditionsData/PixelModuleData.h"
 #include "PixelConditionsData/PixelDCSHVData.h"
 #include "PixelConditionsData/PixelDCSTempData.h"
 #include "GaudiKernel/ICondSvc.h"
@@ -44,6 +45,9 @@ class PixelSiLorentzAngleCondAlg: public AthReentrantAlgorithm {
   private:
     ServiceHandle<ICondSvc> m_condSvc;
 
+    SG::ReadCondHandleKey<PixelModuleData> m_moduleDataKey
+    {this, "PixelModuleData", "PixelModuleData", "Pixel module data"};
+
     SG::ReadCondHandleKey<PixelDCSTempData> m_readKeyTemp
     {this, "ReadKeyeTemp", "PixelDCSTempCondData", "Key of input sensor temperature conditions folder"};
 
@@ -66,7 +70,7 @@ class PixelSiLorentzAngleCondAlg: public AthReentrantAlgorithm {
     DoubleProperty           m_nominalField  {this, "NominalField", 2.0834*Gaudi::Units::tesla, "Default nominal field"};
     BooleanProperty          m_useMagFieldCache{this, "UseMagFieldCache", true};
     BooleanProperty          m_useMagFieldDcs{this, "UseMagFieldDcs", true};
-    DoubleProperty           m_correctionFactor{this, "CorrectionFactor", 0.9, "Lorentz angle correction factor"};
+
     unsigned int             m_maxHash;
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
index df14c3d5aece..170c86963c52 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
@@ -405,7 +405,7 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
   double collectionDist = 0.2*CLHEP::mm;
   double smearScale = 1. + 0.35*smearRand;
   double tanLorentz = m_lorentzAngleTool->getTanLorentzAngle(Module.identifyHash());
-  double coLorentz=sqrt(1+pow(tanLorentz,2));
+  double coLorentz=std::sqrt(1.0+pow(tanLorentz,2));
 
   const EBC_EVCOLL evColl = EBC_MAINEVCOLL;
   const HepMcParticleLink::PositionFlag idxFlag = (phit.eventId()==0) ? HepMcParticleLink::IS_POSITION: HepMcParticleLink::IS_INDEX;
-- 
GitLab


From 774f3d00f2e029c9b06165dde2de677ad77b225a Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Thu, 10 Dec 2020 01:06:54 +0100
Subject: [PATCH 010/308] Adding dummy electron in TrigEgammaFastElectronFexMT
 to accommodate idperf chain

---
 .../python/TrigEgammaFastElectronHypoTool.py  | 74 ++++++++++---------
 .../src/TrigEgammaFastElectronFexMT.cxx       | 17 ++++-
 .../src/TrigEgammaFastElectronFexMT.h         |  4 +
 .../HLTMenuConfig/Egamma/ElectronDef.py       | 10 ++-
 .../Egamma/ElectronSequenceSetup.py           | 12 ++-
 5 files changed, 74 insertions(+), 43 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
index 9962a8780f1f..3f618a218caa 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
@@ -17,41 +17,45 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
     from AthenaConfiguration.ComponentFactory import CompFactory
     tool = CompFactory.TrigEgammaFastElectronHypoTool(name)
 
-    monTool = GenericMonitoringTool("MonTool"+name)
-    monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="FastElectron Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt="kCumulative")
-    monTool.defineHistogram('CaloTrackdEta', type='TH1F', path='EXPERT', title="FastElectron Hypo #Delta #eta between cluster and track;#Delta #eta;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
-    monTool.defineHistogram('CaloTrackdPhi', type='TH1F', path='EXPERT', title="FastElectron Hypo #Delta #phi between cluster and track;#Delta #phi;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
-    monTool.defineHistogram('CaloTrackEoverP', type='TH1F', path='EXPERT', title="FastElectron Hypo E/p;E/p;Nevents", xbins=120, xmin=0, xmax=12)
-    monTool.defineHistogram('PtTrack', type='TH1F', path='EXPERT', title="FastElectron Hypo p_{T}^{track} [MeV];p_{T}^{track} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
-    monTool.defineHistogram('PtCalo', type='TH1F', path='EXPERT', title="FastElectron Hypo p_{T}^{calo} [MeV];p_{T}^{calo} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
-    monTool.defineHistogram('CaloEta', type='TH1F', path='EXPERT', title="FastElectron Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5)
-    monTool.defineHistogram('CaloPhi', type='TH1F', path='EXPERT', title="FastElectron Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2)
-
-    monTool.HistPath = 'FastElectronHypo/'+tool.getName()
-    tool.MonTool = monTool
-
-    nt = len( thresholds )
-    tool.TrackPt = [0.0] * nt
-    tool.CaloTrackdETA = [ 0.2 ] *nt
-    tool.CaloTrackdPHI = [ 990. ] *nt
-    tool.CaloTrackdEoverPLow = [ 0.0 ] * nt
-    tool.CaloTrackdEoverPHigh = [ 999.0 ] * nt
-    tool.TRTRatio = [ -999. ] * nt
-
-
-    for th, thvalue in enumerate(thresholds):        
-        if float(thvalue) < 15:
-            tool.TrackPt[ th ] = 1.0 * GeV 
-        elif float(thvalue) >= 15 and float(thvalue) < 20:
-            tool.TrackPt[ th ] = 2.0 * GeV 
-        elif float(thvalue) >= 20 and float(thvalue) < 50:
-            tool.TrackPt[ th ] =  3.0 * GeV 
-        elif float(thvalue) >= 50:
-            tool.TrackPt[ th ] =  5.0 * GeV 
-            tool.CaloTrackdETA[ th ] =  999. 
-            tool.CaloTrackdPHI[ th ] =  999.
-        else:
-            raise RuntimeError('No threshold: Default cut configured')
+    if 'idperf' in name:
+        tool.AcceptAll = True
+    
+    else:
+        monTool = GenericMonitoringTool("MonTool"+name)
+        monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="FastElectron Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt="kCumulative")
+        monTool.defineHistogram('CaloTrackdEta', type='TH1F', path='EXPERT', title="FastElectron Hypo #Delta #eta between cluster and track;#Delta #eta;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
+        monTool.defineHistogram('CaloTrackdPhi', type='TH1F', path='EXPERT', title="FastElectron Hypo #Delta #phi between cluster and track;#Delta #phi;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
+        monTool.defineHistogram('CaloTrackEoverP', type='TH1F', path='EXPERT', title="FastElectron Hypo E/p;E/p;Nevents", xbins=120, xmin=0, xmax=12)
+        monTool.defineHistogram('PtTrack', type='TH1F', path='EXPERT', title="FastElectron Hypo p_{T}^{track} [MeV];p_{T}^{track} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
+        monTool.defineHistogram('PtCalo', type='TH1F', path='EXPERT', title="FastElectron Hypo p_{T}^{calo} [MeV];p_{T}^{calo} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
+        monTool.defineHistogram('CaloEta', type='TH1F', path='EXPERT', title="FastElectron Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5)
+        monTool.defineHistogram('CaloPhi', type='TH1F', path='EXPERT', title="FastElectron Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2)
+
+        monTool.HistPath = 'FastElectronHypo/'+tool.getName()
+        tool.MonTool = monTool
+
+        nt = len( thresholds )
+        tool.TrackPt = [0.0] * nt
+        tool.CaloTrackdETA = [ 0.2 ] *nt
+        tool.CaloTrackdPHI = [ 990. ] *nt
+        tool.CaloTrackdEoverPLow = [ 0.0 ] * nt
+        tool.CaloTrackdEoverPHigh = [ 999.0 ] * nt
+        tool.TRTRatio = [ -999. ] * nt
+
+
+        for th, thvalue in enumerate(thresholds):        
+            if float(thvalue) < 15:
+                    tool.TrackPt[ th ] = 1.0 * GeV 
+            elif float(thvalue) >= 15 and float(thvalue) < 20:
+                    tool.TrackPt[ th ] = 2.0 * GeV 
+            elif float(thvalue) >= 20 and float(thvalue) < 50:
+                    tool.TrackPt[ th ] =  3.0 * GeV 
+            elif float(thvalue) >= 50:
+                    tool.TrackPt[ th ] =  5.0 * GeV 
+                    tool.CaloTrackdETA[ th ] =  999. 
+                    tool.CaloTrackdPHI[ th ] =  999.
+            else:
+                    raise RuntimeError('No threshold: Default cut configured')
     return tool
 
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
index 92d9fea388cb..ac97bd9be8f2 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
@@ -80,6 +80,7 @@ ATH_CHECK( m_roiCollectionKey.initialize() );
 ATH_CHECK( m_TrigEMClusterContainerKey.initialize() );
 ATH_CHECK( m_TrackParticleContainerKey.initialize() );
 ATH_CHECK( m_outputElectronsKey.initialize() );
+ATH_CHECK( m_outputDummyElectronsKey.initialize() );
 
   return StatusCode::SUCCESS;
 }
@@ -103,9 +104,13 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
   auto trigElecColl =   SG::makeHandle (m_outputElectronsKey, ctx);  
   ATH_CHECK( trigElecColl.record (std::make_unique<xAOD::TrigElectronContainer>(),
                            std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );
-
+  
   ATH_MSG_DEBUG( "Made WriteHandle " << m_outputElectronsKey );
 
+  auto trigDummyElecColl =   SG::makeHandle (m_outputDummyElectronsKey, ctx);
+
+  ATH_MSG_DEBUG( "Made Dummy WriteHandle " << m_outputDummyElectronsKey );
+
   auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx);
   ATH_MSG_DEBUG( "Made handle " << m_roiCollectionKey  );
   
@@ -171,8 +176,14 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
 
   auto mon = Monitored::Group(m_monTool,  caloPtMon, trackPtMon, caloTrackDEtaMon, caloTrackDPhiMon, etOverPtMon, caloTrackDEtaNoExtrapMon );
 
-
-
+  // Make Dummy Electron
+     xAOD::TrigElectron* trigDummyElec = new xAOD::TrigElectron();
+     ElementLink<xAOD::TrackParticleContainer> trackDummyEL = ElementLink<xAOD::TrackParticleContainer> (*tracks, 0);
+     trigDummyElec->init(  roiDescriptor->roiWord(),
+                      0, 0,  0,
+                      clusEL,
+                      trackDummyEL);
+     trigDummyElecColl->push_back(trigDummyElec);
   // loop over tracks
 
   unsigned int track_index=0;
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.h
index a074822965cd..b61461aba63c 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.h
@@ -129,6 +129,10 @@ class TrigEgammaFastElectronFexMT : public AthAlgorithm  {
       "Electrons",                                             // default value of StoreGate key
       "output Electron container name "};
 
+  SG::WriteHandleKey<xAOD::TrigElectronContainer> m_outputDummyElectronsKey{ this,
+      "DummyElectronsName",                  // property name
+      "Electrons",                                             // default value of StoreGate key
+      "output Dummy Electron container name "};
 
   ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
   
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
index f1087e5e0a93..9b79c50971c7 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
@@ -24,7 +24,10 @@ def electronFastCaloCfg( flags ):
     return fastCaloMenuSequence("Electron", doRinger=True)
 
 def fastElectronSequenceCfg( flags ):
-    return fastElectronMenuSequence()
+    return fastElectronMenuSequence(do_idperf=False)
+
+def fastElectronSequenceCfg_idperf( flags ):
+    return fastElectronMenuSequence(do_idperf=True)
 
 def precisionCaloSequenceCfg( flags ):
     return precisionCaloMenuSequence('Electron')
@@ -73,6 +76,7 @@ class ElectronChainConfiguration(ChainConfigurationBase):
 
         stepDictionary = {
                 'etcut1step': ['getFastCalo'],
+                'idperf'    : ['getFastCalo', 'getFastElectron_idperf', 'getPrecisionCaloElectron', 'getPrecisionTracking'],
                 'etcut'     : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking'],
                 'lhloose'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionElectron'],
                 'lhvloose'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionElectron'],
@@ -143,6 +147,10 @@ class ElectronChainConfiguration(ChainConfigurationBase):
     def getFastElectron(self):
         stepName = "fast_electron"
         return self.getStep(2,stepName,[ fastElectronSequenceCfg])
+   
+    def getFastElectron_idperf(self):
+        stepName = "fast_electron_idperf"
+        return self.getStep(2,stepName,[ fastElectronSequenceCfg_idperf])
 
     def getPrecisionCaloElectron(self):
         stepName = "precisionCalo_electron"
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index 8b0c0fc42cc2..1ba63358357b 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -10,7 +10,7 @@ from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
 from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 
-def fastElectronSequence(ConfigFlags):
+def fastElectronSequence(do_idperf):
     """ second step:  tracking....."""
     
     from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
@@ -36,6 +36,7 @@ def fastElectronSequence(ConfigFlags):
     theElectronFex.TrigEMClusterName = CaloMenuDefs.L2CaloClusters
     theElectronFex.TrackParticlesName = TrackParticlesName
     theElectronFex.ElectronsName=recordable("HLT_FastElectrons")
+    theElectronFex.DummyElectronsName= "HLT_FastDummyElectrons"
 
     # EVCreator:
     l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron")
@@ -57,13 +58,16 @@ def fastElectronSequence(ConfigFlags):
     l2ElectronViewsMaker.ViewNodeName = "electronInViewAlgs"
 
     electronAthSequence = seqAND("electronAthSequence", [l2ElectronViewsMaker, electronInViewAlgs ] )
-    return (electronAthSequence, l2ElectronViewsMaker, theElectronFex.ElectronsName)
 
+    if not do_idperf:
+        return (electronAthSequence, l2ElectronViewsMaker, theElectronFex.ElectronsName)
+    else:
+        return (electronAthSequence, l2ElectronViewsMaker, theElectronFex.DummyElectronsName)
 
-def fastElectronMenuSequence():
+def fastElectronMenuSequence(do_idperf):
     """ Creates 2nd step Electron  MENU sequence"""
     # retrievee the reco seuqence+IM
-    (electronAthSequence, l2ElectronViewsMaker, sequenceOut) = RecoFragmentsPool.retrieve(fastElectronSequence, ConfigFlags)
+    (electronAthSequence, l2ElectronViewsMaker, sequenceOut) = RecoFragmentsPool.retrieve(fastElectronSequence, {'do_idperf':do_idperf})
 
     # make the Hypo
     from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastElectronHypoAlgMT
-- 
GitLab


From 6862ff3949278f1ee5dc57b092a96930311f0d55 Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Thu, 10 Dec 2020 02:51:44 +0100
Subject: [PATCH 011/308] update

---
 .../python/PixelConditionsConfig.py           | 26 +++++++++++++++++--
 .../src/PixelSiLorentzAngleCondAlg.cxx        |  2 ++
 .../python/PixelDigitizationConfig.py         | 10 +++++++
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
index 3ab63159c016..2dd1ea7a1277 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
@@ -63,6 +63,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             BarrelCrossTalk2016          = [ 0.30, 0.06, 0.06, 0.06],
             BarrelNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8, 5e-8],
             BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3],
+            BarrelLorentzAngleCorr2016   = [  1.0,  1.0,  1.0,  1.0],
             EndcapToTThreshold2016       = [    5,    5,    5],
             FEI3EndcapLatency2016        = [  256,  256,  256],
             FEI3EndcapHitDuplication2016 = [False,False,False],
@@ -71,6 +72,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             EndcapCrossTalk2016          = [ 0.06, 0.06, 0.06],
             EndcapNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8],
             EndcapDisableProbability2016 = [ 9e-3, 9e-3, 9e-3],
+            EndcapLorentzAngleCorr2016   = [  1.0,  1.0,  1.0],
             DBMToTThreshold2016       = [   -1,   -1,   -1],
             DBMCrossTalk2016          = [ 0.06, 0.06, 0.06],
             DBMNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8],
@@ -95,6 +97,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             BarrelCrossTalk2017          = [ 0.30, 0.06, 0.06, 0.06],
             BarrelNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8, 5e-8],
             BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3],
+            BarrelLorentzAngleCorr2017   = [  1.0,  1.0,  1.0,  1.0],
             EndcapToTThreshold2017       = [    5,    5,    5],
             FEI3EndcapLatency2017        = [  256,  256,  256],
             FEI3EndcapHitDuplication2017 = [False,False,False],
@@ -103,6 +106,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             EndcapCrossTalk2017          = [ 0.06, 0.06, 0.06],
             EndcapNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8],
             EndcapDisableProbability2017 = [ 9e-3, 9e-3, 9e-3],
+            EndcapLorentzAngleCorr2017   = [  1.0,  1.0,  1.0],
             DBMToTThreshold2017       = [   -1,   -1,   -1],
             DBMCrossTalk2017          = [ 0.06, 0.06, 0.06],
             DBMNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8],
@@ -122,6 +126,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             BarrelCrossTalk2018          = [ 0.30, 0.06, 0.06, 0.06],
             BarrelNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8, 5e-8],
             BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3],
+            BarrelLorentzAngleCorr2018   = [  1.0,  1.0,  1.0,  1.0],
             EndcapToTThreshold2018       = [    5,    5,    5],
             FEI3EndcapLatency2018        = [  256,  256,  256],
             FEI3EndcapHitDuplication2018 = [False,False,False],
@@ -130,6 +135,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             EndcapCrossTalk2018          = [ 0.06, 0.06, 0.06],
             EndcapNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8],
             EndcapDisableProbability2018 = [ 9e-3, 9e-3, 9e-3],
+            EndcapLorentzAngleCorr2018   = [  1.0,  1.0,  1.0],
             DBMToTThreshold2018       = [   -1,   -1,   -1],
             DBMCrossTalk2018          = [ 0.06, 0.06, 0.06],
             DBMNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8],
@@ -149,6 +155,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             BarrelCrossTalkRUN1          = [ 0.06, 0.06, 0.06],
             BarrelNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8],
             BarrelDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3],
+            BarrelLorentzAngleCorrRUN1   = [  1.0,  1.0,  1.0],
             EndcapToTThresholdRUN1       = [    3,    3,    3],
             FEI3EndcapLatencyRUN1        = [  256,  256,  256],
             FEI3EndcapHitDuplicationRUN1 = [ True, True, True],
@@ -157,6 +164,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             EndcapCrossTalkRUN1          = [ 0.06, 0.06, 0.06],
             EndcapNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8],
             EndcapDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3],
+            EndcapLorentzAngleCorrRUN1   = [  1.0,  1.0,  1.0],
             BLayerNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
             PixelNoiseShapeRUN1  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
         )
@@ -167,22 +175,36 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             BarrelCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06],
             BarrelNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
             BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
+            BarrelLorentzAngleCorrITK   = [  1.0,  1.0,  1.0,  1.0,  1.0],
             EndcapToTThresholdITK       = [    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3],
             EndcapCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06],
             EndcapNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
             EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
+            EndcapLorentzAngleCorrITK   = [  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0],
             InnermostNoiseShapeITK     = [0.0, 1.0],
             NextInnermostNoiseShapeITK = [0.0, 1.0],
             PixelNoiseShapeITK         = [0.0, 1.0]
         )
+      else:
+        # for data, make sure no Lorentz angle correction
+        CondArgs.update(
+            BarrelLorentzAngleCorr2016 = [  1.0,  1.0,  1.0,  1.0],
+            EndcapLorentzAngleCorr2016 = [  1.0,  1.0,  1.0],
+            BarrelLorentzAngleCorr2017 = [  1.0,  1.0,  1.0,  1.0],
+            EndcapLorentzAngleCorr2017 = [  1.0,  1.0,  1.0],
+            BarrelLorentzAngleCorr2018 = [  1.0,  1.0,  1.0,  1.0],
+            EndcapLorentzAngleCorr2018 = [  1.0,  1.0,  1.0],
+            BarrelLorentzAngleCorrRUN1 = [  1.0,  1.0,  1.0],
+            EndcapLorentzAngleCorrRUN1 = [  1.0,  1.0,  1.0],
+            BarrelLorentzAngleCorrITK  = [  1.0,  1.0,  1.0,  1.0,  1.0],
+            EndcapLorentzAngleCorrITK  = [  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0]
+        )
 
     # Charge calibration parameters
     CondArgs.update(
         DefaultCalibrationParameterA=70.2,
         DefaultCalibrationParameterE=-3561.25,
         DefaultCalibrationParameterC=26000.0
-#        IBLChargeScale=1.0,
-#        IBLSpecificCorrection=False
     )
     # DCS parameters
     CondArgs.update(
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index e3fd0bba45b2..59710f7addde 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -180,6 +180,8 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     double lorentzCorrectionEta = -0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth;
     writeCdo->setLorentzShiftEta(elementHash, LACorr*lorentzCorrectionEta);
 
+    std::cout << "STSTST " << elementHash << " " << barrel_ec << " " << layerIndex << " " << LACorr*tanLorentzAnglePhi << " " << LACorr*lorentzCorrectionPhi << " " << LACorr*tanLorentzAngleEta << " " << LACorr*lorentzCorrectionEta << std::endl;
+
     // Monitoring value
     writeCdo->setBiasVoltage(elementHash, biasVoltage/CLHEP::volt);
     writeCdo->setTemperature(elementHash, temperature-273.15);
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
index fb8f71212c75..ce9bfcd830f6 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
@@ -213,6 +213,7 @@ def PixelConfigCondAlg_MC():
     alg.BarrelCrossTalk2016          = [ 0.30, 0.06, 0.06, 0.06]
     alg.BarrelNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8, 5e-8]
     alg.BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3]
+    alg.BarrelLorentzAngleCorr2016   = [  1.0,  1.0,  1.0,  1.0]
 
     alg.EndcapToTThreshold2016       = [    5,    5,    5]
     alg.FEI3EndcapLatency2016        = [  256,  256,  256]
@@ -222,6 +223,7 @@ def PixelConfigCondAlg_MC():
     alg.EndcapCrossTalk2016          = [ 0.06, 0.06, 0.06]
     alg.EndcapNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8]
     alg.EndcapDisableProbability2016 = [ 9e-3, 9e-3, 9e-3]
+    alg.EndcapLorentzAngleCorr2016   = [  1.0,  1.0,  1.0]
 
     alg.DBMToTThreshold2016       = [   -1,   -1,   -1]
     alg.DBMCrossTalk2016          = [ 0.06, 0.06, 0.06]
@@ -248,6 +250,7 @@ def PixelConfigCondAlg_MC():
     alg.BarrelCrossTalk2017          = [ 0.30, 0.06, 0.06, 0.06]
     alg.BarrelNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8, 5e-8]
     alg.BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3]
+    alg.BarrelLorentzAngleCorr2017   = [  1.0,  1.0,  1.0,  1.0]
 
     alg.EndcapToTThreshold2017       = [    5,    5,    5]
     alg.FEI3EndcapLatency2017        = [  256,  256,  256]
@@ -257,6 +260,7 @@ def PixelConfigCondAlg_MC():
     alg.EndcapCrossTalk2017          = [ 0.06, 0.06, 0.06]
     alg.EndcapNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8]
     alg.EndcapDisableProbability2017 = [ 9e-3, 9e-3, 9e-3]
+    alg.EndcapLorentzAngleCorr2017   = [  1.0,  1.0,  1.0]
 
     alg.DBMToTThreshold2017       = [   -1,   -1,   -1]
     alg.DBMCrossTalk2017          = [ 0.06, 0.06, 0.06]
@@ -277,6 +281,7 @@ def PixelConfigCondAlg_MC():
     alg.BarrelCrossTalk2018          = [ 0.30, 0.06, 0.06, 0.06]
     alg.BarrelNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8, 5e-8]
     alg.BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3]
+    alg.BarrelLorentzAngleCorr2018   = [  1.0,  1.0,  1.0,  1.0]
 
     alg.EndcapToTThreshold2018       = [    5,    5,    5]
     alg.FEI3EndcapLatency2018        = [  256,  256,  256]
@@ -286,6 +291,7 @@ def PixelConfigCondAlg_MC():
     alg.EndcapCrossTalk2018          = [ 0.06, 0.06, 0.06]
     alg.EndcapNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8]
     alg.EndcapDisableProbability2018 = [ 9e-3, 9e-3, 9e-3]
+    alg.EndcapLorentzAngleCorr2018   = [  1.0,  1.0,  1.0]
 
     alg.DBMToTThreshold2018       = [   -1,   -1,   -1]
     alg.DBMCrossTalk2018          = [ 0.06, 0.06, 0.06]
@@ -306,6 +312,7 @@ def PixelConfigCondAlg_MC():
     alg.BarrelCrossTalkRUN1          = [ 0.06, 0.06, 0.06]
     alg.BarrelNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8]
     alg.BarrelDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3]
+    alg.BarrelLorentzAngleCorrRUN1   = [  1.0,  1.0,  1.0]
 
     alg.EndcapToTThresholdRUN1       = [    3,    3,    3]
     alg.FEI3EndcapLatencyRUN1        = [  256,  256,  256]
@@ -315,6 +322,7 @@ def PixelConfigCondAlg_MC():
     alg.EndcapCrossTalkRUN1          = [ 0.06, 0.06, 0.06]
     alg.EndcapNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8]
     alg.EndcapDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3]
+    alg.EndcapLorentzAngleCorrRUN1   = [  1.0,  1.0,  1.0]
 
     alg.BLayerNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0]
     alg.PixelNoiseShapeRUN1  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0]
@@ -325,11 +333,13 @@ def PixelConfigCondAlg_MC():
     alg.BarrelCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06]
     alg.BarrelNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8]
     alg.BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3]
+    alg.BarrelLorentzAngleCorrITK   = [  1.0,  1.0,  1.0,  1.0,  1.0]
 
     alg.EndcapToTThresholdITK       = [    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3]
     alg.EndcapCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06]
     alg.EndcapNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8]
     alg.EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3]
+    alg.EndcapLorentzAngleCorrITK   = [  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0,  1.0]
 
     alg.InnermostNoiseShapeITK     = [0.0, 1.0]
     alg.NextInnermostNoiseShapeITK = [0.0, 1.0]
-- 
GitLab


From 50941e456431d4591177e093df96eb74e2186ed2 Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Thu, 10 Dec 2020 05:31:04 +0100
Subject: [PATCH 012/308] remove lorentz angle correction

---
 .../python/PixelConditionsConfig.py           |  2 +-
 .../src/PixelSiLorentzAngleCondAlg.cxx        |  2 --
 .../PROCTools/data/master_q221_AOD_digest.ref | 26 +++++++++----------
 .../PROCTools/data/master_q431_AOD_digest.ref | 16 ++++++------
 4 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
index 2dd1ea7a1277..c46863dcea3e 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
@@ -185,7 +185,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             NextInnermostNoiseShapeITK = [0.0, 1.0],
             PixelNoiseShapeITK         = [0.0, 1.0]
         )
-      else:
+    else:
         # for data, make sure no Lorentz angle correction
         CondArgs.update(
             BarrelLorentzAngleCorr2016 = [  1.0,  1.0,  1.0,  1.0],
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index 59710f7addde..e3fd0bba45b2 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -180,8 +180,6 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     double lorentzCorrectionEta = -0.5*element->hitPhiDirection()*tanLorentzAngleEta*depletionDepth;
     writeCdo->setLorentzShiftEta(elementHash, LACorr*lorentzCorrectionEta);
 
-    std::cout << "STSTST " << elementHash << " " << barrel_ec << " " << layerIndex << " " << LACorr*tanLorentzAnglePhi << " " << LACorr*lorentzCorrectionPhi << " " << LACorr*tanLorentzAngleEta << " " << LACorr*lorentzCorrectionEta << std::endl;
-
     // Monitoring value
     writeCdo->setBiasVoltage(elementHash, biasVoltage/CLHEP::volt);
     writeCdo->setTemperature(elementHash, temperature-273.15);
diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index 0fbea1060ec9..3da3e871698f 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -1,26 +1,26 @@
          run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
       284500    87473001         122         130           4           1           8           2           6           7           4           3
       284500    87473014          83          80           6           0          10           1           9           7           5           2
-      284500    87473022          38          29           4           0           4           1           3           3           2           1
+      284500    87473022          38          30           4           0           4           2           2           4           3           1
       284500    87473032          30          33           4           1          10           4           6           5           2           3
       284500    87473037          62          38           7           0          12           2          10           6           4           2
       284500    87473040         107          96          10           1          17           1          16          10           5           5
-      284500    87473051         140         112          11           1          16           1          15          23          16           7
+      284500    87473051         140         111          11           1          16           1          15          23          16           7
       284500    87473063          62          76           5           2           7           1           6           6           4           2
-      284500    87473068          25          34           1           1           0           0           0           0           0           0
-      284500    87473075          60          85           6           0           5           0           5           6           5           1
-      284500    87473084          78          85           7           2          14           1          13           9           3           6
+      284500    87473068          25          33           1           1           0           0           0           0           0           0
+      284500    87473075          60          87           6           0           5           0           5           6           5           1
+      284500    87473084          78          86           7           2          14           1          13           9           3           6
       284500    87473091          41          49           3           0           4           2           2           4           2           2
       284500    87473096          66          75           3           2           3           0           3           4           3           1
-      284500    87473104          64          62           6           0           5           1           4           4           3           1
+      284500    87473104          64          63           6           0           6           2           4           4           3           1
       284500    87473114          89          81           7           2          12           1          11           9           6           3
-      284500    87473121          93         100           6           3          15           4          11           8           6           2
-      284500    87473132          84          57           9           1          12           0          12           3           3           0
-      284500    87473137          94          70           8           3          15           0          15           8           8           0
-      284500    87473144          78          65           7           1           8           2           6           8           6           2
+      284500    87473121          93         100           6           3          15           4          11           9           6           3
+      284500    87473132          84          56           9           1          12           0          12           3           3           0
+      284500    87473137          94          71           8           3          15           0          15           9           9           0
+      284500    87473144          78          66           7           1           8           2           6           8           6           2
       284500    87473154          86          88           7           0          13           3          10          10           4           6
-      284500    87473162          53          52           4           0           7           0           7           3           2           1
+      284500    87473162          53          52           4           0           6           0           6           3           2           1
       284500    87473167          77          54           6           3          14           2          12          13           8           5
-      284500    87473171          77          70           8           3           4           2           2           6           5           1
-      284500    87473184          75          86           5           2           8           1           7           5           3           2
+      284500    87473171          77          69           8           3           4           2           2           5           4           1
+      284500    87473184          75          88           5           2           8           1           7           5           3           2
       284500    87473192          55          52           4           1           7           4           3           5           4           1
diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref
index 409bddb5d777..37021240d684 100644
--- a/Tools/PROCTools/data/master_q431_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref
@@ -1,26 +1,26 @@
          run       event       nTopo   nIdTracks       nJets      nMuons
       330470  1183722158           1           0           0           0
-      330470  1183722342         394         429          16           0
-      330470  1183727953         532         588          11           4
-      330470  1183732647         467         484          12           1
+      330470  1183722342         394         428          16           0
+      330470  1183727953         532         590          11           4
+      330470  1183732647         467         485          12           1
       330470  1183733040         381         288           6           1
       330470  1183734651         361         368          14           3
-      330470  1183735332         406         386           9           1
-      330470  1183736475         741         686          15           1
+      330470  1183735332         406         385           9           1
+      330470  1183736475         741         684          15           1
       330470  1183738728           1           0           0           0
       330470  1183738949         368         444           9           1
       330470  1183742489         152         127           2           1
       330470  1183743040         285         326           5           0
-      330470  1183746343         492         495          12           1
+      330470  1183746343         492         492          12           0
       330470  1183746710           6           0           0           0
       330470  1183751782         239         246           2           0
       330470  1183752624         347         366           7           3
       330470  1183753006         357         398          11           3
       330470  1183754806         470         423          14           0
-      330470  1183769295         342         336           7           2
+      330470  1183769295         342         335           7           2
       330470  1183769939         348         362          10           3
       330470  1183773832         307         209           7           0
       330470  1183775209          57           0           0           0
-      330470  1183787124         431         382          10           2
+      330470  1183787124         431         383          10           2
       330470  1183787946         321         324           5           1
       330470  1183795329         458         355          18           0
-- 
GitLab


From 5ef2f1d480ef4001dcd8364aa9ba6b167b40de42 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Thu, 10 Dec 2020 13:21:13 +0100
Subject: [PATCH 013/308] PyJobTransforms: Update AMI tests

---
 Tools/PyJobTransforms/test/test_trfAMI.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Tools/PyJobTransforms/test/test_trfAMI.py b/Tools/PyJobTransforms/test/test_trfAMI.py
index 143d070c90ce..7a53f02421ff 100755
--- a/Tools/PyJobTransforms/test/test_trfAMI.py
+++ b/Tools/PyJobTransforms/test/test_trfAMI.py
@@ -154,7 +154,9 @@ class trfAMIUnitTests(unittest.TestCase):
         self.assertEqual(tag.trfs[0].release, 'AtlasProduction,19.1.1.9')
         self.assertEqual(tag.trfs[0].newTransform, True)
         self.assertEqual(tag.trfs[0].physics, physics)
-        self.assertEqual(tag.trfs[0].inFiles, {'inputHighPtMinbiasHitsFile': 'myHighPtMinbiasHits', 'inputLowPtMinbiasHitsFile': 'myLowPtMinbiasHits'})
+        self.assertEqual(tag.trfs[0].inFiles, {
+            'inputHighPtMinbiasHitsFile': 'mc14_13TeV.119996.Pythia8_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3038_s1967_s2007',
+            'inputLowPtMinbiasHitsFile': 'mc14_13TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3038_s1967_s2007'})
         self.assertEqual(tag.trfs[0].outFiles, {})
         self.assertEqual(tag.trfs[0].outputs, {})
         self.assertEqual(tag.trfs[0].inDS, None)
@@ -223,8 +225,9 @@ class trfAMIUnitTests(unittest.TestCase):
         self.assertEqual(tag.trfs[0].release, 'AtlasProduction,20.1.4.5')
         self.assertEqual(tag.trfs[0].newTransform, True)
         self.assertEqual(tag.trfs[0].physics, physics)
-        self.assertEqual(tag.trfs[0].inFiles, {'inputHighPtMinbiasHitsFile': 'myHighPtMinbiasHits',
-                                               'inputLowPtMinbiasHitsFile': 'myLowPtMinbiasHits'})
+        self.assertEqual(tag.trfs[0].inFiles, {
+            'inputHighPtMinbiasHitsFile': 'mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00',
+            'inputLowPtMinbiasHitsFile': 'mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00'})
         self.assertEqual(tag.trfs[0].outFiles, {})
         self.assertEqual(tag.trfs[0].outputs, {})
         self.assertEqual(tag.trfs[0].inDS, None)
-- 
GitLab


From 9255fbdec89727e3f895070b67da4a70bdb097a5 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Thu, 10 Dec 2020 17:40:09 +0100
Subject: [PATCH 014/308] Adding some DEBUG message to figure out the crash

---
 .../src/TrigEgammaFastElectronFexMT.cxx       | 32 ++++++++++++++++---
 .../Egamma/ElectronSequenceSetup.py           |  3 +-
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
index ac97bd9be8f2..6d9fbd58beff 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
@@ -134,7 +134,9 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
 
   auto clusContainer = SG::makeHandle (m_TrigEMClusterContainerKey, ctx);
   ATH_MSG_DEBUG( "Made handle " << m_TrigEMClusterContainerKey  );
-  
+
+ /**********************/
+  ATH_MSG_DEBUG("Debo1");  
   
   //JTB Should only be 1 cluster in each RoI 
 
@@ -151,7 +153,8 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
   ATH_MSG_DEBUG("Cluster: ET=" << calo_et);
   ATH_MSG_DEBUG("searching a matching track: loop over tracks");
 
-
+  /**********************/
+  ATH_MSG_DEBUG("Debo2");
 
   SG::ReadHandle<xAOD::TrackParticleContainer> tracks(m_TrackParticleContainerKey, ctx);
   ATH_MSG_DEBUG( "Made handle " << m_TrackParticleContainerKey  );
@@ -161,6 +164,9 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
       return StatusCode::SUCCESS; // Exit early if there are no tracks
   }
   
+  /**********************/
+  ATH_MSG_DEBUG("Debo3");
+
   size_t coll_size = tracks->size();
   trigElecColl->reserve(coll_size);
 
@@ -176,16 +182,34 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
 
   auto mon = Monitored::Group(m_monTool,  caloPtMon, trackPtMon, caloTrackDEtaMon, caloTrackDPhiMon, etOverPtMon, caloTrackDEtaNoExtrapMon );
 
+  /**********************/
+  ATH_MSG_DEBUG("Debo4");
+
   // Make Dummy Electron
      xAOD::TrigElectron* trigDummyElec = new xAOD::TrigElectron();
+  
+ /**********************/
+  ATH_MSG_DEBUG("Debo5");
+
      ElementLink<xAOD::TrackParticleContainer> trackDummyEL = ElementLink<xAOD::TrackParticleContainer> (*tracks, 0);
-     trigDummyElec->init(  roiDescriptor->roiWord(),
+     
+ /**********************/
+  ATH_MSG_DEBUG("Debo6");  
+     
+     trigDummyElec->init( 0,
                       0, 0,  0,
                       clusEL,
                       trackDummyEL);
-     trigDummyElecColl->push_back(trigDummyElec);
+   
+   /**********************/
+    ATH_MSG_DEBUG("Debo7");
+ 
+    trigDummyElecColl->push_back(trigDummyElec);
   // loop over tracks
 
+  /**********************/
+  ATH_MSG_DEBUG("Debo8");
+
   unsigned int track_index=0;
   for(const auto trkIter:(*tracks)){
       ATH_MSG_VERBOSE("AlgoId = " << (trkIter)->patternRecoInfo());
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index 1ba63358357b..90298838e5d1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -9,6 +9,7 @@ from AthenaCommon.CFElements import parOR, seqAND
 from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
 from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool
 from TrigEDMConfig.TriggerEDMRun3 import recordable
+from AthenaCommon.Constants import DEBUG
 
 def fastElectronSequence(do_idperf):
     """ second step:  tracking....."""
@@ -37,7 +38,7 @@ def fastElectronSequence(do_idperf):
     theElectronFex.TrackParticlesName = TrackParticlesName
     theElectronFex.ElectronsName=recordable("HLT_FastElectrons")
     theElectronFex.DummyElectronsName= "HLT_FastDummyElectrons"
-
+    #theElectronFex.OutputLevel = DEBUG
     # EVCreator:
     l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron")
     l2ElectronViewsMaker.RoIsLink = "initialRoI" # Merge inputs based on their initial L1 ROI
-- 
GitLab


From e501390e4f3ae8d59d0ed1034f8d298bfc7dfa7e Mon Sep 17 00:00:00 2001
From: Riccardo Longo <riccardo.longo@cern.ch>
Date: Thu, 10 Dec 2020 11:41:42 -0600
Subject: [PATCH 015/308] Updates to accommodate new dataHandle features and
 avoid crashes

---
 .../HeavyIonRec/HIJetRec/python/HIJetRecUtils.py      | 11 ++++++-----
 .../HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
index 81a1276ab396..eab3fe8fff66 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
@@ -8,8 +8,8 @@ from JetRec.JetRecFlags import jetFlags
 def AddToOutputList(tname, objType='xAOD::JetContainer') :
 
     #filter container based on package flags
-    if HIJetFlags.UnsubtractedSuffix() in tname and not HIJetFlags.WriteUnsubtracted() : return
-    if HIJetFlags.SeedSuffix() in tname and not HIJetFlags.WriteSeeds() : return
+    if HIJetFlags.UnsubtractedSuffix() in str(tname) and not HIJetFlags.WriteUnsubtracted() : return
+    if HIJetFlags.SeedSuffix() in str(tname) and not HIJetFlags.WriteSeeds() : return
 
     has_key=False
     for k in HIJetFlags.HIJetOutputList() :
@@ -120,7 +120,7 @@ def MakeModulatorTool(mod_key, **kwargs) :
 
 def MakeSubtractionTool(shapeKey, moment_name='', momentOnly=False, **kwargs) :
     HIJetConstituentSubtractionTool=CompFactory.HIJetConstituentSubtractionTool
-    suffix=shapeKey
+    suffix=shapeKey.toStringProperty()
     if momentOnly : suffix+='_'+moment_name
 
     if 'modulator' in kwargs.keys() : mod_tool=kwargs['modulator']
@@ -131,7 +131,7 @@ def MakeSubtractionTool(shapeKey, moment_name='', momentOnly=False, **kwargs) :
         from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
         map_tool=HIEventShapeMapTool()
 
-    subtr=HIJetConstituentSubtractionTool("HICS_"+suffix)
+    subtr=HIJetConstituentSubtractionTool(("HICS_"+suffix))
     subtr.EventShapeKey=shapeKey
     subtr.Modulator=mod_tool
     subtr.MomentName='JetSubtractedScale%sMomentum' % moment_name
@@ -371,7 +371,8 @@ def HITruthParticleCopy() :
 def BuildHarmonicName(shape_key, **kwargs) :
     tname=shape_key
     if 'harmonics' in kwargs.keys() :
-        for n in kwargs['harmonics'] : tname += '_V%d' % n
+        for n in kwargs['harmonics'] :
+            tname = str(tname) + str('_V%d' % n)
     return tname
 
 def GetNullModulator() :
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py b/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
index 6b3eceb986b5..16b212838a3b 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/share/HIJetRec_jobOptions.py
@@ -197,7 +197,7 @@ unsubtr_suffix=HIJetFlags.UnsubtractedSuffix()
 for k in jtm.jetrecs :
     if unsubtr_suffix in k.name() :
         in_name=k.OutputContainer
-        out_name=in_name.replace("_%s" % unsubtr_suffix,"")
+        out_name=in_name.toStringProperty().replace("_%s" % unsubtr_suffix,"")
         #>slight tweak in case R=1.0 jets are requestd, add some substructure tools
         modifiers=GetHIModifierList(out_name,hi_tools)
         if '10HIJets' in k.name() :
-- 
GitLab


From d28730cab1c9fc8f4d2caa6826e8295f5c4f2a6c Mon Sep 17 00:00:00 2001
From: Riccardo Longo <riccardo.longo@cern.ch>
Date: Thu, 10 Dec 2020 12:13:01 -0600
Subject: [PATCH 016/308] Removed a round of parenthesis not needed

---
 Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
index eab3fe8fff66..716c4e13f991 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecUtils.py
@@ -131,7 +131,7 @@ def MakeSubtractionTool(shapeKey, moment_name='', momentOnly=False, **kwargs) :
         from HIEventUtils.HIEventUtilsConf import HIEventShapeMapTool
         map_tool=HIEventShapeMapTool()
 
-    subtr=HIJetConstituentSubtractionTool(("HICS_"+suffix))
+    subtr=HIJetConstituentSubtractionTool("HICS_"+suffix)
     subtr.EventShapeKey=shapeKey
     subtr.Modulator=mod_tool
     subtr.MomentName='JetSubtractedScale%sMomentum' % moment_name
-- 
GitLab


From c15cd156532543bbb0cbe5e4b4813a711ecd452a Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Thu, 10 Dec 2020 22:28:40 +0100
Subject: [PATCH 017/308] Debugging errors in TrigEgammaFastElectronHypoTool
 and hypotool's AcceptAll property

---
 .../python/TrigEgammaFastElectronHypoTool.py  |  4 +-
 .../src/TrigEgammaFastElectronFexMT.cxx       |  6 ++-
 .../src/TrigEgammaFastElectronHypoTool.cxx    | 43 +++++++++++++++----
 .../Egamma/ElectronSequenceSetup.py           | 10 ++---
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |  1 +
 5 files changed, 46 insertions(+), 18 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
index 3f618a218caa..21c7d14d5dd4 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
@@ -4,7 +4,6 @@ from AthenaCommon.SystemOfUnits import GeV
 from AthenaCommon.Logging import logging
 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
 
-
 log = logging.getLogger('TrigEgammaFastElectronHypoTool')
 
 def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
@@ -16,7 +15,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
     name = chainDict['chainName']
     from AthenaConfiguration.ComponentFactory import CompFactory
     tool = CompFactory.TrigEgammaFastElectronHypoTool(name)
-
+ 
     if 'idperf' in name:
         tool.AcceptAll = True
     
@@ -56,6 +55,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
                     tool.CaloTrackdPHI[ th ] =  999.
             else:
                     raise RuntimeError('No threshold: Default cut configured')
+    
     return tool
 
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
index 6d9fbd58beff..92c66a26209f 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
@@ -108,8 +108,10 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
   ATH_MSG_DEBUG( "Made WriteHandle " << m_outputElectronsKey );
 
   auto trigDummyElecColl =   SG::makeHandle (m_outputDummyElectronsKey, ctx);
-
+ 
   ATH_MSG_DEBUG( "Made Dummy WriteHandle " << m_outputDummyElectronsKey );
+  ATH_CHECK( trigDummyElecColl.record (std::make_unique<xAOD::TrigElectronContainer>(),
+                           std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );  
 
   auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx);
   ATH_MSG_DEBUG( "Made handle " << m_roiCollectionKey  );
@@ -196,6 +198,7 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
  /**********************/
   ATH_MSG_DEBUG("Debo6");  
      
+     trigDummyElecColl->push_back(trigDummyElec);
      trigDummyElec->init( 0,
                       0, 0,  0,
                       clusEL,
@@ -204,7 +207,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
    /**********************/
     ATH_MSG_DEBUG("Debo7");
  
-    trigDummyElecColl->push_back(trigDummyElec);
   // loop over tracks
 
   /**********************/
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
index b9f4af0006df..18c602f01a9d 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
@@ -50,6 +50,17 @@ TrigEgammaFastElectronHypoTool::~TrigEgammaFastElectronHypoTool() {}
 
 bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElectron* electron, 
 						   size_t cutIndex ) const {
+  bool pass=false;
+
+  if ( m_acceptAll ) {
+    pass = true;
+    ATH_MSG_DEBUG( "AcceptAll property is set: taking all events" );
+    return pass;
+   } else {
+     pass = false;
+     ATH_MSG_DEBUG( "AcceptAll property not set: applying selection" );
+   }
+
   auto cutCounter = Monitored::Scalar<int>( "CutCounter", -1 );  
   auto cutIndexM  = Monitored::Scalar<int>( "CutIndex", cutIndex );  // one can do 2D plots for each cut independently
   auto ptCalo     = Monitored::Scalar( "PtCalo", -999. );
@@ -67,8 +78,10 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
 					     caloEta, caloPhi );
 
   const xAOD::TrackParticle* trkIter = electron-> trackParticle();
-  if ( trkIter == 0 )  // disconsider candidates without track
-    return  false;
+  if ( trkIter == 0 ){  // disconsider candidates without track
+     pass = false;
+     return pass;
+  }
   cutCounter++;
 
   // Retrieve all quantities
@@ -87,38 +100,50 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
   ATH_MSG_VERBOSE( "Cut index " << cutIndex );
   if ( ptCalo < m_trackPt[cutIndex] ){ 
     ATH_MSG_VERBOSE( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] );
-    return  false;
+    pass = false;
+    return  pass;
   }
   cutCounter++;
 
   if ( dEtaCalo > m_caloTrackDEta[cutIndex] ) {
     ATH_MSG_VERBOSE( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] );
-    return  false;
+    
+    pass = false;
+    return  pass;
   }
   cutCounter++;
   if ( dPhiCalo > m_caloTrackDPhi[cutIndex] ) {
     ATH_MSG_VERBOSE( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] );
-    return  false;
+    
+    pass = false;
+    return  pass;
   }
 
   cutCounter++;
   if( eToverPt <  m_caloTrackdEoverPLow[cutIndex] ) {
     ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " <<  m_caloTrackdEoverPLow[cutIndex] );
-    return  false;
+
+    pass = true;
+    return  pass;
   }
   cutCounter++;
   if ( eToverPt > m_caloTrackdEoverPHigh[cutIndex] ) {
     ATH_MSG_VERBOSE( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] );
-    return  false;
+
+    pass = false;
+    return  pass;
   }
   cutCounter++;
   if ( TRTHitRatio < m_trtRatio[cutIndex] ){
     ATH_MSG_VERBOSE( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] );
-    return  false;
+
+    pass = false;
+    return  pass;
   }
   cutCounter++;
   ATH_MSG_DEBUG( "Passed selection" );
-  return  true;
+  pass = true;
+  return  pass;
 
 }
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index 90298838e5d1..447c38a661c7 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -1,7 +1,6 @@
 #
 #  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
-from AthenaConfiguration.AllConfigFlags import ConfigFlags 
 
 # menu components   
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
@@ -9,7 +8,6 @@ from AthenaCommon.CFElements import parOR, seqAND
 from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
 from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool
 from TrigEDMConfig.TriggerEDMRun3 import recordable
-from AthenaCommon.Constants import DEBUG
 
 def fastElectronSequence(do_idperf):
     """ second step:  tracking....."""
@@ -38,7 +36,7 @@ def fastElectronSequence(do_idperf):
     theElectronFex.TrackParticlesName = TrackParticlesName
     theElectronFex.ElectronsName=recordable("HLT_FastElectrons")
     theElectronFex.DummyElectronsName= "HLT_FastDummyElectrons"
-    #theElectronFex.OutputLevel = DEBUG
+ 
     # EVCreator:
     l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron")
     l2ElectronViewsMaker.RoIsLink = "initialRoI" # Merge inputs based on their initial L1 ROI
@@ -72,9 +70,11 @@ def fastElectronMenuSequence(do_idperf):
 
     # make the Hypo
     from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastElectronHypoAlgMT
-    theElectronHypo = TrigEgammaFastElectronHypoAlgMT()
+    if do_idperf is True:
+        theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT_idperf")
+    else:
+        theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT")
     theElectronHypo.Electrons = sequenceOut
-
     theElectronHypo.RunInView=True
 
     from TrigEgammaHypo.TrigEgammaFastElectronHypoTool import TrigEgammaFastElectronHypoToolFromDict
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 5e099641c193..95a563eefcd8 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -105,6 +105,7 @@ def setupMenu():
         ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e5_idperf_L1EM3', groups=SingleElectronGroup),
         
         # Primary
         ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH',  groups=SingleElectronGroup),
-- 
GitLab


From 9da1ddf0cfc74fc0213b96b42cdd3b32e2fbb3fe Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Fri, 11 Dec 2020 08:35:29 +0100
Subject: [PATCH 018/308] update

---
 Tools/PROCTools/python/RunTier0TestsTools.py  |  4 +-
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 74 +++++++++----------
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 7372331fbc67..74481aeb2f77 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -31,10 +31,10 @@ ciRefFileMap = {
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
                 'overlay-d1498-22.0'   : 'v38',
-                'overlay-d1592-22.0'   : 'v1',
+                'overlay-d1592-22.0'   : 'v2',
                 'overlay-bkg-21.0'     : 'v1',
                 'overlay-bkg-22.0'     : 'v4',
-                'dataoverlay-d1590-22.0' : 'v4',
+                'dataoverlay-d1590-22.0' : 'v5',
                 'dataoverlay-hits-22.0'  : 'v1',
                }
 
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index c059ebb16c13..7cd1818c9f1f 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -60,8 +60,8 @@ HLT_2e3_etcut_L12EM3:
   stepFeatures:
     0: 342
     1: 976
-    2: 712
-    3: 270
+    2: 708
+    3: 268
 HLT_2g10_loose_mu20_L1MU20:
   eventCount: 0
   stepCounts:
@@ -872,8 +872,8 @@ HLT_e3_etcut_L1EM3:
   stepFeatures:
     0: 171
     1: 491
-    2: 360
-    3: 136
+    2: 358
+    3: 135
 HLT_e5_etcut_L1EM3:
   eventCount: 20
   stepCounts:
@@ -883,7 +883,7 @@ HLT_e5_etcut_L1EM3:
     3: 20
   stepFeatures:
     0: 137
-    1: 458
+    1: 459
     2: 173
     3: 102
 HLT_e5_lhloose_L1EM3:
@@ -896,7 +896,7 @@ HLT_e5_lhloose_L1EM3:
     4: 6
   stepFeatures:
     0: 60
-    1: 145
+    1: 146
     2: 78
     3: 44
     4: 7
@@ -910,7 +910,7 @@ HLT_e5_lhloose_noringer_L1EM3:
     4: 6
   stepFeatures:
     0: 56
-    1: 128
+    1: 130
     2: 88
     3: 46
     4: 7
@@ -924,7 +924,7 @@ HLT_e5_lhmedium_L1EM3:
     4: 4
   stepFeatures:
     0: 58
-    1: 131
+    1: 132
     2: 76
     3: 42
     4: 5
@@ -938,7 +938,7 @@ HLT_e5_lhmedium_noringer_L1EM3:
     4: 4
   stepFeatures:
     0: 48
-    1: 97
+    1: 99
     2: 66
     3: 38
     4: 5
@@ -952,7 +952,7 @@ HLT_e5_lhtight_L1EM3:
     4: 4
   stepFeatures:
     0: 57
-    1: 128
+    1: 129
     2: 74
     3: 41
     4: 5
@@ -966,7 +966,7 @@ HLT_e5_lhtight_nod0_L1EM3:
     4: 4
   stepFeatures:
     0: 57
-    1: 128
+    1: 129
     2: 74
     3: 41
     4: 5
@@ -980,7 +980,7 @@ HLT_e5_lhtight_noringer_L1EM3:
     4: 4
   stepFeatures:
     0: 45
-    1: 92
+    1: 94
     2: 60
     3: 36
     4: 5
@@ -994,7 +994,7 @@ HLT_e5_lhtight_noringer_nod0_L1EM3:
     4: 4
   stepFeatures:
     0: 45
-    1: 92
+    1: 94
     2: 60
     3: 36
     4: 5
@@ -1035,7 +1035,7 @@ HLT_e7_etcut_L1EM3:
     3: 20
   stepFeatures:
     0: 89
-    1: 361
+    1: 362
     2: 117
     3: 73
 HLT_e7_lhmedium_mu24_L1MU20:
@@ -1663,11 +1663,11 @@ HLT_j45_pf_subjesgscIS_ftf_L1J20:
     0: 19
     1: 52
 HLT_j45_pf_subjesgscIS_ftf_bdl1r70_split_L1J20:
-  eventCount: 13
+  eventCount: 14
   stepCounts:
     0: 19
     1: 18
-    2: 13
+    2: 14
   stepFeatures:
     0: 19
     1: 49
@@ -1729,15 +1729,15 @@ HLT_j45_subjesgscIS_ftf_L1J15:
     0: 20
     1: 48
 HLT_j45_subjesgscIS_ftf_bdl1r70_split_L1J20:
-  eventCount: 13
+  eventCount: 12
   stepCounts:
     0: 19
     1: 19
-    2: 13
+    2: 12
   stepFeatures:
     0: 19
     1: 47
-    2: 24
+    2: 23
 HLT_j45_subjesgscIS_ftf_bmv2c1070_split_L1J20:
   eventCount: 15
   stepCounts:
@@ -1747,7 +1747,7 @@ HLT_j45_subjesgscIS_ftf_bmv2c1070_split_L1J20:
   stepFeatures:
     0: 19
     1: 47
-    2: 27
+    2: 28
 HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:
   eventCount: 19
   stepCounts:
@@ -2473,17 +2473,17 @@ HLT_sct_noise_SCTPEB_L1RD0_EMPTY:
 HLT_tau0_perf_ptonly_L1TAU100:
   eventCount: 0
 HLT_tau0_perf_ptonly_L1TAU12:
-  eventCount: 15
+  eventCount: 16
   stepCounts:
     0: 18
-    1: 15
-    2: 15
-    3: 15
+    1: 16
+    2: 16
+    3: 16
   stepFeatures:
     0: 42
-    1: 23
-    2: 23
-    3: 23
+    1: 24
+    2: 24
+    3: 24
 HLT_tau0_perf_ptonly_L1TAU60:
   eventCount: 3
   stepCounts:
@@ -2893,7 +2893,7 @@ HLT_unconvtrk120_isohpttrack_imedium_L1XE50:
   stepCounts:
     0: 6
   stepFeatures:
-    0: 11
+    0: 10
 HLT_xe100_cvfpufit_L1XE50:
   eventCount: 6
   stepCounts:
@@ -2977,21 +2977,21 @@ HLT_xe110_pfsum_L1XE50:
     0: 10
     1: 5
 HLT_xe110_pfsum_cssk_L1XE50:
-  eventCount: 3
+  eventCount: 2
   stepCounts:
     0: 10
-    1: 3
+    1: 2
   stepFeatures:
     0: 10
-    1: 3
+    1: 2
 HLT_xe110_pfsum_vssk_L1XE50:
-  eventCount: 4
+  eventCount: 3
   stepCounts:
     0: 10
-    1: 4
+    1: 3
   stepFeatures:
     0: 10
-    1: 4
+    1: 3
 HLT_xe110_tc_em_L1XE50:
   eventCount: 5
   stepCounts:
@@ -3109,7 +3109,7 @@ HLT_xe80_tcpufit_unconvtrk120_isohpttrack_iaggrloose_L1XE50:
   stepCounts:
     0: 3
   stepFeatures:
-    0: 7
+    0: 6
 HLT_xe80_tcpufit_unconvtrk120_isohpttrack_iaggrmedium_L1XE50:
   eventCount: 2
   stepCounts:
@@ -3121,13 +3121,13 @@ HLT_xe80_tcpufit_unconvtrk120_isohpttrack_imedium_L1XE50:
   stepCounts:
     0: 5
   stepFeatures:
-    0: 15
+    0: 14
 HLT_xe80_tcpufit_unconvtrk80_isohpttrack_imedium_L1XE50:
   eventCount: 6
   stepCounts:
     0: 6
   stepFeatures:
-    0: 20
+    0: 19
 HLT_xe95_trkmht_xe90_tcpufit_xe75_cell_L1XE50:
   eventCount: 4
   stepCounts:
-- 
GitLab


From fcf3101fdcf38879c654e728fc17db9ac9c84327 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Fri, 11 Dec 2020 14:53:58 +0100
Subject: [PATCH 019/308] Adding idperf chains to LS2

---
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 95a563eefcd8..363092d4e08f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -99,13 +99,13 @@ def setupMenu():
         ChainProp(name='HLT_e5_lhmedium_noringer_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_noringer_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_noringer_nod0_L1EM3', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e5_idperf_L1EM3', groups=SingleElectronGroup),        #idperf chains
 
         # low et threshold chains using Ringer
         ChainProp(name='HLT_e5_lhloose_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e5_idperf_L1EM3', groups=SingleElectronGroup),
         
         # Primary
         ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH',  groups=SingleElectronGroup),
@@ -123,6 +123,8 @@ def setupMenu():
         ChainProp(name='HLT_e26_lhtight_ivartight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM24VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_idperf_L1EM24VHI', groups=SingleElectronGroup),      #idperf chains
+        ChainProp(name='HLT_e28_idperf_L1EM24VHI', groups=SingleElectronGroup),      #idperf chains
         ChainProp(name='HLT_e60_lhmedium_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e60_lhmedium_nod0_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e140_lhloose_L1EM22VHI', groups=SingleElectronGroup),
@@ -135,8 +137,10 @@ def setupMenu():
         ChainProp(name='HLT_2e24_lhvloose_L12EM20VH', stream=[PhysicsStream], groups=MultiElectronGroup),
         ChainProp(name='HLT_e24_lhvloose_2e12_lhvloose_L1EM20VH_3EM10VH', stream=[PhysicsStream], groups=MultiElectronGroup),
 
+        
         # TnP triggers
-        ChainProp(name='HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3', groups=MultiElectronGroup),    
+        ChainProp(name='HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3', groups=MultiElectronGroup),
+        ChainProp(name='HLT_e20_lhmedium_e15_idperf_Zee_L12EM3', groups=MultiElectronGroup), #idperf leg    
         # for moving to PhysicsP1, ATR-21242
         # ChainProp(name='HLT_2e17_etcut_L12EM15VHI', stream=[PhysicsStream], groups=MultiElectronGroup),
    
-- 
GitLab


From 818962cc3abc030a49740071b914ab0e18917f4e Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Fri, 11 Dec 2020 17:07:53 +0100
Subject: [PATCH 020/308] Allow extra flexibility in HypoAlg output validation
 for multi-leg chains

---
 .../DecisionHandling/src/HypoBase.cxx         | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/Trigger/TrigSteer/DecisionHandling/src/HypoBase.cxx b/Trigger/TrigSteer/DecisionHandling/src/HypoBase.cxx
index 9f5244df6a12..37e07dedac87 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/HypoBase.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/HypoBase.cxx
@@ -150,16 +150,19 @@ StatusCode HypoBase::validateLogicalFlow(const ElementLink<DecisionContainer>& d
       ATH_CHECK( seed.isValid() );
       DecisionIDContainer seedIDSet;
       decisionIDs(*seed, seedIDSet);
-      if (passed(id, seedIDSet)) {
+      // Id may be a chain-ID (represetns a whole chain) or a leg-ID (represents just a single leg of a multi-leg chain)
+      // Is ID is in this parent's set of passed IDs?
+      // Or, (if ID is a leg-ID) is the chain-ID of leg-ID in the parent's set of passed IDs?
+      if (passed(id, seedIDSet) or passed(getIDFromLeg(id).numeric(), seedIDSet)) {
         ++parentsWithDecision;
       }
-      else{ //adding also Ids from the legs
-	for (auto sid: seedIDSet){
-	  if (TrigCompositeUtils::getIDFromLeg(sid).numeric() == id){
-	    ++parentsWithDecision;
-	    break;
-	  }
-	}
+      else{ // Or, for each of the seed IDs, if the seed ID is a leg-ID, is the seed chain-ID of the seed leg-ID the same as ID?  
+        for (auto sid: seedIDSet){
+          if (getIDFromLeg(sid).numeric() == id){
+            ++parentsWithDecision;
+            break;
+          }
+        }
       }
     }
     if (mode == kRequireOne && parentsWithDecision == 0) {
-- 
GitLab


From 50ba3574383aa256b206d504f905ae11241ca3aa Mon Sep 17 00:00:00 2001
From: Michel Angelo Aguilera Pulgar <michel.angelo.aguilera.pulgar@cern.ch>
Date: Sat, 12 Dec 2020 04:11:27 +0100
Subject: [PATCH 021/308] Filling L1 variables 1

---
 .../python/TrigTauMonitoringConfigMT.py       |  62 ++++++++++
 .../src/TrigTauMonitorAlgorithm.cxx           | 108 +++++++++++++-----
 .../src/TrigTauMonitorAlgorithm.h             |   4 +-
 3 files changed, 144 insertions(+), 30 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
index c09400a12dac..813f58d1fb1e 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
@@ -230,6 +230,7 @@ class TrigTauMonAlgBuilder:
     for l1seed in l1seeds:
         if not l1seed : 
             continue
+        self.bookL1( monAlg, l1seed )
         self.bookL1EffHistograms( monAlg, l1seed, nProng='1P')
         self.bookL1EffHistograms( monAlg, l1seed, nProng='MP') 
    
@@ -280,6 +281,67 @@ class TrigTauMonAlgBuilder:
     defineEachStepHistograms('tauPhi','#phi', 16, -3.2, 3.2)
     defineEachStepHistograms('averageMu', 'average pileup', 10, 0., 80.)
 
+  #
+  # Booking L1 Variables
+  #
+
+  def bookL1( self, monAlg, trigL1Item):
+
+    monGroupName = trigL1Item+'_L1'
+    monGroupPath = 'L1/'+trigL1Item+'/L1'
+
+    monGroup = self.helper.addGroup( monAlg, monGroupName,
+                              self.basePath+'/'+monGroupPath )
+    #hL1EtVsEta hL1EtVsPhi hL1EtaVsPhi hL1RoIEMIso hL1RoIEta hL1RoIHadCore hL1RoIHadIsol hL1RoIPhi hL1RoITauClus hL1RoITauClusEMIso hL1RoITauVsJet hL1RoITauVsJetDEt hL1RoITauVsJetMismatch hL1RoIeT hL1RoIisol
+
+    monGroup.defineHistogram('L1RoIEt;L1RoIEta', type='TH2F', title='L1 RoI Et vs Eta; E_{T}[GeV]; #eta',
+                            path=monGroupPath,
+                            xbins=100,xmin=0,xmax=100,
+                            ybins=100,ymin=-2.6,ymax=2.6)
+    monGroup.defineHistogram('L1RoIEt;L1RoIPhi', type='TH2F', title='L1 RoI Et vs Phi; E_{T}[GeV]; #phi',
+                            path=monGroupPath,
+                            xbins=100,xmin=0,xmax=100,
+                            ybins=100,ymin=-3.2,ymax=3.2)
+    monGroup.defineHistogram('L1RoIEta;L1RoIPhi', type='TH2F', title='L1 RoI Eta vs Phi; #eta; #phi',
+                            path=monGroupPath,
+                            xbins=100,xmin=-2.6,xmax=2.6,
+                            ybins=100,ymin=-3.2,ymax=3.2)
+    monGroup.defineHistogram('L1RoIEMIso', title='L1 RoI EM Isol ; E_{T}^{EM Isol}[GeV]; N RoI',xbins=16,xmin=-2,xmax=30)
+    monGroup.defineHistogram('L1RoIEta', title='L1 RoI Eta ; #eta; N RoI',xbins=100,xmin=-2.6,xmax=2.6)
+    monGroup.defineHistogram('L1RoIHadCore', title='L1 RoI HAD Core ; E_{T}^{HAD}[GeV]; N RoI',xbins=16,xmin=-2,xmax=30)
+    monGroup.defineHistogram('L1RoIHadIsol', title='L1 RoI HAD Isol ; E_{T}^{HAD Isol}[GeV]; N RoI',xbins=16,xmin=-2,xmax=30)
+    monGroup.defineHistogram('L1RoIPhi', title='L1 RoI Phi ; #phi; N RoI',xbins=100,xmin=-3.2,xmax=3.2)
+    monGroup.defineHistogram('L1RoITauClus', title='L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI',xbins=260,xmin=0,xmax=130)
+    monGroup.defineHistogram('L1RoITauClus;L1RoIEMIso', type='TH2F', title='L1 RoI TauClus vs EMiso ; E_{T}[GeV]; E_{T}^{EM Isol}[GeV]',
+                            path=monGroupPath,
+                            xbins=140,xmin=10,xmax=80,
+                            ybins=42,ymin=-1,ymax=20)
+    #hL1RoITauVsJet hL1RoITauVsJetDEt hL1RoITauVsJetMismatch
+    monGroup.defineHistogram('L1RoIeT', title='L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI',xbins=260,xmin=0,xmax=130)
+
+    """     addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/L1RoI",run));
+        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
+        ATH_MSG_DEBUG("After setting CurrentMonGroup" << "HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
+        addHistogram(new TH1F("hL1RoIEta","L1 RoI Eta ; #eta; N RoI",100,-2.6,2.6));
+        addHistogram(new TH1F("hL1RoIPhi","L1 RoI Phi ; #phi; N RoI",100,-3.2,3.2));
+        
+        addHistogram(new TH2F("hL1EtaVsPhi","L1 RoI Eta vs Phi; #eta; #phi",100,-2.6,2.6,100,-3.2,3.2));
+        addHistogram(new TH1F("hL1RoIisol","L1 RoI Isolation; RoI Isolation Bit; N RoI",10,0.5,9.5));
+        addHistogram(new TH1F("hL1RoIeT","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
+        addHistogram(new TH1F("hL1RoITauClus","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
+          //addHistogram(new TH1F("hL1RoITauClus2","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",200,0.,1000.));
+          addHistogram(new TH1F("hL1RoIEMIso","L1 RoI EM Isol ; E_{T}^{EM Isol}[GeV]; N RoI",16,-2,30));
+          addHistogram(new TH1F("hL1RoIHadCore","L1 RoI HAD Core ; E_{T}^{HAD}[GeV]; N RoI",16,-2,30));
+          addHistogram(new TH1F("hL1RoIHadIsol","L1 RoI HAD Isol ; E_{T}^{HAD Isol}[GeV]; N RoI",16,-2,30));
+          addHistogram(new TH2F("hL1RoITauClusEMIso","L1 RoI TauClus vs EMiso ; E_{T}[GeV]; E_{T}^{EM Isol}[GeV]",140.,10.,80.,42,-1.,20.));
+          addHistogram(new TH2F("hL1RoITauVsJet","L1 RoI Tau Et vs Jet Et ; Tau E_{T} [GeV]; Jet E_{T} [GeV]",200,0.,100.,200,0.,100));
+          addHistogram(new TH2F("hL1RoITauVsJetMismatch","L1 RoI Tau-Jet deta-dphi if Jet Et< Tau Et ; d#eta; d#phi",50,-0.3,0.3,50,-0.3,0.3));
+          addHistogram(new TH2F("hL1RoITauVsJetDEt","L1 RoI Tau-Jet dEt if Jet Et< Tau Et ; Tau E_{t}; dE_{T}",200,0.,100.,50,0.,25.));
+        addHistogram(new TH2F("hL1EtVsPhi","L1 RoI Et vs Phi; E_{T}[GeV]; #phi",100,0.,100.,100,-3.2,3.2));
+        addHistogram(new TH2F("hL1EtVsEta","L1 RoI Et vs Eta; E_{T}[GeV]; #eta",100,0.,100.,100,-2.6,2.6));    """
+
+
+                             
   #
   # Book RNN Variables
   #
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
index 9dfa8256c990..8e45827a1e08 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
@@ -80,7 +80,7 @@ StatusCode TrigTauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
     }
 
     fillDistributions( ctx, pairObjs, trigger, info.HLTthr, fill_l1eff, info.trigL1Item, info.L1thr); 
-
+    fillL1Distributions( ctx, pairObjs, trigger, info.HLTthr, fill_l1eff, info.trigL1Item, info.L1thr); 
     pairObjs.clear();
                                                             
   }
@@ -164,15 +164,7 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
     }else if(nTracks>1 && ( pairObj.first->pt() > (HLTthr-thresholdOffset)*1.e3)){
        offline_for_hlt_tau_vec_mp.push_back(pairObj.first);
     }
-
-    // filling vectors for studying L1 performance
-    if(nTracks==1 && ( pairObj.first->pt() > (L1thr-thresholdOffset)*1.e3)){
-       offline_for_l1_tau_vec_1p.push_back(pairObj.first);
-    }else if(nTracks>1 && ( pairObj.first->pt() > (L1thr-thresholdOffset)*1.e3)){
-       offline_for_l1_tau_vec_mp.push_back(pairObj.first); 
-    }
   }
-
   // Offline
   if(info.isRNN){
     fillRNNInputVars( trigger, offline_for_hlt_tau_vec_1p,"1P", false );
@@ -228,19 +220,65 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
     fillHLTEfficiencies(ctx, trigger, offline_for_hlt_tau_vec_mp, online_tau_vec_mp, "MP");
   }
 
-  if(fill_l1eff) {
-    fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_1p, "1P", trigL1Item);
-    fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_mp, "MP", trigL1Item);
-  }
-
   offline_for_hlt_tau_vec_1p.clear();
   offline_for_hlt_tau_vec_mp.clear();
-  offline_for_l1_tau_vec_1p.clear();
-  offline_for_l1_tau_vec_mp.clear();
   online_tau_vec_1p.clear();
   online_tau_vec_mp.clear();
 }
 
+  void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1thr) const
+  {
+    ATH_MSG_DEBUG ("TrigTauMonitorAlgorithm::fillL1Distributions");
+
+    const double thresholdOffset{10.0};
+    const TrigInfo info = getTrigInfo(trigger);
+    std::vector<const xAOD::TauJet*> tau_vec; //  offline taus
+    std::vector<const xAOD::TauJet*> offline_for_l1_tau_vec_1p; // offline 1p taus
+    std::vector<const xAOD::TauJet*> offline_for_l1_tau_vec_mp; // offline mp taus
+    std::vector<const xAOD::EmTauRoI*> L1rois; //  used for studying L1 performance
+
+    for( auto pairObj: pairObjs )
+      {
+      int nTracks=-1;
+      pairObj.first->detail(xAOD::TauJetParameters::nChargedTracks, nTracks);
+      ATH_MSG_DEBUG("NTracks Offline: " << nTracks);
+      // filling vectors 1p and mp
+      if(nTracks==1 && ( pairObj.first->pt() > (L1thr-thresholdOffset)*1.e3)){
+        offline_for_l1_tau_vec_1p.push_back(pairObj.first);
+      }else if(nTracks>1 && ( pairObj.first->pt() > (L1thr-thresholdOffset)*1.e3)){
+        offline_for_l1_tau_vec_mp.push_back(pairObj.first); 
+      }
+      }
+
+    const std::vector<Trig::Feature<TrigRoiDescriptor> > vec_L1roi_EFall =
+      m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs).get<TrigRoiDescriptor>("initialRoI",TrigDefs::alsoDeactivateTEs);
+    std::vector<Trig::Feature<TrigRoiDescriptor> >::const_iterator CI = vec_L1roi_EFall.begin();
+
+    for (;CI!=vec_L1roi_EFall.end(); ++CI){
+      if(!(CI->cptr())) continue;
+      const xAOD::EmTauRoI *aEmTau_ROI = findLVL1_ROI(ctx, CI->cptr());
+      if(!aEmTau_ROI) continue;
+      L1rois.push_back(aEmTau_ROI);
+    }
+
+    //if(info.isL1){
+      fillL1(trigL1Item, L1rois);
+    //}
+
+    if(fill_l1eff) {
+      fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_1p, "1P", trigL1Item, L1rois);
+      fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_mp, "MP", trigL1Item, L1rois);
+    }
+
+
+    offline_for_l1_tau_vec_1p.clear();
+    offline_for_l1_tau_vec_mp.clear();
+    L1rois.clear();
+  }
+
+
+
+
 void TrigTauMonitorAlgorithm::fillHLTEfficiencies(const EventContext& ctx, const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::vector<const xAOD::TauJet*> online_tau_vec, std::string nProng) const
 {
   ATH_MSG_DEBUG("Fill HLT efficiencies: " << trigger);
@@ -270,7 +308,7 @@ void TrigTauMonitorAlgorithm::fillHLTEfficiencies(const EventContext& ctx, const
 
 }
 
-void TrigTauMonitorAlgorithm::fillL1Efficiencies(const EventContext& ctx, const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Item) const
+void TrigTauMonitorAlgorithm::fillL1Efficiencies( const EventContext& ctx ,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois) const
 {
   ATH_MSG_DEBUG("Fill L1 efficiencies: " << trigL1Item);
  
@@ -284,18 +322,6 @@ void TrigTauMonitorAlgorithm::fillL1Efficiencies(const EventContext& ctx, const
   auto averageMu = Monitored::Scalar<float>(monGroupName+"_averageMu",0.0);
   auto L1_match = Monitored::Scalar<bool>(monGroupName+"_L1pass",false);
 
-  const std::vector<Trig::Feature<TrigRoiDescriptor> > vec_L1roi_EFall =
-       m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs).get<TrigRoiDescriptor>("initialRoI",TrigDefs::alsoDeactivateTEs);
-  std::vector<Trig::Feature<TrigRoiDescriptor> >::const_iterator CI = vec_L1roi_EFall.begin();
-
-  std::vector<const xAOD::EmTauRoI*> L1rois;
-  for (;CI!=vec_L1roi_EFall.end(); ++CI){
-      if(!(CI->cptr())) continue;
-      const xAOD::EmTauRoI *aEmTau_ROI = findLVL1_ROI(ctx, CI->cptr());
-      if(!aEmTau_ROI) continue;
-      L1rois.push_back(aEmTau_ROI);
-  }
-
   for(auto offline_tau : offline_tau_vec){
 
        tauPt = offline_tau->pt()/1e3;
@@ -333,6 +359,30 @@ const xAOD::EmTauRoI* TrigTauMonitorAlgorithm::findLVL1_ROI(const EventContext&
 
   return 0;
    
+}
+
+ void TrigTauMonitorAlgorithm::fillL1(const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois)  const
+ {
+   ATH_MSG_DEBUG("Fill L1: " << trigL1Item);
+
+   std::string monGroupName = trigL1Item+"_L1";
+
+   auto monGroup = getGroup(monGroupName);
+   //EmTauRoI_v2.h
+   auto L1RoIEt           = Monitored::Collection("L1RoIEt"     , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->eT()/1e3 , detail){} return detail;});
+   auto L1RoIEta          = Monitored::Collection("L1RoIEta"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->eta()    , detail){} return detail;});
+   auto L1RoIPhi          = Monitored::Collection("L1RoIPhi"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->phi()    , detail){} return detail;});
+   auto L1RoITauClus      = Monitored::Collection("L1RoITauClus", L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->tauClus(), detail){} return detail;});
+   auto L1RoIisol         = Monitored::Collection("L1RoIisol"   , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->isol()   , detail){} return detail;});
+   auto L1RoIEMIsol       = Monitored::Collection("L1RoIEMIsol" , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->emIsol() , detail){} return detail;});
+   auto L1RoIHadCore      = Monitored::Collection("L1RoIHadCore", L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->hadCore(), detail){} return detail;});
+   auto L1RoIHadIsol      = Monitored::Collection("L1RoIHadIsol", L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->hadIsol(), detail){} return detail;});
+
+
+ fill(monGroup,L1RoIEt,L1RoIEta,L1RoIPhi,L1RoITauClus,L1RoIisol,L1RoIEMIsol,L1RoIHadCore,L1RoIHadIsol);
+
+ ATH_MSG_DEBUG("AFTER L1: " << trigL1Item);
+
 }
 
 void TrigTauMonitorAlgorithm::fillBDTOut(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
index 3a781ebad855..f212e154a778 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
@@ -50,11 +50,13 @@ class TrigTauMonitorAlgorithm : public AthMonitorAlgorithm {
   void fillRNNTrack(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec, bool online) const;
   void fillRNNCluster(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec, bool online) const;
   void fillbasicVars(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec, bool online) const;
+  void fillL1(const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois)  const;
   void fillBDTNoCorr(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const;
   void fillBDTOut(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const;
   void fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, const std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1Tthr) const;
+  void fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1thr) const;
   void fillHLTEfficiencies(const EventContext& ctx,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::vector<const xAOD::TauJet*> online_tau_vec, std::string nProng) const;
-  void fillL1Efficiencies(const EventContext& ctx, const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec,std::string nProng, const std::string trigL1Item) const;
+  void fillL1Efficiencies(const EventContext& ctx,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Ite, std::vector<const xAOD::EmTauRoI*> L1rois) const;
 
   inline double dR(const double eta1, const double phi1, const double eta2, const double phi2) const
   {
-- 
GitLab


From c6c7a8584459ea35ef9bf15bf9d24436641ebb68 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Sat, 12 Dec 2020 09:08:51 +0100
Subject: [PATCH 022/308] Move to LCG_98python3_ATLAS_3

---
 Projects/AthDataQuality/CMakeLists.txt    | 2 +-
 Projects/AthGeneration/build_externals.sh | 2 +-
 Projects/AthSimulation/build_externals.sh | 2 +-
 Projects/Athena/build_externals.sh        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Projects/AthDataQuality/CMakeLists.txt b/Projects/AthDataQuality/CMakeLists.txt
index 75a5c2a00fae..0a88450493ed 100644
--- a/Projects/AthDataQuality/CMakeLists.txt
+++ b/Projects/AthDataQuality/CMakeLists.txt
@@ -18,7 +18,7 @@ set( TDAQ-COMMON_ATROOT
 find_package( AtlasCMake REQUIRED )
 
 # Build the project against LCG:
-set( LCG_VERSION_POSTFIX "python3_ATLAS_2"
+set( LCG_VERSION_POSTFIX "python3_ATLAS_3"
    CACHE STRING "Version postfix for the LCG release to use" )
 set( LCG_VERSION_NUMBER 98
    CACHE STRING "Version number for the LCG release to use" )
diff --git a/Projects/AthGeneration/build_externals.sh b/Projects/AthGeneration/build_externals.sh
index 2046b1fcfd9e..926cc7c91aaf 100755
--- a/Projects/AthGeneration/build_externals.sh
+++ b/Projects/AthGeneration/build_externals.sh
@@ -24,7 +24,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_2"
+EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_3"
             -DATLAS_GAUDI_TAG="v35r0.001")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh
index ab39eecffaa9..507d9e19dd0a 100755
--- a/Projects/AthSimulation/build_externals.sh
+++ b/Projects/AthSimulation/build_externals.sh
@@ -24,7 +24,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_2"
+EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_3"
             -DATLAS_GAUDI_TAG="v35r0.001")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh
index 01e4fbb871eb..8766b836971c 100755
--- a/Projects/Athena/build_externals.sh
+++ b/Projects/Athena/build_externals.sh
@@ -24,7 +24,7 @@ BUILDDIR=""
 BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
-EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_2"
+EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_3"
             -DATLAS_GAUDI_TAG="v35r0.001")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
-- 
GitLab


From d06a86463af5628107c047b3efa070ff6942d2a9 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Sat, 12 Dec 2020 16:27:59 +0100
Subject: [PATCH 023/308] Debugging TrigEgammaFastElectronHypoTool.cxx to keep
 return pass reasonable

---
 .../TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py     | 2 +-
 .../TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
index 21c7d14d5dd4..79b33b344746 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
@@ -18,7 +18,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
  
     if 'idperf' in name:
         tool.AcceptAll = True
-    
+   
     else:
         monTool = GenericMonitoringTool("MonTool"+name)
         monTool.defineHistogram('CutCounter', type='TH1I', path='EXPERT', title="FastElectron Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt="kCumulative")
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
index 18c602f01a9d..e21607786cfb 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
@@ -123,7 +123,7 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
   if( eToverPt <  m_caloTrackdEoverPLow[cutIndex] ) {
     ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " <<  m_caloTrackdEoverPLow[cutIndex] );
 
-    pass = true;
+    pass = false;
     return  pass;
   }
   cutCounter++;
-- 
GitLab


From d106a7b2d48fc117c075559f3d48968b3e053a62 Mon Sep 17 00:00:00 2001
From: Michel Angelo Aguilera Pulgar <michel.angelo.aguilera.pulgar@cern.ch>
Date: Sun, 13 Dec 2020 02:11:08 +0100
Subject: [PATCH 024/308] Add fill_l1

---
 .../python/TrigTauMonitoringConfigMT.py       | 22 ----------------
 .../src/TrigTauMonitorAlgorithm.cxx           | 25 ++++++++-----------
 .../src/TrigTauMonitorAlgorithm.h             |  4 +--
 3 files changed, 13 insertions(+), 38 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
index 813f58d1fb1e..372d8d211339 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
@@ -319,28 +319,6 @@ class TrigTauMonAlgBuilder:
     #hL1RoITauVsJet hL1RoITauVsJetDEt hL1RoITauVsJetMismatch
     monGroup.defineHistogram('L1RoIeT', title='L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI',xbins=260,xmin=0,xmax=130)
 
-    """     addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/L1RoI",run));
-        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
-        ATH_MSG_DEBUG("After setting CurrentMonGroup" << "HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
-        addHistogram(new TH1F("hL1RoIEta","L1 RoI Eta ; #eta; N RoI",100,-2.6,2.6));
-        addHistogram(new TH1F("hL1RoIPhi","L1 RoI Phi ; #phi; N RoI",100,-3.2,3.2));
-        
-        addHistogram(new TH2F("hL1EtaVsPhi","L1 RoI Eta vs Phi; #eta; #phi",100,-2.6,2.6,100,-3.2,3.2));
-        addHistogram(new TH1F("hL1RoIisol","L1 RoI Isolation; RoI Isolation Bit; N RoI",10,0.5,9.5));
-        addHistogram(new TH1F("hL1RoIeT","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
-        addHistogram(new TH1F("hL1RoITauClus","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
-          //addHistogram(new TH1F("hL1RoITauClus2","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",200,0.,1000.));
-          addHistogram(new TH1F("hL1RoIEMIso","L1 RoI EM Isol ; E_{T}^{EM Isol}[GeV]; N RoI",16,-2,30));
-          addHistogram(new TH1F("hL1RoIHadCore","L1 RoI HAD Core ; E_{T}^{HAD}[GeV]; N RoI",16,-2,30));
-          addHistogram(new TH1F("hL1RoIHadIsol","L1 RoI HAD Isol ; E_{T}^{HAD Isol}[GeV]; N RoI",16,-2,30));
-          addHistogram(new TH2F("hL1RoITauClusEMIso","L1 RoI TauClus vs EMiso ; E_{T}[GeV]; E_{T}^{EM Isol}[GeV]",140.,10.,80.,42,-1.,20.));
-          addHistogram(new TH2F("hL1RoITauVsJet","L1 RoI Tau Et vs Jet Et ; Tau E_{T} [GeV]; Jet E_{T} [GeV]",200,0.,100.,200,0.,100));
-          addHistogram(new TH2F("hL1RoITauVsJetMismatch","L1 RoI Tau-Jet deta-dphi if Jet Et< Tau Et ; d#eta; d#phi",50,-0.3,0.3,50,-0.3,0.3));
-          addHistogram(new TH2F("hL1RoITauVsJetDEt","L1 RoI Tau-Jet dEt if Jet Et< Tau Et ; Tau E_{t}; dE_{T}",200,0.,100.,50,0.,25.));
-        addHistogram(new TH2F("hL1EtVsPhi","L1 RoI Et vs Phi; E_{T}[GeV]; #phi",100,0.,100.,100,-3.2,3.2));
-        addHistogram(new TH2F("hL1EtVsEta","L1 RoI Et vs Eta; E_{T}[GeV]; #eta",100,0.,100.,100,-2.6,2.6));    """
-
-
                              
   #
   # Book RNN Variables
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
index 8e45827a1e08..a1bed95144d9 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
@@ -54,7 +54,7 @@ StatusCode TrigTauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
   std::vector< std::pair<const xAOD::TauJet*, const TrigCompositeUtils::Decision*>> pairObjs;
  
   std::vector<std::string> L1seed_list;
-  bool fill_l1eff = false;
+  bool fill_l1 = false;
 
   for(const auto& trigger : m_trigList){
 
@@ -67,20 +67,22 @@ StatusCode TrigTauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
     }  
 
     if(info.trigL1Item.empty()){ // L1 item not found
-       fill_l1eff = false;
+       fill_l1 = false;
     }
     else if (std::find(L1seed_list.begin(), L1seed_list.end(), info.trigL1Item) == L1seed_list.end())
     {
         // check if L1 seed has been already filled -> L1 seed must be filled only once for triggers with same L1 seed
-        fill_l1eff = true;
+        fill_l1 = true;
         L1seed_list.push_back(info.trigL1Item);
         
     } else {
-        fill_l1eff = false;
+        fill_l1 = false;
     }
 
-    fillDistributions( ctx, pairObjs, trigger, info.HLTthr, fill_l1eff, info.trigL1Item, info.L1thr); 
-    fillL1Distributions( ctx, pairObjs, trigger, info.HLTthr, fill_l1eff, info.trigL1Item, info.L1thr); 
+    fillDistributions( ctx, pairObjs, trigger, info.HLTthr, info.trigL1Item, info.L1thr); 
+    if(fill_l1){
+      fillL1Distributions( ctx, pairObjs, trigger, info.HLTthr,info.trigL1Item, info.L1thr);  
+    }   
     pairObjs.clear();
                                                             
   }
@@ -136,7 +138,7 @@ StatusCode TrigTauMonitorAlgorithm::executeNavigation( const EventContext& ctx,
   return StatusCode::SUCCESS;
 }
 
-void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1thr) const
+void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const std::string trigL1Item, float L1thr) const
 {
   ATH_MSG_DEBUG ("TrigTauMonitorAlgorithm::fillDistributions");
 
@@ -144,8 +146,6 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
 
   std::vector<const xAOD::TauJet*> offline_for_hlt_tau_vec_1p; // offline 1p taus used for studying HLT performance
   std::vector<const xAOD::TauJet*> offline_for_hlt_tau_vec_mp; // offline mp taus used for studying HLT performance
-  std::vector<const xAOD::TauJet*> offline_for_l1_tau_vec_1p; // offline 1p taus used for studying L1 performance 
-  std::vector<const xAOD::TauJet*> offline_for_l1_tau_vec_mp; // offline mp taus used for studying L1 performance
   std::vector<const xAOD::TauJet*> online_tau_vec_1p; // online 1p taus used for studying HLT performance
   std::vector<const xAOD::TauJet*> online_tau_vec_mp; // online mp taus used for studying HLT performance
 
@@ -226,7 +226,7 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
   online_tau_vec_mp.clear();
 }
 
-  void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1thr) const
+  void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const std::string trigL1Item, float L1thr) const
   {
     ATH_MSG_DEBUG ("TrigTauMonitorAlgorithm::fillL1Distributions");
 
@@ -265,12 +265,9 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
       fillL1(trigL1Item, L1rois);
     //}
 
-    if(fill_l1eff) {
       fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_1p, "1P", trigL1Item, L1rois);
       fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_mp, "MP", trigL1Item, L1rois);
-    }
-
-
+    
     offline_for_l1_tau_vec_1p.clear();
     offline_for_l1_tau_vec_mp.clear();
     L1rois.clear();
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
index f212e154a778..471891ef6304 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
@@ -53,8 +53,8 @@ class TrigTauMonitorAlgorithm : public AthMonitorAlgorithm {
   void fillL1(const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois)  const;
   void fillBDTNoCorr(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const;
   void fillBDTOut(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const;
-  void fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, const std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1Tthr) const;
-  void fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const bool fill_l1eff, const std::string trigL1Item, float L1thr) const;
+  void fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, const std::string trigger, float HLTthr, const std::string trigL1Item, float L1Tthr) const;
+  void fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const std::string trigL1Item, float L1thr) const;
   void fillHLTEfficiencies(const EventContext& ctx,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::vector<const xAOD::TauJet*> online_tau_vec, std::string nProng) const;
   void fillL1Efficiencies(const EventContext& ctx,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Ite, std::vector<const xAOD::EmTauRoI*> L1rois) const;
 
-- 
GitLab


From b5ff38f9634d0ada59708fcc97a80b6d2b6d4ea5 Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Mon, 14 Dec 2020 09:09:49 +0100
Subject: [PATCH 025/308] update

---
 .../PixelConditionsData/PixelModuleData.h                  | 3 ++-
 .../PixelConditionsData/src/PixelModuleData.cxx            | 7 ++++++-
 .../SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx  | 2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
index 66352b0fcec2..642c30ba7c1f 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
@@ -142,7 +142,8 @@ class PixelModuleData {
     // Lorentz angle correction
     void setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr);
     void setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr);
-    double getLorentzAngleCorr(const int bec, const int layer) const;
+    double getLorentzAngleCorr(int bec, int layer) const;
+    double getLorentzAngleCorr2() const;
 
     // DCS parameters
     void setDefaultBiasVoltage(float biasVoltage);
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
index 29e9b2dd140e..faa8fe7245eb 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
@@ -283,13 +283,18 @@ float PixelModuleData::getDefaultQ2TotC() const { return m_paramC; }
 // Lorentz angle correction
 void PixelModuleData::setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr) { m_BarrelLorentzAngleCorr = BarrelLorentzAngleCorr; }
 void PixelModuleData::setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr) { m_EndcapLorentzAngleCorr = EndcapLorentzAngleCorr; }
-double PixelModuleData::getLorentzAngleCorr(const int bec, const int layer) const {
+double PixelModuleData::getLorentzAngleCorr(int bec, int layer) const {
   double LAcorr = 1.0;
   if (std::abs(bec)==0 && layer<(int)m_BarrelLorentzAngleCorr.size()) { LAcorr=m_BarrelLorentzAngleCorr.at(layer); }
   if (std::abs(bec)==2 && layer<(int)m_EndcapLorentzAngleCorr.size()) { LAcorr=m_EndcapLorentzAngleCorr.at(layer); }
   return LAcorr;
 }
 
+double PixelModuleData::getLorentzAngleCorr2() const { 
+  double LAcorr = 1.0;
+  return LAcorr;
+}
+
 // DCS parameters
 void PixelModuleData::setDefaultBiasVoltage(float biasVoltage) { m_biasVoltage=biasVoltage; }
 float PixelModuleData::getDefaultBiasVoltage() const { return m_biasVoltage; }
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index e3fd0bba45b2..d16b21a68abd 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -145,6 +145,8 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     int barrel_ec   = pixelId->barrel_ec(element->identify());
     int layerIndex  = pixelId->layer_disk(element->identify());
 
+    int aaa = moduleData->getFEI4OverflowToT(barrel_ec,layerIndex);
+    double LACorr2 = moduleData->getLorentzAngleCorr2(barrel_ec,layerIndex);
     double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
 
     if (not p_design){
-- 
GitLab


From 26a0e409f547df8f0b105fd86a097e976b571824 Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Mon, 14 Dec 2020 09:13:23 +0100
Subject: [PATCH 026/308] update

---
 .../PixelConditionsData/PixelModuleData.h                    | 1 -
 .../PixelConditionsData/src/PixelModuleData.cxx              | 5 -----
 .../SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx    | 2 --
 3 files changed, 8 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
index 642c30ba7c1f..e1efb342b00c 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelModuleData.h
@@ -143,7 +143,6 @@ class PixelModuleData {
     void setBarrelLorentzAngleCorr(std::vector<double> BarrelLorentzAngleCorr);
     void setEndcapLorentzAngleCorr(std::vector<double> EndcapLorentzAngleCorr);
     double getLorentzAngleCorr(int bec, int layer) const;
-    double getLorentzAngleCorr2() const;
 
     // DCS parameters
     void setDefaultBiasVoltage(float biasVoltage);
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
index faa8fe7245eb..16da803924fc 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelModuleData.cxx
@@ -290,11 +290,6 @@ double PixelModuleData::getLorentzAngleCorr(int bec, int layer) const {
   return LAcorr;
 }
 
-double PixelModuleData::getLorentzAngleCorr2() const { 
-  double LAcorr = 1.0;
-  return LAcorr;
-}
-
 // DCS parameters
 void PixelModuleData::setDefaultBiasVoltage(float biasVoltage) { m_biasVoltage=biasVoltage; }
 float PixelModuleData::getDefaultBiasVoltage() const { return m_biasVoltage; }
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index d16b21a68abd..e3fd0bba45b2 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -145,8 +145,6 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     int barrel_ec   = pixelId->barrel_ec(element->identify());
     int layerIndex  = pixelId->layer_disk(element->identify());
 
-    int aaa = moduleData->getFEI4OverflowToT(barrel_ec,layerIndex);
-    double LACorr2 = moduleData->getLorentzAngleCorr2(barrel_ec,layerIndex);
     double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
 
     if (not p_design){
-- 
GitLab


From 09c73202903273070eab7604c0283cb556e5a20b Mon Sep 17 00:00:00 2001
From: Michel Angelo Aguilera Pulgar <michel.angelo.aguilera.pulgar@cern.ch>
Date: Mon, 14 Dec 2020 12:53:45 +0100
Subject: [PATCH 027/308] Fix warnings

---
 .../src/TrigTauMonitorAlgorithm.cxx           | 30 +++++++++----------
 .../src/TrigTauMonitorAlgorithm.h             |  6 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
index a1bed95144d9..7807e86a61e0 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
@@ -79,9 +79,9 @@ StatusCode TrigTauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
         fill_l1 = false;
     }
 
-    fillDistributions( ctx, pairObjs, trigger, info.HLTthr, info.trigL1Item, info.L1thr); 
+    fillDistributions( ctx, pairObjs, trigger, info.HLTthr); 
     if(fill_l1){
-      fillL1Distributions( ctx, pairObjs, trigger, info.HLTthr,info.trigL1Item, info.L1thr);  
+      fillL1Distributions( ctx, pairObjs, trigger ,info.trigL1Item, info.L1thr);  
     }   
     pairObjs.clear();
                                                             
@@ -138,7 +138,7 @@ StatusCode TrigTauMonitorAlgorithm::executeNavigation( const EventContext& ctx,
   return StatusCode::SUCCESS;
 }
 
-void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const std::string trigL1Item, float L1thr) const
+void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr) const
 {
   ATH_MSG_DEBUG ("TrigTauMonitorAlgorithm::fillDistributions");
 
@@ -226,7 +226,7 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
   online_tau_vec_mp.clear();
 }
 
-  void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const std::string trigL1Item, float L1thr) const
+void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger,  const std::string trigL1Item, float L1thr) const
   {
     ATH_MSG_DEBUG ("TrigTauMonitorAlgorithm::fillL1Distributions");
 
@@ -265,8 +265,8 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
       fillL1(trigL1Item, L1rois);
     //}
 
-      fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_1p, "1P", trigL1Item, L1rois);
-      fillL1Efficiencies(ctx, trigger, offline_for_l1_tau_vec_mp, "MP", trigL1Item, L1rois);
+      fillL1Efficiencies(ctx, offline_for_l1_tau_vec_1p, "1P", trigL1Item, L1rois);
+      fillL1Efficiencies(ctx, offline_for_l1_tau_vec_mp, "MP", trigL1Item, L1rois);
     
     offline_for_l1_tau_vec_1p.clear();
     offline_for_l1_tau_vec_mp.clear();
@@ -305,7 +305,7 @@ void TrigTauMonitorAlgorithm::fillHLTEfficiencies(const EventContext& ctx, const
 
 }
 
-void TrigTauMonitorAlgorithm::fillL1Efficiencies( const EventContext& ctx ,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois) const
+void TrigTauMonitorAlgorithm::fillL1Efficiencies( const EventContext& ctx , std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois) const
 {
   ATH_MSG_DEBUG("Fill L1 efficiencies: " << trigL1Item);
  
@@ -366,15 +366,15 @@ const xAOD::EmTauRoI* TrigTauMonitorAlgorithm::findLVL1_ROI(const EventContext&
 
    auto monGroup = getGroup(monGroupName);
    //EmTauRoI_v2.h
-   auto L1RoIEt           = Monitored::Collection("L1RoIEt"     , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->eT()/1e3 , detail){} return detail;});
-   auto L1RoIEta          = Monitored::Collection("L1RoIEta"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->eta()    , detail){} return detail;});
-   auto L1RoIPhi          = Monitored::Collection("L1RoIPhi"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->phi()    , detail){} return detail;});
-   auto L1RoITauClus      = Monitored::Collection("L1RoITauClus", L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->tauClus(), detail){} return detail;});
-   auto L1RoIisol         = Monitored::Collection("L1RoIisol"   , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->isol()   , detail){} return detail;});
-   auto L1RoIEMIsol       = Monitored::Collection("L1RoIEMIsol" , L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->emIsol() , detail){} return detail;});
-   auto L1RoIHadCore      = Monitored::Collection("L1RoIHadCore", L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->hadCore(), detail){} return detail;});
-   auto L1RoIHadIsol      = Monitored::Collection("L1RoIHadIsol", L1rois,  [] (const xAOD::EmTauRoI* L1roi){float detail = -999;if (L1roi->hadIsol(), detail){} return detail;});
 
+   auto L1RoIEt           = Monitored::Collection("L1RoIEt"     , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->eT()/1e3;});
+   auto L1RoIEta          = Monitored::Collection("L1RoIEta"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->eta();});
+   auto L1RoIPhi          = Monitored::Collection("L1RoIPhi"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->phi();});
+   auto L1RoITauClus      = Monitored::Collection("L1RoITauClus", L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->tauClus();});
+   auto L1RoIisol         = Monitored::Collection("L1RoIisol"   , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->isol();});
+   auto L1RoIEMIsol       = Monitored::Collection("L1RoIEMIsol" , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->emIsol();});
+   auto L1RoIHadCore      = Monitored::Collection("L1RoIHadCore", L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->hadCore();});
+   auto L1RoIHadIsol      = Monitored::Collection("L1RoIHadIsol", L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->hadIsol();});
 
  fill(monGroup,L1RoIEt,L1RoIEta,L1RoIPhi,L1RoITauClus,L1RoIisol,L1RoIEMIsol,L1RoIHadCore,L1RoIHadIsol);
 
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
index 471891ef6304..d5d14695bf59 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.h
@@ -53,10 +53,10 @@ class TrigTauMonitorAlgorithm : public AthMonitorAlgorithm {
   void fillL1(const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois)  const;
   void fillBDTNoCorr(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const;
   void fillBDTOut(const std::string trigger, std::vector<const xAOD::TauJet*> tau_vec,const std::string nProng) const;
-  void fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, const std::string trigger, float HLTthr, const std::string trigL1Item, float L1Tthr) const;
-  void fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, float HLTthr, const std::string trigL1Item, float L1thr) const;
+  void fillDistributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, const std::string trigger, float HLTthr) const;
+  void fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger, const std::string trigL1Item, float L1thr) const;
   void fillHLTEfficiencies(const EventContext& ctx,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::vector<const xAOD::TauJet*> online_tau_vec, std::string nProng) const;
-  void fillL1Efficiencies(const EventContext& ctx,const std::string trigger, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Ite, std::vector<const xAOD::EmTauRoI*> L1rois) const;
+  void fillL1Efficiencies(const EventContext& ctx, std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois) const;
 
   inline double dR(const double eta1, const double phi1, const double eta2, const double phi2) const
   {
-- 
GitLab


From ee7798558ed3f3ee354973f2e5387f1a095f8212 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Mon, 14 Dec 2020 13:07:38 +0100
Subject: [PATCH 028/308] Changing some messages from VERBOSE to DEBUG

---
 .../src/TrigEgammaFastElectronHypoTool.cxx         | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
index e21607786cfb..072189ed75f9 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx
@@ -97,23 +97,23 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
   float NStrawHits  = ( float )( electron->nTRTHiThresholdHits() );
   float TRTHitRatio = NStrawHits == 0 ? 1e10 : NTRHits/NStrawHits;
 
-  ATH_MSG_VERBOSE( "Cut index " << cutIndex );
+  ATH_MSG_DEBUG( "Cut index " << cutIndex );
   if ( ptCalo < m_trackPt[cutIndex] ){ 
-    ATH_MSG_VERBOSE( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] );
+    ATH_MSG_DEBUG( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] );
     pass = false;
     return  pass;
   }
   cutCounter++;
 
   if ( dEtaCalo > m_caloTrackDEta[cutIndex] ) {
-    ATH_MSG_VERBOSE( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] );
+    ATH_MSG_DEBUG( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] );
     
     pass = false;
     return  pass;
   }
   cutCounter++;
   if ( dPhiCalo > m_caloTrackDPhi[cutIndex] ) {
-    ATH_MSG_VERBOSE( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] );
+    ATH_MSG_DEBUG( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] );
     
     pass = false;
     return  pass;
@@ -121,21 +121,21 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
 
   cutCounter++;
   if( eToverPt <  m_caloTrackdEoverPLow[cutIndex] ) {
-    ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " <<  m_caloTrackdEoverPLow[cutIndex] );
+    ATH_MSG_DEBUG( "Fails eoverp low cut " << eToverPt << " < " <<  m_caloTrackdEoverPLow[cutIndex] );
 
     pass = false;
     return  pass;
   }
   cutCounter++;
   if ( eToverPt > m_caloTrackdEoverPHigh[cutIndex] ) {
-    ATH_MSG_VERBOSE( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] );
+    ATH_MSG_DEBUG( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] );
 
     pass = false;
     return  pass;
   }
   cutCounter++;
   if ( TRTHitRatio < m_trtRatio[cutIndex] ){
-    ATH_MSG_VERBOSE( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] );
+    ATH_MSG_DEBUG( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] );
 
     pass = false;
     return  pass;
-- 
GitLab


From b15f1d0ccdcea5b4fa277ddb3b262849336fb7dc Mon Sep 17 00:00:00 2001
From: Ruby Ferguson <ruby.alice.molly.ferguson@cern.ch>
Date: Mon, 14 Dec 2020 16:31:08 +0000
Subject: [PATCH 029/308] removed BDT references

---
 .../python/tauMonitorAlgorithm.py             |  95 ++++++------
 .../tauMonitoring/src/tauMonitorAlgorithm.cxx | 146 +++++++++---------
 2 files changed, 115 insertions(+), 126 deletions(-)

diff --git a/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py b/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py
index b54d8e2dcdcc..1f058baac3a4 100644
--- a/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py
+++ b/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py
@@ -47,7 +47,7 @@ def tauMonitoringConfig(inputFlags):
     tauMonAlgEleTrig = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgEleTrig')
     tauMonAlgJetTrig = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgJetTrig')
     tauMonAlgHighPt = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgHighPt')
-    tauMonAlgHighPtBDTLoose = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgHighPtBDTLoose')
+    tauMonAlgHighPtRNNLoose = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgHighPtRNNLoose')
 
 
 
@@ -88,8 +88,8 @@ def tauMonitoringConfig(inputFlags):
     tauMonAlgJetTrig.etaMax = 100
     tauMonAlgHighPt.etaMin = -100
     tauMonAlgHighPt.etaMax = 100
-    tauMonAlgHighPtBDTLoose.etaMin = -100
-    tauMonAlgHighPtBDTLoose.etaMax = 100
+    tauMonAlgHighPtRNNLoose.etaMin = -100
+    tauMonAlgHighPtRNNLoose.etaMax = 100
 
     tauMonAlgBA.kinGroupName = 'tauMonKinGroupBA'
     tauMonAlgCR.kinGroupName = 'tauMonKinGroupCR'
@@ -106,7 +106,7 @@ def tauMonitoringConfig(inputFlags):
     tauMonAlgEleTrig.kinGroupName = 'tauMonKinGroupEleTrig'
     tauMonAlgJetTrig.kinGroupName = 'tauMonKinGroupJetTrig'
     tauMonAlgHighPt.kinGroupName = 'tauMonKinGroupHighPt'
-    tauMonAlgHighPtBDTLoose.kinGroupName = 'tauMonKinGroupHighPtBDTLoose'
+    tauMonAlgHighPtRNNLoose.kinGroupName = 'tauMonKinGroupHighPtRNNLoose'
 
     ### STEP 4 ###
     # Add some tools. N.B. Do not use your own trigger decion tool. Use the
@@ -131,7 +131,7 @@ def tauMonitoringConfig(inputFlags):
     myKinGroupJetTrig = cfgHelper.addGroup(alg=tauMonAlgJetTrig, name='tauMonKinGroupJetTrig', topPath='Tau/Trigger/JetTrig' )
 
     myKinGroupHighPt = cfgHelper.addGroup(alg=tauMonAlgHighPt, name='tauMonKinGroupHighPt', topPath='Tau/' )
-    myKinGroupHighPtBDTLoose = cfgHelper.addGroup(alg=tauMonAlgHighPtBDTLoose, name='tauMonKinGroupHighPtBDTLoose', topPath='Tau/' )
+    myKinGroupHighPtRNNLoose = cfgHelper.addGroup(alg=tauMonAlgHighPtRNNLoose, name='tauMonKinGroupHighPtRNNLoose', topPath='Tau/' )
 
 
     naming= {
@@ -140,7 +140,7 @@ def tauMonitoringConfig(inputFlags):
             'EC': "Tau_TauE_",
             'Global': "",
             'HighPt': "",
-            'HighPtBDTLoose': "",
+            'HighPtRNNLoose': "",
             'EleTrig': "emTriggered_",
             'JetTrig': "jetTriggered_",
             'TauTrig1': "tauTriggered1_",
@@ -174,7 +174,7 @@ def tauMonitoringConfig(inputFlags):
                  (myKinGroupEC,'EC'),
                  (myKinGroupGlobal,'Global'),
                  (myKinGroupHighPt,'HighPt'),
-                 (myKinGroupHighPtBDTLoose,'HighPtBDTLoose'),
+                 (myKinGroupHighPtRNNLoose,'HighPtRNNLoose'),
                  (myKinGroupEleTrig,'EleTrig'),
                  (myKinGroupJetTrig,'JetTrig'),
                  (myKinGroupTauTrig1, 'TauTrig1'),
@@ -205,6 +205,10 @@ def tauMonitoringConfig(inputFlags):
             igroup.defineHistogram(namer('RNNJetScore','RNNJetScore','',postfix), title='RNN Jet Score',
                                    xbins=100, xmin=0, xmax=1,path=folder)
 
+            igroup.defineHistogram(namer('RNNJetScoreSigTrans','RNNJetScoreSigTrans','',postfix), title='RNN Jet Score Sig Trans',
+                                   xbins=48, xmin=0, xmax=1.1,path=folder)
+
+
 
             igroup.defineHistogram(namer('tauEt','tauEt','',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
                                    xbins=60, xmin=0., xmax=300.,path=folder)
@@ -232,46 +236,46 @@ def tauMonitoringConfig(inputFlags):
 
         if(postfix =="BA" or postfix =="CR" or postfix=="EC" or postfix.startswith('TauTrig')):
 
-            igroup.defineHistogram(namer('tauPhiBDTLoose','phi','Identification_BDTLoose',postfix), title='Phi of tau candidates ( BDTLoose) ;Phi;Number of Candidates',
-                xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/BDTLoose" )
+            igroup.defineHistogram(namer('tauPhiRNNLoose','phi','Identification_RNNLoose',postfix), title='Phi of tau candidates ( RNNLoose) ;Phi;Number of Candidates',
+                xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNLoose" )
 
-            igroup.defineHistogram(namer('tauEtaBDTLoose','eta','Identification_BDTLoose',postfix), title='Eta of tau candidates ( BDTLoose) ;Eta;Number of Candidates',
-                xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/BDTLoose")
+            igroup.defineHistogram(namer('tauEtaRNNLoose','eta','Identification_RNNLoose',postfix), title='Eta of tau candidates ( RNNLoose) ;Eta;Number of Candidates',
+                xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNLoose")
 
-            igroup.defineHistogram(namer('tauEtBDTLoose','et','Identification_BDTLoose',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
-                xbins=60, xmin=0., xmax=300.,path=folder+"Identification/BDTLoose")
+            igroup.defineHistogram(namer('tauEtRNNLoose','et','Identification_RNNLoose',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
+                xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNLoose")
 
-            igroup.defineHistogram(namer('NumTracksBDTLoose','NumTracks','Identification_BDTLoose',postfix), title='Number Of Tracks for Tau Candidates (BDTLoose);Number Of Tracks;Number Of Candidates',
-                xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/BDTLoose")
+            igroup.defineHistogram(namer('NumTracksRNNLoose','NumTracks','Identification_RNNLoose',postfix), title='Number Of Tracks for Tau Candidates (RNNLoose);Number Of Tracks;Number Of Candidates',
+                xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNLoose")
 
-            igroup.defineHistogram(namer('tauPhiBDTMedium','phi','Identification_BDTMedium',postfix), title='Phi of tau candidates ( BDTMedium) ;Phi;Number of Candidates',
-                xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/BDTMedium" )
+            igroup.defineHistogram(namer('tauPhiRNNMedium','phi','Identification_RNNMedium',postfix), title='Phi of tau candidates ( RNNMedium) ;Phi;Number of Candidates',
+                xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNMedium" )
 
-            igroup.defineHistogram(namer('tauEtaBDTMedium','eta','Identification_BDTMedium',postfix), title='Eta of tau candidates ( BDTMedium) ;Eta;Number of Candidates',
-                xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/BDTMedium")
+            igroup.defineHistogram(namer('tauEtaRNNMedium','eta','Identification_RNNMedium',postfix), title='Eta of tau candidates ( RNNMedium) ;Eta;Number of Candidates',
+                xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNMedium")
 
-            igroup.defineHistogram(namer('tauEtBDTMedium','et','Identification_BDTMedium',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
-                xbins=60, xmin=0., xmax=300.,path=folder+"Identification/BDTMedium")
+            igroup.defineHistogram(namer('tauEtRNNMedium','et','Identification_RNNMedium',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
+                xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNMedium")
 
-            igroup.defineHistogram(namer('NumTracksBDTMedium','NumTracks','Identification_BDTMedium',postfix), title='Number Of Tracks for Tau Candidates (BDTMedium);Number Of Tracks;Number Of Candidates',
-                xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/BDTMedium")
-            igroup.defineHistogram(namer('tauPhiEt15BDTLoose','phi','Identification_BDTLoose15GeV',postfix), title='Phi of tau candidates (Et>15, BDTLoose) ;Phi;Number of Candidates',
-                xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/BDTLoose15GeV" )
+            igroup.defineHistogram(namer('NumTracksRNNMedium','NumTracks','Identification_RNNMedium',postfix), title='Number Of Tracks for Tau Candidates (RNNMedium);Number Of Tracks;Number Of Candidates',
+                xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNMedium")
+            igroup.defineHistogram(namer('tauPhiEt15RNNLoose','phi','Identification_RNNLoose15GeV',postfix), title='Phi of tau candidates (Et>15, RNNLoose) ;Phi;Number of Candidates',
+                xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNLoose15GeV" )
 
-            igroup.defineHistogram(namer('tauEtaEt15BDTLoose','eta','Identification_BDTLoose15GeV',postfix), title='Eta of tau candidates (Et>15, BDTLoose) ;Eta;Number of Candidates',
-                xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/BDTLoose15GeV")
+            igroup.defineHistogram(namer('tauEtaEt15RNNLoose','eta','Identification_RNNLoose15GeV',postfix), title='Eta of tau candidates (Et>15, RNNLoose) ;Eta;Number of Candidates',
+                xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNLoose15GeV")
 
-            igroup.defineHistogram(namer('nClustersEt15BDTLoose','nCluster','Identification_BDTLoose15GeV',postfix), title='Number Of CaloTopoClusters (Et>15,BDTLoose);Number Of Clusters;Number Of Candidates',
-                xbins=40, xmin=0., xmax=40.,path=folder+"Identification/BDTLoose15GeV" )
+            igroup.defineHistogram(namer('nClustersEt15RNNLoose','nCluster','Identification_RNNLoose15GeV',postfix), title='Number Of CaloTopoClusters (Et>15,RNNLoose);Number Of Clusters;Number Of Candidates',
+                xbins=40, xmin=0., xmax=40.,path=folder+"Identification/RNNLoose15GeV" )
 
-            igroup.defineHistogram(namer('NumTracksEt15BDTLoose','NumTracks','Identification_BDTLoose15GeV',postfix), title='Number Of Tracks for Tau Candidates (Et>15,BDTLoose);Number Of Tracks;Number Of Candidates',
-                xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/BDTLoose15GeV")
+            igroup.defineHistogram(namer('NumTracksEt15RNNLoose','NumTracks','Identification_RNNLoose15GeV',postfix), title='Number Of Tracks for Tau Candidates (Et>15,RNNLoose);Number Of Tracks;Number Of Candidates',
+                xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNLoose15GeV")
 
-            igroup.defineHistogram(namer('tauEtEt15BDTLoose','et','Identification_BDTLoose15GeV',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
-                                   xbins=60, xmin=0., xmax=300.,path=folder+"Identification/BDTLoose15GeV")
+            igroup.defineHistogram(namer('tauEtEt15RNNLoose','et','Identification_RNNLoose15GeV',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
+                                   xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNLoose15GeV")
 
-            igroup.defineHistogram(namer('panModeEt15BDTLoose','panMode','Identification_BDTLoose15GeV',postfix), title='tau decay mode from panTau upon JetBDTSigMedium;mode',
-                                   xbins=5, xmin=0., xmax=5., path=folder+"Identification/BDTLoose15GeV", xlabels=["1p0n","1p1n","1pXn","3p0n","3pXn"])
+            igroup.defineHistogram(namer('panModeEt15RNNLoose','panMode','Identification_RNNLoose15GeV',postfix), title='tau decay mode from panTau upon JetRNNSigMedium;mode',
+                                   xbins=5, xmin=0., xmax=5., path=folder+"Identification/RNNLoose15GeV", xlabels=["1p0n","1p1n","1pXn","3p0n","3pXn"])
 
             igroup.defineHistogram(namer('jetSeedEta','jetSeedEta','Calo',postfix), title='Calorimeter eta of tau candidates;Eta;Numbers of Candidates',path=folder+"Calo",
             xbins=50, xmin=-2.5, xmax=2.5 )
@@ -312,27 +316,18 @@ def tauMonitoringConfig(inputFlags):
             igroup.defineHistogram('isolFrac,LB', type='TH2F', title='Isolation Fraction vs Lumiblock;Isolation Fraction;Lumiblock', path=folder+"Calo", 
             xbins=51,xmin=0,xmax=1.02,ybins=1200,ymin=0.,ymax=1200.)
 
-            igroup.defineHistogram(namer('BDTJetScore','BDTJetScore','Identification',postfix), title='BDT Score for Jet Rejection;Boosted Decision Tree Score',path=folder+"Identification",
-            xbins=48, xmin=-1.1, xmax=1.1 )
-
-            igroup.defineHistogram(namer('JetBDTBkgMedium','JetBDTBkgMedium','Identification',postfix), title='Loose EleBDT',path=folder+"Identification",
-            xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"])
-
-
-            igroup.defineHistogram(namer('BDTJetScoreSigTrans','BDTJetScoreSigTrans','Identification',postfix), title='Flattened signal Transformed BDT Score for Jet Rejection;Boosted Decision Tree Score',path=folder+"Identification",
-            xbins=48, xmin=0, xmax=1.1 )
 
 
             igroup.defineHistogram(namer('muonVeto','muonVeto','Identification',postfix), title='Muon Veto',path=folder+"Identification",
             xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"] )
 
-            igroup.defineHistogram(namer('tauBDTLoose','tauBDTLoose','Identification',postfix), title='Identification Flag: tauBDTLoose',path=folder+"Identification",
+            igroup.defineHistogram(namer('tauRNNLoose','tauRNNLoose','Identification',postfix), title='Identification Flag: tauRNNLoose',path=folder+"Identification",
             xbins=2, xmin=-0.5, xmax=1.5 , xlabels=["False","True"])
 
-            igroup.defineHistogram(namer('tauBDTMedium','tauBDTMedium','Identification',postfix), title='Identification Flag: tauBDTMedium',path=folder+"Identification",
+            igroup.defineHistogram(namer('tauRNNMedium','tauRNNMedium','Identification',postfix), title='Identification Flag: tauRNNMedium',path=folder+"Identification",
             xbins=2, xmin=-0.5, xmax=1.5 , xlabels=["False","True"])
 
-            igroup.defineHistogram(namer('tauBDTTight','tauBDTTight','Identification',postfix), title='Identification Flag: tauBDTTight',path=folder+"Identification",
+            igroup.defineHistogram(namer('tauRNNTight','tauRNNTight','Identification',postfix), title='Identification Flag: tauRNNTight',path=folder+"Identification",
             xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"])
 
 
@@ -529,9 +524,9 @@ def tauMonitoringConfig(inputFlags):
             igroup.defineHistogram(namer('tauEtaEt15,tauPhiEt15','tauPhiVsEta_et15','',postfix), type='TH2F', title='EtaVsEtTitle;Eta;Phi', 
                xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
 
-        if postfix == 'HighPtBDTLoose':
+        if postfix == 'HighPtRNNLoose':
 
-            igroup.defineHistogram(namer('tauEtaEt15BDTLoose,tauPhiEt15BDTLoose','tauPhiVsEta_et15_BDTLoose','',postfix), type='TH2F', title='Phi vs Eta (Et>15, BDTLoose) ;Eta;Phi', 
+            igroup.defineHistogram(namer('tauEtaEt15RNNLoose,tauPhiEt15RNNLoose','tauPhiVsEta_et15_RNNLoose','',postfix), type='TH2F', title='Phi vs Eta (Et>15, RNNLoose) ;Eta;Phi', 
                xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
 
 
@@ -596,7 +591,7 @@ if __name__=='__main__':
     exampleMonitorAcc.getEventAlgo('tauMonAlgEleTrig').OutputLevel = 2 # DEBUG
     exampleMonitorAcc.getEventAlgo('tauMonAlgJetTrig').OutputLevel = 2 # DEBUG
     exampleMonitorAcc.getEventAlgo('tauMonAlgHighPt').OutputLevel = 2 # DEBUG
-    exampleMonitorAcc.getEventAlgo('tauMonAlgHighPtBDTLoose').OutputLevel = 2 # DEBUG
+    exampleMonitorAcc.getEventAlgo('tauMonAlgHighPtRNNLoose').OutputLevel = 2 # DEBUG
 
     cfg.printConfig(withDetails=True) # set True for exhaustive info
 
diff --git a/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx b/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
index 8abe8007f428..6110d4162921 100644
--- a/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
+++ b/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
@@ -49,8 +49,8 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
 
     auto tauPhi = Monitored::Scalar<float>("tauPhi",0.0);
     auto tauEt = Monitored::Scalar<float>("tauEt",0.0);
-    auto tauEtEt15BDTLoose = Monitored::Scalar<float>("tauEtEt15BDTLoose",0.0);
-    auto panModeEt15BDTLoose = Monitored::Scalar<float>("panModeEt15BDTLoose",0.0);
+    auto tauEtEt15RNNLoose = Monitored::Scalar<float>("tauEtEt15RNNLoose",0.0);
+    auto panModeEt15RNNLoose = Monitored::Scalar<float>("panModeEt15RNNLoose",0.0);
     auto panModeSubstructure = Monitored::Scalar<float>("panModeSubstructure",0.0);
     auto coreTrk = Monitored::Scalar<float>("coreTrk",0.0);
     auto PtTESMVA = Monitored::Scalar<float>("PtTESMVA",0.0);
@@ -60,30 +60,31 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto tauPhiEt15 = Monitored::Scalar<float>("tauPhiEt15",0.0);
     auto tauEtaEt15 = Monitored::Scalar<float>("tauEtaEt15",0.0);
 
-    auto tauPhiEt15BDTLoose = Monitored::Scalar<float>("tauPhiEt15BDTLoose",0.0);
-    auto tauEtaEt15BDTLoose = Monitored::Scalar<float>("tauEtaEt15BDTLoose",0.0);
+    auto tauPhiEt15RNNLoose = Monitored::Scalar<float>("tauPhiEt15RNNLoose",0.0);
+    auto tauEtaEt15RNNLoose = Monitored::Scalar<float>("tauEtaEt15RNNLoose",0.0);
 
 
     auto tauCharge = Monitored::Scalar<int>("tauCharge",0.0);
     auto RNNJetScore = Monitored::Scalar<float>("RNNJetScore",0.0);
+    auto RNNJetScoreSigTrans = Monitored::Scalar<float>("RNNJetScoreSigTrans",0.0);
 
     auto NumTracks = Monitored::Scalar<int>("NumTracks",0.0);
-    auto NumTracksEt15BDTLoose = Monitored::Scalar<int>("NumTracksEt15BDTLoose",0.0);
+    auto NumTracksEt15RNNLoose = Monitored::Scalar<int>("NumTracksEt15RNNLoose",0.0);
 
     auto nTauCandidates = Monitored::Scalar<int>("nTauCandidates",0.0);
     auto nHighPtTauCandidates = Monitored::Scalar<int>("nHighPtTauCandidates",0.0);
     auto nClusters = Monitored::Scalar<int>("nClusters",0.0);
-    auto nClustersEt15BDTLoose = Monitored::Scalar<int>("nClustersEt15BDTLoose",0.0);
+    auto nClustersEt15RNNLoose = Monitored::Scalar<int>("nClustersEt15RNNLoose",0.0);
 
-    auto tauEtBDTLoose = Monitored::Scalar<float>("tauEtBDTLoose",0.0);
-    auto tauEtaBDTLoose = Monitored::Scalar<float>("tauEtaBDTLoose",0.0);
-    auto tauPhiBDTLoose = Monitored::Scalar<float>("tauPhiBDTLoose",0.0);
-    auto NumTracksBDTLoose = Monitored::Scalar<float>("NumTracksBDTLoose",0.0);
+    auto tauEtRNNLoose = Monitored::Scalar<float>("tauEtRNNLoose",0.0);
+    auto tauEtaRNNLoose = Monitored::Scalar<float>("tauEtaRNNLoose",0.0);
+    auto tauPhiRNNLoose = Monitored::Scalar<float>("tauPhiRNNLoose",0.0);
+    auto NumTracksRNNLoose = Monitored::Scalar<float>("NumTracksRNNLoose",0.0);
 
-    auto tauEtBDTMedium = Monitored::Scalar<float>("tauEtBDTMedium",0.0);
-    auto tauEtaBDTMedium = Monitored::Scalar<float>("tauEtaBDTMedium",0.0);
-    auto tauPhiBDTMedium = Monitored::Scalar<float>("tauPhiBDTMedium",0.0);
-    auto NumTracksBDTMedium = Monitored::Scalar<float>("NumTracksBDTMedium",0.0);
+    auto tauEtRNNMedium = Monitored::Scalar<float>("tauEtRNNMedium",0.0);
+    auto tauEtaRNNMedium = Monitored::Scalar<float>("tauEtaRNNMedium",0.0);
+    auto tauPhiRNNMedium = Monitored::Scalar<float>("tauPhiRNNMedium",0.0);
+    auto NumTracksRNNMedium = Monitored::Scalar<float>("NumTracksRNNMedium",0.0);
 
     auto LB = Monitored::Scalar<int>("LB",0.0);
 
@@ -100,16 +101,13 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto jetSeedPhi = Monitored::Scalar<float>("jetSeedPhi",0.0);
     auto jetSeedPt = Monitored::Scalar<float>("jetSeedPt",0.0);
 
-    auto BDTJetScore = Monitored::Scalar<float>("BDTJetScore",0.0);
-    auto BDTJetScoreSigTrans = Monitored::Scalar<float>("BDTJetScoreSigTrans",0.0);
-    auto JetBDTBkgMedium  = Monitored::Scalar<float>("JetBDTBkgMedium",0.0);
 
     auto muonVeto = Monitored::Scalar<float>("muonVeto",0.0);
 
 
-    auto tauBDTLoose = Monitored::Scalar<float>("tauBDTLoose",0.0);
-    auto tauBDTMedium = Monitored::Scalar<float>("tauBDTMedium",0.0);
-    auto tauBDTTight = Monitored::Scalar<float>("tauBDTTight",0.0);
+    auto tauRNNLoose = Monitored::Scalar<float>("tauRNNLoose",0.0);
+    auto tauRNNMedium = Monitored::Scalar<float>("tauRNNMedium",0.0);
+    auto tauRNNTight = Monitored::Scalar<float>("tauRNNight",0.0);
 
     auto hadLeakFracFixed = Monitored::Scalar<float>("hadLeakFracFixed",0.0);
     auto PSSFrac = Monitored::Scalar<float>("PSSFrac",0.0);
@@ -208,17 +206,16 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
         ptIntermediateAxis     =    tau->ptIntermediateAxis()/GeV;
 
         //identification
-        BDTJetScore = tau->discriminant(xAOD::TauJetParameters::BDTJetScore);
-        BDTJetScoreSigTrans = tau->discriminant(xAOD::TauJetParameters::BDTJetScoreSigTrans);
         RNNJetScore =  tau->discriminant(xAOD::TauJetParameters::TauID::RNNJetScore);
+        RNNJetScoreSigTrans =  tau->discriminant(xAOD::TauJetParameters::TauID::RNNJetScoreSigTrans);
+
 
-        JetBDTBkgMedium = tau->isTau(xAOD::TauJetParameters::JetBDTBkgMedium);
 
 
         muonVeto     =       tau->isTau(xAOD::TauJetParameters::MuonVeto);
-        tauBDTLoose  =       tau->isTau(xAOD::TauJetParameters::JetBDTSigLoose);
-        tauBDTMedium =       tau->isTau(xAOD::TauJetParameters::JetBDTSigMedium);
-        tauBDTTight  =       tau->isTau(xAOD::TauJetParameters::JetBDTSigTight);
+        tauRNNLoose  =       tau->isTau(xAOD::TauJetParameters::JetRNNSigLoose);
+        tauRNNMedium =       tau->isTau(xAOD::TauJetParameters::JetRNNSigMedium);
+        tauRNNTight  =       tau->isTau(xAOD::TauJetParameters::JetRNNSigTight);
 
         dRmax           =    tau->detail<float>(xAOD::TauJetParameters::dRmax);
         EMPOverTrkSysP  =    tau->detail<float>(xAOD::TauJetParameters::EMPOverTrkSysP);
@@ -265,7 +262,7 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
                 nHighPtTaus +=1;
             }
 
-            if (m_kinGroupName != "tauMonKinGroupHighPt"&& m_kinGroupName!="tauMonKinGroupHighPtBDTLoose"){
+            if (m_kinGroupName != "tauMonKinGroupHighPt"&& m_kinGroupName!="tauMonKinGroupHighPtRNNLoose"){
 
                 if (
                      (
@@ -289,49 +286,49 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
                      (m_kinGroupName == "tauMonKinGroupJetTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_j[2-9][0-9]_.*"))
                 ){
 
-                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauEt > lowerEtThreshold && tauBDTLoose){
-                        tauPhiEt15BDTLoose = tau->phi();
-                        tauEtaEt15BDTLoose = tau->eta();
-                        tauEtEt15BDTLoose = tau->pt()/GeV;
-                        nClustersEt15BDTLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
-                        NumTracksEt15BDTLoose = tau->nTracks();
+                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauEt > lowerEtThreshold && tauRNNLoose){
+                        tauPhiEt15RNNLoose = tau->phi();
+                        tauEtaEt15RNNLoose = tau->eta();
+                        tauEtEt15RNNLoose = tau->pt()/GeV;
+                        nClustersEt15RNNLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
+                        NumTracksEt15RNNLoose = tau->nTracks();
 
                         tau->panTauDetail(xAOD::TauJetParameters::PanTau_DecayMode, panModeDummy); 
-                        panModeEt15BDTLoose = panModeDummy;
+                        panModeEt15RNNLoose = panModeDummy;
                         fill(tool
-                        ,tauPhiEt15BDTLoose
-                        ,tauEtaEt15BDTLoose
-                        ,nClustersEt15BDTLoose
-                        ,NumTracksEt15BDTLoose
-                        ,tauEtEt15BDTLoose
-                        ,panModeEt15BDTLoose);
+                        ,tauPhiEt15RNNLoose
+                        ,tauEtaEt15RNNLoose
+                        ,nClustersEt15RNNLoose
+                        ,NumTracksEt15RNNLoose
+                        ,tauEtEt15RNNLoose
+                        ,panModeEt15RNNLoose);
                     }
 
                     
-                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauBDTLoose){
-                        tauPhiBDTLoose = tau->phi();
-                        tauEtaBDTLoose = tau->eta();
-                        tauEtBDTLoose = tau->pt()/GeV;
-                        NumTracksBDTLoose = tau->nTracks();
+                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauRNNLoose){
+                        tauPhiRNNLoose = tau->phi();
+                        tauEtaRNNLoose = tau->eta();
+                        tauEtRNNLoose = tau->pt()/GeV;
+                        NumTracksRNNLoose = tau->nTracks();
 
                         fill(tool
-                        ,tauPhiBDTLoose
-                        ,tauEtaBDTLoose
-                        ,NumTracksBDTLoose
-                        ,tauEtBDTLoose);
+                        ,tauPhiRNNLoose
+                        ,tauEtaRNNLoose
+                        ,NumTracksRNNLoose
+                        ,tauEtRNNLoose);
                     }
 
-                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauBDTMedium){
-                        tauPhiBDTMedium = tau->phi();
-                        tauEtaBDTMedium = tau->eta();
-                        tauEtBDTMedium = tau->pt()/GeV;
-                        NumTracksBDTMedium = tau->nTracks();
+                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauRNNMedium){
+                        tauPhiRNNMedium = tau->phi();
+                        tauEtaRNNMedium = tau->eta();
+                        tauEtRNNMedium = tau->pt()/GeV;
+                        NumTracksRNNMedium = tau->nTracks();
 
                         fill(tool
-                        ,tauPhiBDTMedium
-                        ,tauEtaBDTMedium
-                        ,NumTracksBDTMedium
-                        ,tauEtBDTMedium);
+                        ,tauPhiRNNMedium
+                        ,tauEtaRNNMedium
+                        ,NumTracksRNNMedium
+                        ,tauEtRNNMedium);
                     }
 
                     
@@ -461,15 +458,12 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
                     ,etEMAtEMScale
                     ,etHadAtEMScale
                     ,tauCharge
-                    ,BDTJetScore
-                    ,BDTJetScoreSigTrans
-                    ,JetBDTBkgMedium
                     ,RNNJetScore
+                    ,RNNJetScoreSigTrans
                     ,muonVeto
-                    ,tauBDTLoose
-                    ,tauBDTMedium
-                    ,tauBDTTight
-                    ,BDTJetScore
+                    ,tauRNNLoose
+                    ,tauRNNMedium
+                    ,tauRNNTight
                     ,PSSFrac
                     ,hadLeakFracFixed
                     ,etHotShotWinOverPtLeadTrk
@@ -513,20 +507,20 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
                 fill(tool,LB,tauPhiEt15,tauEtaEt15);
             }
 
-            if ((m_kinGroupName == "tauMonKinGroupHighPtBDTLoose") && tauEt > lowerEtThreshold &&tauBDTLoose){
-                tauPhiEt15BDTLoose = tau->phi();
-                tauEtaEt15BDTLoose = tau->eta();
-                tauEtEt15BDTLoose = tau->pt()/GeV; //GeV
+            if ((m_kinGroupName == "tauMonKinGroupHighPtRNNLoose") && tauEt > lowerEtThreshold &&tauRNNLoose){
+                tauPhiEt15RNNLoose = tau->phi();
+                tauEtaEt15RNNLoose = tau->eta();
+                tauEtEt15RNNLoose = tau->pt()/GeV; //GeV
 
-                nClustersEt15BDTLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
-                NumTracksEt15BDTLoose = tau->nTracks();
+                nClustersEt15RNNLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
+                NumTracksEt15RNNLoose = tau->nTracks();
                 fill(tool
                 ,LB
-                ,tauPhiEt15BDTLoose
-                ,tauEtaEt15BDTLoose
-                ,nClustersEt15BDTLoose
-                ,NumTracksEt15BDTLoose
-                ,tauEtEt15BDTLoose);
+                ,tauPhiEt15RNNLoose
+                ,tauEtaEt15RNNLoose
+                ,nClustersEt15RNNLoose
+                ,NumTracksEt15RNNLoose
+                ,tauEtEt15RNNLoose);
             }
         }
     }
-- 
GitLab


From 8c31c3090781690540d1f423b3326ff61ca58936 Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Tue, 15 Dec 2020 15:24:37 +0100
Subject: [PATCH 030/308] Change InputMaker merging code to be typeless

---
 .../DecisionHandling/InputMakerBase.h         |  5 +-
 .../DecisionHandling/InputMakerBase.icc       | 40 ----------------
 .../DecisionHandling/src/InputMakerBase.cxx   | 46 ++++++++++++++++++-
 3 files changed, 45 insertions(+), 46 deletions(-)
 delete mode 100644 Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.icc

diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.h
index 756d4de76031..03b6c3775b86 100644
--- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.h
+++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.h
@@ -47,8 +47,7 @@ This is a base class for HLT InputMakers to reduce boilerplate and enforce the c
   /// does the standard handling of input decisions: read from handles with all the checks, create merged output handles and link them, copies links and return outputHandles
   StatusCode decisionInputToOutput(const EventContext& context, SG::WriteHandle<TrigCompositeUtils::DecisionContainer>& outputHandle) const;
 
-  /// Checks for merge-able Decision objects coming from N upstream filters. Check based on stored element link in typed CONTAINER with 'linkNameToMatch'
-  template<typename CONTAINER>
+  /// Checks for merge-able Decision objects coming from N upstream filters. Check based on most-recent element link with name 'linkNameToMatch'. Works for any link type.
   size_t matchDecision(const TrigCompositeUtils::DecisionContainer* outDecisions, 
     const TrigCompositeUtils::Decision* toMatch, 
     const std::string& linkNameToMatch) const;
@@ -68,6 +67,4 @@ This is a base class for HLT InputMakers to reduce boilerplate and enforce the c
   
 };
 
-#include "InputMakerBase.icc"
-
 #endif // DECISIONHANDLING_INPUTMAKERBASE_H
diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.icc b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.icc
deleted file mode 100644
index 496914524d53..000000000000
--- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/InputMakerBase.icc
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-template<typename CONTAINER>
-size_t InputMakerBase::matchDecision(const TrigCompositeUtils::DecisionContainer* outDecisions, 
-  const TrigCompositeUtils::Decision* toMatch, 
-  const std::string& linkNameToMatch) const
-{
-  const std::vector<TrigCompositeUtils::LinkInfo<CONTAINER>> myObject = TrigCompositeUtils::findLinks<CONTAINER>(toMatch, linkNameToMatch, TrigDefs::lastFeatureOfType);
-  
-  if (myObject.size() != 1) {
-    ATH_MSG_ERROR("InputMakerBase::matchDecision Did not locate exactly one object of type '" << ClassID_traits<CONTAINER>::typeName() << "' having searched for a link named '" << linkNameToMatch 
-      << "', found " << myObject.size() << ". Unable to match this Decision object.");
-    for (const auto& li : myObject) {
-      ATH_MSG_ERROR("  -- " << li.link.dataID() << ":" << li.link.index() << ". Dump:" << *(li.source)); 
-    }
-    return std::numeric_limits<std::size_t>::max();
-  }
-
-  // Look for match
-  for (size_t index = 0; index < outDecisions->size(); ++index) {
-    const TrigCompositeUtils::Decision* checkDecision = outDecisions->at(index);
-    if (checkDecision == nullptr) {
-      ATH_MSG_ERROR("Failed to get Decision object " << index << " of " << outDecisions->size());
-      return std::numeric_limits<std::size_t>::max();
-    }
-    const std::vector<TrigCompositeUtils::LinkInfo<CONTAINER>> checkObject = TrigCompositeUtils::findLinks<CONTAINER>(checkDecision, linkNameToMatch, TrigDefs::lastFeatureOfType);
-    if (checkObject.size() != 1) {
-      ATH_MSG_ERROR("Logic error. Expect myObject().size() == 1 and checkObject.size() == 1."
-        << " But have checkObject.size() = " << checkObject.size() << ". Unable to match this Decision object.");
-      return std::numeric_limits<std::size_t>::max();
-    }
-    if (myObject.at(0).link == checkObject.at(0).link) {
-      return index;
-    }
-  }
-
-  return std::numeric_limits<std::size_t>::max();
-}
diff --git a/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx b/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx
index 8b445be045ac..afebd6200261 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx
@@ -94,13 +94,55 @@ StatusCode InputMakerBase::decisionInputToOutput(const EventContext& context, SG
 
 bool InputMakerBase::matchInCollection(const DecisionContainer* toMatchAgainst, const Decision* toMatch, size_t& matchIndex) const {
   if ( m_mergeUsingFeature ) {
-    matchIndex = matchDecision<xAOD::IParticleContainer>(toMatchAgainst, toMatch, featureString());
+    matchIndex = matchDecision(toMatchAgainst, toMatch, featureString());
   } else {
-    matchIndex = matchDecision<TrigRoiDescriptorCollection>(toMatchAgainst, toMatch, m_roisLink.value());
+    matchIndex = matchDecision(toMatchAgainst, toMatch, m_roisLink.value());
   }
   return (matchIndex != std::numeric_limits<std::size_t>::max());
 }
 
+size_t InputMakerBase::matchDecision(const DecisionContainer* outDecisions, const Decision* toMatch, const std::string& linkNameToMatch) const {
+  
+  std::set<const Decision*> cache; //!< Used to accelerate the recursive typelessFindLinks. Should be cleared between uses.
+  std::vector<uint32_t> keysA;
+  std::vector<uint32_t> clidsA;
+  std::vector<uint16_t> indiciesA;
+  TrigCompositeUtils::typelessfindLinks(toMatch, linkNameToMatch, keysA, clidsA, indiciesA, TrigDefs::lastFeatureOfType, &cache);
+  
+  if (keysA.size() != 1) {
+    ATH_MSG_ERROR("InputMakerBase::matchDecision Did not locate exactly one object having searched for a link named '" << linkNameToMatch 
+      << "', found " << keysA.size() << ". Unable to match this Decision object.");
+    for (size_t i = 0; i < keysA.size(); ++i) {
+      ATH_MSG_ERROR("  -- Key:" << keysA.at(i) << " Index:" << indiciesA.at(i) << " CLID:" << clidsA.at(i)); 
+    }
+    return std::numeric_limits<std::size_t>::max();
+  }
+
+  // Look for match
+  for (size_t index = 0; index < outDecisions->size(); ++index) {
+    const TrigCompositeUtils::Decision* checkDecision = outDecisions->at(index);
+    if (checkDecision == nullptr) {
+      ATH_MSG_ERROR("Failed to get Decision object " << index << " of " << outDecisions->size());
+      return std::numeric_limits<std::size_t>::max();
+    }
+    cache.clear();
+    std::vector<uint32_t> keysB;
+    std::vector<uint32_t> clidsB;
+    std::vector<uint16_t> indiciesB;
+    TrigCompositeUtils::typelessfindLinks(checkDecision, linkNameToMatch, keysB, clidsB, indiciesB, TrigDefs::lastFeatureOfType, &cache);
+    if (keysB.size() != 1) {
+      ATH_MSG_ERROR("Logic error. Expect toMatch size == 1 (confirmed) and checkObject size == 1."
+        << " But have checkObject size = " << keysB.size() << ". Unable to match this Decision object.");
+      return std::numeric_limits<std::size_t>::max();
+    }
+    if (keysA.at(0) == keysB.at(0) and clidsA.at(0) == clidsB.at(0) and indiciesA.at(0) == indiciesB.at(0)) {
+      return index;
+    }
+  }
+
+  return std::numeric_limits<std::size_t>::max();
+}
+
 
 void InputMakerBase::debugPrintOut(const EventContext& context, SG::WriteHandle<TrigCompositeUtils::DecisionContainer>& outputHandle) const{
   size_t validInput=0;
-- 
GitLab


From c7e8e7760da45a7bb873cb4ab71b7324375b6645 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Tue, 15 Dec 2020 16:54:30 +0100
Subject: [PATCH 031/308] use Minuit2 instead of TMinuit

---
 .../MdtSegmentT0Fitter/MdtSegmentT0Fitter.h   |  20 --
 .../src/MdtSegmentT0Fitter.cxx                | 340 +++++++-----------
 2 files changed, 125 insertions(+), 235 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/MdtSegmentT0Fitter/MdtSegmentT0Fitter.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/MdtSegmentT0Fitter/MdtSegmentT0Fitter.h
index e3e89b6c26f9..efd01f8cfa9d 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/MdtSegmentT0Fitter/MdtSegmentT0Fitter.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/MdtSegmentT0Fitter/MdtSegmentT0Fitter.h
@@ -19,8 +19,6 @@
 #include <vector>
 #include <memory>
 
-#include "TMinuit.h"
-
 namespace TrkDriftCircleMath {
 
   class MdtSegmentT0Fitter : public AthAlgTool, public DCSLFitter, virtual public Muon::IDCSLFitProvider {
@@ -36,34 +34,16 @@ namespace TrkDriftCircleMath {
  
       virtual const DCSLFitter* getFitter() const override { return this; }
 
-      /// Struct for passing data to/from TMinuit fit function
-      struct MdtSegmentT0FcnData {
-        struct HitCoords {
-          double z;
-          double t;
-          double y;
-          double w;
-          double r;
-          const MuonCalib::IRtRelation *rt;
-        };
-        std::vector<HitCoords> data;
-        int used;
-        int t0Error;
-      };
-
     private:
       ToolHandle<MdtCalibrationDbTool> m_calibrationDbTool{this,"CalibrationDbTool","MdtCalibrationDbTool"};
 
       Gaudi::Property<bool> m_trace{this,"TraceOperation",false,"debug - traces operation"};
-      Gaudi::Property<bool> m_dumpToFile{this,"DumpToFile",false,"debug - dumps some performance info"};
       Gaudi::Property<bool> m_rejectWeakTopologies{this,"RejectWeakTopologies",true,"reject topolgies that do not have at least one +- combination in one multilayer"};
       Gaudi::Property<bool> m_scaleErrors{this,"RescaleErrors",true,"rescale errors in fit"};
       Gaudi::Property<bool> m_propagateErrors{this,"PropagateErrors",true,"propagate errors"};
       Gaudi::Property<int> m_minHits{this,"MinimumHits",4,"minimum number of selected hits for t0 fit. Otherwise use default"};
       Gaudi::Property<float> m_dRTol{this,"dRTolerance",0.1};
 
-      std::unique_ptr<TMinuit> m_minuit;
-
       // counters
       mutable std::atomic_uint m_ntotalCalls;
       mutable std::atomic_uint m_npassedNHits;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
index c317a68d4ee1..5c9ab78eaacf 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
@@ -15,6 +15,10 @@
 #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
 #include "MuonPrepRawData/MdtPrepData.h"
 
+#include "Minuit2/Minuit2Minimizer.h"
+#include "Math/Functor.h"
+#include <functional>
+
 #include <iostream>
 #include <fstream>
 #include <atomic>
@@ -40,9 +44,72 @@
 
 namespace TrkDriftCircleMath {
 
-  static MdtSegmentT0Fitter::MdtSegmentT0FcnData* g_fcnData ATLAS_THREAD_SAFE = nullptr; ///< Data to pass to/from TMinuit fcn. Guarded with mutex.
-  static std::mutex g_fcnDataMutex; ///< Mutex to protect g_fcnData access
-	    
+  class FunctionToMinimize : public ROOT::Math::IMultiGenFunction {
+    public:
+      struct HitCoords {
+        double z;
+        double t;
+        double y;
+        double w;
+        double r;
+        const MuonCalib::IRtRelation *rt;
+      };
+      FunctionToMinimize(const int used) : m_data(),m_used(used),m_t0Error() {}
+      ~FunctionToMinimize() {m_data.clear();}
+      double DoEval(const double* xx) const {
+        double ang = xx[0];  
+        double b = xx[1];
+        double t0 = xx[2];
+        
+        double cosin = std::cos(ang);
+        double sinus = std::sin(ang);
+        
+        double fval = 0.;
+        // Add t0 constraint 
+        if (m_t0Error == WEAK_TOPO_T0ERROR ) {
+         fval += xx[2]*xx[2]/(1.0 *m_t0Error*m_t0Error);
+        }
+        double t, r, z, y, w, dist;
+        for(int i=0;i<m_used;++i) {
+          t = m_data[i].t - t0;
+          z = m_data[i].z;
+          y = m_data[i].y;
+          w = m_data[i].w;
+          dist = std::abs(b*cosin + z*sinus - y*cosin); // same thing as fabs(a*z - y + b)/sqrt(1. + a*a);
+          double uppercut = m_data[i].rt->tUpper();
+          double lowercut = m_data[i].rt->tLower();
+          // Penalty for t<lowercut and t >uppercut
+          if (t> uppercut ) { // too large 
+            fval += (t-uppercut)* (t-uppercut)*0.1;
+          } else if (t < 0 ) {// too small
+            fval += (t-lowercut)*(t-lowercut)*0.1;
+          }
+          if(t<lowercut) r =  m_data[i].rt->radius(lowercut);
+          else if(t>uppercut)  r = m_data[i].rt->radius(uppercut);
+          else r = m_data[i].rt->radius(t);
+          fval += (dist - r)*(dist - r)*w;
+        }
+        return fval;
+      }
+      ROOT::Math::IBaseFunctionMultiDim* Clone() const {return new FunctionToMinimize(m_used);}
+      unsigned int NDim() const {return 3;}
+      void setT0Error(const int t0Error){m_t0Error=t0Error;}
+      void addCoords(const double z, const double t, const double y, const double w, const double r, const MuonCalib::IRtRelation *rt){
+        HitCoords coords;
+        coords.z=z;
+        coords.t=t;
+        coords.y=y;
+        coords.w=w;
+        coords.r=r;
+        coords.rt=rt;
+        m_data.push_back(coords);
+      }
+    private:
+      std::vector<HitCoords> m_data;
+      int m_used;
+      int m_t0Error;
+  };
+
   MdtSegmentT0Fitter::MdtSegmentT0Fitter(const std::string& ty,const std::string& na,const IInterface* pa)
   : AthAlgTool(ty,na,pa),
     DCSLFitter(), 
@@ -56,15 +123,7 @@ namespace TrkDriftCircleMath {
   }
   
   StatusCode MdtSegmentT0Fitter::initialize() {
-
-    TMinuit* oldMinuit = gMinuit;
-    m_minuit = std::make_unique<TMinuit>(3);
-    m_minuit->SetPrintLevel(-1); // -1: no output, 1: std output
-    if( msgLvl(MSG::VERBOSE) ) m_minuit->SetPrintLevel(1);
-    gMinuit = oldMinuit;
-    
     ATH_CHECK(m_calibrationDbTool.retrieve());
-
     return StatusCode::SUCCESS;
   }
   
@@ -79,7 +138,6 @@ namespace TrkDriftCircleMath {
                   << " sel. hits > 2    " << std::setw(10) << m_npassedNSelectedHits << "   " << scaleFactor*m_npassedNSelectedHits << "\n"
                   << " Hits > min hits  " << std::setw(10) << m_npassedMinHits << "   " << scaleFactor*m_npassedMinHits << "\n"
                   << " Passed Fit       " << std::setw(10) << m_npassedMinuitFit << "   " << scaleFactor*m_npassedMinuitFit  );
-    if(gMinuit == m_minuit.get()) gMinuit = nullptr;
     return StatusCode::SUCCESS;
   }
   
@@ -217,52 +275,6 @@ namespace TrkDriftCircleMath {
     }
     return -1;    // failed to find key
   }
-  
-  /// the fit function
-  /// gets distance between the line and the hit (in the frame whose direction is given by the line segment
-  /// and position is given by the weighted average of all the hits), subtracts off the radius from the rt relation etc 
-  void mdtSegmentT0Fcn(Int_t &/*npar*/, Double_t* grad, Double_t &fval, Double_t* par, Int_t jflag) {
-    if(jflag < 0) grad[0] = 0.;
-    
-    double ang = par[0];  
-    double b = par[1];
-    double t0 = par[2];
-    
-    double cosin = std::cos(ang);
-    double sinus = std::sin(ang);
-    
-    fval = 0.;
-    // Add t0 constraint 
-    if (g_fcnData->t0Error == WEAK_TOPO_T0ERROR ) {
-     fval += par[2]*par[2]/(1.0 *g_fcnData->t0Error*g_fcnData->t0Error);
-    }
-    double t, r, z, y, w, dist;
-    for(int i = 0; i < g_fcnData->used ; i++) {
-      t = g_fcnData->data[i].t - t0;
-      z = g_fcnData->data[i].z;
-      y = g_fcnData->data[i].y;
-      w = g_fcnData->data[i].w;
-      dist = std::abs(b*cosin + z*sinus - y*cosin); // same thing as fabs(a*z - y + b)/sqrt(1. + a*a);
-      double uppercut = g_fcnData->data[i].rt->tUpper();
-      double lowercut = g_fcnData->data[i].rt->tLower();
-// Penalty for t<lowercut and t >uppercut
-      if (t> uppercut ) { // too large 
-	fval += (t-uppercut)* (t-uppercut)*0.1;
-      }else if (t < 0 ) {// too small
-	fval += (t-lowercut)*(t-lowercut)*0.1;
-      }
-	  if(t<lowercut) r =  g_fcnData->data[i].rt->radius(lowercut);
-          else if(t>uppercut)  r =  g_fcnData->data[i].rt->radius(uppercut);
-	  else r = g_fcnData->data[i].rt->radius(t);
-      fval += (dist - r)*(dist - r)*w;
-      
-    }
-    
-    return;
-  }
-  /***********************************************************************************/
-  
-  
   int sign(double a) {
     if(a>0) return 1;
     if(a<0) return -1;
@@ -272,14 +284,17 @@ namespace TrkDriftCircleMath {
     ++m_ntotalCalls;
 
     if(m_trace) ATH_MSG_DEBUG("New seg: ");
+
+    ROOT::Math::Minimizer* minimum = new ROOT::Minuit2::Minuit2Minimizer("algoName");
+    minimum->SetMaxFunctionCalls(1000000);
+    minimum->SetTolerance(0.001);
+    minimum->SetPrintLevel(-1);
+    if(msgLvl(MSG::VERBOSE)) minimum->SetPrintLevel(1);
  
     const DCOnTrackVec& dcs_keep = dcs;
 
     unsigned int N = dcs_keep.size();
 
-    std::unique_ptr<MdtSegmentT0FcnData> fcnData = std::make_unique<MdtSegmentT0FcnData>();
-
-    fcnData->used=0;
     result.setT0Shift(-99999,-99999);
     
     if(N<2) {
@@ -291,16 +306,17 @@ namespace TrkDriftCircleMath {
       return false;
     }  
     ++m_npassedSelectionConsistency;
+    int used=0;
     for(unsigned int i=0;i<N;++i){
-      if( selection[i] == 0 ) ++(fcnData->used);
+      if( selection[i] == 0 ) ++used;
     }
-    if(fcnData->used < 2){
+    if(used < 2){
       if(m_trace) ATH_MSG_DEBUG("TOO FEW HITS SELECTED");
       return false;
     }
     ++m_npassedNSelectedHits;
-    if(fcnData->used < m_minHits) {
-      if(m_trace) ATH_MSG_DEBUG("FEWER THAN Minimum HITS N " << m_minHits << " total hits " <<N<<" used " << fcnData->used);
+    if(used < m_minHits) {
+      if(m_trace) ATH_MSG_DEBUG("FEWER THAN Minimum HITS N " << m_minHits << " total hits " <<N<<" used " << used);
 
       //
       //     Copy driftcircles and reset the drift radii as they might have been overwritten
@@ -339,7 +355,7 @@ namespace TrkDriftCircleMath {
       if(m_trace) ATH_MSG_DEBUG(" chi2 total " << result.chi2() << " angle " << result.line().phi() << " y0 " << result.line().y0()  << " nhits "<< selection.size() << " refit ok " << iok);
       return oldrefit;
     } else {
-      if(m_trace) ATH_MSG_DEBUG("FITTING FOR T0 N "<<N<<" used " << fcnData->used);
+      if(m_trace) ATH_MSG_DEBUG("FITTING FOR T0 N "<<N<<" used " << used);
     } 
 
     ++m_npassedMinHits;
@@ -361,10 +377,9 @@ namespace TrkDriftCircleMath {
     std::vector<double> dr(N);
     std::vector<double> t(N);
     std::vector<const MuonCalib::IRtRelation*> rtpointers(N);
-    
-    // allocate memory for data
-    if(fcnData->data.capacity() != 50) fcnData->data.reserve(50);
-    fcnData->data.resize(fcnData->used);
+
+    FunctionToMinimize minFunct(used);
+
     {
       DCOnTrackVec::const_iterator it = dcs_keep.begin();
       DCOnTrackVec::const_iterator it_end = dcs_keep.end();
@@ -442,13 +457,7 @@ namespace TrkDriftCircleMath {
     
     for(int ii=0 ;it!=it_end; ++it, ++ii ){
       if( selection[ii] == 0 ) {
-        fcnData->data[selcount].z = z[ii];
-        fcnData->data[selcount].y = y[ii];
-        fcnData->data[selcount].r = r[ii];
-        fcnData->data[selcount].w = w[ii];
-        fcnData->data[selcount].rt = rtpointers[ii];
-        double r2tval;
-        r2tval = r2t_ext(&rtpointers,  r[ii], ii) ;
+        double r2tval = r2t_ext(&rtpointers,  r[ii], ii) ;
         tl = rtpointers[ii]->tLower();
         th = rtpointers[ii]->tUpper();
         if(t[ii] - tl < min_tlower) min_tlower = t[ii] - tl;
@@ -468,8 +477,9 @@ namespace TrkDriftCircleMath {
         t0seed += tee0;
         st0 += tee0*tee0;
         if(tee0 < min_t0 && std::abs(r2tval) < R2TSPURIOUS) min_t0 = tee0;
-        
-        fcnData->data[selcount].t = t[ii];
+
+        minFunct.addCoords(z[ii], t[ii], y[ii], w[ii], r[ii], rtpointers[ii]);
+
         selcount++;
       } 
     }
@@ -518,13 +528,15 @@ namespace TrkDriftCircleMath {
       if(it->id().ml()==1&&sdist < 0) nml2n++;
     }
 
-// Define t0 constraint in Minuit 
-    fcnData->t0Error = STRONG_TOPO_T0ERROR;
-    if (nml1p+nml2p < 2 || nml1n+nml2n < 2) fcnData->t0Error = WEAK_TOPO_T0ERROR;
+// Define t0 constraint in Minuit
+    int t0Error = STRONG_TOPO_T0ERROR;
+    if (nml1p+nml2p < 2 || nml1n+nml2n < 2) t0Error = WEAK_TOPO_T0ERROR;
+
+    minFunct.setT0Error(t0Error);
 
 // Reject topologies where in one of the Multilayers no +- combination is present
     if((nml1p<1||nml1n<1)&&(nml2p<1||nml2n<1)&&m_rejectWeakTopologies) {
-      if(m_trace) ATH_MSG_DEBUG("Combination rejected for positive radii ML1 " <<  nml1p << " ML2 " <<  nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << fcnData->used << " t0 Error " << fcnData->t0Error);
+      if(m_trace) ATH_MSG_DEBUG("Combination rejected for positive radii ML1 " <<  nml1p << " ML2 " <<  nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << used << " t0 Error " << t0Error);
       it = dcs.begin();
       it_end = dcs.end();
       double chi2p = 0.; 
@@ -554,127 +566,32 @@ namespace TrkDriftCircleMath {
       return oldrefit;
     }  // end rejection of weak topologies  
 
-    if(m_trace) ATH_MSG_DEBUG("positive radii ML1 " <<  nml1p << " ML2 " <<  nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << fcnData->used << " t0 Error " << fcnData->t0Error);
-    
-    int errFlag = 0;
-    int errFlag1 = 0;
-    int errFlag2 = 0;
-    int errFlag3 = 0;
-    int errFlag4 = 0;
-    int errFlag5 = 0;
-    {
-      // The part where the fcn gets used, requires locking to protect fcnData from concurrent access
-      std::scoped_lock lock(g_fcnDataMutex);
-      g_fcnData = fcnData.get();
-
-      m_minuit->SetFCN(mdtSegmentT0Fcn);
-      Double_t arglist[3];
-      
-      // Set printout level
-      arglist[0] = -1;
-      // Clear previous fit
-      m_minuit->mncler();
-      arglist[0] = -1;
-      
-      Double_t vstart[3];
-      vstart[0] = theta;
-      // x' = x - xc, y' = y - yc => y' = m x' + b + m xc - yc
-      // and b = yc - m xc
-      vstart[1] = d ; 
-      vstart[2] = 0 ;
+    if(m_trace) ATH_MSG_DEBUG("positive radii ML1 " <<  nml1p << " ML2 " <<  nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << used << " t0 Error " << t0Error);
 
-      // if t0Seed value from outside use this
-      if(t0Seed > -999.)  vstart[2] = t0Seed; 
+    Double_t step[3] = {0.01 , 0.01 , 0.1 };
+    // starting point
+    Double_t variable[3] = {theta,d,0};
+    // if t0Seed value from outside use this
+    if(t0Seed > -999.) variable[2] = t0Seed; 
 
-      Double_t step[3] = {0.01 , 0.01 , 0.1 };
-      
-      if(m_trace) {
-        ATH_MSG_DEBUG("\n____________INITIAL VALUES________________" );
-        ATH_MSG_DEBUG("Theta " << theta << "("<<std::tan(theta)<<") d " << vstart[1]);
-      }
-      
+    minimum->SetVariable(0,"a",variable[0], step[0]);
+    minimum->SetVariable(1,"b",variable[1], step[1]);
+    minimum->SetVariable(2,"t0",variable[2], step[2]);
 
-      m_minuit->mnparm(0, "a", vstart[0], step[0], -0.5, 3.5,errFlag);
-      m_minuit->mnparm(1, "b", vstart[1], step[1], 0., 0.,errFlag);
-      m_minuit->mnparm(2, "t0", vstart[2], step[2], 0., 0.,errFlag);
+    minimum->SetFunction(minFunct);
 
-      if (errFlag !=0 &&m_trace)  {
-        ATH_MSG_DEBUG("ALARM with steering of Minuit variable " << errFlag);
-      }
-      
-      m_minuit->FixParameter(0);
-      m_minuit->FixParameter(1);
-
-      m_minuit->mnexcm("MINIMIZE", arglist, 0,errFlag1);
-
-      m_minuit->Release(0);
-      m_minuit->Release(1);
-      m_minuit->FixParameter(2);
-      m_minuit->mnexcm("MINIMIZE", arglist, 0,errFlag2);
-      m_minuit->mnexcm("MIGRAD", arglist, 0,errFlag3);
-      m_minuit->Release(2);
-      m_minuit->mnexcm("MINIMIZE", arglist, 0,errFlag4);
-      m_minuit->mnexcm("MIGRAD", arglist, 0,errFlag5);
-      if(errFlag5!=0&&errFlag4==0) {
-        m_minuit->mnexcm("MINIMIZE", arglist, 0,errFlag4); 
-        if (errFlag4 == 0 &&m_trace)  {
-          ATH_MSG_DEBUG(" ALARM Fall back to MINIMIZE " << errFlag4);
-        }
-      }
-      g_fcnData = nullptr; 
-    } // end of scoped_lock
-    
-    // Get the chisquare and errors
-    double chisq(0);
-    double edm(0);
-    double errdef(0);
-    int npari(0);
-    int nparx(0);
-    int icstat(0);
-    m_minuit->mnstat(chisq, edm, errdef, npari, nparx, icstat);
-   
-    int fitretval = errFlag5;
-    if (npari<0 || nparx < 0 || chisq < 0) ATH_MSG_WARNING("MdtSegmentT0Fitter MINUIT problem " << " chisq "<<chisq<<" npari "<<npari<<" nparx "<< nparx <<" fitretval "<< fitretval<<" (cf. ATLASRECTS-5795)");
-
-    if (fitretval !=0 &&m_trace)  {
-      ATH_MSG_DEBUG(  " ALARM return value " << fitretval  );
-    }
-    if(m_dumpToFile) {
-      std::ofstream ff;
-      ff.open("fitres.txt", std::ios::out | std::ios::app);
-      ff<<npari<<" "<<nparx<<" "<<fitretval<<" "<<chisq<< " "<< std::endl;
-      ff.close();
-    }
-    if(m_trace) ATH_MSG_DEBUG("chisq "<<chisq<<" npari "<<npari<<" nparx "<<nparx<<" fitretval "<<fitretval);
+    // do the minimization
+    minimum->Minimize();
 
-    // Do standard DCSL fit if minuit is bad 
-    // Do standard DCSL fit if all fits from minuit are bad 
-    if (errFlag5!=0&&errFlag4!=0&&errFlag3!=0&&errFlag2!=0&&errFlag1!=0) {
-      if(m_trace)ATH_MSG_DEBUG(" ALARM Minimize fix " << errFlag1 << " ALARM minimize release " << errFlag2 
-			<< " ALARM migrad fix 1 " << errFlag3 << " ALARM minimize all free" << errFlag4 << " ALARM migrad all free " 
-                                << errFlag5);
+    const double *results = minimum->X();
+    const double *errors = minimum->Errors();
+    ATH_MSG_DEBUG("Minimum: f(" << results[0] << "+-" << errors[0] << "," << results[1]<< "+-" << errors[1]<< "," << results[2] << "+-" << errors[2]<< "): " << minimum->MinValue());
 
-      DCOnTrackVec dcs_new;
-      dcs_new.reserve(dcs.size());
-      DCOnTrackVec::const_iterator it = dcs.begin();
-      DCOnTrackVec::const_iterator it_end = dcs.end();
-    
-      for(int i=0; it!=it_end; ++it, ++i ){
-        const DriftCircle* ds  = & dcs[i];
-        DriftCircle dc_keep(ds->position(), ds->rot()->driftRadius(), ds->dr(), ds->drPrecise(), ds->state(), ds->id(), ds->index(),ds->rot() );
-        DCOnTrack dc_new(dc_keep, 0., 0.);
-        dc_new.state(dcs[i].state());
-        dcs_new.push_back( dc_new );
-      }
-      bool oldrefit =  DCSLFitter::fit( result, line , dcs_new, selection );
-      return oldrefit;
-    }
     ++m_npassedMinuitFit;
 
     // Get the fit values
-    double aret(0);
-    double aErr(0);
-    m_minuit->GetParameter(0,aret,aErr); // theta returned
+    double aret=results[0];
+    double aErr=errors[0];
     double dtheta = aErr;
     double tana = std::tan(aret); // tangent of angle
     double ang = aret;  // between zero and pi
@@ -687,48 +604,41 @@ namespace TrkDriftCircleMath {
       cosin = -cosin;
     }
     ang = std::atan2(sinus, cosin);
-    
-    
-    double b(0);
-    double bErr(0);
-    m_minuit->GetParameter(1,b,bErr); // intercept
-    double t0(0);
-    double t0Err(0);
-    m_minuit->GetParameter(2,t0,t0Err);
+    double b=results[1];
+    double bErr=errors[1];
+    double t0=results[2];
+    double t0Err=errors[2];
     double dy0 = cosin * bErr - b * sinus * aErr;
     
     double del_t;
     del_t = std::abs(rtpointers[0]->radius((t0+t0Err)) - rtpointers[0]->radius(t0)) ;
-    
+
     if(m_trace) {
       ATH_MSG_DEBUG("____________FINAL VALUES________________" );
       ATH_MSG_DEBUG("Values: a "<<tana<<" d "<<b * cosin <<" t0 "<<t0);
       ATH_MSG_DEBUG("Errors: a "<<aErr<<" b "<<dy0 <<" t0 "<<t0Err);
     }
     d = b * cosin;
-    double covar[3][3];
-    m_minuit->mnemat(&covar[0][0],3);  // 3x3
     if(m_trace) {
       msg() << MSG::DEBUG <<"COVAR  ";
       for(int it1=0; it1<3; it1++) {
         for(int it2=0; it2<3; it2++) {
-          msg() << MSG::DEBUG <<covar[it1][it2]<<" ";
+          msg() << MSG::DEBUG <<minimum->CovMatrix(it1,it2)<<" ";
         }
         msg() << MSG::DEBUG << endmsg;
       }
     }
-    
+
     result.dcs().clear();
     result.clusters().clear();
     result.emptyTubes().clear();
 
     if(m_trace) ATH_MSG_DEBUG("after fit theta "<<ang<<" sinus "<<sinus<< " cosin "<< cosin);
-    
+
     double chi2 = 0;
     unsigned int nhits(0);
     double yl;
-    
-    
+
     // calculate predicted hit positions from track parameters
     it = dcs_keep.begin();
     it_end = dcs_keep.end();
@@ -775,7 +685,7 @@ namespace TrkDriftCircleMath {
       double covsq=0;
       for(int rr=0; rr<3; rr++) {
         for(int cc=0; cc<3; cc++) {
-          covsq += deriv[rr]*covar[rr][cc]* deriv[cc];
+          covsq += deriv[rr]*minimum->CovMatrix(rr,cc)* deriv[cc];
         }
       }
       if(m_trace) {
@@ -783,8 +693,8 @@ namespace TrkDriftCircleMath {
 	if( covsq < 0. ){
 	  for(int rr=0; rr<3; rr++) {
 	    for(int cc=0; cc<3; cc++) {
-	      double dot = deriv[rr]*covar[rr][cc]* deriv[cc];
-	      ATH_MSG_DEBUG(" adding term " << dot << " dev1 " << deriv[rr] << " cov " << covar[rr][cc] << " dev2 " << deriv[cc]);
+	      double dot = deriv[rr]*minimum->CovMatrix(rr,cc)* deriv[cc];
+	      ATH_MSG_DEBUG(" adding term " << dot << " dev1 " << deriv[rr] << " cov " << minimum->CovMatrix(rr,cc) << " dev2 " << deriv[cc]);
 	    }
 	  }
 	}
@@ -836,7 +746,7 @@ namespace TrkDriftCircleMath {
       if(chi2/(nhits-NUMPAR) > 5) {
         ATH_MSG_DEBUG("_______NOT GOOD ");
       }
-      ATH_MSG_DEBUG("chi2 "<<chi2<<" per dof "<<chi2/(nhits-NUMPAR)<<" root chisq "<<chisq);
+      ATH_MSG_DEBUG("chi2 "<<chi2<<" per dof "<<chi2/(nhits-NUMPAR));
     }
     return true;
   }
-- 
GitLab


From 00b89010b35ab4a14f4be69563baf7e8a91069d6 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Tue, 15 Dec 2020 20:50:19 +0100
Subject: [PATCH 032/308] Updated all projects to atlasexternals-2.0.93.

---
 Projects/AnalysisBase/externals.txt   | 2 +-
 Projects/AthAnalysis/externals.txt    | 2 +-
 Projects/AthDataQuality/externals.txt | 2 +-
 Projects/AthGeneration/externals.txt  | 2 +-
 Projects/AthSimulation/externals.txt  | 2 +-
 Projects/Athena/externals.txt         | 2 +-
 Projects/VP1Light/externals.txt       | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index 56cafc4159cf..5194df2180d4 100644
--- a/Projects/AnalysisBase/externals.txt
+++ b/Projects/AnalysisBase/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AnalysisBaseExternalsVersion = 2.0.92
+AnalysisBaseExternalsVersion = 2.0.93
diff --git a/Projects/AthAnalysis/externals.txt b/Projects/AthAnalysis/externals.txt
index 3eab080a1962..daedfe45cd05 100644
--- a/Projects/AthAnalysis/externals.txt
+++ b/Projects/AthAnalysis/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthAnalysisExternalsVersion = 2.0.92
+AthAnalysisExternalsVersion = 2.0.93
diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt
index 7e3bc3a47628..878d0bf1cf52 100644
--- a/Projects/AthDataQuality/externals.txt
+++ b/Projects/AthDataQuality/externals.txt
@@ -5,4 +5,4 @@
 # an "origin/" prefix before it. For tags however this is explicitly
 # forbidden.
 
-AtlasExternalsVersion = 2.0.92
+AtlasExternalsVersion = 2.0.93
diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt
index 02a983fc934c..d18f36322222 100644
--- a/Projects/AthGeneration/externals.txt
+++ b/Projects/AthGeneration/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthGenerationExternalsVersion = 2.0.92
+AthGenerationExternalsVersion = 2.0.93
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 278b93235d14..900556adffda 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthSimulationExternalsVersion = 2.0.92
+AthSimulationExternalsVersion = 2.0.93
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index d69bd120be45..5e279150d955 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthenaExternalsVersion = 2.0.92
+AthenaExternalsVersion = 2.0.93
diff --git a/Projects/VP1Light/externals.txt b/Projects/VP1Light/externals.txt
index ae41cc700aaa..488dcf5ae416 100644
--- a/Projects/VP1Light/externals.txt
+++ b/Projects/VP1Light/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-VP1LightExternalsVersion = 2.0.92
+VP1LightExternalsVersion = 2.0.93
-- 
GitLab


From 6cccbc764d913479c10655789d668a894a560d66 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Tue, 15 Dec 2020 20:54:04 +0100
Subject: [PATCH 033/308] Fixing do_idperf flags in ElectronSequenceSetup.py
 and adding DEBUG msgs to others

---
 .../python/TrigEgammaFastElectronHypoTool.py  |  2 +-
 .../src/TrigEgammaFastElectronFexMT.cxx       | 43 +++++--------------
 .../src/TrigEgammaFastElectronHypoAlgMT.cxx   |  3 ++
 .../Egamma/ElectronSequenceSetup.py           | 18 ++++----
 4 files changed, 23 insertions(+), 43 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
index 79b33b344746..5f44ae2edb23 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py
@@ -15,7 +15,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
     name = chainDict['chainName']
     from AthenaConfiguration.ComponentFactory import CompFactory
     tool = CompFactory.TrigEgammaFastElectronHypoTool(name)
- 
+
     if 'idperf' in name:
         tool.AcceptAll = True
    
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
index 92c66a26209f..05e487b098cb 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx
@@ -76,11 +76,11 @@ StatusCode TrigEgammaFastElectronFexMT::initialize()
   ATH_MSG_DEBUG("CaloTrackdEoverPLow  = " << m_calotrackdeoverp_low); 
   ATH_MSG_DEBUG("CaloTrackdEoverPHigh = " << m_calotrackdeoverp_high);
 
-ATH_CHECK( m_roiCollectionKey.initialize() );
-ATH_CHECK( m_TrigEMClusterContainerKey.initialize() );
-ATH_CHECK( m_TrackParticleContainerKey.initialize() );
-ATH_CHECK( m_outputElectronsKey.initialize() );
-ATH_CHECK( m_outputDummyElectronsKey.initialize() );
+  ATH_CHECK( m_roiCollectionKey.initialize() );
+  ATH_CHECK( m_TrigEMClusterContainerKey.initialize() );
+  ATH_CHECK( m_TrackParticleContainerKey.initialize() );
+  ATH_CHECK( m_outputElectronsKey.initialize() );
+  ATH_CHECK( m_outputDummyElectronsKey.initialize() );
 
   return StatusCode::SUCCESS;
 }
@@ -136,9 +136,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
 
   auto clusContainer = SG::makeHandle (m_TrigEMClusterContainerKey, ctx);
   ATH_MSG_DEBUG( "Made handle " << m_TrigEMClusterContainerKey  );
-
- /**********************/
-  ATH_MSG_DEBUG("Debo1");  
   
   //JTB Should only be 1 cluster in each RoI 
 
@@ -155,9 +152,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
   ATH_MSG_DEBUG("Cluster: ET=" << calo_et);
   ATH_MSG_DEBUG("searching a matching track: loop over tracks");
 
-  /**********************/
-  ATH_MSG_DEBUG("Debo2");
-
   SG::ReadHandle<xAOD::TrackParticleContainer> tracks(m_TrackParticleContainerKey, ctx);
   ATH_MSG_DEBUG( "Made handle " << m_TrackParticleContainerKey  );
 
@@ -165,9 +159,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
   if (tracks->size() == 0){
       return StatusCode::SUCCESS; // Exit early if there are no tracks
   }
-  
-  /**********************/
-  ATH_MSG_DEBUG("Debo3");
 
   size_t coll_size = tracks->size();
   trigElecColl->reserve(coll_size);
@@ -184,42 +175,28 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
 
   auto mon = Monitored::Group(m_monTool,  caloPtMon, trackPtMon, caloTrackDEtaMon, caloTrackDPhiMon, etOverPtMon, caloTrackDEtaNoExtrapMon );
 
-  /**********************/
-  ATH_MSG_DEBUG("Debo4");
-
   // Make Dummy Electron
      xAOD::TrigElectron* trigDummyElec = new xAOD::TrigElectron();
-  
- /**********************/
-  ATH_MSG_DEBUG("Debo5");
 
      ElementLink<xAOD::TrackParticleContainer> trackDummyEL = ElementLink<xAOD::TrackParticleContainer> (*tracks, 0);
      
- /**********************/
-  ATH_MSG_DEBUG("Debo6");  
-     
      trigDummyElecColl->push_back(trigDummyElec);
      trigDummyElec->init( 0,
                       0, 0,  0,
                       clusEL,
                       trackDummyEL);
-   
-   /**********************/
-    ATH_MSG_DEBUG("Debo7");
  
   // loop over tracks
 
-  /**********************/
-  ATH_MSG_DEBUG("Debo8");
-
   unsigned int track_index=0;
   for(const auto trkIter:(*tracks)){
+      ATH_MSG_DEBUG("Track loop starts");
       ATH_MSG_VERBOSE("AlgoId = " << (trkIter)->patternRecoInfo());
       ATH_MSG_VERBOSE("At perigee:");
-      ATH_MSG_VERBOSE(" Pt  = " << fabs((trkIter)->pt())); 
-      ATH_MSG_VERBOSE(" phi = " << fabs((trkIter)->phi0()));
-      ATH_MSG_VERBOSE(" eta = " << fabs((trkIter)->eta())); 
-      ATH_MSG_VERBOSE(" z0  = " << fabs((trkIter)->z0()));  
+      ATH_MSG_DEBUG(" Pt  = " << fabs((trkIter)->pt())); 
+      ATH_MSG_DEBUG(" phi = " << fabs((trkIter)->phi0()));
+      ATH_MSG_DEBUG(" eta = " << fabs((trkIter)->eta())); 
+      ATH_MSG_DEBUG(" z0  = " << fabs((trkIter)->z0()));  
 
       // ============================================= //
       // Pt cut
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoAlgMT.cxx
index 6572eac08f27..f1aa9472e427 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoAlgMT.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoAlgMT.cxx
@@ -39,6 +39,9 @@ StatusCode TrigEgammaFastElectronHypoAlgMT::execute( const EventContext& context
   ATH_CHECK( previousDecisionsHandle.isValid() );
   ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() <<" previous decisions");
   
+  //Printing event No.
+  ATH_MSG_DEBUG("Event No.: "<<context.eventID().event_number());
+  
   // new output decisions
   SG::WriteHandle<DecisionContainer> outputHandle = createAndStore(decisionOutput(), context ); 
   auto decisions = outputHandle.ptr();
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index 447c38a661c7..e73acabad95c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -2,6 +2,8 @@
 #  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
+from AthenaConfiguration.AllConfigFlags import ConfigFlags 
+
 # menu components   
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
 from AthenaCommon.CFElements import parOR, seqAND
@@ -9,7 +11,7 @@ from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
 from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 
-def fastElectronSequence(do_idperf):
+def fastElectronSequence(ConfigFlags):
     """ second step:  tracking....."""
     
     from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
@@ -57,24 +59,22 @@ def fastElectronSequence(do_idperf):
     l2ElectronViewsMaker.ViewNodeName = "electronInViewAlgs"
 
     electronAthSequence = seqAND("electronAthSequence", [l2ElectronViewsMaker, electronInViewAlgs ] )
-
-    if not do_idperf:
-        return (electronAthSequence, l2ElectronViewsMaker, theElectronFex.ElectronsName)
-    else:
-        return (electronAthSequence, l2ElectronViewsMaker, theElectronFex.DummyElectronsName)
-
+    return (electronAthSequence, l2ElectronViewsMaker)
+   
 def fastElectronMenuSequence(do_idperf):
     """ Creates 2nd step Electron  MENU sequence"""
     # retrievee the reco seuqence+IM
-    (electronAthSequence, l2ElectronViewsMaker, sequenceOut) = RecoFragmentsPool.retrieve(fastElectronSequence, {'do_idperf':do_idperf})
+    (electronAthSequence, l2ElectronViewsMaker) = RecoFragmentsPool.retrieve(fastElectronSequence, ConfigFlags)
 
     # make the Hypo
     from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastElectronHypoAlgMT
     if do_idperf is True:
         theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT_idperf")
+        theElectronHypo.Electrons = "HLT_FastDummyElectrons"
     else:
         theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT")
-    theElectronHypo.Electrons = sequenceOut
+        theElectronHypo.Electrons = "HLT_FastElectrons"
+
     theElectronHypo.RunInView=True
 
     from TrigEgammaHypo.TrigEgammaFastElectronHypoTool import TrigEgammaFastElectronHypoToolFromDict
-- 
GitLab


From ccec4e531f94452cd67df0c6267554de3e71085c Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Wed, 16 Dec 2020 10:31:24 +0100
Subject: [PATCH 034/308] Updating references

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 50 +++++++++++++++++++
 .../share/ref_data_v1Dev_build.ref            | 50 +++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index c8d782b99bf8..d81dd39244c7 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -620,6 +620,20 @@ HLT_e17_lhvloose_nod0_L1EM15VHI:
     2: 6
     3: 4
     4: 4
+HLT_e20_lhmedium_e15_idperf_Zee_L12EM3:
+  eventCount: 19
+  stepCounts:
+    0: 20
+    1: 20
+    2: 20
+    3: 19
+    4: 19
+  stepFeatures:
+    0: 176
+    1: 715
+    2: 292
+    3: 152
+    4: 111
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
   eventCount: 0
   stepCounts:
@@ -664,6 +678,18 @@ HLT_e26_etcut_L1EM22VHI:
     1: 30
     2: 6
     3: 6
+HLT_e26_idperf_L1EM24VHI:
+  eventCount: 6
+  stepCounts:
+    0: 6
+    1: 6
+    2: 6
+    3: 6
+  stepFeatures:
+    0: 7
+    1: 7
+    2: 16
+    3: 7
 HLT_e26_lhloose_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -850,6 +876,18 @@ HLT_e26_lhtight_nod0_L1EM24VHI:
     2: 6
     3: 4
     4: 4
+HLT_e28_idperf_L1EM24VHI:
+  eventCount: 6
+  stepCounts:
+    0: 6
+    1: 6
+    2: 6
+    3: 6
+  stepFeatures:
+    0: 7
+    1: 7
+    2: 16
+    3: 7
 HLT_e300_etcut_L1EM22VHI:
   eventCount: 0
 HLT_e3_etcut1step_g5_etcut_L12EM3:
@@ -886,6 +924,18 @@ HLT_e5_etcut_L1EM3:
     1: 458
     2: 173
     3: 102
+HLT_e5_idperf_L1EM3:
+  eventCount: 20
+  stepCounts:
+    0: 20
+    1: 20
+    2: 20
+    3: 20
+  stepFeatures:
+    0: 176
+    1: 166
+    2: 292
+    3: 153
 HLT_e5_lhloose_L1EM3:
   eventCount: 6
   stepCounts:
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index f55a38a8f6e3..cf9b8dc3686f 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -334,6 +334,20 @@ HLT_e17_lhvloose_nod0_L1EM15VH:
   eventCount: 0
 HLT_e17_lhvloose_nod0_L1EM15VHI:
   eventCount: 0
+HLT_e20_lhmedium_e15_idperf_Zee_L12EM3:
+  eventCount: 12
+  stepCounts:
+    0: 13
+    1: 13
+    2: 13
+    3: 12
+    4: 12
+  stepFeatures:
+    0: 47
+    1: 106
+    2: 70
+    3: 36
+    4: 36
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
   eventCount: 0
 HLT_e24_lhmedium_2g12_loose_L1EM20VH_3EM10VH:
@@ -356,6 +370,18 @@ HLT_e26_etcut_L1EM22VHI:
     1: 1
     2: 1
     3: 1
+HLT_e26_idperf_L1EM24VHI:
+  eventCount: 1
+  stepCounts:
+    0: 1
+    1: 1
+    2: 1
+    3: 1
+  stepFeatures:
+    0: 1
+    1: 1
+    2: 4
+    3: 1
 HLT_e26_lhloose_L1EM15VH:
   eventCount: 0
 HLT_e26_lhloose_L1EM22VHI:
@@ -382,6 +408,18 @@ HLT_e26_lhtight_nod0_L1EM22VHI:
   eventCount: 0
 HLT_e26_lhtight_nod0_L1EM24VHI:
   eventCount: 0
+HLT_e28_idperf_L1EM24VHI:
+  eventCount: 1
+  stepCounts:
+    0: 1
+    1: 1
+    2: 1
+    3: 1
+  stepFeatures:
+    0: 1
+    1: 1
+    2: 4
+    3: 1
 HLT_e300_etcut_L1EM22VHI:
   eventCount: 0
 HLT_e3_etcut1step_g5_etcut_L12EM3:
@@ -418,6 +456,18 @@ HLT_e5_etcut_L1EM3:
     1: 54
     2: 41
     3: 27
+HLT_e5_idperf_L1EM3:
+  eventCount: 13
+  stepCounts:
+    0: 15
+    1: 13
+    2: 13
+    3: 13
+  stepFeatures:
+    0: 49
+    1: 40
+    2: 70
+    3: 37
 HLT_e5_lhloose_L1EM3:
   eventCount: 0
   stepCounts:
-- 
GitLab


From 8b59aed5ac2aca8731229aef841895076af22a33 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Wed, 16 Dec 2020 11:21:11 +0100
Subject: [PATCH 035/308] make ComponentAccumulator.conf2toConfigurable less
 verbose

---
 .../python/ComponentAccumulator.py                 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index b08120e3ecfd..76da75a712ea 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -884,7 +884,7 @@ def conf2toConfigurable( comp, indent="", suppressDupes=False ):
         _log.warning( "%sComponent: \"%s\" is of type string, no conversion, some properties possibly not set?", indent, comp )
         return comp
 
-    _log.info( "%sConverting from GaudiConfig2 object %s type %s", indent, compName(comp), comp.__class__.__name__ )
+    _log.debug( "%sConverting from GaudiConfig2 object %s type %s", indent, compName(comp), comp.__class__.__name__ )
 
     def __alreadyConfigured( instanceName ):
         from AthenaCommon.Configurable import Configurable
@@ -1018,14 +1018,14 @@ def conf2toConfigurable( comp, indent="", suppressDupes=False ):
                     pvalue=pvalue.data
 
                 if pname not in alreadySetProperties:
-                    _log.info( "%sAdding property: %s for %s", indent, pname, newConf2Instance.getName() )
+                    _log.debug( "%sAdding property: %s for %s", indent, pname, newConf2Instance.getName() )
                     try:
                         setattr(existingConfigurableInstance, pname, pvalue)
                     except AttributeError:
                         _log.info("%s Could not set attribute. Type of existingConfigurableInstance %s.",indent, type(existingConfigurableInstance) )
                         raise
                 elif alreadySetProperties[pname] != pvalue:
-                    _log.info( "%sMerging property: %s for %s", indent, pname, newConf2Instance.getName() )
+                    _log.debug( "%sMerging property: %s for %s", indent, pname, newConf2Instance.getName() )
                     # create surrogate
                     clone = newConf2Instance.getInstance("Clone")
                     setattr(clone, pname, alreadySetProperties[pname])
@@ -1041,10 +1041,10 @@ def conf2toConfigurable( comp, indent="", suppressDupes=False ):
 
                     setattr(existingConfigurableInstance, pname, updatedPropValue)
                     del clone
-                    _log.info("%s invoked GaudiConf2 semantics to merge the %s and the %s to %s "
-                              "for property %s of %s",
-                              indent, alreadySetProperties[pname], pvalue, pname,
-                              updatedPropValue, existingConfigurable.getFullName())
+                    _log.debug("%s invoked GaudiConf2 semantics to merge the %s and the %s to %s "
+                               "for property %s of %s",
+                               indent, alreadySetProperties[pname], pvalue, pname,
+                               updatedPropValue, existingConfigurable.getFullName())
 
     _log.debug( "%s Conf2 Full name: %s ", indent, comp.getFullJobOptName() )
     existingConfigurable = __alreadyConfigured( comp.name )
-- 
GitLab


From ffd019cfddac83e4598605839baa1eed0e53be5b Mon Sep 17 00:00:00 2001
From: Denis Damazio <damazio@mail.cern.ch>
Date: Wed, 16 Dec 2020 11:39:41 +0100
Subject: [PATCH 036/308] fix for missing type specification in log output
 variable

---
 .../LArExample/LArConditionsCommon/python/LArCondFlags.py       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py
index a809b87757cc..7b17f47c9a26 100644
--- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py
@@ -468,7 +468,7 @@ class LArCondFlags(JobPropertyContainer):
             
         # set the tag for FebRodMap
         if "/LAR/Identifier/FebRodMap" in self.LArCondFolderTags():
-            self._log.info(' using user specified tag for /LAR/Identifier/FebRodMap' , self.LArCondFolderTags()['/LAR/Identifier/FebRodMap'])
+            self._log.info(' using user specified tag for /LAR/Identifier/FebRodMap %s' , self.LArCondFolderTags()['/LAR/Identifier/FebRodMap'])
 
         else :
             if DDVtype=="" or DDVtype not in self.DDVtoFebRodIdMCTag():
-- 
GitLab


From 39cc376ec575d49c03db92bc2957ed9b8297c41e Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 16 Dec 2020 13:48:19 +0100
Subject: [PATCH 037/308] AthenaMonitoringKernel: Initialize HistogramDef
 members

Assign the same C++ default values to the `HistogramDef` members as in
Python.
---
 .../AthenaMonitoringKernel/HistogramDef.h     | 36 +++++++++----------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h
index ae260d3463fa..dbae08354663 100644
--- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h
+++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h
@@ -19,7 +19,7 @@ namespace Monitored {
     std::string path; //!< booking path
     std::string title; //!< title of the histogram
     std::string opt; //!< options
-    std::string tld{""}; //!< top level directory (below THistSvc stream)
+    std::string tld; //!< top level directory (below THistSvc stream)
     std::string weight; //!< name of weight variable
     std::string cutMask; //!< variable that defines whether event is accepted
 
@@ -40,33 +40,33 @@ namespace Monitored {
     RunMode runmode = RunMode::Invalid; //!< online or offline
     RunPeriod runperiod = RunPeriod::Invalid; //!< rebook period in offline monitoring
 
-    bool Sumw2; //!< store sum of squares of weights
-    int kLBNHistoryDepth; //!< length of lb history
-    bool kAddBinsDynamically; //!< add new bins outside the existing range
-    bool kRebinAxes; //!< increase the axis range without adding new bins
-    bool kCanRebin; //!< allow all axes to be rebinned
-    bool kVec; //!< add content to each bin from each element of a vector
-    bool kVecUO; //!< add content to each bin from vector, including overflow/underflow
-    bool kCumulative; //!< fill bin of monitored object's value, and every bin below it
+    bool Sumw2{false}; //!< store sum of squares of weights
+    int kLBNHistoryDepth{0}; //!< length of lb history
+    bool kAddBinsDynamically{false}; //!< add new bins outside the existing range
+    bool kRebinAxes{false}; //!< increase the axis range without adding new bins
+    bool kCanRebin{false}; //!< allow all axes to be rebinned
+    bool kVec{false}; //!< add content to each bin from each element of a vector
+    bool kVecUO{false}; //!< add content to each bin from vector, including overflow/underflow
+    bool kCumulative{false}; //!< fill bin of monitored object's value, and every bin below it
 
     std::string xvar; //!< name of x variable
-    int xbins; //!< number of y bins
-    float xmin; //!< x axis minimum
-    float xmax; //!< x axis maximum
+    int xbins{0}; //!< number of y bins
+    float xmin{0}; //!< x axis minimum
+    float xmax{0}; //!< x axis maximum
     std::vector<std::string> xlabels; //!< labels for x axis
     std::vector<double> xarray; //!< array of x bin edges
 
     std::string yvar; //!< name of y variable
-    int ybins; //!< number of y bins
-    float ymin; //!< y axis minimum
-    float ymax; //!< y axis maximum
+    int ybins{0}; //!< number of y bins
+    float ymin{0}; //!< y axis minimum
+    float ymax{0}; //!< y axis maximum
     std::vector<std::string> ylabels; //!< labels for y axis
     std::vector<double> yarray; //!< array of y bin edges
 
     std::string zvar; //!< name of z variable
-    int zbins; //!< number of z bins
-    float zmin; //!< z axis minimum
-    float zmax; //!< z axis maximum
+    int zbins{0}; //!< number of z bins
+    float zmin{0}; //!< z axis minimum
+    float zmax{0}; //!< z axis maximum
     std::vector<std::string> zlabels; //!< labels for z axis
 
     std::string treeDef; //!< defines output TTree of monitored quantities
-- 
GitLab


From 081460f0429fae71825841339768328b8cdfc9b1 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 16 Dec 2020 14:15:42 +0100
Subject: [PATCH 038/308] JetD3PDMaker: enable flake8, delete obsolete files

Enable `flake8` and make code compliant. Delete unused `JetTileD3PD.py`
and `ModJetD3PD.py`. Also remove a lot of commented code.
---
 .../D3PDMaker/JetD3PDMaker/CMakeLists.txt     |   2 +-
 .../D3PDMaker/JetD3PDMaker/python/JetD3PD.py  |   5 -
 .../JetD3PDMaker/python/JetD3PDObject.py      | 401 +-----------------
 .../JetD3PDMaker/python/JetTileD3PD.py        |  86 ----
 .../JetD3PDMaker/python/ModJetD3PD.py         |  94 ----
 5 files changed, 3 insertions(+), 585 deletions(-)
 delete mode 100644 PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PD.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/ModJetD3PD.py

diff --git a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/CMakeLists.txt
index f5f6fd7a1255..987894859e3f 100644
--- a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/CMakeLists.txt
@@ -14,6 +14,6 @@ atlas_add_component( JetD3PDMaker
                      LINK_LIBRARIES ${Boost_LIBRARIES} TrigCaloEvent CaloEvent CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel Navigation StoreGateLib Identifier EventKernel FourMomUtils GaudiKernel AnalysisTriggerEvent D3PDMakerInterfaces D3PDMakerUtils TriggerD3PDMakerLib JetTagEvent JetTagInfo JetEvent Particle TileConditionsLib TileEvent TileIdentifier VxVertex )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PD.py b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PD.py
index 641e4c2496ea..f7671f3431ab 100644
--- a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PD.py
@@ -12,12 +12,8 @@ from JetD3PDMaker.jetMETD3PDTrigger           import jetMETTriggerBitsD3PDObject
 from MuonD3PDMaker.MuonD3PDObject             import MuonD3PDObject
 from JetD3PDMaker.JetD3PDObject               import JetD3PDObject
 from TrackD3PDMaker.xAODVertexD3PDObject      import PrimaryxAODVertexD3PDObject
-from MissingETD3PDMaker.MissingETD3PDObject   import *
-from CaloD3PDMaker.MBTSD3PDObject             import MBTSD3PDObject
-from egammaD3PDAnalysis.egammaUserDataConfig  import egammaUserDataConfig
 from EventCommonD3PDMaker.LBMetadataConfig    import LBMetadataConfig
 from TruthD3PDMaker.GenEventD3PDObject        import GenEventD3PDObject
-from TruthD3PDAnalysis.truthParticleConfig    import truthParticleConfig
 from TruthD3PDMaker.TruthParticleD3PDObject   import TruthParticleD3PDObject
 from RecExConfig.RecFlags                     import rec
 
@@ -47,7 +43,6 @@ def JetD3PD (file,
                                       file = file,
                                       D3PDSvc = D3PDSvc,
                                       streamNameRoot = streamNameRoot)
-    JetIncludes = ['AssocTrackCont']
 
     alg += EventInfoD3PDObject        (**_args (level, 'EventInfo', kw ))
     alg += ElectronD3PDObject         (**_args (level, 'Electron', kw))
diff --git a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PDObject.py
index 3d5648f28e84..2f76ee43dabf 100644
--- a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetD3PDObject.py
@@ -1,31 +1,9 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# import JetD3PDMaker
 import D3PDMakerCoreComps
 import EventCommonD3PDMaker
-# import BackgroundD3PDMaker
-from D3PDMakerCoreComps.D3PDObject import D3PDObject, \
-                                          make_SGDataVector_D3PDObject
-# from D3PDMakerCoreComps.release_version import at_least_version
-# from D3PDMakerCoreComps.resolveSGKey import resolveSGKey
-# from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
-# from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
-# from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
+from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
 from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-# from EventCommonD3PDMaker.DRAssociation import DRAssociation
-
-# from JetD3PDAnalysis.JetVertexFractionConfig import JetVertexFractionConfig
-# from JetD3PDMaker import JetD3PDMakerConf
-# from JetRecTools.JetRecToolsConf import *
-# from JetMomentTools.JetMomentToolsConf import *
-# from RecExConfig.RecFlags import rec
-# from AthenaCommon.AlgSequence import AlgSequence
-# from JetRec import JetRecConf
-# from JetRecTools import JetRecToolsConf
-# from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject
-# from AthenaCommon.Logging import logging
-
-
 
 # #
 # # Useful options:
@@ -40,166 +18,16 @@ from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
 # #
 
 
-
-# # Reconstruction versions prior to 15.6.8 didn't fill in the jet timing/quality.
-# # Fix up such jets here.
-# def _fixJetTiming (c, **kw):
-#     if at_least_version ('15.6.8'): return
-
-#     sgkey_in = c.Getter.SGKey
-#     try:
-#         sgkey_in = resolveSGKey ('JetCollection', sgkey_in)
-#     except:
-#         if not kw.get('allowMissing'): raise
-#         return
-#     sgkey_out = sgkey_in + '_timing'
-
-#     seq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName())
-#     if not hasattr (seq, sgkey_out):
-#         tools = []
-#         caloqual_kw = {'doCellBasedVariables' : True,
-#                        'doConstituentBasedVariables' : True,
-#                        'doSamplingBasedVariables' : True,
-#                        'cutOnTile' : 254,
-#                        'cutOnLAr' : 4000,
-#                        'doTileQuality' : True,
-#                        'doLArQuality' : True}
-
-#         if hasattr (JetRecToolsConf, 'JetTimeQualityTool'):
-#             # rel 15 setup
-#             tool1 = JetRecToolsConf.JetTimeQualityTool (sgkey_out + 'TimeTool',
-#                                                         DoTime = False,
-#                                                         DoQuality = False,
-#                                                         UseCells = False)
-#             if rec.readESD() or rec.readRDO():
-#                 tool1.DoTime    = True
-#                 tool1.DoQuality = True
-#                 tool1.UseCells  = True
-#             if rec.readAOD() and (sgkey_in.find ('H1Topo') >= 0 or
-#                                   sgkey_in.find ('LCTopo') >= 0):
-#                 tool1.DoTime    = True
-#             tools.append (tool1)
-#         else:
-#             # rel 16
-#             caloqual_kw['doTiming'] = True
-
-#         tool2 = JetCaloQualityTool (sgkey_out + 'QualTool',
-#                                     **caloqual_kw)
-#         tools.append (tool2)
-
-#         alg = JetD3PDMaker.JetFixupAlg (sgkey_out,
-#                                         InputKey = sgkey_in,
-#                                         OutputKey = sgkey_out,
-#                                         Tools = tools)
-#         for t in tools:
-#             alg += t
-
-#         seq += alg
-
-#     c.Getter.SGKey = sgkey_out
-#     return
-
-
-# def _getprop (c, n):
-#     return getattr (c, n, c.getDefaultProperty(n))
-
-# def _jetVertexAlgHook (c, prefix, sgkey, typeName,
-#                        seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
-#                        *args, **kw):
-#     jvf = getattr(c, c.getName() + '_JetVertexFraction', None)
-#     if jvf :setattr(jvf,'FillFullJVF',True) # impose FillFullJVF in this case
-#     if jvf and (_getprop (jvf, 'FromUD') or _getprop (jvf, 'FillFullJVF')):
-#         JetVertexFractionConfig (seq = seq,
-#                                  prefix = prefix,
-#                                  # nb. Use this rather than the sgkey
-#                                  # passed in; _fixJetTiming may
-#                                  # have changed it.
-#                                  sgkey = c.Getter.SGKey,
-#                                  typeName = typeName)
-
-
-#     return
-
-
-# # Don't make this unless target has been specified.
-# def _constitAssocLevel (reqlev, args):
-#     if reqlev < 1: return False
-#     if not args.has_key ('Target') or not args['Target']: return False
-#     return True
-
-
-# def _jetMomentsHook (c, prefix, sgkey, typeName,
-#                      seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
-#                      *args, **kw):
-
-#     from JetD3PDAnalysis.JetMomentCalcConfig import JetMomentCalcConfig
-
-#     # Always turn this on if we're making jets --- it changes jvf results.
-#     from JetRec.JetRecFlags import jetFlags
-#     if hasattr(jetFlags, 'jetPerformanceJob'):
-#                jetFlags.jetPerformanceJob = True
-
-#     if hasattr (c, c.name() + '_Special'):
-#         JetMomentCalcConfig (c.Getter.SGKey, 'all', seq=seq)
-#     else:
-#         key = resolveSGKey ('JetCollection', c.Getter.SGKey)
-#         if hasattr (c, c.name() + '_ActiveArea'):
-#             JetMomentCalcConfig (c.Getter.SGKey, None, seq=seq)
-#         if hasattr (c, c.name() + '_TruthMF') and 'Topo'  in key:
-#             JetMomentCalcConfig (c.Getter.SGKey, ['truthMF'], seq=seq)
-#         if hasattr (c, c.name() + '_TracksMoments') and 'Topo'  in key:
-#             JetMomentCalcConfig (c.Getter.SGKey, ['trackMoments'], seq=seq)
-#     if hasattr (c, c.name() + '_OriginCorrection'):
-#         JetMomentCalcConfig (c.Getter.SGKey, ['origin'], seq=seq)
-#     return
-
-# def _jetClusterMomentsHook (c, prefix, sgkey, typeName,
-#                      seq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
-#                      *args, **kw):
-
-#     if hasattr (c, c.name() + '_JetClusterMoment'):
-#         from JetRec.JetMomentGetter import make_JetMomentGetter
-#         try:
-#             from JetMomentTools.JetMomentToolsConf import JetMomentsFromClusters
-#         except ImportError:
-#             # JetMomentsFromClusters available only in AtlasPhysics, not
-#             # in AtlasProduction or development.
-#             log = logging.getLogger ('JetD3PDObject')
-#             log.warn ('JetMomentsFromClusters not available; skipping.')
-#             return
-#         jt = JetMomentsFromClusters(ClusterMoments=["CENTER_LAMBDA","SECOND_R","SECOND_LAMBDA"],
-#                                     ClusterPt=True)
-#         make_JetMomentGetter(resolveSGKey ('JetCollection', c.Getter.SGKey),
-#                              [jt])
-
-#     return
-
 def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=7):
 
-
     object = make_SGDataVector_D3PDObject ('DataVector<xAOD::Jet_v1>',
                                            D3PDMakerFlags.JetSGKey(),
                                            prefix, objectname)
 
-#     object.defineHook (_fixJetTiming)
-#     object.defineHook (_jetVertexAlgHook)
-#     object.defineHook (_jetMomentsHook)
-#     object.defineHook (_jetClusterMomentsHook)
-
     object.defineBlock(0, 'Kinematics',
                        EventCommonD3PDMaker.FourMomFillerTool,
                        WriteE  = True)
 
-#     object.defineBlock(1, 'OriginCorrection',
-#                               JetD3PDMaker.JetMomentFillerTool,
-#                               Moments=['EtaOrigin'  , 'PhiOrigin'  ,  'MOrigin'
-#                                        ])
-
-#     object.defineBlock(1, 'WIDTH',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['WIDTH'
-#                                 ])
-
     object.defineBlock (
         1, 'DQMoments',
         D3PDMakerCoreComps.AuxDataFillerTool,
@@ -221,10 +49,6 @@ def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=
                 'ootFracClusters10 < float: 0',
         ])
   
-#     object.defineBlock(1, 'JetSamplingsFrac',
-#                               JetD3PDMaker.JetSamplingsFracFillerTool)
-#     object.defineBlock(1, 'JetQual',
-#                               JetD3PDMaker.JetCaloUtilsFillerTool)
     object.defineBlock (
         1, 'JetQual',
         D3PDMakerCoreComps.AuxDataFillerTool,
@@ -234,228 +58,7 @@ def getJetD3PDObject(objectname='JetD3PDObject', prefix='jet_', btagleveloffset=
                 'isUgly < int: 0',
                 'hecf = HECFrac < float: 0',
                 ])
-#     object.defineBlock(1, 'EMFraction',
-#                               JetD3PDMaker.JetEMFractionFillerTool)
-  
-#     object.defineBlock(1, 'JES',
-#                               JetD3PDMaker.JetMomentFillerTool,
-#                               Moments=[ 'Offset', 'EMJES', 'EMJES_EtaCorr','EMJESnooffset' ])
-  
-#     object.defineBlock(1, 'JESMoments',
-#                               JetD3PDMaker.JetMomentFillerTool,
-#                               Moments=['LCJES', 'LCJES_EtaCorr' ])
-  
-#     object.defineBlock(1, 'EMScale',
-#                               JetD3PDMaker.JetSignalStateFillerTool,
-#                               WriteE = True,
-#                               SignalStateNumber = 0,
-#                               SignalStatePrefix = 'emscale')
-  
-#     object.defineBlock(1, 'ActiveArea',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['ActiveArea', 'ActiveAreaPx', 'ActiveAreaPy', 'ActiveAreaPz', 'ActiveAreaE'])
-
-#     # Including JetVertexFraction should also include JVtx and TruthMF,
-#     # unless explicitly excluded.
-#     def _jvfLOD (reqlev, args, hookargs):
-#         if reqlev < 3: return False
-#         if not 'JVtx' in hookargs['exclude']:
-#             hookargs['include'].append ('JVtx')
-#         if not 'TruthMF' in hookargs['exclude']:
-#             hookargs['include'].append ('TruthMF')
-#         return True
-#     try:
-#         # tracksAvailableForJets not defined in every release. Temporarily put it in
-#         # a try / except block
-#         from JetRec.TrackSelectionForJets import tracksAvailableForJets
-#         dotrackVars = tracksAvailableForJets()
-#     except:
-#         dotrackVars = True
-#     if dotrackVars:
-#         object.defineBlock(_jvfLOD, 'JetVertexFraction',
-#                            JetD3PDMaker.JetVertexFractionFillerTool,
-#                            UDPrefix=D3PDMakerFlags.JetUserDataPrefix(),
-#                            )
-#         object.defineBlock(3, 'JVtx',
-#                            JetD3PDMaker.JetVtxFillerTool)
-    
-#     object.defineBlock(3, 'TruthMF',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['TruthMFindex','TruthMF'])
-  
-#     object.defineBlock(3, 'Layer',
-#                               JetD3PDMaker.JetMomentFillerTool,
-#                               Moments=['GSCFactorF','WidthFraction'])
-  
-#     object.defineBlock(4, 'Samplings',
-#                               JetD3PDMaker.JetSamplingsFillerTool)
-  
-#     object.defineBlock(4, 'JetShape',
-#                               JetD3PDMaker.JetShapeFillerTool)
-  
-  
-#     object.defineBlock(4, 'Constituents',
-#                               JetD3PDMaker.JetConstituentFillerTool,
-#                               SignalStateNumber = -1,
-#                               SignalStatePrefix = 'default')
-  
-#     object.defineBlock(4, 'ConstituentScale',
-#                               JetD3PDMaker.JetSignalStateFillerTool,
-#                               WriteE = True,
-#                               SignalStateNumber = 2,
-#                               SignalStatePrefix = 'constscale')
-  
-#     object.defineBlock(5, 'JetLArHVMoment',
-#                               JetD3PDMaker.JetMomentFillerTool,
-#                               Moments=['LArBadHVEnergy','LArBadHVRatio'])
-
-#     object.defineBlock(9, 'JetClusterMoment',
-#                               JetD3PDMaker.JetMomentFillerTool,
-#                               Moments=['CENTER_LAMBDA','SECOND_R','SECOND_LAMBDA',
-#                                        'CLUSTER_PT'])
-
-#     addBTagInfoToJetObject(object,btagleveloffset)
-
-#     # Track association cannot be done unless there are tracks.
-#     # As often this is not the case track association will be done only
-#     # if this is explicitly asked for. by defining it in the include list.
-#     #
-#     # You can also enable it by passing an argument to JetD3PDObject
-#     # like:
-#     #   AssocTrackCont_target='mytarget_'
-#     def _jetAssocLevel (reqlev, args):
-#         return args.has_key ('target') or (reqlev >= 999)
-#     IndexMultiAssociation (object,
-#                            JetD3PDMaker.FlavorAssociationTool,
-#                            'trk',
-#                            prefix = 'flavor_assoctrk_',
-#                            level = _jetAssocLevel,
-#                            blockname = 'AssocTrackCont')
-
-#     object.defineBlock(10, 'JetRoIword',
-#                               JetD3PDMaker.JetROIWordFillerTool
-#                               )
-
-
-#     #JetElAssoc = DRAssociation(object,"ElectronContainer",D3PDMakerFlags.ElectronSGKey(),0.2,prefix='el_',matched="matched",blockname="El02Match")
-
-#     #JetMuAssoc = DRAssociation(object,"Analysis::MuonContainer",D3PDMakerFlags.MuonSGKey(),0.2,prefix='mu_',matched="matched",blockname="Mu02Match")
-
-# #JetTrkAssoc = DRAssociation(object,"Rec::TrackParticleContainer",D3PDMakerFlags.TrackSGKey(),0.4,prefix='trk_',matched="matched",blockname="Trk04Match")
-
-# #---------------- Trigger Object ----------------------------
-
-#     #if D3PDMakerFlags.DoTrigger():
-#     if False:
-#         JetL1Assoc = SimpleAssociation(object,
-#                                        JetD3PDMaker.JetL1TriggerObjectAssociationTool,
-#                                        matched = 'matched',
-#                                        blockname = 'L1Info',
-#                                        prefix = 'L1_',
-#                                        MaxDR = 0.6,
-#                                        ChainPattern = 'L1_J.*')
-
-#         JetL1Assoc.defineBlock (99, 'L1Kinematics',
-#                                 EventCommonD3PDMaker.FourMomFillerTool,
-#                                 WriteE = True,
-#                                 WriteEt = False,
-#                                 WriteM = False)
-
-#         JetL2Assoc = SimpleAssociation(object,
-#                                        JetD3PDMaker.JetL2TriggerObjectAssociationTool,
-#                                        matched = 'matched',
-#                                        blockname = 'L2Info',
-#                                        prefix = 'L2_',
-#                                        MaxDR = 0.25,
-#                                        ChainPattern = 'L2_j.*')
-
-#         JetL2Assoc.defineBlock (99, 'L2Kinematics',
-#                                 EventCommonD3PDMaker.FourMomFillerTool,
-#                                 WriteE = True,
-#                                 WriteEt = False,
-#                                 WriteM = False)
-
-#         JetEFAssoc = SimpleAssociation(object,
-#                                        JetD3PDMaker.JetEFTriggerObjectAssociationTool,
-#                                        matched = 'matched',
-#                                        blockname = 'EFInfo',
-#                                        prefix = 'EF_',
-#                                        MaxDR = 0.25,
-#                                        ChainPattern = 'EF_j.*')
-
-#         JetEFAssoc.defineBlock (99, 'EFKinematics',
-#                                 EventCommonD3PDMaker.FourMomFillerTool,
-#                                 WriteE = True,
-#                                 WriteEt = False,
-#                                 WriteM = False)
-#         pass
-
-#     ConstitAssoc = ContainedVectorMultiAssociation \
-#         (object,
-#          #JetD3PDMaker.JetConstituentAssociationTool,
-#          EventCommonD3PDMaker.NavigableConstituentAssociationTool,
-#          'constit_',
-#          TypeName = 'CaloCluster',
-#          nrowName = '',
-#          level = 1)
-  
-
-#     ConstitAssoc.defineBlock (_constitAssocLevel, 'ConstitIndex',
-#                               D3PDMakerCoreComps.IndexFillerTool,
-#                               Target = '')
-
-
-#     # Beam Background Identification Method
-#     object.defineBlock( 999, 'BeamBackground',
-#                         BackgroundD3PDMaker.BeamBackgroundJetFillerTool)
-
-# #---------------- special jet moments ----------------------------
-
-#     object.defineBlock(999, 'TrackMF',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['TrackMFindex','TrackMF'])
-
-#     object.defineBlock(999, 'TracksMoments',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['nTrk_pv0_1GeV', 'sumPtTrk_pv0_1GeV', 'nTrk_allpv_1GeV', 'sumPtTrk_allpv_1GeV',
-#                                 'nTrk_pv0_500MeV', 'sumPtTrk_pv0_500MeV',
-#                                 'trackWIDTH_pv0_1GeV','trackWIDTH_allpv_1GeV'
-#                                 ])
-  
-#     object.defineBlock(999, 'JetLabel',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['JetLabel'])
-
-#     object.defineBlock(999, 'Special',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['LikeLihood_0',
-#                                 'LowEtConstituentsFrac','KtDr',
-#                                 ])
-
-#     object.defineBlock(999, 'VoronoiArea',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['VoronoiArea', 'VoronoiAreaPx', 'VoronoiAreaPy', 'VoronoiAreaPz', 'VoronoiAreaE',
-#                                 ])
-
-#     object.defineBlock(999, 'Isolation',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['IsoKR20Perp', 'IsoKR20Par', 'IsoKR20SumPt', 'IsoDelta2Perp', 'IsoDelta2Par',
-#                                 'IsoDelta2SumPt', 'IsoFixedCone8Perp', 'IsoFixedCone8Par', 'IsoFixedCone8SumPt',
-#                                 'IsoFixedArea13Perp', 'IsoFixedArea13Par', 'IsoFixedArea13SumPt',
-#                                 'Iso6To88Perp', 'Iso6To88Par', 'Iso6To88SumPt',
-#                                 ])
-
-#     object.defineBlock(999, 'SplitInfo',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['SPLIT12', 'SPLIT23', 'SPLIT34'])
-
-#     object.defineBlock(999, 'Uncertainties',
-#                        JetD3PDMaker.JetMomentFillerTool,
-#                        Moments=['SmearingFactor'])
 
     return object
 
-
-
-
 JetD3PDObject = getJetD3PDObject()
diff --git a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PD.py b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PD.py
deleted file mode 100644
index 23a189f63c15..000000000000
--- a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PD.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-
-import D3PDMakerCoreComps            
-from D3PDMakerConfig.D3PDMakerFlags           import D3PDMakerFlags
-from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
-from JetD3PDMaker.jetMETD3PDTrigger           import jetMETTriggerBitsD3PDObject
-from JetD3PDMaker.JetTileD3PDObject           import JetTileD3PDObject
-#from MissingETD3PDMaker.MissingETD3PDObject   import *
-from EventCommonD3PDMaker.LBMetadataConfig    import LBMetadataConfig
-from TruthD3PDMaker.GenEventD3PDObject        import GenEventD3PDObject
-from TruthD3PDMaker.TruthParticleD3PDObject   import TruthParticleD3PDObject
-from RecExConfig.RecFlags                     import rec
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-inputSGkey='AntiKt4TopoEMNewJets'
-
-def _args (level, name, kwin, **kw):
-    kw = kw.copy()
-    kw['level'] = level
-    for (k, v) in kwin.items():
-        if k.startswith (name + '_'):
-            kw[k[len(name)+1:]] = v
-    return kw
-
-
-# TD: changed the tuplename here:
-def JetTileD3PD (file,
-             level = 4,
-             tuplename = 'MyTuple',
-             seq = topSequence,
-             D3PDSvc = 'D3PD::RootD3PDSvc',
-             streamNameRoot = None,
-             **kw):
-
-
-    alg = D3PDMakerCoreComps.MakerAlg(tuplename,
-                    seq,
-                    file = file,
-                    D3PDSvc = D3PDSvc,
-                    streamNameRoot = streamNameRoot)
-    
-    JetIncludes = ['AssocTrackCont']
-
-    alg += EventInfoD3PDObject        (**_args (level, 'EventInfo', kw ))
-         
-    alg += JetTileD3PDObject (**_args(level,inputSGkey, kw,  sgkey=inputSGkey,   prefix='AntiKt4Topo_' ) )
-
-    from TriggerD3PDMaker.BGCodeD3PDObject import BGCodeD3PDObject
-    from TriggerD3PDMaker.BunchStructureMetadata import addBunchStructureMetadata
-    alg += BGCodeD3PDObject (**_args (2, 'BGCode', kw))
-    addBunchStructureMetadata( alg )
-
-    
-    from TriggerD3PDMaker.TrigDecisionD3PDObject import TrigDecisionD3PDObject
-    from TriggerD3PDMaker.TrigConfMetadata import addTrigConfMetadata
-
-    alg += TrigDecisionD3PDObject  (**_args(10, 'TrigDecision', kw))
-    addTrigConfMetadata( alg )
-
-    if D3PDMakerFlags.DoTrigger():
-        alg +=  jetMETTriggerBitsD3PDObject(level)
-        
- 
-    from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
-    TrackD3PDFlags.storeVertexTrackIndexAssociation.set_Value_and_Lock(False)
-    TrackD3PDFlags.storeVertexTrackAssociation.set_Value_and_Lock(False)
-    TrackD3PDFlags.storeVertexFitQuality.set_Value_and_Lock(False)
-
-    from TrackD3PDMaker.xAODVertexD3PDObject    import PrimaryxAODVertexD3PDObject
-    alg += PrimaryxAODVertexD3PDObject (**_args (0, 'PrimaryVertex', kw,
-                                                 allowMissing = True,
-                                                 sgkey = D3PDMakerFlags.VertexSGKey(),
-                                                 prefix = 'vxp_'))    
-
-
-    if rec.doTruth():
-        alg += GenEventD3PDObject     (**_args (1, 'GenEvent', kw))
-        alg += TruthParticleD3PDObject(**_args (1, 'TruthParticle', kw))
-        alg += JetTileD3PDObject      (**_args (1, 'AntiKt4TruthJets', kw, sgkey='AntiKt4TruthJets', prefix='AntiKt4Truth_' ) )
-        
-        
-    alg.MetadataTools += [LBMetadataConfig()]    
-    return alg
diff --git a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/ModJetD3PD.py b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/ModJetD3PD.py
deleted file mode 100644
index 825123394f0c..000000000000
--- a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/ModJetD3PD.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# Haifeng.Li@cern.ch
-
-# For May reprocess data
-
-
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags           import D3PDMakerFlags
-from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
-from egammaD3PDMaker.ElectronD3PDObject       import ElectronD3PDObject
-from egammaD3PDMaker.PhotonD3PDObject         import PhotonD3PDObject
-from JetD3PDMaker.jetMETD3PDTrigger           import jetMETTriggerBitsD3PDObject
-from MuonD3PDMaker.MuonD3PDObject             import MuonD3PDObject
-from JetD3PDMaker.JetD3PDObject               import JetD3PDObject
-from TrackD3PDMaker.xAODVertexD3PDObject      import PrimaryxAODVertexD3PDObject
-from MissingETD3PDMaker.MissingETD3PDObject   import *
-from CaloD3PDMaker.MBTSD3PDObject             import MBTSD3PDObject
-from egammaD3PDAnalysis.egammaUserDataConfig  import egammaUserDataConfig
-from EventCommonD3PDMaker.LBMetadataConfig    import LBMetadataConfig
-from TruthD3PDMaker.GenEventD3PDObject        import GenEventD3PDObject
-from TruthD3PDAnalysis.truthParticleConfig    import truthParticleConfig
-from TruthD3PDMaker.TruthParticleD3PDObject   import TruthParticleD3PDObject
-from RecExConfig.RecFlags                     import rec
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-def JetD3PD (file,
-             level = 4,
-             tuplename = 'jet',
-             seq = topSequence,
-             D3PDSvc = 'D3PD::RootD3PDSvc'):
-
-    egammaUserDataConfig (seq)
-    if rec.doTruth():
-        truthParticleConfig (seq)
-
-    JetIncludes = ['AssocTrackCont']
-
-    alg = D3PDMakerCoreComps.MakerAlg(tuplename, seq,
-                                      file = file, D3PDSvc = D3PDSvc)
-    #-- General
-    alg += EventInfoD3PDObject (level)
-    alg += ElectronD3PDObject (0)
-    alg += PhotonD3PDObject (0)
-    alg += MuonD3PDObject (0)
-    alg += PrimaryxAODVertexD3PDObject (4, allowMissing = True,
-                                        sgkey = D3PDMakerFlags.VertexSGKey(),
-                                        prefix = 'vxp_')
-    #-- JET
-    alg += JetD3PDObject (level, sgkey='AntiKt4H1TopoJets',  include = JetIncludes, prefix='AntiKt4H1Topo_' )
-    alg += JetD3PDObject (level, sgkey='AntiKt6H1TopoJets',  include = JetIncludes, prefix='AntiKt6H1Topo_'           )
-    
-    #alg += JetD3PDObject (level, sgkey='Cone4H1TopoJets',    include = JetIncludes, prefix='Cone4H1Topo_'   )
- 
-    #-- MET 
-    alg += RefFinalMETD3PDObject (level)
-    alg += MuonMETD3PDObject (level)
-    alg += MuonBoyMETD3PDObject (level)
-    alg += FinalMETD3PDObject (level)
-    alg += CryoMETD3PDObject (level)
-    alg += CryoConeMETD3PDObject (level)
-    alg += RefEleMETD3PDObject (level)
-    alg += RefJetMETD3PDObject (level)
-    alg += RefGammaMETD3PDObject (level)
-    alg += RefTauMETD3PDObject (level)
-    alg += CellOutMETD3PDObject (level)
-    alg += BaseMETD3PDObject (level)
-    alg += Base0METD3PDObject (level)
-    alg += CalibMETD3PDObject (level)
-    alg += MuonBoySpectroMETD3PDObject (level)
-    alg += MuonBoyTrackMETD3PDObject (level)
-    alg += TopoMETD3PDObject (level)
-    alg += CorrTopoMETD3PDObject (level)
-    alg += LocHadTopoMETD3PDObject (level)
-    alg += TopoObjMETD3PDObject (level)
-
-    #-- Trigger
-    if D3PDMakerFlags.DoTrigger():
-        alg +=  jetMETTriggerBitsD3PDObject(level)
-
-    #-- Truth     
-    if rec.doTruth() :
-        alg += GenEventD3PDObject (1)
-        #alg += TruthParticleD3PDObject (level)
-        #alg += JetD3PDObject (level, sgkey='Cone4TruthJets'  , prefix='Cone4Truth_'    )
-        alg += JetD3PDObject (3, sgkey='AntiKt4TruthJets', prefix='AntiKt4Truth_' )
-        #alg += JetD3PDObject (3, sgkey='AntiKt6TruthJets', prefix='AntiKt6Truth_'  )
-        
-
-    #-- Meta Data    
-    alg.MetadataTools += [LBMetadataConfig()]    
-    return alg
-- 
GitLab


From 34d539faa9f0944986b1ca9b7229c6326a0425ef Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Wed, 16 Dec 2020 14:30:12 +0100
Subject: [PATCH 039/308] Update mcLatest tests to use recommended settings in
 RDOtoRDOTrigger. Remove large radius tracking (LRT) test because LRT is now
 on by default.

---
 .../test/test_mcLatest_13TeV.sh                   |  2 +-
 .../test_mcLatest_13TeV_largeRadiusTrackingOn.sh  | 15 ---------------
 .../test/test_mcLatest_nopileup_13TeV.sh          |  2 +-
 .../test_mcLatest_nopileup_stdcmalloc_13TeV.sh    |  2 +-
 4 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_largeRadiusTrackingOn.sh

diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV.sh
index c8c0af161901..ce865d3746f5 100755
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV.sh
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV.sh
@@ -7,7 +7,7 @@
 # art-include: master/Athena
 
 export TRF_ECHO=True;
-Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1 --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/HITS.10501933._000008.pool.root.1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000027.pool.root.1 --maxEvents=500 --jobNumber=1 --imf False
+Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1 --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/HITS.10501933._000008.pool.root.1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000027.pool.root.1 --maxEvents=500 --jobNumber=1 --imf False --athenaopts "RDOtoRDOTrigger:--imf --threads=1 --concurrent-events=1"
 RES=$?
 echo "art-result: $RES Reco"
 if [ $RES -ne 0 ];then
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_largeRadiusTrackingOn.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_largeRadiusTrackingOn.sh
deleted file mode 100755
index b6302ccef134..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_13TeV_largeRadiusTrackingOn.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# art-description: Run reco with a latest (September 2020) MC setup with pileup. This test also enables Large Radius Tracking.
-# art-output: log.*
-# art-athena-mt: 4
-# art-type: grid
-# art-include: master/Athena
-
-export TRF_ECHO=True;
-Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1 --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/HITS.10501933._000008.pool.root.1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/HITS.10501925._000027.pool.root.1 --maxEvents=500 --jobNumber=1 --imf False --preExec r2e:'from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doR3LargeD0.set_Value_and_Lock(True);InDetFlags.storeSeparateLargeD0Container.set_Value_and_Lock(True);'
-RES=$?
-echo "art-result: $RES Reco"
-if [ $RES -ne 0 ];then
-return $RES
-fi
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_13TeV.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_13TeV.sh
index acaae2dd55c7..cda40e1f6ec7 100755
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_13TeV.sh
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_13TeV.sh
@@ -6,7 +6,7 @@
 # art-include: master/Athena
 
 export TRF_ECHO=True;
-Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1  --maxEvents=500 --jobNumber=1 --imf False
+Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1  --maxEvents=500 --jobNumber=1 --imf False  --athenaopts "RDOtoRDOTrigger:--imf --threads=1 --concurrent-events=1"
 RES=$?
 echo "art-result: $RES Reco"
 if [ $RES -ne 0 ];then
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_stdcmalloc_13TeV.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_stdcmalloc_13TeV.sh
index 8f58826b79aa..185774a7f8c0 100755
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_stdcmalloc_13TeV.sh
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mcLatest_nopileup_stdcmalloc_13TeV.sh
@@ -7,7 +7,7 @@
 # art-include: master/Athena
 
 export TRF_ECHO=True;
-Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1  --maxEvents=500 --jobNumber=1 --imf False --athenaopts="--stdcmalloc"
+Reco_tf.py --AMI=r11976 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3227/HITS.12560240._000287.pool.root.1  --maxEvents=500 --jobNumber=1 --imf False --athenaopts "all:--stdcmalloc" "RDOtoRDOTrigger:--imf --threads=1 --concurrent-events=1"
 RES=$?
 echo "art-result: $RES Reco"
 if [ $RES -ne 0 ];then
-- 
GitLab


From 68543a4ef9edc8729f679975756682e252e324bd Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 16 Dec 2020 14:31:05 +0100
Subject: [PATCH 040/308] EMTrackMatchBuilder pass EventContext to Element
 Links

---
 .../egamma/egammaTools/src/EMTrackMatchBuilder.cxx           | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
index e57e4de29800..1b719045ede4 100644
--- a/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
@@ -138,15 +138,14 @@ EMTrackMatchBuilder::trackExecute(
     std::vector<EL> trackParticleLinks;
     trackParticleLinks.reserve(trkMatches.size());
     const std::string key = EL(*trackPC, 0).dataID();
-    IProxyDict* sg = SG::CurrentEventStore::store();
     for (const TrackMatch& m : trkMatches) {
       ATH_MSG_DEBUG("Match  dR: " << m.dR << " second  dR: " << m.seconddR
                                   << " hasPix: " << m.hasPix
                                   << " hitsScore: " << m.hitsScore);
       if (key.empty()) {
-        trackParticleLinks.emplace_back(*trackPC, m.trackNumber, sg);
+        trackParticleLinks.emplace_back(*trackPC, m.trackNumber, ctx);
       } else {
-        trackParticleLinks.emplace_back(key, m.trackNumber, sg);
+        trackParticleLinks.emplace_back(key, m.trackNumber, ctx);
       }
     }
     eg->setTrackParticles(trackParticleLinks);
-- 
GitLab


From 89c2fd1008b8926a0721ac5f49a6223c7f6049b2 Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Wed, 16 Dec 2020 14:31:35 +0100
Subject: [PATCH 041/308] Bug fix to AOD file name in comparison script. When
 running from ESD the AOD is called AOD.pool.root and not myAOD.pool.root.

---
 .../test/test_compare_SerialAndThreadedAthenas.sh         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_compare_SerialAndThreadedAthenas.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_compare_SerialAndThreadedAthenas.sh
index a0e2e369f75b..6ceca97222e0 100755
--- a/Reconstruction/RecExample/RecExRecoTest/test/test_compare_SerialAndThreadedAthenas.sh
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_compare_SerialAndThreadedAthenas.sh
@@ -4,7 +4,7 @@ echo "Creating new serial directory"
 mkdir serial; cd serial
 athena $1 | tee athenaSerial.log
 rc=${PIPESTATUS[0]}
-xAODDigest.py myAOD.pool.root | tee digestSerial.log
+xAODDigest.py AOD.pool.root | tee digestSerial.log
 echo "art-result: $rc Serial"
 
 test_postProcessing_Errors.sh athenaSerial.log | tee errorsSerial.log
@@ -15,7 +15,7 @@ mkdir threadOne; cd threadOne
 
 athena --threads=1 $1 | tee athenaOneThread.log
 rc1=${PIPESTATUS[0]}
-xAODDigest.py myAOD.pool.root | tee digestOneThread.log
+xAODDigest.py AOD.pool.root | tee digestOneThread.log
 echo "art-result: $rc1 OneThread"
 
 test_postProcessing_Errors.sh athenaOneThread.log | tee errorsOneThread.log
@@ -39,7 +39,7 @@ mkdir threadTwo; cd threadTwo
 
 athena --threads=2 $1 | tee athenaTwoThreads.log
 rc2=${PIPESTATUS[0]}
-xAODDigest.py myAOD.pool.root | tee digestTwoThreads.log
+xAODDigest.py AOD.pool.root | tee digestTwoThreads.log
 echo "art-result: $rc2 TwoThreads"
 
 test_postProcessing_Errors.sh athenaTwoThreads.log | tee errorsTwoThreads.log
@@ -59,7 +59,7 @@ mkdir threadFive; cd threadFive
 
 athena --threads=5 $1 | tee athenaFiveThreads.log
 rc5=${PIPESTATUS[0]}
-xAODDigest.py myAOD.pool.root | tee digestFiveThreads.log
+xAODDigest.py AOD.pool.root | tee digestFiveThreads.log
 echo "art-result: $rc5 FiveThreads"
 
 test_postProcessing_Errors.sh athenaFiveThreads.log | tee errorsFiveThreads.log
-- 
GitLab


From 3fc792f5265a15740977b0517c832e59ce0d4acf Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 16 Dec 2020 14:38:32 +0100
Subject: [PATCH 042/308] JetTagD3PDMaker: enable flake8

---
 .../D3PDMaker/JetTagD3PDMaker/CMakeLists.txt  | 10 ++-
 .../JetTagD3PDMaker/python/AddBTagD3PDInfo.py | 62 +++++++------------
 .../JetTagD3PDMaker/python/BTaggingD3PD.py    | 24 +++----
 .../python/JetTagClustersD3PDObject.py        |  4 +-
 .../python/JetTagElectronInJetD3PDObject.py   |  6 +-
 .../python/JetTagEventInfoD3PDObject.py       |  4 +-
 .../python/JetTagJSD3PDObjects.py             | 31 ++++------
 .../python/JetTagJetD3PDObject.py             | 12 ++--
 .../python/JetTagMETD3PDObject.py             |  4 +-
 .../python/JetTagMSVVtxInJetD3PDObject.py     |  3 +-
 .../python/JetTagMuonInJetD3PDObject.py       |  3 +-
 .../python/JetTagPhotonInJetD3PDObject.py     |  5 +-
 .../python/JetTagPixModCondD3PDObject.py      |  8 +--
 .../python/JetTagPrimaryVertexD3PDObject.py   |  4 +-
 .../python/JetTagTrackD3PDObject.py           |  7 +--
 .../python/JetTagTriggerBitsD3PDObject.py     |  4 +-
 .../python/JetTagTwoTrackVertexD3PDObject.py  |  5 +-
 .../python/JetTagVxOnJetAxisD3PDObject.py     |  5 +-
 18 files changed, 70 insertions(+), 131 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt
index 19dfe77fbc9e..0dec158a9738 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt
@@ -1,12 +1,10 @@
-################################################################################
-# Package: JetTagD3PDMaker
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( JetTagD3PDMaker )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
 
 # Component(s) in the package:
@@ -14,9 +12,9 @@ atlas_add_component( JetTagD3PDMaker
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS}  ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers EventKernel EventPrimitives GaudiKernel GeneratorObjects InDetIdentifier InDetReadoutGeometry D3PDMakerUtils JetTagEvent JetTagInfo MuonIDEvent McParticleEvent JetEvent muonEvent Particle egammaEvent TrkParticleBase VxJetVertex VxSecVertex VxVertex TrkVertexFitterInterfaces InDetConditionsSummaryService )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers EventPrimitives GaudiKernel GeneratorObjects InDetIdentifier InDetReadoutGeometry D3PDMakerUtils JetTagEvent JetTagInfo MuonIDEvent McParticleEvent JetEvent muonEvent Particle egammaEvent StoreGateLib TrkParticleBase VxJetVertex VxSecVertex VxVertex InDetConditionsSummaryService )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/AddBTagD3PDInfo.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/AddBTagD3PDInfo.py
index 29111f043801..49f4a296b419 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/AddBTagD3PDInfo.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/AddBTagD3PDInfo.py
@@ -1,7 +1,5 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
 #
 ## @file JetTagD3PDMaker/python/AddBTagInfoToJetObject.py
 ## @brief Python function to add BTagging specific fillers and association tools to a JetD3PDObject
@@ -32,14 +30,10 @@ addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=X)
 alg+=JetD3PDObject(level, <additional options>)
 """
 import JetTagD3PDMaker
-import TrackD3PDMaker
-import TruthD3PDMaker
 import EventCommonD3PDMaker
 import MuonD3PDMaker
+import TruthD3PDMaker
 
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
 from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
 from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
@@ -51,7 +45,6 @@ from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
 
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
-from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags
 
 def _jetTagAssocLevel (reqlev, args):
     if not args.has_key ('target') : 
@@ -67,7 +60,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
     from AthenaCommon.Logging import logging
     addBTagInfoLogger = logging.getLogger( "addBTagInfoToJetObject" )
 
-    if JetD3PDObject.allBlocknames().has_key(JetTagD3PDKeys.BTagWeightsBlockName()) :
+    if JetTagD3PDKeys.BTagWeightsBlockName() in JetD3PDObject.allBlocknames():
         addBTagInfoLogger.warning("btag blocks already added to JetD3PDObject - ignore")
         return
 
@@ -153,7 +146,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
         
 
-        JetTrack = ContainedVectorMultiAssociation(JetD3PDObject,
+        JetTrack = ContainedVectorMultiAssociation(JetD3PDObject,  # noqa: F841
                                                    JetTagD3PDMaker.JetTagJetTrackAssociationTool,
                                                    level = btagLevelOffset+4,
                                                    prefix=JetTagD3PDKeys.JetTrackAssocPrefix(),
@@ -164,7 +157,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
 
     if LocalFlags.JetTrackGhostAssoc():
-        JetTrackAssoc = IndexMultiAssociation(JetD3PDObject,
+        JetTrackAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                               JetTagD3PDMaker.JetTagJetTrackAssociationTool,
                                               '', ## set target when calling the JetD3PDObject
                                               level = _jetTagAssocLevel,
@@ -230,7 +223,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.JetMuonAssoc():
 
-        JetMuonAssoc = IndexMultiAssociation(JetD3PDObject,
+        JetMuonAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                              JetTagD3PDMaker.JetTagJetMuonAssociationTool,
                                              '', ## set target when calling the JetD3PDObject
                                              level =_jetTagAssocLevel,
@@ -239,7 +232,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
         if LocalFlags.AddSecondMuonCollection():
 
-            JetMuon2Assoc = IndexMultiAssociation(JetD3PDObject,
+            JetMuon2Assoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                   JetTagD3PDMaker.JetTagJetMuonAssociationTool,
                                                   '',
                                                   level = _jetTagAssocLevel,
@@ -249,7 +242,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.JetElectronAssoc():
 
-        JetElectronAssoc = IndexMultiAssociation(JetD3PDObject,
+        JetElectronAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                  JetTagD3PDMaker.JetTagJetElectronAssociationTool,
                                                  '',
                                                  level = _jetTagAssocLevel,
@@ -258,7 +251,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.JetPhotonAssoc():
 
-        JetPhotonAssoc = IndexMultiAssociation(JetD3PDObject,
+        JetPhotonAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                JetTagD3PDMaker.JetTagJetPhotonAssociationTool,
                                                '',
                                                level = _jetTagAssocLevel,
@@ -269,8 +262,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
  
     if rec.doTruth and LocalFlags.JetGenSoftLeptonAssoc():
 
-        JetGenSoftLeptonAssoc = IndexMultiAssociation(\
-            JetD3PDObject,
+        JetGenSoftLeptonAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
             JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool,
             '',
             level = _jetTagAssocLevel,
@@ -281,8 +273,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
 
     
-        JetGenSoftLepton = ContainedVectorMultiAssociation(\
-            JetD3PDObject,
+        JetGenSoftLepton = ContainedVectorMultiAssociation(JetD3PDObject,  # noqa: F841
             JetTagD3PDMaker.JetTagJetGenSoftLeptonAssociationTool,
             level = btagLevelOffset+4,
             prefix=JetTagD3PDKeys.JetGenSoftLeptonAssocPrefix(),
@@ -475,7 +466,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.IPInfoPlus():
 
-        IPInfoPlusTrackAssoc =  IndexMultiAssociation(JetD3PDObject,
+        IPInfoPlusTrackAssoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                       JetTagD3PDMaker.JetTagIPInfoPlusTrackAssociationTool,
                                                       '',
                                                       level = _jetTagAssocLevel,
@@ -515,7 +506,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
                                   AddNormDist=True)
 
 
-        SVInfoPlusTrackAssoc =  IndexMultiAssociation(JetD3PDObject,
+        SVInfoPlusTrackAssoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                       JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool,
                                                       '',
                                                       level = _jetTagAssocLevel,
@@ -552,7 +543,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
                                   InfoType="SV0InfoPlus",
                                   AllowMissing = True)
 
-        SV0InfoPlusTrackAssoc =  IndexMultiAssociation(JetD3PDObject,
+        SV0InfoPlusTrackAssoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                        JetTagD3PDMaker.JetTagSVInfoPlusTrackAssociationTool,
                                                        '',
                                                        level = _jetTagAssocLevel,
@@ -583,7 +574,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.SoftMuonInfo():
 
-        SoftMuonInfoMuonAssoc =  IndexMultiAssociation(JetD3PDObject,
+        SoftMuonInfoMuonAssoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                        JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
                                                        '',
                                                        level = _jetTagAssocLevel,
@@ -630,8 +621,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
             
         if LocalFlags.AddSecondMuonCollection():
 
-            SoftMuon2InfoMuon2Assoc =  IndexMultiAssociation(\
-                JetD3PDObject,
+            SoftMuon2InfoMuon2Assoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                 JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
                 '',
                 level = _jetTagAssocLevel,
@@ -663,7 +653,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.SoftMuonChi2Info():
 
-        SoftMuonChi2InfoMuonAssoc =  IndexMultiAssociation(JetD3PDObject,
+        SoftMuonChi2InfoMuonAssoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                        JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
                                                        '',
                                                        level = _jetTagAssocLevel,
@@ -712,8 +702,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
             
         if LocalFlags.AddSecondMuonCollection():
 
-            SoftMuon2Chi2InfoMuon2Assoc =  IndexMultiAssociation(\
-                JetD3PDObject,
+            SoftMuon2Chi2InfoMuon2Assoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                 JetTagD3PDMaker.JetTagSoftMuonInfoMuonAssociationTool,
                 '',
                 level = _jetTagAssocLevel,
@@ -747,8 +736,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
     if LocalFlags.SoftElectronInfo():
 
-        SoftElectronInfoElectronAssoc =  IndexMultiAssociation(\
-            JetD3PDObject,
+        SoftElectronInfoElectronAssoc =  IndexMultiAssociation(JetD3PDObject,  # noqa: F841
             JetTagD3PDMaker.JetTagSoftElecInfoegammaAssociationTool,
             '',
             level = _jetTagAssocLevel,
@@ -784,8 +772,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
                                   AllowMissing = True)
 
 
-        MultiSVInfoPlusTrackAssoc = IndexMultiAssociation(\
-            JetD3PDObject,
+        MultiSVInfoPlusTrackAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
             JetTagD3PDMaker.JetTagMultiSVInfoMSVVtxInfoAssociationTool,
                 '',
             level = _jetTagAssocLevel,
@@ -853,7 +840,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
         if LocalFlags.JFVxOnJetAxisAssocLabel() != "":
 
-            JetVxOnJetAxisAssoc = IndexMultiAssociation(JetD3PDObject,
+            JetVxOnJetAxisAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                                                         JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool,
                                                         LocalFlags.JFVxOnJetAxisAssocLabel(),
                                                         level = btagLevelOffset+5,
@@ -864,8 +851,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
             if LocalFlags.JetFitterFlipVxOnJetAxisAssoc():
 
-                JFFlipJetVxOnJetAxisAssoc = IndexMultiAssociation(\
-                    JetD3PDObject,
+                JFFlipJetVxOnJetAxisAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                     JetTagD3PDMaker.JetTagJetVxOnJetAxisAssociationTool,
                     LocalFlags.JFVxOnJetAxisAssocLabel(),
                     level = btagLevelOffset+6,
@@ -877,8 +863,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
         if LocalFlags.JFTwoTrackVertexAssocLabel() != "":
 
-            JetJFTwoTrackVertexAssoc = IndexMultiAssociation(\
-                JetD3PDObject,
+            JetJFTwoTrackVertexAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                 JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool,
                 LocalFlags.JFTwoTrackVertexAssocLabel(),
                 level = btagLevelOffset+5,
@@ -889,8 +874,7 @@ def addBTagInfoToJetObject(JetD3PDObject, btagLevelOffset=0, LocalFlags=JetTagD3
 
             if LocalFlags.JetFitterFlipTwoTrackVertexAssoc():
 
-                JetJFFlipTwoTrackVertexAssoc = IndexMultiAssociation(\
-                JetD3PDObject,
+                JetJFFlipTwoTrackVertexAssoc = IndexMultiAssociation(JetD3PDObject,  # noqa: F841
                 JetTagD3PDMaker.JetTagJetJFTwoTrackVertexAssociationTool,
                 LocalFlags.JFTwoTrackVertexAssocLabel(),
                 level = btagLevelOffset+6,
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/BTaggingD3PD.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/BTaggingD3PD.py
index 54ca8cb2eebc..69ef4530a672 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/BTaggingD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/BTaggingD3PD.py
@@ -6,30 +6,24 @@
 # @brief Construct a btagging d3pd.
 #
 
-from __future__ import print_function
-
-
 from AthenaCommon.AppMgr import ServiceMgr
-from AthenaCommon.AppMgr import ToolSvc
 from RecExConfig.RecFlags import rec
 
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
-from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
-from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags
 
 def _modifyMuonObject(MuonD3PDObject):
-    if not MuonD3PDObject.allBlocknames().has_key("BtagMuonTrackMatchingBlock"):
+    if "BtagMuonTrackMatchingBlock" not in MuonD3PDObject.allBlocknames():
         if JetTagD3PDFlags.TrackAssocLabel() != "":
             from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
             import MuonD3PDMaker
-            mtassoc = IndexAssociation(MuonD3PDObject,
-                                       MuonD3PDMaker.MuonTrackParticleAssociationTool,
-                                       JetTagD3PDFlags.TrackAssocLabel(),
-                                       level = 500,
-                                       prefix=JetTagD3PDKeys.MuonInDetTrackAssocPrefix(),
-                                       blockname="BtagMuonTrackMatchingBlock",
-                                       Type =  'InDet')
+            _ = IndexAssociation(MuonD3PDObject,
+                                 MuonD3PDMaker.MuonTrackParticleAssociationTool,
+                                 JetTagD3PDFlags.TrackAssocLabel(),
+                                 level = 500,
+                                 prefix=JetTagD3PDKeys.MuonInDetTrackAssocPrefix(),
+                                 blockname="BtagMuonTrackMatchingBlock",
+                                 Type =  'InDet')
 
 
 
@@ -312,7 +306,7 @@ def BTaggingD3PD(alg = None,
     if JetTagD3PDFlags.AddFatJets():
         from JetTagD3PDMaker.JetTagJSD3PDObjects import JSD3PD_Tool
         for xx in JetTagD3PDKeys.FatJetsList():	   
-            if xx[0] != None and xx[1] != None:
+            if xx[0] is not None and xx[1] is not None:
                 jsD3PD = JSD3PD_Tool(xx)
                 jsD3PD.addToAlg(alg)
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagClustersD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagClustersD3PDObject.py
index 20451112a83d..4900c4ea4224 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagClustersD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagClustersD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagClustersD3PDObject.py
@@ -6,8 +6,6 @@
 ## @author Georges Aad
 ## @date Nov, 2010
 ##
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 
 def getJetTagClusterD3PDObject(level=0, **kw):
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py
index 9804b1080ce2..418e3f49a758 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagElectronInJetD3PDObject.py
@@ -7,8 +7,6 @@
 ## @date Nov, 2010
 ##
 
-import JetTagD3PDMaker
-import TrackD3PDMaker
 import egammaD3PDMaker
 import EventCommonD3PDMaker
 ##from egammaD3PDMaker.isem_version import isem_version ## use 16
@@ -19,8 +17,6 @@ from ROOT import egammaPID
 import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
 from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
-
 
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py
index f4c1e662250a..7a836ed94007 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagEventInfoD3PDObject.py
@@ -7,8 +7,6 @@
 ## @date Nov, 2010
 ##
 
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
 
 def getJetTagEventInfoD3PDObject(level=1, **kw):
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSD3PDObjects.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSD3PDObjects.py
index a745f144f130..411976b9bae8 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSD3PDObjects.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSD3PDObjects.py
@@ -1,15 +1,11 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from JetD3PDMaker.JetD3PDObject             import getJetD3PDObject
-from D3PDMakerConfig.D3PDMakerFlags         import D3PDMakerFlags
-from RecExConfig.RecFlags                   import rec
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
 from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
 from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
 import JetSubstructureD3PDMaker
 from D3PDMakerCoreComps.D3PDObject          import make_SG_D3PDObject
-import EventCommonD3PDMaker
-#from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
 import JetTagD3PDMaker
@@ -37,14 +33,14 @@ def AddHadronicInfo(obj, additionalMoments = [], theblockname = 'SubjetMomentsHa
 
 def AddAssocJetsIndex(obj, jetassocname, jettarget, intermediate_names = [], level=0):
    
-   JetAssocTrack = IndexMultiAssociation(obj, 
-                                         JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,
-                                         jettarget,level = level,
-                                         prefix=jetassocname+'_',
-                                         blockname=jetassocname+'blockindex', 
-                                         AssociationName = jetassocname , 
-                                         IntermediateAssociationNames=intermediate_names, 
-                                         OutputLevel=3 )
+   _ = IndexMultiAssociation(obj,
+                             JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,
+                             jettarget,level = level,
+                             prefix=jetassocname+'_',
+                             blockname=jetassocname+'blockindex',
+                             AssociationName = jetassocname ,
+                             IntermediateAssociationNames=intermediate_names,
+                             OutputLevel=3 )
 
 def AddConstitIndex(object, typename='CaloCluster', target='cl_', myprefix='', level=0):
  
@@ -64,7 +60,6 @@ def AddConstitIndex(object, typename='CaloCluster', target='cl_', myprefix='', l
 def AddConstitTruthIndex(object, typename='TruthParticle', level=0):
 
     import EventCommonD3PDMaker
-    import D3PDMakerCoreComps
     import TruthD3PDMaker
     ConstitAssoc = ContainedVectorMultiAssociation \
             (object,
@@ -74,10 +69,10 @@ def AddConstitTruthIndex(object, typename='TruthParticle', level=0):
              TypeName = typename, WriteWeight = False,
              level = level)
            
-    genpart = IndexAssociation (ConstitAssoc,
-                                TruthD3PDMaker.TruthParticleGenParticleAssociationTool,
-                                TruthD3PDFlags.GenParticleAssocLabel(),
-                                prefix='mcpart_')
+    _ = IndexAssociation (ConstitAssoc,
+                          TruthD3PDMaker.TruthParticleGenParticleAssociationTool,
+                          TruthD3PDFlags.GenParticleAssocLabel(),
+                          prefix='mcpart_')
 
 
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJetD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJetD3PDObject.py
index 8404905fa9df..4bc767efa3a2 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJetD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJetD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagJetD3PDObject.py
@@ -10,8 +10,6 @@
 import JetTagD3PDMaker
 
 import D3PDMakerCoreComps
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
 from AthenaCommon.AlgSequence             import AlgSequence
 from RecExConfig.ObjKeyStore                  import cfgKeyStore
 from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
@@ -53,11 +51,11 @@ def _jetFilterAlgHook (c, prefix, sgkey,
     del filterargs['name']
 
     ### if some argument do not exist set them to the flag values
-    if not 'PtMinCut' in filterargs:
+    if 'PtMinCut' not in filterargs:
         filterargs['PtMinCut']=JetTagD3PDFlags.JetFilterPtMinCut()
-    if not 'EtaCut' in filterargs:
+    if 'EtaCut' not in filterargs:
         filterargs['EtaCut']=JetTagD3PDFlags.JetFilterEtaCut()
-    if not 'UseEMScale' in filterargs:
+    if 'UseEMScale' not in filterargs:
         filterargs['UseEMScale']=JetTagD3PDFlags.JetFilterUseEMScale()
     
     preseq += JetTagD3PDMaker.JetTagJetFilterAlg(algname,
@@ -139,7 +137,7 @@ def getJetTagJetD3PDObject(filteredsgkey, origsgkey, level=4, prefix=None,
                            **kw):
               
              
-    if prefix == None:
+    if prefix is None:
         import re
         prefix = re.sub('Jets','',origsgkey)
         prefix = re.sub('AOD','',prefix)
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMETD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMETD3PDObject.py
index 82f6ab61e5ea..3a7cec901a76 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMETD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMETD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagMETD3PDObject.py
@@ -6,8 +6,6 @@
 ## @author Georges Aad
 ## @date Nov, 2010
 ##
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 import re
 
 from MissingETD3PDMaker.MissingETD3PDObject import RefFinalMETD3PDObject
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py
index 705cec126a75..b9e6bf7406d6 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagMSVVtxInJetD3PDObject.py
@@ -13,7 +13,6 @@ import JetTagD3PDMaker
 import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py
index 4ff1ed59f93a..526f53857a9e 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagMuonInJetD3PDObject.py
@@ -18,7 +18,6 @@ import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
 from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
 from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py
index 579358a1f5c4..7c78b5b69116 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagPhotonInJetD3PDObject.py
@@ -7,14 +7,11 @@
 ## @date Nov, 2010
 ##
 
-import JetTagD3PDMaker
-import TrackD3PDMaker
 import egammaD3PDMaker
 import EventCommonD3PDMaker
 
 import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py
index 5e68ae3897e4..874c72c9bad5 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagPixModCondD3PDObject.py
@@ -11,15 +11,11 @@ import JetTagD3PDMaker
 import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
 
-from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
-from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
-
-
 def _jetTagPixModCondAssocLevel (reqlev, args):
 
     if not args.has_key ('PixelSummarySvc') : 
         return False
-    if args['PixelSummarySvc'] == None:
+    if args['PixelSummarySvc'] is None:
         return False
 
     return True
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py
index abee42be5c0c..2a98e4b2511a 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagPrimaryVertexD3PDObject.py
@@ -6,8 +6,6 @@
 ## @author Georges Aad
 ## @date Nov, 2010
 ##
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 from TrackD3PDMaker.xAODVertexD3PDObject import BuildxAODVertexD3PDObject
 from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
 
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
index 7768e2414a55..490c5dd1dfa7 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
@@ -6,8 +6,6 @@
 ## @author Georges Aad
 ## @date Nov, 2010
 ##
-import D3PDMakerCoreComps
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
 from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
 from TrackD3PDMaker.xAODTrackD3PDObject import xAODTrackD3PDObject
 from RecExConfig.RecFlags import rec
@@ -15,7 +13,6 @@ from RecExConfig.RecFlags import rec
 from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys
 from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags
 from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags
-from TruthD3PDMaker.TruthD3PDMakerKeys import TruthD3PDKeys
 
 ## configure TrackD3PDFlags before calling this function
 ##eg:
@@ -45,7 +42,7 @@ def getJetTagTrackD3PDObject(level=20, **kw):
     if not rec.doTruth:
         TrackD3PDFlags.doTruth = False
 
-    if TruthD3PDFlags.GenParticleAssocLabel() == None or TruthD3PDFlags.GenParticleAssocLabel() == "":
+    if TruthD3PDFlags.GenParticleAssocLabel() is None or TruthD3PDFlags.GenParticleAssocLabel() == "":
         TrackD3PDFlags.doTruth = False
         
  
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTriggerBitsD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTriggerBitsD3PDObject.py
index d86015bb79bd..2d86428587c0 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTriggerBitsD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTriggerBitsD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagTriggerBitsD3PDObject.py
@@ -44,6 +44,6 @@ defineTriggerBits(JetTagTriggerBitsD3PDObject, 0, ["L1_MU4.*","L2_mu4T.*","EF_mu
 
 def getJetTagTriggerBitsD3PDObject(triggerList):
 
-    defineTriggerBits(JetTagTriggerBitsD3PDObject,0,triggerList);
+    defineTriggerBits(JetTagTriggerBitsD3PDObject,0,triggerList)
 
     return JetTagTriggerBitsD3PDObject(0)
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTwoTrackVertexD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTwoTrackVertexD3PDObject.py
index bd064a3d3f5b..f9276c248844 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTwoTrackVertexD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTwoTrackVertexD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagTwoTrackVertexD3PDObject.py
@@ -8,12 +8,9 @@
 ##
 
 import JetTagD3PDMaker
-import EventCommonD3PDMaker
-import TrackD3PDMaker
 
 import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
 from AthenaCommon.AlgSequence             import AlgSequence
 from RecExConfig.ObjKeyStore                  import cfgKeyStore
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagVxOnJetAxisD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagVxOnJetAxisD3PDObject.py
index f29754886ceb..62a669632636 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagVxOnJetAxisD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagVxOnJetAxisD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 ## @file JetTagD3PDMaker/python/JetTagVxOnJetAxisD3PDObject.py
@@ -9,12 +9,9 @@
 
 
 import JetTagD3PDMaker
-import EventCommonD3PDMaker
-import TrackD3PDMaker
 
 import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
 from AthenaCommon.AlgSequence             import AlgSequence
 from RecExConfig.ObjKeyStore              import cfgKeyStore
-- 
GitLab


From 4fb4ad835d7eaf21fba5b934d947c4e7ac8e2488 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Wed, 16 Dec 2020 14:59:54 +0100
Subject: [PATCH 043/308] MuonD3PDMaker: cmake cleanup, enable flake8, cleanup

Cleanup cmake configuration and delete unused modules. Enable flake8 and
make code compliant.
---
 .../D3PDMaker/MuonD3PDMaker/CMakeLists.txt    | 11 +++----
 .../python/CscPrepDataD3PDObject.py           | 29 -----------------
 .../python/MDTSimHitD3PDObject.py             |  7 +----
 .../python/MdtPrepDataD3PDObject.py           | 29 -----------------
 .../MuonD3PDMaker/python/MuonD3PDObject.py    | 10 ------
 .../python/MuonSegmentD3PDObject.py           |  8 +----
 .../python/MuonSegmentTruthD3PDObject.py      | 19 ------------
 .../python/MuonSpShowerD3PDObject.py          |  2 --
 .../python/RpcPrepDataD3PDObject.py           | 29 -----------------
 .../python/TgcPrepDataD3PDObject.py           | 31 -------------------
 .../python/TrackRecordD3PDObject.py           |  8 +----
 .../python/TruthMuonD3PDObject.py             |  3 +-
 .../MuonD3PDMaker/python/muonD3PD.py          |  3 +-
 13 files changed, 9 insertions(+), 180 deletions(-)
 delete mode 100644 PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/CscPrepDataD3PDObject.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MdtPrepDataD3PDObject.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentTruthD3PDObject.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/RpcPrepDataD3PDObject.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TgcPrepDataD3PDObject.py

diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/CMakeLists.txt
index 8be369473eb4..412ff095b2ab 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/CMakeLists.txt
@@ -1,22 +1,19 @@
-################################################################################
-# Package: MuonD3PDMaker
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MuonD3PDMaker )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_component( MuonD3PDMaker
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers StoreGateLib SGtests AtlasDetDescr EventInfo EventKernel FourMomUtils xAODMuon xAODTracking xAODTruth GaudiKernel MuonCalibITools MuonIdHelpersLib MuonPattern MuonPrepRawData MuonSegment MuonRecHelperToolsLib MuonRecToolInterfaces MuonSimEvent AnalysisTriggerEvent D3PDMakerUtils TriggerD3PDMakerLib MCTruthClassifierLib McParticleEvent muonEvent TrkGeometry TrkEventPrimitives TrkPrepRawData TrkSegment TrkTrackSummary TrkTruthData TrkExInterfaces TrkToolInterfaces TrigObjectMatchingLib TrigInDetEvent TrigMuonEvent TrackRecordLib MuonTruthAlgsLib )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel AthContainers StoreGateLib AtlasDetDescr EventKernel FourMomUtils xAODMuon xAODTracking xAODTruth GaudiKernel MuonCalibITools MuonIdHelpersLib MuonPattern MuonPrepRawData MuonSegment MuonRecHelperToolsLib MuonRecToolInterfaces MuonSimEvent AnalysisTriggerEvent D3PDMakerUtils MCTruthClassifierLib McParticleEvent muonEvent TrkGeometry TrkEventPrimitives TrkPrepRawData TrkSegment TrkTrackSummary TrkTruthData TrkExInterfaces TrkToolInterfaces TrigMuonEvent TrackRecordLib MuonTruthAlgsLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/CscPrepDataD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/CscPrepDataD3PDObject.py
deleted file mode 100644
index 087859689e80..000000000000
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/CscPrepDataD3PDObject.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import MuonD3PDMaker
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-
-def makeD3PDObject (name, prefix, object_name, getter = None,
-                    sgkey = 'CSC_Clusters',
-                    typename = 'Muon::CscPrepDataContainer',
-                    label = 'CscPrepData'):
-    if not getter:
-        from MuonD3PDMaker.MuonD3PDMakerConf import D3PD__CscPrepDataCollectionGetterTool
-        getter = D3PD__CscPrepDataCollectionGetterTool \
-                 (name + '_Getter',
-                  SGKey = sgkey,
-                  TypeName = typename,
-                  Label = label)
-    getter.OutputLevel=1    
-    return D3PDMakerCoreComps.VectorFillerTool (name,
-                                                Prefix = prefix,
-                                                Getter = getter,
-                                                ObjectName = object_name, OutputLevel=1)
-
-
-CscPrepDataD3PDObject =  D3PDObject (makeD3PDObject, 'csc_', 'CscPrepDataD3PDObject')
-
-CscPrepDataD3PDObject.defineBlock (0, 'PrepData', MuonD3PDMaker.CscPrepDataFillerTool)
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MDTSimHitD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MDTSimHitD3PDObject.py
index b33c3dbbccd6..27479a70d738 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MDTSimHitD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MDTSimHitD3PDObject.py
@@ -1,13 +1,8 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id: MDTSimHitD3PDObject.py 508173 2012-06-29 11:47:55Z ssnyder $
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Import all needed modules:
 import MuonD3PDMaker
-import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject  import make_SGDataVector_D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from D3PDMakerCoreComps.D3PDObject  import D3PDObject
 
 # Create the configurable:
 MDTSimHitD3PDObject = \
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MdtPrepDataD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MdtPrepDataD3PDObject.py
deleted file mode 100644
index 4ddc187f4f44..000000000000
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MdtPrepDataD3PDObject.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import MuonD3PDMaker
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-
-def makeD3PDObject (name, prefix, object_name, getter = None,
-                    sgkey = 'MDT_DriftCircles',
-                    typename = 'Muon::MdtPrepDataContainer',
-                    label = 'MdtPrepData'):
-    if not getter:
-        from MuonD3PDMaker.MuonD3PDMakerConf import D3PD__MdtPrepDataCollectionGetterTool
-        getter = D3PD__MdtPrepDataCollectionGetterTool \
-                 (name + '_Getter',
-                  SGKey = sgkey,
-                  TypeName = typename,
-                  Label = label)
-    getter.OutputLevel=1    
-    return D3PDMakerCoreComps.VectorFillerTool (name,
-                                                Prefix = prefix,
-                                                Getter = getter,
-                                                ObjectName = object_name, OutputLevel=1)
-
-
-MdtPrepDataD3PDObject =  D3PDObject (makeD3PDObject, 'mdt_', 'MdtPrepDataD3PDObject')
-
-MdtPrepDataD3PDObject.defineBlock (0, 'PrepData', MuonD3PDMaker.MdtPrepDataFillerTool)
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py
index 5dd4489e20c1..d8eb5967a39d 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonD3PDObject.py
@@ -4,23 +4,13 @@
 import MuonD3PDMaker
 import D3PDMakerCoreComps
 import EventCommonD3PDMaker
-import TriggerD3PDMaker
 import TrackD3PDMaker
-from TriggerD3PDMaker.defineTriggerBits   import defineTriggerBits
 from D3PDMakerCoreComps.D3PDObject        import make_SGDataVector_D3PDObject
-from D3PDMakerCoreComps.D3PDObject         import DeferArg
 from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
-from D3PDMakerCoreComps.IndexAssociation  import IndexAssociation
 from D3PDMakerConfig.D3PDMakerFlags       import D3PDMakerFlags
-from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
 import TruthD3PDMaker
 
 from RecExConfig.RecFlags import rec
-from RecExConfig.ObjKeyStore import cfgKeyStore
-
-from AthenaCommon.AppMgr import ToolSvc
-from AthenaCommon.Include import include
-
 from MuonD3PDMaker.MuonD3PDMakerFlags    import MuonD3PDFlags
 
 
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentD3PDObject.py
index 54557190d10f..8e45f15497fa 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentD3PDObject.py
@@ -1,18 +1,12 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 import MuonD3PDMaker
-import D3PDMakerCoreComps
-import EventCommonD3PDMaker
 from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
 from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
 
 from MuonD3PDMaker.MuonD3PDMakerFlags    import MuonD3PDFlags
 from RecExConfig.RecFlags import rec
 
-#from MuonD3PDMaker.MuonD3PDMakerConf import MuonWZTruthTool
-#TruthTool = MuonWZTruthTool()
-#ToolSvc += TruthTool
-
 MuonSegmentD3PDObject = \
            make_SGDataVector_D3PDObject ('Trk::SegmentCollection',
                                          D3PDMakerFlags.MuonSegmentSGKey(),
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentTruthD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentTruthD3PDObject.py
deleted file mode 100644
index e8cfa5bc2b1e..000000000000
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSegmentTruthD3PDObject.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import MuonD3PDMaker
-import D3PDMakerCoreComps
-import EventCommonD3PDMaker
-from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
-from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-from RecExConfig.RecFlags import rec
-
-MuonSegmentTruthD3PDObject = \
-                   make_SGDataVector_D3PDObject ('Trk::SegmentCollection',
-                                                 'MuonSegments',
-                                                 'mu_segmentTruth_', 'MuonSegmentTruthD3PDObject')
-
-MuonSegmentTruthD3PDObject.defineBlock (1, 'PatternTruthCombination',
-                                        MuonD3PDMaker.MuonSegmentTruthFillerTool)
-
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSpShowerD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSpShowerD3PDObject.py
index bf3d1f64eb57..cdb5179c8cc5 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSpShowerD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/MuonSpShowerD3PDObject.py
@@ -1,6 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file MuonD3PDMaker/python/MuonSpShowerD3PDObject.py
 # @author Michiru Kaneda <Michiru.Kaneda@cern.ch>
@@ -8,7 +7,6 @@
 # @brief MuonSpShower filler tool
 #
 
-import D3PDMakerCoreComps
 from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
 from MuonD3PDMaker.MuonD3PDMakerConf import D3PD__MuonSpShowerFillerTool as MuonSpShowerFillerTool
 
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/RpcPrepDataD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/RpcPrepDataD3PDObject.py
deleted file mode 100644
index a8cb743c8763..000000000000
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/RpcPrepDataD3PDObject.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import MuonD3PDMaker
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-
-def makeD3PDObject (name, prefix, object_name, getter = None,
-                    sgkey = 'RPC_Measurements',
-                    typename = 'Muon::RpcPrepDataContainer',
-                    label = 'RpcPrepData'):
-    if not getter:
-        from MuonD3PDMaker.MuonD3PDMakerConf import D3PD__RpcPrepDataCollectionGetterTool
-        getter = D3PD__RpcPrepDataCollectionGetterTool \
-                 (name + '_Getter',
-                  SGKey = sgkey,
-                  TypeName = typename,
-                  Label = label)
-    getter.OutputLevel=1    
-    return D3PDMakerCoreComps.VectorFillerTool (name,
-                                                Prefix = prefix,
-                                                Getter = getter,
-                                                ObjectName = object_name, OutputLevel=1)
-
-
-RpcPrepDataD3PDObject =  D3PDObject (makeD3PDObject, 'rpc_', 'RpcPrepDataD3PDObject')
-
-RpcPrepDataD3PDObject.defineBlock (0, 'PrepData', MuonD3PDMaker.RpcPrepDataFillerTool)
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TgcPrepDataD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TgcPrepDataD3PDObject.py
deleted file mode 100644
index 74780db166d5..000000000000
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TgcPrepDataD3PDObject.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import MuonD3PDMaker
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.D3PDObject import D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-
-def makeD3PDObject (name, prefix, object_name, getter = None,
-                    sgkey = 'TGC_Measurements',
-                    #sgkey = 'TGC_MeasurementsPriorBC',
-                    #sgkey = 'TGC_MeasurementsNextBC',
-                    typename = 'Muon::TgcPrepDataContainer',
-                    label = 'TgcPrepData'):
-    if not getter:
-        from MuonD3PDMaker.MuonD3PDMakerConf import D3PD__TgcPrepDataCollectionGetterTool
-        getter = D3PD__TgcPrepDataCollectionGetterTool \
-                 (name + '_Getter',
-                  SGKey = sgkey,
-                  TypeName = typename,
-                  Label = label)
-    getter.OutputLevel=1    
-    return D3PDMakerCoreComps.VectorFillerTool (name,
-                                                Prefix = prefix,
-                                                Getter = getter,
-                                                ObjectName = object_name, OutputLevel=1)
-
-
-TgcPrepDataD3PDObject =  D3PDObject (makeD3PDObject, 'tgc_', 'TgcPrepDataD3PDObject')
-
-TgcPrepDataD3PDObject.defineBlock (0, 'PrepData', MuonD3PDMaker.TgcPrepDataFillerTool)
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TrackRecordD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TrackRecordD3PDObject.py
index 9af4e3ea9084..af551535e625 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TrackRecordD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TrackRecordD3PDObject.py
@@ -1,13 +1,7 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id: TrackRecordD3PDObject.py
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Import all needed modules:
 import MuonD3PDMaker
-import D3PDMakerCoreComps
-from D3PDMakerCoreComps.resolveSGKey import testSGKey
-from D3PDMakerConfig.D3PDMakerFlags  import D3PDMakerFlags
-from D3PDMakerCoreComps.D3PDObject   import D3PDObject
 from D3PDMakerCoreComps.D3PDObject   import make_SGDataVector_D3PDObject
 
 
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TruthMuonD3PDObject.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TruthMuonD3PDObject.py
index 89bbea369762..28d646ea12c0 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TruthMuonD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/TruthMuonD3PDObject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # @file  MuonD3PDMaker/python/TruthMuonD3PDObject.py
 # $author  Srivas Prasad <srivas.prasad@cern.ch>
@@ -9,7 +9,6 @@
 import MuonD3PDMaker
 import EventCommonD3PDMaker
 from D3PDMakerCoreComps.D3PDObject         import make_SGDataVector_D3PDObject
-from D3PDMakerCoreComps.resolveSGKey       import testSGKey
 from D3PDMakerConfig.D3PDMakerFlags        import D3PDMakerFlags
 from AthenaCommon.AlgSequence              import AlgSequence
 from RecExConfig.ObjKeyStore               import cfgKeyStore
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/muonD3PD.py b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/muonD3PD.py
index d3ddfb1b3f63..2d4e90c52671 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/muonD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/python/muonD3PD.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file MuonD3PDMaker/python/muonD3PD.py
 # @author srivas prasad <srivas.prasad@cern.ch>
-- 
GitLab


From 4237a180cbd964837d9695aed82ad2cd4c66e19e Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Wed, 16 Dec 2020 15:01:41 +0100
Subject: [PATCH 044/308] Change loop to be a bit more conventional. I think
 this fixes a crash I saw, presumably because inputTSOS_ID->end()-1 was
 invalid because inputTSOS_ID was empty.

---
 .../src/TrkMaterialProviderTool.cxx           | 33 ++++---------------
 1 file changed, 7 insertions(+), 26 deletions(-)

diff --git a/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx b/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx
index 3607f5e1b0c5..a623f6875f2d 100644
--- a/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx
+++ b/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx
@@ -405,63 +405,44 @@ void Trk::TrkMaterialProviderTool::getCaloMEOT(const Trk::Track& idTrack, const
 #endif
   
   // find last ID TSOS
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator lastIDwP  = inputTSOS_ID->end();
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator it        = inputTSOS_ID->end()-1;
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator itFront   = inputTSOS_ID->begin();
-  while(*it) {
+  DataVector<const Trk::TrackStateOnSurface>::const_reverse_iterator lastIDwP  = inputTSOS_ID->rbegin();
+  for (auto it = inputTSOS_ID->rbegin(); it != inputTSOS_ID->rend(); ++it) {
     if(this->getVolumeByGeo(*it)==1 && (*it)->trackParameters()) {
       lastIDwP = it;
       break;
     }
-    if(it==itFront) break;
-    --it;
   }
   
   // find first MS TSOS
   DataVector<const Trk::TrackStateOnSurface>::const_iterator firstMS   = inputTSOS_MS->end();
   DataVector<const Trk::TrackStateOnSurface>::const_iterator firstMSwP = inputTSOS_MS->end();
-  it = inputTSOS_MS->begin();
   DataVector<const Trk::TrackStateOnSurface>::const_iterator itEnd = inputTSOS_MS->end();
-  for(; it!=itEnd; ++it) {
+  for(auto it = inputTSOS_MS->begin(); it!=itEnd ; ++it) {
     if(this->getVolumeByGeo(*it)==3) {// && !(*it)->type(Trk::TrackStateOnSurface::Perigee)) {
       if(firstMS==itEnd) 
-	firstMS = it;
+	      firstMS = it;
       if((*it)->trackParameters() && (*it)->trackParameters()->covariance()) {
-	firstMSwP = it;
-	break;
+	      firstMSwP = it;
+      	break;
       }
     }
   }
 
-  if(lastIDwP == inputTSOS_ID->end()) {
+  if(lastIDwP == inputTSOS_ID->rbegin()) {
     ATH_MSG_WARNING("Unable to find last ID TSOS with Track Parameters");    
     ATH_MSG_WARNING("Unable to update Calorimeter TSOS");
-    /** deprecated outputLevel()
-    if(outputLevel() >= MSG::VERBOSE) {
-      for(auto m : *inputTSOS_ID)
-	      printTSOS(m, "DEBUG-ID-TSOS");
-    }    
-    **/
     return;
   }
   if(firstMS == inputTSOS_MS->end()) {
     ATH_MSG_WARNING("Unable to find first MS TSOS");    
     ATH_MSG_WARNING("Unable to update Calorimeter TSOS");
-    /** deprecated outputLevel()
-    if(outputLevel() >= MSG::VERBOSE) {
-      for(auto m : *inputTSOS_MS)
-	       printTSOS(m, "DEBUG-MS-TSOS");
-    }
-    **/
     return;
   }
 
   // check that first MS TSOS is not a PerigeeSurface
-  //bool removeOoC = false;
   DataVector<const Trk::TrackStateOnSurface>::const_iterator firstMSnotPerigee = firstMS;
   if( (*firstMS)->type(Trk::TrackStateOnSurface::Perigee) && (firstMS+1)!=inputTSOS_MS->end()) {
     firstMSnotPerigee=firstMS+1;
-    //removeOoC = true;
   }
 
 #ifdef DEBUGON
-- 
GitLab


From da3c3d259c04afb5c1927d761b4fa454d8a19ee1 Mon Sep 17 00:00:00 2001
From: yoyamagu <yohei.yamaguchi@cern.ch>
Date: Wed, 16 Dec 2020 23:58:43 +0900
Subject: [PATCH 045/308] delete obsolete function and object

---
 .../TrigL2MuonSA/src/MuFastSteering.cxx       | 140 ------------------
 .../TrigL2MuonSA/src/MuFastSteering.h         |   6 -
 2 files changed, 146 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
index b4feab6cdfc1..ebf02d6a7a8d 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
@@ -28,7 +28,6 @@
 MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc) 
   : HLT::FexAlgo(name, svc), 
     m_timerSvc("TrigTimerSvc", name),
-    m_regionSelector("RegSelSvc", name),
     m_recMuonRoIUtils(),
     m_rpcHits(), m_tgcHits(),
     m_mdtRegion(), m_muonRoad(),
@@ -62,13 +61,6 @@ HLT::ErrorCode MuFastSteering::hltInitialize()
     }
   }
 
-  // Locate RegionSelector
-  if (m_regionSelector.retrieve().isFailure()) {
-    ATH_MSG_ERROR("Could not retrieve the regionselector service");
-    return HLT::ERROR;
-  }
-  ATH_MSG_DEBUG("Retrieved the RegionSelector service ");
-
   // Locate DataPreparator
   if (m_dataPreparator.retrieve().isFailure()) {
     ATH_MSG_ERROR("Cannot retrieve Tool DataPreparator");
@@ -2277,135 +2269,3 @@ void MuFastSteering::handle(const Incident& incident) {
 }
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
-
-HLT::ErrorCode MuFastSteering::prepareRobRequests(const HLT::TriggerElement* inputTE){
-
-  ATH_MSG_DEBUG("prepareRobRequests called");
-  
-  HLT::RobRequestInfo* RRInfo = config()->robRequestInfo();
-
-  if (!RRInfo) {
-    ATH_MSG_ERROR("Null pointer to RobRequestInfo");
-    return HLT::ERROR;
-  }
-  
-  std::vector<uint32_t> MdtRobList;
-  std::vector<uint32_t> RpcRobList;
-  std::vector<uint32_t> TgcRobList;
-  std::vector<uint32_t> CscRobList;
-  
-  std::vector<const TrigRoiDescriptor*> roids;
-  HLT::ErrorCode hec = getFeatures(inputTE, roids);
-
-  if (hec != HLT::OK) {
-    ATH_MSG_ERROR("Could not find input TE");
-    return hec;
-  }
-  
-  // RoI base data access
-  for (unsigned int i=0; i < roids.size(); i++) {
-    
-    if ( m_use_RoIBasedDataAccess_MDT) {
-
-      float roi_eta = roids[i]->eta();
-      float roi_phi = roids[i]->phi();
-      if (roi_phi < 0) roi_phi += 2.0 * M_PI;
-   
-      double etaMin = roi_eta - 0.2;
-      double etaMax = roi_eta + 0.2;
-      double phiMin = roi_phi - 0.2;
-      double phiMax = roi_phi + 0.2;
-      if( phiMin < 0 ) phiMin += 2*M_PI;
-      if( phiMax < 0 ) phiMax += 2*M_PI;
-      if( phiMin > 2*M_PI ) phiMin -= 2*M_PI;
-      if( phiMax > 2*M_PI ) phiMax -= 2*M_PI;
-
-      TrigRoiDescriptor* roi = new TrigRoiDescriptor( roi_eta, etaMin, etaMax, roi_phi, phiMin, phiMax );
-      const IRoiDescriptor* iroi = (IRoiDescriptor*) roi;
-
-      MdtRobList.clear();
-      if ( iroi ) m_regionSelector->DetROBIDListUint(MDT, *iroi, MdtRobList);
-      RRInfo->addRequestScheduledRobIDs(MdtRobList);
-      ATH_MSG_DEBUG("prepareRobRequests, find " << MdtRobList.size() << " Mdt Rob's,");
-
-      if(roi) delete roi;
-    }
-
-    if ( m_use_RoIBasedDataAccess_RPC) {
-
-      const IRoiDescriptor* iroi = (IRoiDescriptor*) roids[i];
-
-      RpcRobList.clear();
-      if ( iroi ) m_regionSelector->DetROBIDListUint(RPC, *iroi, RpcRobList);
-      RRInfo->addRequestScheduledRobIDs(RpcRobList);
-      ATH_MSG_DEBUG("prepareRobRequests, find " << RpcRobList.size() << " Rpc Rob's,");
-    }
-
-    if ( m_use_RoIBasedDataAccess_TGC) {
-
-      float roi_eta = roids[i]->eta();
-      float roi_phi = roids[i]->phi();
-      if (roi_phi < 0) roi_phi += 2.0 * M_PI;
-   
-      double etaMin = roi_eta - 0.2;
-      double etaMax = roi_eta + 0.2;
-      double phiMin = roi_phi - 0.1;
-      double phiMax = roi_phi + 0.1;
-      if( phiMin < 0 ) phiMin += 2*M_PI;
-      if( phiMax < 0 ) phiMax += 2*M_PI;
-      if( phiMin > 2*M_PI ) phiMin -= 2*M_PI;
-      if( phiMax > 2*M_PI ) phiMax -= 2*M_PI;
-
-      TrigRoiDescriptor* roi = new TrigRoiDescriptor( roi_eta, etaMin, etaMax, roi_phi, phiMin, phiMax );
-      const IRoiDescriptor* iroi = (IRoiDescriptor*) roi;
-
-      TgcRobList.clear();
-      if ( iroi ) m_regionSelector->DetROBIDListUint(TGC, *iroi, TgcRobList);
-      RRInfo->addRequestScheduledRobIDs(TgcRobList);
-      ATH_MSG_DEBUG("prepareRobRequests, find " << TgcRobList.size() << " Tgc Rob's,");
-
-      if(roi) delete roi;
-    }
-
-    if ( m_use_RoIBasedDataAccess_CSC) {
-
-      const IRoiDescriptor* iroi = (IRoiDescriptor*) roids[i];
-
-      CscRobList.clear();
-      if ( iroi ) m_regionSelector->DetROBIDListUint(CSC, *iroi, CscRobList);
-      RRInfo->addRequestScheduledRobIDs(CscRobList);
-      ATH_MSG_DEBUG("prepareRobRequests, find " << CscRobList.size() << " Csc Rob's,");
-    }
-  }
-  
-  // Full data access
-  if ( !m_use_RoIBasedDataAccess_MDT ) {
-    MdtRobList.clear();
-    m_regionSelector->DetROBIDListUint(MDT, MdtRobList);
-    RRInfo->addRequestScheduledRobIDs(MdtRobList);
-    ATH_MSG_DEBUG("prepareRobRequests, find " << MdtRobList.size() << " Mdt Rob's,");
-  }
-
-  if ( !m_use_RoIBasedDataAccess_RPC ) {
-    RpcRobList.clear();
-    m_regionSelector->DetROBIDListUint(RPC, RpcRobList);
-    RRInfo->addRequestScheduledRobIDs(RpcRobList);
-    ATH_MSG_DEBUG("prepareRobRequests, find " << RpcRobList.size() << " Rpc Rob's,");
-  }
-
-  if ( !m_use_RoIBasedDataAccess_TGC ) {
-    TgcRobList.clear();
-    m_regionSelector->DetROBIDListUint(TGC, TgcRobList);
-    RRInfo->addRequestScheduledRobIDs(TgcRobList);
-    ATH_MSG_DEBUG("prepareRobRequests, find " << TgcRobList.size() << " Tgc Rob's,");
-  }
-
-  if ( !m_use_RoIBasedDataAccess_CSC ) {
-    CscRobList.clear();
-    m_regionSelector->DetROBIDListUint(CSC, CscRobList);
-    RRInfo->addRequestScheduledRobIDs(CscRobList);
-    ATH_MSG_DEBUG("prepareRobRequests, find " << CscRobList.size() << " Csc Rob's,");
-  }
-  
-  return HLT::OK;
-}
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.h
index 9d1dcbf63272..dd91c6803769 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.h
@@ -38,7 +38,6 @@
 #include "xAODTracking/TrackParticleContainer.h"
 #include "AthenaMonitoringKernel/GenericMonitoringTool.h"
 
-class IRegSelSvc;
 class Incident;
 class MsgStream;
 
@@ -97,9 +96,6 @@ class MuFastSteering : public HLT::FexAlgo,
 
   // handler for "UpdateAfterFork" actions
   void handle(const Incident& incident);
-  
-  using HLT::FexAlgo::prepareRobRequests;
-  virtual HLT::ErrorCode prepareRobRequests(const HLT::TriggerElement* inputTE );
 
  protected:
   
@@ -164,8 +160,6 @@ class MuFastSteering : public HLT::FexAlgo,
   ServiceHandle<ITrigTimerSvc> m_timerSvc;
   std::vector<TrigTimer*> m_timingTimers;
 
-  ServiceHandle<IRegSelSvc> m_regionSelector;
-  
   // Tools
   ToolHandle<TrigL2MuonSA::MuFastDataPreparator>     m_dataPreparator {
 	this, "DataPreparator", "TrigL2MuonSA::MuFastDataPreparator", "data preparator" };
-- 
GitLab


From 4d807e12f75fb1eca8563e33617f4328fbcb6038 Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Wed, 16 Dec 2020 16:28:31 +0100
Subject: [PATCH 046/308] Fix existing typo in typelessfindLinks

---
 Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx     | 4 ++--
 .../TrigCompositeUtils/TrigCompositeUtils.h                   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx b/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx
index afebd6200261..c726f8b63a77 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx
@@ -107,7 +107,7 @@ size_t InputMakerBase::matchDecision(const DecisionContainer* outDecisions, cons
   std::vector<uint32_t> keysA;
   std::vector<uint32_t> clidsA;
   std::vector<uint16_t> indiciesA;
-  TrigCompositeUtils::typelessfindLinks(toMatch, linkNameToMatch, keysA, clidsA, indiciesA, TrigDefs::lastFeatureOfType, &cache);
+  TrigCompositeUtils::typelessFindLinks(toMatch, linkNameToMatch, keysA, clidsA, indiciesA, TrigDefs::lastFeatureOfType, &cache);
   
   if (keysA.size() != 1) {
     ATH_MSG_ERROR("InputMakerBase::matchDecision Did not locate exactly one object having searched for a link named '" << linkNameToMatch 
@@ -129,7 +129,7 @@ size_t InputMakerBase::matchDecision(const DecisionContainer* outDecisions, cons
     std::vector<uint32_t> keysB;
     std::vector<uint32_t> clidsB;
     std::vector<uint16_t> indiciesB;
-    TrigCompositeUtils::typelessfindLinks(checkDecision, linkNameToMatch, keysB, clidsB, indiciesB, TrigDefs::lastFeatureOfType, &cache);
+    TrigCompositeUtils::typelessFindLinks(checkDecision, linkNameToMatch, keysB, clidsB, indiciesB, TrigDefs::lastFeatureOfType, &cache);
     if (keysB.size() != 1) {
       ATH_MSG_ERROR("Logic error. Expect toMatch size == 1 (confirmed) and checkObject size == 1."
         << " But have checkObject size = " << keysB.size() << ". Unable to match this Decision object.");
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h
index 64ea8b34ea3e..84594aade1ff 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.h
@@ -457,7 +457,7 @@ namespace TrigCompositeUtils {
                           branch once a link has been located and collected. 
    * @param[inout] visitedCache Optional cache used by the recursive algorithm to avoid exploring each node multiple times. 
    */
-  bool typelessfindLinks(const Decision* start, 
+  bool typelessFindLinks(const Decision* start, 
     const std::string& linkName,
     std::vector<uint32_t>& key,
     std::vector<uint32_t>& clid,
-- 
GitLab


From 1e8877f998f35a5f001f5215a32e0c46e824f5f6 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Tue, 15 Dec 2020 19:54:55 +0100
Subject: [PATCH 047/308] ComponentAccumulator configuration of transient
 ByteStream

---
 .../python/ByteStreamConfig.py                |  55 ++++++++++
 .../python/LArByteStreamConfig.py             |   8 +-
 .../python/TriggerTransBSConfig.py            | 100 ++++++++++++++++++
 .../TriggerJobOpts/share/runHLT_standalone.py |  12 ++-
 4 files changed, 165 insertions(+), 10 deletions(-)
 create mode 100644 Trigger/TriggerCommon/TriggerJobOpts/python/TriggerTransBSConfig.py

diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
index beac64668773..ec40719560ee 100644
--- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
+++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py
@@ -157,6 +157,61 @@ def ByteStreamWriteCfg(flags, type_names=None):
 
     return result
 
+def TransientByteStreamCfg(flags, item_list=None, type_names=None, extra_inputs=None):
+    """Set up transient ByteStream output stream
+
+    Configure components responsible for writing bytestream format. Write the
+    specified objects to ByteStream into the cache of the ROBDataProviderSvc.
+    The data can then be read downstream as if they were coming from a BS file.
+
+    Args:
+        flags:        Job configuration, usually derived from ConfigFlags
+        item_list:    (optional) List of objects to be written to transient ByteStream
+        type_names:   (optional) List of types/names to register in BS conversion service
+                      as available to be read from (transient) ByteStream
+        extra_inputs: (optional) List of objects which need to be produced before transient
+                      ByteStream streaming is scheduled - ensures correct scheduling
+
+    Returns:
+        A component accumulator fragment containing the components required to
+        write transient bytestream. Should be merged into main job configuration.
+    """
+
+    result = ComponentAccumulator()
+    comp_factory = AthenaConfiguration.ComponentFactory.CompFactory
+
+    rdp = comp_factory.ROBDataProviderSvc()
+    result.addService(rdp)
+
+    rdp_output = comp_factory.ByteStreamRDP_OutputSvc()
+    result.addService(rdp_output)
+
+    bytestream_conversion = comp_factory.ByteStreamCnvSvc(
+        name="ByteStreamCnvSvc",
+        ByteStreamOutputSvcList=[rdp_output.getName()],
+    )
+    result.addService(bytestream_conversion)
+
+    output_stream = comp_factory.AthenaOutputStream(
+        name="TransBSStreamAlg",
+        EvtConversionSvc=bytestream_conversion.name,
+        OutputFile="ByteStreamRDP_OutputSvc",
+        ItemList=item_list if item_list else list(),
+        ExtraInputs=extra_inputs if extra_inputs else list(),
+    )
+    result.addEventAlgo(output_stream, primary=True)
+
+    address_provider = comp_factory.ByteStreamAddressProviderSvc(
+        TypeNames=type_names if type_names else list(),
+    )
+    result.addService(address_provider)
+
+    proxy = comp_factory.ProxyProviderSvc()
+    proxy.ProviderNames += [address_provider.name]
+    result.addService(proxy)
+
+    return result
+
 
 def main():
     """Run a functional test if module is executed"""
diff --git a/LArCalorimeter/LArCnv/LArByteStream/python/LArByteStreamConfig.py b/LArCalorimeter/LArCnv/LArByteStream/python/LArByteStreamConfig.py
index cad5f10f1769..6ffba323d0f1 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/python/LArByteStreamConfig.py
+++ b/LArCalorimeter/LArCnv/LArByteStream/python/LArByteStreamConfig.py
@@ -1,19 +1,17 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 
-from LArByteStream.LArByteStreamConf import LArRawDataContByteStreamTool
-
+from AthenaConfiguration.ComponentFactory import CompFactory
 
 
 def LArRawDataContByteStreamToolConfig (name="LArRawDataContByteStreamTool",
                                         InitializeForWriting = False,
                                         stream=None,
                                         **kwargs):
-      tool = LArRawDataContByteStreamTool (name, **kwargs)
+      tool = CompFactory.LArRawDataContByteStreamTool (name, **kwargs)
       if InitializeForWriting:
-         from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
          from LArCabling.LArCablingAccess import LArOnOffIdMapping, LArFebRodMapping
-         noisealg = CaloNoiseCondAlg ('totalNoise')
+         noisealg = CompFactory.CaloNoiseCondAlg ('totalNoise')
          LArOnOffIdMapping()
          LArFebRodMapping()
          if stream:
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerTransBSConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerTransBSConfig.py
new file mode 100644
index 000000000000..2e932fa4a03c
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerTransBSConfig.py
@@ -0,0 +1,100 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+'''
+ComponentAccumulator configuration for producing transient ByteStream,
+which is required when running HLT selection algorithms on MC RDO inputs
+'''
+
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from ByteStreamCnvSvc.ByteStreamConfig import TransientByteStreamCfg
+
+def triggerTransBSCfg(flags, seqName="AthAlgSeq"):
+    acc = ComponentAccumulator(seqName)
+
+    itemList = []  # Objects to be written to transient BS
+    typeNames = []  # Objects to be read from transient BS
+    extraInputs = []  # Objects to be produced before writing transient BS (scheduler dependency)
+
+    # --------------------------------------------------
+    # Level-1 Trigger
+    # --------------------------------------------------
+    from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamEncoderCfg
+    acc.merge(L1TriggerByteStreamEncoderCfg(flags))
+
+    if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1Phase1:
+        itemList += ["ROIB::RoIBResult#RoIBResult"]
+        typeNames += ["MuCTPI_RDO/MUCTPI_RDO"]
+        extraInputs += [('ROIB::RoIBResult', 'StoreGateSvc+RoIBResult')]
+
+    if flags.Trigger.enableL1Phase1:
+        itemList += ["xAOD::TrigCompositeContainer#L1TriggerResult",
+                     "xAOD::TrigCompositeAuxContainer#L1TriggerResultAux."]
+        extraInputs += [('xAOD::TrigCompositeContainer', 'StoreGateSvc+L1TriggerResult')]
+
+    # --------------------------------------------------
+    # ID
+    # --------------------------------------------------
+    if flags.Trigger.doID:
+        # Pixel
+        itemList += ["PixelRDO_Container#*"]
+        typeNames += ["InDet::PixelClusterContainer/PixelOnlineClusters"]
+        extraInputs += [('PixelHitDiscCnfgData','ConditionStore+PixelHitDiscCnfgData')]
+        extraInputs += [('PixelCablingCondData','ConditionStore+PixelCablingCondData')]
+        # SCT
+        itemList += ["SCT_RDO_Container#*"]
+        typeNames += ["InDet::SCT_ClusterContainer/SCT_OnlineClusters"]
+        extraInputs += [('SCT_CablingData','ConditionStore+SCT_CablingData')]
+        # TRT
+        itemList += ["TRT_RDO_Container#*"]
+        typeNames += ["InDet::TRT_DriftCircleContainer/TRT_DriftCircle"]
+
+    # --------------------------------------------------
+    # Calo
+    # --------------------------------------------------
+    if flags.Trigger.doCalo:
+        # LAr
+        from LArByteStream.LArByteStreamConfig import LArRawDataContByteStreamToolConfig
+        lar_tool = LArRawDataContByteStreamToolConfig(InitializeForWriting=True)
+        acc.addPublicTool(lar_tool)
+        itemList += ["LArRawChannelContainer#*"]
+        extraInputs += [('CaloNoise', 'ConditionStore+totalNoise'),
+                        ('LArOnOffIdMapping', 'ConditionStore+LArOnOffIdMap'),
+                        ('LArFebRodMapping', 'ConditionStore+LArFebRodMap')]
+        # Tile
+        itemList += ["TileRawChannelContainer#*"]
+        typeNames += ["TileCellIDC/TileCellIDC"]
+        extraInputs += [('TileBadChannels','ConditionStore+TileBadChannels')]
+
+    # --------------------------------------------------
+    # Muon
+    # --------------------------------------------------
+    if flags.Trigger.doMuon:
+        # MDT
+        itemList += ["MdtCsmContainer#*"]
+        typeNames += ["MdtDigitContainer/MDT_DIGITS",
+                      "MdtCsmContainer/MDTCSM"]
+        extraInputs += [('MuonMDT_CablingMap','ConditionStore+MuonMDT_CablingMap')]
+        # RPC
+        itemList += ["RpcPadContainer#*"]
+        typeNames += ["RpcDigitContainer/RPC_DIGITS",
+                      "RpcPadContainer/RPCPAD"]
+        # TGC
+        itemList += ["TgcRdoContainer#*"]
+        typeNames += ["TgcDigitContainer/TGC_DIGITS",
+                      "TgcRdoContainer/TGCRDO"]
+        # CSC
+        itemList += ["CscRawDataContainer#*"]
+        typeNames += ["CscDigitContainer/CSC_DIGITS",
+                      "CscRawDataContainer/CSCRDO"]
+
+    # --------------------------------------------------
+    # Final configuration
+    # --------------------------------------------------
+    transBSCfg = TransientByteStreamCfg(
+        flags,
+        item_list=itemList,
+        type_names=typeNames,
+        extra_inputs=extraInputs)
+    acc.merge(transBSCfg, sequenceName=seqName)
+
+    return acc
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
index 3ea6726e9574..a4c83476b215 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
@@ -390,11 +390,6 @@ if ConfigFlags.Input.Format == 'POOL':
     import AthenaPoolCnvSvc.ReadAthenaPool   # noqa
     svcMgr.AthenaPoolCnvSvc.PoolAttributes = [ "DEFAULT_BUFFERSIZE = '2048'" ]
     svcMgr.PoolSvc.AttemptCatalogPatch=True
-    # enable transient BS
-    if ConfigFlags.Trigger.doTransientByteStream:
-        log.info("setting up transient BS")
-        include( "TriggerJobOpts/jobOfragment_TransBS_standalone.py" )
-
 
 # ----------------------------------------------------------------
 # ByteStream input
@@ -469,6 +464,13 @@ if opt.doL1Sim:
     from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
     hltBeginSeq += Lvl1SimulationSequence(ConfigFlags)
 
+# ---------------------------------------------------------------
+# Transient ByteStream
+# ---------------------------------------------------------------
+if ConfigFlags.Trigger.doTransientByteStream:
+    log.info("Configuring transient ByteStream")
+    from TriggerJobOpts.TriggerTransBSConfig import triggerTransBSCfg
+    CAtoGlobalWrapper(triggerTransBSCfg, ConfigFlags, seqName="HLTBeginSeq")
 
 # ---------------------------------------------------------------
 # HLT generation
-- 
GitLab


From 41036e41f6f69865bf4c06188886fa74ff40299e Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Wed, 16 Dec 2020 17:07:40 +0100
Subject: [PATCH 048/308] Updating reference files

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 160 ++++++------------
 1 file changed, 55 insertions(+), 105 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index d81dd39244c7..e3e4dc9de662 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -71,7 +71,7 @@ HLT_2g10_loose_mu20_L1MU20:
   stepFeatures:
     0: 3
     1: 3
-    2: 5
+    2: 4
 HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I:
   eventCount: 0
 HLT_2g20_tight_L12EM15VH:
@@ -585,7 +585,7 @@ HLT_e17_lhloose_mu14_L1EM15VH_MU10:
   stepFeatures:
     0: 4
     1: 5
-    2: 6
+    2: 4
     3: 4
     4: 4
     5: 4
@@ -603,7 +603,7 @@ HLT_e17_lhvloose_nod0_L1EM15VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 7
+    2: 5
     3: 5
     4: 5
 HLT_e17_lhvloose_nod0_L1EM15VHI:
@@ -617,23 +617,9 @@ HLT_e17_lhvloose_nod0_L1EM15VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
-HLT_e20_lhmedium_e15_idperf_Zee_L12EM3:
-  eventCount: 19
-  stepCounts:
-    0: 20
-    1: 20
-    2: 20
-    3: 19
-    4: 19
-  stepFeatures:
-    0: 176
-    1: 715
-    2: 292
-    3: 152
-    4: 111
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
   eventCount: 0
   stepCounts:
@@ -663,7 +649,7 @@ HLT_e24_lhvloose_L1EM20VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 7
+    2: 5
     3: 5
     4: 5
 HLT_e26_etcut_L1EM22VHI:
@@ -678,18 +664,6 @@ HLT_e26_etcut_L1EM22VHI:
     1: 30
     2: 6
     3: 6
-HLT_e26_idperf_L1EM24VHI:
-  eventCount: 6
-  stepCounts:
-    0: 6
-    1: 6
-    2: 6
-    3: 6
-  stepFeatures:
-    0: 7
-    1: 7
-    2: 16
-    3: 7
 HLT_e26_lhloose_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -701,7 +675,7 @@ HLT_e26_lhloose_L1EM15VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 7
+    2: 5
     3: 5
     4: 5
 HLT_e26_lhloose_L1EM22VHI:
@@ -715,7 +689,7 @@ HLT_e26_lhloose_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhmedium_L1EM15VH:
@@ -729,7 +703,7 @@ HLT_e26_lhmedium_L1EM15VH:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhmedium_L1EM22VHI:
@@ -743,7 +717,7 @@ HLT_e26_lhmedium_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhmedium_mu8noL1_L1EM22VHI:
@@ -759,7 +733,7 @@ HLT_e26_lhmedium_mu8noL1_L1EM22VHI:
   stepFeatures:
     0: 10
     1: 10
-    2: 10
+    2: 8
     3: 8
     4: 8
     5: 4
@@ -775,7 +749,7 @@ HLT_e26_lhtight_L1EM15VH:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_L1EM22VHI:
@@ -789,7 +763,7 @@ HLT_e26_lhtight_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_gsf_L1EM22VHI:
@@ -803,7 +777,7 @@ HLT_e26_lhtight_gsf_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_ivarloose_L1EM22VHI:
@@ -817,7 +791,7 @@ HLT_e26_lhtight_ivarloose_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 3
 HLT_e26_lhtight_ivarmedium_L1EM22VHI:
@@ -831,7 +805,7 @@ HLT_e26_lhtight_ivarmedium_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 3
 HLT_e26_lhtight_ivartight_L1EM22VHI:
@@ -845,7 +819,7 @@ HLT_e26_lhtight_ivartight_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 3
 HLT_e26_lhtight_nod0_L1EM22VHI:
@@ -859,7 +833,7 @@ HLT_e26_lhtight_nod0_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_nod0_L1EM24VHI:
@@ -873,21 +847,9 @@ HLT_e26_lhtight_nod0_L1EM24VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
-HLT_e28_idperf_L1EM24VHI:
-  eventCount: 6
-  stepCounts:
-    0: 6
-    1: 6
-    2: 6
-    3: 6
-  stepFeatures:
-    0: 7
-    1: 7
-    2: 16
-    3: 7
 HLT_e300_etcut_L1EM22VHI:
   eventCount: 0
 HLT_e3_etcut1step_g5_etcut_L12EM3:
@@ -924,18 +886,6 @@ HLT_e5_etcut_L1EM3:
     1: 458
     2: 173
     3: 102
-HLT_e5_idperf_L1EM3:
-  eventCount: 20
-  stepCounts:
-    0: 20
-    1: 20
-    2: 20
-    3: 20
-  stepFeatures:
-    0: 176
-    1: 166
-    2: 292
-    3: 153
 HLT_e5_lhloose_L1EM3:
   eventCount: 6
   stepCounts:
@@ -947,8 +897,8 @@ HLT_e5_lhloose_L1EM3:
   stepFeatures:
     0: 60
     1: 145
-    2: 78
-    3: 44
+    2: 81
+    3: 46
     4: 7
 HLT_e5_lhloose_noringer_L1EM3:
   eventCount: 6
@@ -961,7 +911,7 @@ HLT_e5_lhloose_noringer_L1EM3:
   stepFeatures:
     0: 56
     1: 128
-    2: 88
+    2: 84
     3: 46
     4: 7
 HLT_e5_lhmedium_L1EM3:
@@ -976,7 +926,7 @@ HLT_e5_lhmedium_L1EM3:
     0: 58
     1: 131
     2: 76
-    3: 42
+    3: 44
     4: 5
 HLT_e5_lhmedium_noringer_L1EM3:
   eventCount: 4
@@ -1004,7 +954,7 @@ HLT_e5_lhtight_L1EM3:
     0: 57
     1: 128
     2: 74
-    3: 41
+    3: 43
     4: 5
 HLT_e5_lhtight_nod0_L1EM3:
   eventCount: 4
@@ -1018,7 +968,7 @@ HLT_e5_lhtight_nod0_L1EM3:
     0: 57
     1: 128
     2: 74
-    3: 41
+    3: 43
     4: 5
 HLT_e5_lhtight_noringer_L1EM3:
   eventCount: 4
@@ -1031,7 +981,7 @@ HLT_e5_lhtight_noringer_L1EM3:
   stepFeatures:
     0: 45
     1: 92
-    2: 60
+    2: 61
     3: 36
     4: 5
 HLT_e5_lhtight_noringer_nod0_L1EM3:
@@ -1045,7 +995,7 @@ HLT_e5_lhtight_noringer_nod0_L1EM3:
   stepFeatures:
     0: 45
     1: 92
-    2: 60
+    2: 61
     3: 36
     4: 5
 HLT_e60_lhmedium_L1EM22VHI:
@@ -1059,7 +1009,7 @@ HLT_e60_lhmedium_L1EM22VHI:
   stepFeatures:
     0: 2
     1: 2
-    2: 4
+    2: 2
     3: 2
     4: 2
 HLT_e60_lhmedium_nod0_L1EM22VHI:
@@ -1073,7 +1023,7 @@ HLT_e60_lhmedium_nod0_L1EM22VHI:
   stepFeatures:
     0: 2
     1: 2
-    2: 4
+    2: 2
     3: 2
     4: 2
 HLT_e7_etcut_L1EM3:
@@ -1103,7 +1053,7 @@ HLT_e7_lhmedium_mu24_L1MU20:
   stepFeatures:
     0: 18
     1: 17
-    2: 17
+    2: 15
     3: 14
     4: 4
     5: 4
@@ -1135,7 +1085,7 @@ HLT_g12_loose_LArPEB_L1EM10VH:
   stepFeatures:
     0: 11
     1: 11
-    2: 24
+    2: 22
     3: 6
     4: 6
 HLT_g140_etcut_L1EM22VHI:
@@ -1154,7 +1104,7 @@ HLT_g20_loose_L1EM15VH:
   stepFeatures:
     0: 9
     1: 9
-    2: 17
+    2: 15
     3: 6
 HLT_g20_loose_L1EM15VHI:
   eventCount: 5
@@ -1166,7 +1116,7 @@ HLT_g20_loose_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_loose_LArPEB_L1EM15:
   eventCount: 6
@@ -1179,7 +1129,7 @@ HLT_g20_loose_LArPEB_L1EM15:
   stepFeatures:
     0: 9
     1: 9
-    2: 17
+    2: 15
     3: 6
     4: 6
 HLT_g20_medium_L1EM15VH:
@@ -1192,7 +1142,7 @@ HLT_g20_medium_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 6
 HLT_g20_medium_L1EM15VHI:
   eventCount: 5
@@ -1204,7 +1154,7 @@ HLT_g20_medium_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_L1EM15VH:
   eventCount: 5
@@ -1216,7 +1166,7 @@ HLT_g20_tight_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 5
 HLT_g20_tight_L1EM15VHI:
   eventCount: 5
@@ -1228,7 +1178,7 @@ HLT_g20_tight_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_icaloloose_L1EM15VH:
   eventCount: 5
@@ -1240,7 +1190,7 @@ HLT_g20_tight_icaloloose_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 5
 HLT_g20_tight_icaloloose_L1EM15VHI:
   eventCount: 5
@@ -1252,7 +1202,7 @@ HLT_g20_tight_icaloloose_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_icalomedium_L1EM15VH:
   eventCount: 5
@@ -1264,7 +1214,7 @@ HLT_g20_tight_icalomedium_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 5
 HLT_g20_tight_icalomedium_L1EM15VHI:
   eventCount: 5
@@ -1276,7 +1226,7 @@ HLT_g20_tight_icalomedium_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_icalotight_L1EM15VH:
   eventCount: 0
@@ -1287,7 +1237,7 @@ HLT_g20_tight_icalotight_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
 HLT_g20_tight_icalotight_L1EM15VHI:
   eventCount: 0
   stepCounts:
@@ -1297,7 +1247,7 @@ HLT_g20_tight_icalotight_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
 HLT_g22_tight_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -1308,7 +1258,7 @@ HLT_g22_tight_L1EM15VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 12
+    2: 11
     3: 5
 HLT_g25_etcut_L1EM20VH:
   eventCount: 7
@@ -1330,7 +1280,7 @@ HLT_g25_loose_L1EM20VH:
   stepFeatures:
     0: 9
     1: 9
-    2: 17
+    2: 15
     3: 7
 HLT_g25_medium_L1EM20VH:
   eventCount: 6
@@ -1342,7 +1292,7 @@ HLT_g25_medium_L1EM20VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 12
+    2: 11
     3: 6
 HLT_g25_medium_mu24_ivarmedium_L1MU20:
   eventCount: 0
@@ -1358,7 +1308,7 @@ HLT_g25_medium_mu24_ivarmedium_L1MU20:
   stepFeatures:
     0: 4
     1: 4
-    2: 6
+    2: 4
     3: 4
     4: 4
     5: 2
@@ -1374,7 +1324,7 @@ HLT_g25_tight_L1EM20VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 12
+    2: 11
     3: 5
 HLT_g300_etcut_L1EM22VHI:
   eventCount: 0
@@ -1392,7 +1342,7 @@ HLT_g35_loose_mu18_L1EM24VHI:
   stepFeatures:
     0: 4
     1: 4
-    2: 6
+    2: 4
     3: 4
     4: 4
     5: 2
@@ -1409,7 +1359,7 @@ HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
   stepFeatures:
     0: 10
     1: 10
-    2: 13
+    2: 11
 HLT_g3_loose_LArPEB_L1EM3:
   eventCount: 9
   stepCounts:
@@ -1435,7 +1385,7 @@ HLT_g40_loose_LArPEB_L1EM20VHI:
   stepFeatures:
     0: 5
     1: 5
-    2: 10
+    2: 8
     3: 5
     4: 5
 HLT_g5_etcut_L1EM3:
@@ -1458,7 +1408,7 @@ HLT_g5_loose_L1EM3:
   stepFeatures:
     0: 56
     1: 56
-    2: 103
+    2: 101
     3: 14
 HLT_g5_medium_L1EM3:
   eventCount: 9
@@ -1470,7 +1420,7 @@ HLT_g5_medium_L1EM3:
   stepFeatures:
     0: 48
     1: 48
-    2: 81
+    2: 83
     3: 12
 HLT_g5_tight_L1EM3:
   eventCount: 8
@@ -1482,7 +1432,7 @@ HLT_g5_tight_L1EM3:
   stepFeatures:
     0: 45
     1: 45
-    2: 73
+    2: 76
     3: 8
 HLT_g60_loose_LArPEB_L1EM20VHI:
   eventCount: 3
@@ -1495,7 +1445,7 @@ HLT_g60_loose_LArPEB_L1EM20VHI:
   stepFeatures:
     0: 3
     1: 3
-    2: 7
+    2: 5
     3: 3
     4: 3
 HLT_g80_loose_LArPEB_L1EM20VHI:
-- 
GitLab


From 73fa119723454d0ace6afbed9e7361013e0decb0 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Wed, 16 Dec 2020 17:56:33 +0100
Subject: [PATCH 049/308] TrigAnalysisTest: Fix input flag setting in
 corner-case legacy tests

---
 .../TrigAnalysisTest/share/testAthenaTrigAOD_TrigDecTool.py   | 4 ++--
 .../share/testAthenaTrigAOD_TrigEDMAuxCheck.py                | 4 ++--
 .../TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigDecTool.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigDecTool.py
index 33271117c613..cd706e30fbdf 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigDecTool.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigDecTool.py
@@ -52,8 +52,8 @@ if not ('fileList' in dir()) and not ('RunningRTT' in dir()):
 #added for RTT-chainstore conmpatibility
 if not ('RunningRTT' in dir()):
     acf.FilesInput=fileList
-    ConfigFlags.Input.Files = acf.FilesInput()
-#acf.FilesInput=fileList
+
+ConfigFlags.Input.Files = acf.FilesInput() or acf.PoolAODInput()
 
 ###############################
 
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMAuxCheck.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMAuxCheck.py
index 543a0f5d4964..6843a6bd7ce7 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMAuxCheck.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMAuxCheck.py
@@ -55,8 +55,8 @@ if not ('fileList' in dir()) and not ('RunningRTT' in dir()):
 #added for RTT-chainstore conmpatibility
 if not ('RunningRTT' in dir()):
     acf.FilesInput=fileList
-    ConfigFlags.Input.Files = acf.FilesInput()
-#acf.FilesInput=fileList
+
+ConfigFlags.Input.Files = acf.FilesInput() or acf.PoolAODInput()
 
 
 
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
index 99ab925addcc..31f6dbf9cb14 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
@@ -55,8 +55,8 @@ if not ('fileList' in dir()) and not ('RunningRTT' in dir()):
 #added for RTT-chainstore conmpatibility
 if not ('RunningRTT' in dir()):
     acf.FilesInput=fileList
-    ConfigFlags.Input.Files = acf.FilesInput()
-#acf.FilesInput=fileList
+
+ConfigFlags.Input.Files = acf.FilesInput() or acf.PoolAODInput()
 
 
 
-- 
GitLab


From d6e6eb3a4ddb787928cb170f23149abf32edf821 Mon Sep 17 00:00:00 2001
From: David Shope <david.richard.shope@cern.ch>
Date: Wed, 16 Dec 2020 18:29:46 +0100
Subject: [PATCH 050/308] Also add off-diagonal elements for now to track smart
 slimming

---
 .../python/InDetTrackParticlesCPContent.py                      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
index 55b9bc2b90e4..88c71f05efcb 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
@@ -2,5 +2,5 @@
 
 InDetTrackParticlesCPContent = [
 "InDetTrackParticles",
-"InDetTrackParticlesAux.phi.theta.qOverP.chiSquared.numberDoF.numberOfInnermostPixelLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors.definingParametersCovMatrixDiag"
+"InDetTrackParticlesAux.phi.theta.qOverP.chiSquared.numberDoF.numberOfInnermostPixelLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag"
 ]
-- 
GitLab


From f952e7eeda780106d8928b8816e8850cd62fd749 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Wed, 16 Dec 2020 18:36:39 +0100
Subject: [PATCH 051/308] use correct transform for initializating ITk
 parameters

---
 .../src/SolidStateDetectorElementBase.cxx        | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx b/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx
index 33e37600e2e2..144bf769ab86 100644
--- a/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx
+++ b/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx
@@ -368,31 +368,33 @@ using Trk::distDepth;
     
     // use aligned transform if available
     const GeoTrf::Transform3D* ptrXf;
-    
+    GeoTrf::Transform3D geotrf;
+
     if (m_geoAlignStore){ 
       ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom());
       if (ptrXf) {
-	m_transformHit = (*ptrXf) * m_design->SiHitToGeoModel();
+	m_transformHit = (*ptrXf) * m_design->SiHitToGeoModel(); //need .linear()?
+	geotrf = (*ptrXf);
       }
     }
     else{
-      m_transformHit  = (getMaterialGeom()->getAbsoluteTransform() * m_design->SiHitToGeoModel());
+      m_transformHit  = (getMaterialGeom()->getAbsoluteTransform() * m_design->SiHitToGeoModel()); //need .linear()?
+      geotrf = getMaterialGeom()->getAbsoluteTransform();
     }
     
-    const GeoTrf::Transform3D& geoTransform = m_transformHit;
-
+    const GeoTrf::Transform3D& geoTransform = geotrf;
     m_baseCacheValid = true;
     
     bool firstTimeBaseTmp = m_firstTimeBase;
     m_firstTimeBase = false;
     
-    m_center = geoTransform * m_design->sensorCenter();
+    m_center = geoTransform.linear() * m_design->sensorCenter();
     
     //Is this needed outside e.g. ReadSiDetElements? Maybe candidate for future removal?
     m_centerCLHEP = HepGeom::Point3D<double>(m_center[0],m_center[1],m_center[2]);
 
     Amg::Vector3D centerGeoModel(0., 0., 0.);
-    m_origin = geoTransform * centerGeoModel;
+    m_origin = geoTransform.linear() * centerGeoModel;
    
     //
     // Determine directions depth, eta and phi axis in reconstruction local frame
-- 
GitLab


From 434a5b6ea739059ccb26c2cf33922127c7f787f6 Mon Sep 17 00:00:00 2001
From: Peter van Gemmeren <gemmeren@anl.gov>
Date: Wed, 16 Dec 2020 15:42:31 -0600
Subject: [PATCH 052/308] Make SharedReader configurable in StandAlone mode,
 outside AthenaMP.

---
 Control/AthenaKernel/AthenaKernel/IDataShare.h    |  2 +-
 .../AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h          |  2 +-
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx     | 15 +++++++++++++--
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h       |  4 ++--
 .../test/T_AthenaPoolAuxContainerCnv_test.cxx     |  2 +-
 .../test/T_AthenaPoolTPCnvCnv_test.cxx            |  2 +-
 .../test/T_AthenaPoolViewVectorCnv_test.cxx       |  2 +-
 .../test/T_AthenaPoolxAODCnv_test.cxx             |  2 +-
 .../AthenaPoolCnvSvc/test/TestCnvSvcBase.icc      |  2 +-
 .../src/EventSelectorAthenaPool.cxx               | 14 ++++++++++++++
 .../src/EventSelectorAthenaPool.h                 |  2 ++
 11 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/Control/AthenaKernel/AthenaKernel/IDataShare.h b/Control/AthenaKernel/AthenaKernel/IDataShare.h
index d3921bccf338..81c244bdd7d4 100644
--- a/Control/AthenaKernel/AthenaKernel/IDataShare.h
+++ b/Control/AthenaKernel/AthenaKernel/IDataShare.h
@@ -49,7 +49,7 @@ public:
   /**
    * @brief Read the data
    */
-  virtual StatusCode readData() const = 0;
+  virtual StatusCode readData() = 0;
 };
 
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h
index 99284d0f0030..3ba23ed77023 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h
@@ -54,7 +54,7 @@ public:
 
    /// @param obj [OUT] pointer to the Data Object.
    /// @param token [IN] string token of the Data Object for which a Pool Ref is filled.
-   virtual void setObjPtr(void*& obj, const Token* token) const = 0;
+   virtual void setObjPtr(void*& obj, const Token* token) = 0;
 
    /// @return a boolean for using detailed time and size statistics.
    virtual bool useDetailChronoStat() const = 0;
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index 6ee02a6d0517..51518beb0b8e 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -846,11 +846,16 @@ Token* AthenaPoolCnvSvc::registerForWrite(Placement* placement, const void* obj,
    return(token);
 }
 //______________________________________________________________________________
-void AthenaPoolCnvSvc::setObjPtr(void*& obj, const Token* token) const {
+void AthenaPoolCnvSvc::setObjPtr(void*& obj, const Token* token) {
    ATH_MSG_VERBOSE("Requesting object for: " << token->toString());
    if (m_doChronoStat) {
       m_chronoStatSvc->chronoStart("cObjR_ALL");
    }
+   if (m_makeStreamingToolClient.value() > 0 && !m_inputStreamingTool.empty() && !m_inputStreamingTool->isServer() && !m_inputStreamingTool->isClient()) {
+      if (!makeClient(-m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+      }
+   }
    if (!m_outputStreamingTool.empty() && m_streamServer < m_outputStreamingTool.size()
 		   && m_outputStreamingTool[m_streamServer]->isServer()) {
       if (token->dbID() == Guid::null()) {
@@ -940,6 +945,12 @@ StatusCode AthenaPoolCnvSvc::createAddress(long svcType,
       ATH_MSG_ERROR("createAddress: svcType != POOL_StorageType " << svcType << " " << POOL_StorageType);
       return(StatusCode::FAILURE);
    }
+   if (m_makeStreamingToolClient.value() > 0 && !m_inputStreamingTool.empty() && !m_inputStreamingTool->isServer() && !m_inputStreamingTool->isClient()) {
+      if (!makeClient(-m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+         return(StatusCode::FAILURE);
+      }
+   }
    Token* token = nullptr;
    if (par[0].substr(0, 3) == "SHM") {
       token = new Token();
@@ -1103,7 +1114,7 @@ StatusCode AthenaPoolCnvSvc::makeClient(int num) {
    return(m_inputStreamingTool->makeClient(num));
 }
 //________________________________________________________________________________
-StatusCode AthenaPoolCnvSvc::readData() const {
+StatusCode AthenaPoolCnvSvc::readData() {
    if (m_inputStreamingTool.empty()) {
       return(StatusCode::FAILURE);
    }
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
index 630766b5b972..ff4e651dddae 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
@@ -99,7 +99,7 @@ public:
 
    /// @param obj [OUT] pointer to the Data Object.
    /// @param token [IN] string token of the Data Object for which a Pool Ref is filled.
-   void setObjPtr(void*& obj, const Token* token) const;
+   void setObjPtr(void*& obj, const Token* token);
 
    /// @return a boolean for using detailed time and size statistics.
    bool useDetailChronoStat() const;
@@ -152,7 +152,7 @@ public:
    virtual StatusCode makeClient(int num);
 
    /// Read the next data object
-   virtual StatusCode readData() const;
+   virtual StatusCode readData();
 
    /// Send abort to SharedWriter clients if the server quits on error
    /// @param client_n [IN] number of the current client, -1 if no current
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx
index ff8d44c2bd68..c82597113a1b 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx
@@ -49,7 +49,7 @@ public:
       m_pers2 (nullptr)
   {}
 
-  virtual void setObjPtr(void*& obj, const Token* /*token*/) const override
+  virtual void setObjPtr(void*& obj, const Token* /*token*/) override
   {
     if (m_pers2) {
       obj = new YAuxCont_v2 (*m_pers2);
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx
index ac964f1fb8fe..a75b13c22154 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx
@@ -44,7 +44,7 @@ public:
       m_pers2 (nullptr)
   {}
 
-  virtual void setObjPtr(void*& obj, const Token* /*token*/) const override
+  virtual void setObjPtr(void*& obj, const Token* /*token*/) override
   {
     if (m_pers2) {
       obj = new XCont_p2 (*m_pers2);
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx
index 03d9e4417129..ba57e7647d90 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx
@@ -100,7 +100,7 @@ public:
       m_pers_old (nullptr)
   {}
 
-  virtual void setObjPtr(void*& obj, const Token* token) const override
+  virtual void setObjPtr(void*& obj, const Token* token) override
   {
     if (m_pers) {
       auto vvb = new ViewVector<DataVector<Y_v2> > (*m_pers);
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx
index 8c85da607c8a..ad32a48ed695 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx
@@ -47,7 +47,7 @@ public:
       m_pers2 (nullptr)
   {}
 
-  virtual void setObjPtr(void*& obj, const Token* /*token*/) const override
+  virtual void setObjPtr(void*& obj, const Token* /*token*/) override
   {
     if (m_pers2) {
       DataVector<Y_v2>* v = new DataVector<Y_v2>;
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TestCnvSvcBase.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TestCnvSvcBase.icc
index 8b9cdf0739a9..6a820b1c01c7 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TestCnvSvcBase.icc
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TestCnvSvcBase.icc
@@ -105,7 +105,7 @@ public:
   { std::abort(); }
   virtual StatusCode connectOutput(const std::string& /*outputFile*/) override
   { std::abort(); }
-  virtual StatusCode readData() const override
+  virtual StatusCode readData() override
   { std::abort(); }
   virtual const std::string& name() const override
   { return m_name; }
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx
index 03ea3fae542c..1496c4d919f4 100644
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.cxx
@@ -166,6 +166,11 @@ StatusCode EventSelectorAthenaPool::initialize() {
    if (!m_eventStreamingTool.empty() && !m_eventStreamingTool.retrieve().isSuccess()) {
       ATH_MSG_FATAL("Cannot get " << m_eventStreamingTool.typeAndName() << "");
       return(StatusCode::FAILURE);
+   } else if (m_makeStreamingToolClient.value() == -1) {
+      if (!m_eventStreamingTool->makeClient(m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+         return(StatusCode::FAILURE);
+      }
    }
 
    // Ensure the xAODCnvSvc is listed in the EventPersistencySvc
@@ -478,6 +483,15 @@ StatusCode EventSelectorAthenaPool::createContext(IEvtSelector::Context*& ctxt)
 StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const {
    std::lock_guard<CallMutex> lockGuard(m_callLock);
    if (!m_eventStreamingTool.empty() && m_eventStreamingTool->isClient()) {
+      if (m_makeStreamingToolClient.value() == -1) {
+         StatusCode sc = m_eventStreamingTool->lockEvent(m_evtCount);
+         while (sc.isRecoverable()) {
+            usleep(1000);
+            sc = m_eventStreamingTool->lockEvent(m_evtCount);
+         }
+      }
+      // Increase event count
+      ++m_evtCount;
       void* tokenStr = nullptr;
       unsigned int status = 0;
       if (!m_eventStreamingTool->getLockedEvent(&tokenStr, status).isSuccess()) {
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h
index b04379fd2cc3..6f340f063b12 100644
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/EventSelectorAthenaPool.h
@@ -209,6 +209,8 @@ private: // properties
    ToolHandleArray<IAthenaSelectorTool> m_helperTools{this};
    ToolHandle<IAthenaSelectorTool> m_counterTool{this, "CounterTool", "", ""};
    ToolHandle<IAthenaIPCTool> m_eventStreamingTool{this, "SharedMemoryTool", "", ""};
+   /// Make this instance a Streaming Client during first iteration automatically
+   IntegerProperty m_makeStreamingToolClient{this,"MakeStreamingToolClient",0};
 
    /// The following are included for compatibility with McEventSelector and are not really used.
    /// However runNo, oldRunNo and overrideRunNumberFromInput are used to reset run number for
-- 
GitLab


From ee321b6ba31e1a12665a8bf52665df2316356c37 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Dec 2020 23:03:17 +0100
Subject: [PATCH 053/308] Speed up the primary vertex analysis for the ID
 Trigger validation

We run two vertex analyses - one in the standard offline processing,
and another with a primary vertex selection. This second processing
would previously also re-run all the other ttbar based analyses.

In the ttbar jobs, these take some considreable time, and are not needed,
as they have already been run in the standard job.

This adds a preprocessor macros to skip the confguration of the non-vertex
analysis chain for the primary vertex analysis
---
 .../TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat    | 6 +++++-
 .../share/TIDAdata-run3-offline-vtx.dat                     | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
index 920650f2d464..8e7fca7ed157 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
@@ -5,6 +5,7 @@ testChains = {
     //  "Electrons",
     //  "Truth",
 
+#ifndef VTXANALYSIS
 
     "HLT_mu6_idperf_L1MU6:HLT_IDTrack_Muon_FTF:HLT_Roi_L2SAMuon",
     "HLT_mu6_idperf_L1MU6:HLT_IDTrack_Muon_IDTrig:HLT_Roi_L2SAMuonForEF",
@@ -34,11 +35,14 @@ testChains = {
 
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF",
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig",
+
+    "HLT_mb_sptrk_L1RD0_FILLED:HLT_IDTrack_MinBias_FTF",
+
+#endif
     
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS:post:rvtx=HLT_IDVertex_FS",
     "HLT_j45_ftf_subjesgscIS_boffperf_split_L1J20:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS:post:rvtx=HLT_IDVertex_FS",
     "HLT_j45_ftf_L1J15:HLT_IDTrack_FS_FTF:HLT_FSRoI:HLT_IDVertex_FS:post:rvtx=HLT_IDVertex_FS",
 
-    "HLT_mb_sptrk_L1RD0_FILLED:HLT_IDTrack_MinBias_FTF",
 
 }; 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-vtx.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-vtx.dat
index d644001651d9..43364ed2fca9 100755
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-vtx.dat
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-vtx.dat
@@ -15,6 +15,8 @@ refChain = "Offline";
 //refChain = "Taus";
 
 
+#define VTXANALYSIS
+
 MinVertices = 0;
 
 
-- 
GitLab


From 2e5112344cec2cef02d738cb130892756b9c9b50 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 15 Dec 2020 23:02:17 +0100
Subject: [PATCH 054/308] MuonTrackSteeringTools: Fix dangling refs in
 MuPatCandidateTool.

In MuPatCandidateTool, if we wait until the destructor to free the final
set of garbage, then the garbage may contain pointers to Surface instances
that have already been deleted.  Fix by cleaning all garbage
during finalize().

See ATLASRECTS-5715.
---
 .../MuonTrackSteeringTools/src/MuPatCandidateTool.cxx      | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
index 086c1b5be455..4bf8325d4afe 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
@@ -58,6 +58,13 @@ namespace Muon {
   }
 
   StatusCode MuPatCandidateTool::finalize() {
+
+    // Clean up all garbage now.
+    // If we leave it for the dtor, we may end up with dangling references
+    // to Surface objects that have already been deleted.
+    for (CacheEntry& ent : m_cache) {
+      ent.cleanUp();
+    }
     return StatusCode::SUCCESS;
   }
 
-- 
GitLab


From dd3955a2f4896614c8cde2c316dce9070475a603 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 00:29:09 +0100
Subject: [PATCH 055/308] IOVSvc: Fix memory leak.

Accidently write release() instead of reset() for a unique_ptr,
so the object was being leaked.

See ATEAM-601.
-- 
GitLab


From d48cd2c0e9efa974bfe85c361488702e66546c7f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 16:21:40 -0500
Subject: [PATCH 056/308] DCMathSegmentMaker: Fix compilation with gcc11.

Can't use a full template-id as a ctor name with c++20.
---
 .../DCMathSegmentMaker/src/DCMathSegmentMaker.cxx             | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx
index 37f2995317c4..f00a3da604d2 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/DCMathSegmentMaker.cxx
@@ -1821,8 +1821,8 @@ struct IdDataVec {
     typedef std::vector<Entry>          EntryVec;
     typedef typename EntryVec::iterator EntryIt;
 
-    IdDataVec<T>() {}
-    IdDataVec<T>(const Identifier& i) : id(i) {}
+    IdDataVec() {}
+    IdDataVec(const Identifier& i) : id(i) {}
 
     Identifier id;
     EntryVec   data;
-- 
GitLab


From c0d8a19ce9d383be83f75b34bc8be7ecd0becdde Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Thu, 17 Dec 2020 01:08:30 +0100
Subject: [PATCH 057/308] update

---
 .../src/PixelSiLorentzAngleCondAlg.cxx                 |  3 ++-
 .../PixelDigitization/src/SensorSimPlanarTool.cxx      | 10 ++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index e3fd0bba45b2..7ceaf1edc5ea 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -145,7 +145,8 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     int barrel_ec   = pixelId->barrel_ec(element->identify());
     int layerIndex  = pixelId->layer_disk(element->identify());
 
-    double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
+//STSTST    double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
+    double LACorr = 1.0;
 
     if (not p_design){
       ATH_MSG_FATAL("Dynamic cast to PixelModuleDesign* failed in PixelSiLorentzAngleCondAlg::execute");
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
index da8ac64821e5..0e410735e509 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
@@ -210,6 +210,8 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
   const EBC_EVCOLL evColl = EBC_MAINEVCOLL;
   const HepMcParticleLink::PositionFlag idxFlag = (phit.eventId()==0) ? HepMcParticleLink::IS_POSITION: HepMcParticleLink::IS_INDEX;
 
+  std::cout << "STSTST SensorSimPlanarTool OK1 " << std::endl;
+
   //**************************************//
   //*** Now diffuse charges to surface *** //
   //**************************************//
@@ -249,6 +251,8 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
     int numBins_weightingPotential_y = 0;
     int numBins_weightingPotential_z = 0;
 
+    std::cout << "STSTST SensorSimPlanarTool OK2 " << m_doRadDamage << " " << !(Module.isDBM()) << " " << Module.isBarrel() << std::endl;
+
     if (m_doRadDamage && !(Module.isDBM()) && Module.isBarrel()) {
       centreOfPixel_i = p_design.positionFromColumnRow(pixel_i.etaIndex(), pixel_i.phiIndex());
 
@@ -263,6 +267,8 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
       nnLoop_pixelPhiMax = std::min( 2,pixel_i.phiIndex() );
       nnLoop_pixelPhiMin = std::max( -2, pixel_i.phiIndex() + 1 - phiCells );
 
+      std::cout << "STSTST SensorSimPlanarTool OK3 " << std::endl;
+
       //Setup values to check for overflow when using maps
       if (m_doInterpolateEfield) {
         numBins_driftTime_e = m_distanceMap_e[layer]->GetNbinsY(); //Returns nBins = totalBins - underflow - overflow 
@@ -272,14 +278,18 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
         numBins_weightingPotential_z = m_ramoPotentialMap[layer]->GetNbinsZ();        
       }
       else { // use fluence value from conditions data
+        std::cout << "STSTST SensorSimPlanarTool OK4 " << layer << std::endl;
         numBins_driftTime_e = moduleData->getDistanceMap_e(layer)->GetNbinsY();
         numBins_driftTime_h = moduleData->getDistanceMap_h(layer)->GetNbinsY();   
         numBins_weightingPotential_x = moduleData->getRamoPotentialMap(layer)->GetNbinsX();
         numBins_weightingPotential_y = moduleData->getRamoPotentialMap(layer)->GetNbinsY();
         numBins_weightingPotential_z = moduleData->getRamoPotentialMap(layer)->GetNbinsZ();        
+        std::cout << "STSTST SensorSimPlanarTool OK5 " << std::endl;
       }
     }
 
+    std::cout << "STSTST SensorSimPlanarTool OK6 " << std::endl;
+
     // Distance between charge and readout side.  p_design->readoutSide() is
     // +1 if readout side is in +ve depth axis direction and visa-versa.
     double dist_electrode = 0.5 * sensorThickness - Module.design().readoutSide() * depth_i;
-- 
GitLab


From 9ed0b35f16eaad10a7d90bdb51bdd87d48fe5cdf Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 20:38:41 -0500
Subject: [PATCH 058/308] TrkV0Fitter: Fix gcc11 warnings.

Make sure Eigen objects are initialized.
Fixes uninitialized variable warnings from gcc.
---
 Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx b/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx
index b32151c3f1fa..57022185558d 100755
--- a/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx
+++ b/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx
@@ -111,6 +111,7 @@ namespace Trk
   xAOD::Vertex * TrkV0VertexFitter::fit(const std::vector<const xAOD::TrackParticle*>& vectorTrk) const
   {
     Amg::Vector3D tmpVtx;
+    tmpVtx.setZero();
     return fit(vectorTrk, tmpVtx);
   }
 
@@ -205,6 +206,7 @@ namespace Trk
   xAOD::Vertex * TrkV0VertexFitter::fit(const std::vector<const Trk::TrackParameters*>& originalPerigees) const
   {
     Amg::Vector3D tmpVtx;
+    tmpVtx.setZero();
     return fit(originalPerigees, tmpVtx);
   }
 
-- 
GitLab


From 1842c8d2af50a3d543c2d803573ccd09638a7d84 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 16:33:03 -0500
Subject: [PATCH 059/308] MuonTrackFinderTools: Fix gcc11 warning.

Fix potential null pointer dereference.
---
 .../MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx
index 7679206d8f0a..23da18bc16c7 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonErrorOptimisationTool.cxx
@@ -152,7 +152,8 @@ namespace Muon {
           }else{
             Trk::TrackSummary tmpSum(*summary0);
             m_trackSummaryTool->addDetailedTrackSummary(*track,tmpSum);
-            if( tmpSum.muonTrackSummary() ) nhits0 = muonSummary0->netaHits()+ muonSummary0->nphiHits();
+            muonSummary0 = tmpSum.muonTrackSummary();
+            if( muonSummary0 ) nhits0 = muonSummary0->netaHits()+ muonSummary0->nphiHits();
           }
         }else{
           Trk::TrackSummary tmpSummary;
-- 
GitLab


From 235ecb785c88285e305f80244bbf9daa9f265b7c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 16:51:03 -0500
Subject: [PATCH 060/308] ReweightUtils: Fix gcc11 warnings.

Check result of dynamic_cast before dereferencing.
---
 .../test/ut_ParticleScaleFactorTool_test.cxx              | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/ReweightUtils/test/ut_ParticleScaleFactorTool_test.cxx b/PhysicsAnalysis/AnalysisCommon/ReweightUtils/test/ut_ParticleScaleFactorTool_test.cxx
index 8baaaa0a3909..afdc3a4debb0 100644
--- a/PhysicsAnalysis/AnalysisCommon/ReweightUtils/test/ut_ParticleScaleFactorTool_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ReweightUtils/test/ut_ParticleScaleFactorTool_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -115,12 +115,14 @@ int main() {
 
    CP::SystematicSet s; s.insert(CP::SystematicVariation("mySyst",1));
 
-   dynamic_cast<CP::ISystematicsTool*>(&*myTool4)->applySystematicVariation(s).ignore();
+   auto isyst4 = dynamic_cast<CP::ISystematicsTool*>(&*myTool4);
+   if (!isyst4) std::abort();
+   isyst4->applySystematicVariation(s).ignore();
    std::cout << myTool4->evaluate(e) << std::endl; //should print 5.0
 
    s.clear(); s.insert(CP::SystematicVariation("mySyst",-1));
 
-   dynamic_cast<CP::ISystematicsTool*>(&*myTool4)->applySystematicVariation(s).ignore();
+   isyst4->applySystematicVariation(s).ignore();
    std::cout << myTool4->evaluate(e) << std::endl; //should print 1.0
 
    return 0; //zero = success
-- 
GitLab


From 94805f626778766242d460db802e85bb818d69da Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 16:59:15 -0500
Subject: [PATCH 061/308] METUtilities: Fix gcc11 warning.

Check result of dynamic_cast before dereferencing.
---
 Reconstruction/MET/METUtilities/Root/METSignificance.cxx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/MET/METUtilities/Root/METSignificance.cxx b/Reconstruction/MET/METUtilities/Root/METSignificance.cxx
index e1a0fce43ebc..21e5558d7517 100644
--- a/Reconstruction/MET/METUtilities/Root/METSignificance.cxx
+++ b/Reconstruction/MET/METUtilities/Root/METSignificance.cxx
@@ -562,7 +562,9 @@ namespace met {
     }
     else{
       const xAOD::TauJet* tau(static_cast<const xAOD::TauJet*>(obj));
-      pt_reso = dynamic_cast<CombinedP4FromRecoTaus*>(m_tCombinedP4FromRecoTaus.get())->getCaloResolution(*tau);
+      if (auto combp4 = dynamic_cast<CombinedP4FromRecoTaus*>(m_tCombinedP4FromRecoTaus.get())) {
+        pt_reso = combp4->getCaloResolution(*tau);
+      }
       
       if(m_doPhiReso) phi_reso = tau->pt()*0.01;
       ATH_MSG_VERBOSE("tau: " << pt_reso << " " << tau->pt() << " " << tau->p4().Eta() << " " << tau->p4().Phi() << " phi reso: " << phi_reso);
-- 
GitLab


From d7e6d89f64c3bc6c5729ddde455aa1cdc1e045ac Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 22:45:31 -0500
Subject: [PATCH 062/308] CxxUtils: Add ConcurrentHashMapImpl.

A int->int hash map, allowing for concurrent lockless reads.
This is not meant to be used directly, but more user-oriented
classes may be built on top of it.
---
 Control/CxxUtils/CMakeLists.txt               |   3 +-
 .../CxxUtils/CxxUtils/ConcurrentHashmapImpl.h | 573 ++++++++++++++
 .../CxxUtils/ConcurrentHashmapImpl.icc        | 725 ++++++++++++++++++
 .../share/ConcurrentHashmapImpl_test.ref      |   5 +
 .../test/ConcurrentHashmapImpl_test.cxx       | 571 ++++++++++++++
 5 files changed, 1876 insertions(+), 1 deletion(-)
 create mode 100644 Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h
 create mode 100644 Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc
 create mode 100644 Control/CxxUtils/share/ConcurrentHashmapImpl_test.ref
 create mode 100644 Control/CxxUtils/test/ConcurrentHashmapImpl_test.cxx

diff --git a/Control/CxxUtils/CMakeLists.txt b/Control/CxxUtils/CMakeLists.txt
index bf26f6102a71..f4f725e30015 100644
--- a/Control/CxxUtils/CMakeLists.txt
+++ b/Control/CxxUtils/CMakeLists.txt
@@ -118,7 +118,8 @@ foreach( test sincos_test ArrayScanner_test Arrayrep_test
       atomic_fetch_minmax_test
       MurmurHash2_test bitmask_test crc64_test Ring_test
       restrict_test vectorize_test get_unaligned_test aligned_vector_test
-      vec_int_test vec_float_test vec_fb_int_test vec_fb_float_test)
+      vec_int_test vec_float_test vec_fb_int_test vec_fb_float_test
+      ConcurrentHashmapImpl_test )
    atlas_add_test( ${test}
       SOURCES test/${test}.cxx
       LOG_IGNORE_PATTERN "no version information available"
diff --git a/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h
new file mode 100644
index 000000000000..8f6daf8beb11
--- /dev/null
+++ b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h
@@ -0,0 +1,573 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/ConcurrentHashmapImpl.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Hash table allowing concurrent, lockless reads.
+ */
+
+
+
+#ifndef CXXUTILS_CONCURRENTHASHMAPIMPL_H
+#define CXXUTILS_CONCURRENTHASHMAPIMPL_H
+
+
+#include "CxxUtils/bitscan.h"
+#include "CxxUtils/atomic_fetch_minmax.h"
+#include <functional>
+#include <cstdint>
+#include <cstdlib>
+#include <atomic>
+#include <mutex>
+#include <memory>
+#include <new>
+
+
+class ConcurrentHashmapImplTest;
+
+
+namespace CxxUtils {
+namespace detail {
+
+
+/// Type used for keys and values --- an unsigned big enough to hold a pointer.
+/// Need to have this defined outside of ConcurrentHashmapImpl itself
+/// in order to avoid instantiation circularities, as the HASHER and MATCHER
+/// classes will probably want to use it.
+using ConcurrentHashmapVal_t = uintptr_t;
+
+
+/**
+ * @brief Helper to generate hash probes.
+ *
+ * To search for an entry with hash code @c hash in the table pointed
+ * at by @c entries:
+ *@code
+ *  CHMTableInterator<ENTRIES_PER_CACHELINE> it (hash, mask, maskBits, probleLimit);
+ *  do {
+ *    entry_t* ent = entries + it.offset();
+ *    <<test if ent is the desired entry and handle if so>>
+ *  } while (it.next());
+ *  // Too many probes --- failed.
+ @endcode
+ *
+ * The template argument is the number of table entries per cache line.
+ * We try to be cache friendly by first searching all entries in a cache line,
+ * then moving to another line.
+ */
+template <unsigned ENTRIES_PER_CACHELINE>
+struct CHMTableIterator
+{
+  /// Mask for the within-cachline part of indices.
+  static  constexpr size_t ENTRIES_PER_CACHELINE_MASK = ENTRIES_PER_CACHELINE-1;
+
+  /**
+   * @brief Constructor.
+   * @param hash The hash of the entry we're looking for.
+   * @param mask Table mask; i.e., the table capacity - 1.
+   * @param maskBits Number of 1 bits in mask.
+   * @param probeLimit Maximum number of probes to try before failing.
+   */
+  CHMTableIterator (size_t hash, size_t mask, size_t maskBits, size_t probeLimit);
+
+
+  /**
+   * @brief Offset of the element currently being probed.
+   */
+  size_t offset() const;
+
+
+  /**
+   * @brief Return the number of probes performed so far.
+   */
+  size_t nprobes() const;
+
+
+  /**
+   * @brief Move to the next probe.
+   * Returns true if we should continue, or false if we've hit the maximum
+   * number of probes.
+   */
+  bool next();
+
+
+private:
+  /// Mask for the table; i.e., capacity-1, but with the low bits
+  /// corresponding to ENTRIES_PER_CACHELINE also masked off.
+  const size_t m_mask;
+  /// Offset of the first entry we probe within its cacheline.
+  const size_t m_boffs;
+  /// Base increment between probes.
+  const size_t m_stride;
+  /// Maximum number of probes to try.
+  const size_t m_probeLimit;
+  /// Index of the start of the cacheline currently being probed.
+  size_t m_bucket;
+  /// Number of probes tried so far.
+  size_t m_nprobes;
+};
+
+
+/**
+ * @brief Hash table allowing concurrent, lockless reads.
+ *
+ * This class implements a simple hash map from uintptr_t to uintptr_t.
+ * This class isn't meant to be used directly; rather, a more user-friendly
+ * interface can be built on top of this.  Although here we deal only
+ * with uintptr_t values, the hash and comparison operations are templated.
+ * This allows for handling more complex types, where the values
+ * stored in the map are pointers to the actual objects.  We support
+ * inserting new items and modifying existing ones, but not deletion.
+ * One value of the key must be reserved to indicate null; no keys with
+ * that value may be inserted.
+ *
+ * There can be only one writer at a time; this is enforced with internal locks.
+ * However, there can be any number of concurrent readers at any time.
+ * The reads are lockless.  So this is appropriate when reads
+ * are much more frequent than writes.
+ *
+ * Template arguments:
+ *  UPDATER - Object used for memory management; see below.
+ *            This has the same requirements as for ConcurrentRangeMap;
+ *            see there for further details.
+ *  HASHER  - Functional to compute a hash value from a key.
+ *            Defaults to std::hash.
+ *  MATCHER - Functional to compare two keys for equality.
+ *            Defaults to std::equal_to.
+ *  NULLVAL - Value of the key to be considered null.
+ *            A key with this value may not be inserted.
+ *
+ * Implementation notes:
+ *  We use open addressing (see, eg, knuth AOCP 6.4), in which the payloads
+ *  are kept in the hash table itself.  We try to be cache friendly
+ *  by probing all entries within a cache line before trying anything
+ *  in a different cache line.  If the table gets full, we make a new, larger,
+ *  instance copying the data from the old one.  The old table instances
+ *  are then given to the Updater object to handle.
+ *
+ *  The implementation here is inspired by the hash maps from ConcurrencyKit
+ *  (http://concurrencykit.org), though the code is all new.
+ */
+template <template <class> class UPDATER,
+          typename HASHER = std::hash<uintptr_t>,
+          typename MATCHER = std::equal_to<uintptr_t>,
+          uintptr_t NULLVAL = 0>
+class ConcurrentHashmapImpl
+{
+public:
+  /// Type used for keys and values --- an unsigned big enough to hold a pointer.
+  using val_t = ConcurrentHashmapVal_t;
+  /// Hash object.
+  using Hasher_t = HASHER;
+  /// Key match object.
+  using Matcher_t = MATCHER;
+  /// Null key value.
+  static constexpr uintptr_t nullval = NULLVAL;
+  /// Used to represent an invalid table index.
+  static constexpr size_t INVALID = static_cast<size_t>(-1);
+
+
+private:
+  /// One entry in the hash table.
+  struct entry_t {
+    std::atomic<val_t> m_key;
+    std::atomic<val_t> m_val;
+  };
+
+  /// Assumed length in bytes of one cache line.
+  static constexpr size_t CACHELINE = 64;
+
+  // Ensure that entries will evenly pack a cache line.
+  // If CACHELINE is a power of two, this implies that sizeof(entry_t)
+  // is as well.
+  static_assert (CACHELINE >= sizeof (entry_t) &&
+                 CACHELINE % sizeof(entry_t) == 0);
+
+  /// Number of entries in one cache line.
+  static constexpr size_t ENTRIES_PER_CACHELINE = CACHELINE / sizeof(entry_t);
+  /// Mask for the cache line part of an index.
+  static constexpr size_t ENTRIES_PER_CACHELINE_MASK = (ENTRIES_PER_CACHELINE-1);
+
+  /// For unit testing.
+  friend class ::ConcurrentHashmapImplTest;
+
+
+  /**
+   * @brief Table of hash entries.
+   *
+   * This is the actual table of hash entries.  It consists of a fixed-size
+   * header, followed by the actual array of entries.  We override new
+   * in order to be able to properly allocate the space for the array.
+   * The start of the array of entries need to be aligned on a cache line.
+   * We make a new instance of this if the table needs to be grown.
+   */
+  class alignas(CACHELINE) Table
+  {
+  public:
+    using TableIterator = CHMTableIterator<ENTRIES_PER_CACHELINE>;
+
+
+    /**
+     * @brief Constructor.
+     * @param capacity Number of entries in the table.  Must be a power of 2.
+     * @param hasher Hash object to use.
+     * @param matcher Key match object to use.
+     */
+    Table (size_t capacity,
+           const HASHER& hasher = HASHER(),
+           const MATCHER& matcher = MATCHER());
+
+
+    /**
+     * @brief Allocator for table objects.
+     * @param capacity Size of the table (must be a power of 2).
+     *
+     * Allocate with enough space for the table of entries.
+     * Also align on a cache line.
+     */
+    static void* operator new (size_t, size_t capacity);
+
+
+    /**
+     * @brief Deallocator for table objects.
+     */
+    void operator delete (void* p);
+
+    
+    /**
+     * @brief Find a table entry for reading.
+     * @param key The key for which to search.
+     * @param hash The hash of the key.
+     *
+     * Returns the matching entry, or nullptr.  xxx
+     */
+    size_t probeRead (val_t key, size_t hash) const;
+
+    
+    /**
+     * @brief Find a table entry for writing.
+     * @param key The key for which to search.
+     * @param hash The hash of the key.
+     * @param entry[out] The entry found.
+     *
+     * If we find the entry, return true with @c entry pointing at it.
+     * If we don't find it, and there's still room in the table, return false
+     * with @c entry pointing at the next empty entry.
+     * Otherwise, return false with @c entry set to nullptr.
+     */
+    size_t probeWrite (val_t key, size_t hash, bool& insert);
+
+
+    /**
+     * @brief The number of entries in the table.
+     */
+    size_t capacity() const;
+
+
+    /**
+     * @brief Return the entry for an offset.
+     * @param offset The index of the desired entry.
+     */
+    const entry_t& entry (size_t offset) const;
+
+
+    /**
+     * @brief Return the entry for an offset (non-const).
+     * @param offset The index of the desired entry.
+     */
+    entry_t& entry (size_t offset);
+
+
+  private:
+    /// Number of entries in the table.  Must be a power of 2.
+    const size_t m_capacity;
+    /// Maximum number of probes allowed before resizing the table.
+    const size_t m_maxProbe;
+    /// Mask for table indices (capacity-1).
+    const size_t m_mask;
+    /// Number of bits in the mask.
+    const size_t m_maskBits;
+    /// The hash object.
+    const HASHER& m_hasher;
+    /// The key match object.
+    const MATCHER& m_matcher;
+    /// Longest probe needed so far.
+    std::atomic<size_t> m_longestProbe;
+    /// The actual table entries.
+    alignas(CACHELINE) entry_t m_entries[1];
+  };
+
+
+public:
+  /// Updater object.
+  using Updater_t = UPDATER<Table>;
+  /// Context type for the updater.
+  using Context_t = typename Updater_t::Context_t;
+
+
+
+  /**
+   * @brief Constructor.
+   * @param updater Object used to manage memory
+   *                (see comments at the start of the class).
+   * @param capacity Minimum initial table size.
+   * @param hasher Hash object to use.
+   * @param matcher Key match object to use.
+   * @param ctx Execution context.
+   */
+  ConcurrentHashmapImpl (Updater_t&& updater,
+                         size_t capacity_in,
+                         const HASHER& hasher,
+                         const MATCHER& matcher,
+                         const typename Updater_t::Context_t& ctx);
+
+
+  // Don't implment copying.
+  // This should be done by derived classes, if desired.
+  ConcurrentHashmapImpl (const ConcurrentHashmapImpl&) = delete;
+  ConcurrentHashmapImpl& operator= (const ConcurrentHashmapImpl&) = delete;
+  
+
+  /**
+   * @brief Return the number of items currently stored.
+   *   (not necessarity synced)
+   */
+  size_t size() const;
+
+
+  /**
+   * @brief Return the current table size.
+   */
+  size_t capacity() const;
+
+
+  /** 
+   * @brief Return the hasher object.
+   */
+  const Hasher_t& hasher() const;
+
+
+  /** 
+   * @brief Return the matcher object.
+   */
+  const Matcher_t& matcher() const;
+
+
+  /**
+   * @brief Bidirectional iterator over occupied table entries.
+   *
+   * This is not itself a compliant STL iterator.
+   * Derived classes are meant to build a user-facing iterator on top of this.
+   */
+  class const_iterator
+  {
+  public:
+    /**
+     * @brief Constructor.
+     * @param table The table instance we're referencing.
+     * @param end If true, initialize this to an end iterator.
+     *            Otherwise, initialize it to a a begin iterator.
+     */
+    const_iterator (const Table& table, bool end);
+
+
+    /**
+     * @brief Constructor.
+     * @param table The table instance we're referencing.
+     * @param offset Offset of the iterator within the table.
+     *               (Must point at an occupied entry.)
+     */
+    const_iterator (const Table& table, size_t offset);
+
+
+    /**
+     * @brief Advance the iterator to the next occupied entry.
+     */
+    void next();
+
+
+    /**
+     * @brief Move the iterator back to the previous occupied entry.
+     */
+    void prev();
+
+
+    /**
+     * @brief Return the key for this iterator.
+     */
+    val_t key() const;
+    
+
+    /**
+     * @brief Return the value for this iterator.
+     */
+    val_t value() const;
+
+
+    /**
+     * @brief Compare two iterators.
+     */
+    bool operator!= (const const_iterator& other) const;
+
+
+    /**
+     * @brief Check that the iterator is valid (not pointing at the end).
+     */
+    bool valid() const;
+    
+    
+  private:
+    /// The table over which we're iterating.
+    const Table& m_table;
+    /// The current position in the table.
+    /// Set to -1 for an end iterator.
+    size_t m_offset;
+  };
+
+
+  /**
+   * @brief Add an entry to the table.
+   * @param key The key to insert.
+   * @param hash The hash of the key.
+   * @param val The value to insert.
+   * @param overwrite If true, then overwrite an existing entry.
+   *                  If false, an existing entry will not be changed.
+   * @param ctx Execution context.
+   *
+   * If the key already exists, then its value will be updated.
+   * Returns an iterator pointing at the entry and a flag which is
+   * true if a new element was added.
+   */
+  std::pair<const_iterator, bool>
+  put (val_t key, size_t hash, val_t val,
+       bool overwrite,
+       const typename Updater_t::Context_t& ctx);
+
+
+  /**
+   * @brief Look up an entry in the table.
+   * @param key The key to find.
+   * @param hash The hash of the key.
+   *
+   * Returns an iterator pointing at the found entry, or end().
+   */
+  const_iterator get (val_t key, size_t hash) const;
+
+
+  /// Two iterators defining a range.
+  using const_iterator_range = std::pair<const_iterator, const_iterator>;
+
+
+  /**
+   * @brief Return a range that can be used to iterate over the container.
+   */
+  const_iterator_range range() const;
+
+
+  /** 
+   * @brief A begin iterator for the container.
+   */
+  const_iterator begin() const;
+
+
+  /** 
+   * @brief An end iterator for the container.
+   */
+  const_iterator end() const;
+
+
+  /**
+   * @brief Erase the table and change the capacity.
+   * @param capacity The new table capacity.
+   * @param ctx Execution context.
+   *
+   * Returns an iterator pointing at the start of the old table.
+   */
+  const_iterator clear (size_t capacity,
+                        const typename Updater_t::Context_t& ctx);
+
+
+  /**
+   * @brief Erase the table (don't change the capacity).
+   * @param ctx Execution context.
+   *
+   * Returns an iterator pointing at the start of the old table.
+   */
+  const_iterator clear (const typename Updater_t::Context_t& ctx);
+
+
+  /**
+   * @brief Increase the table capacity.
+   * @param capacity The new table capacity.
+   * @param ctx Execution context.
+   *
+   * No action will be taken in @c capacity is smaller
+   * than the current capacity.
+   */
+  void reserve (size_t capacity,
+                const typename Updater_t::Context_t& ctx);
+
+
+  /**
+   * @brief Called when this thread is no longer referencing anything
+   *        from this container.
+   * @param ctx Execution context.
+   */
+  void quiescent (const typename Updater_t::Context_t& ctx);
+
+
+private:
+  using mutex_t = std::mutex;
+  using lock_t  = std::lock_guard<mutex_t>;
+
+
+  /**
+   * @brief Make the table larger.
+   * @param ctx Execution context.
+   *
+   * Must be holding a lock on the mutex to call this.
+   */
+  bool grow (lock_t& /*lock*/, const typename Updater_t::Context_t& ctx);
+
+
+  /**
+   * @brief Make the table larger.
+   * @param new_capacity The new table capacity (must be a power of 2).
+   * @param ctx Execution context.
+   *
+   * Must be holding a lock on the mutex to call this.
+   */
+  bool grow (lock_t& /*lock*/, size_t new_capacity, const typename Updater_t::Context_t& ctx);
+
+
+  static uint64_t round_up (uint64_t);
+
+
+  /// Updater object managing memory.  See above.
+  Updater_t m_updater;
+  /// The hash object.
+  const HASHER m_hasher;
+  /// The key match object.
+  const MATCHER m_matcher;
+  /// The current table instance.  Must be holding the mutex to access this.
+  Table* m_table;
+  /// Number of entries in the map.
+  std::atomic<size_t> m_size;
+  /// Mutex to serialize changes to the map.
+  std::mutex m_mutex;
+};
+
+
+} // namespace detail
+
+
+} // namespace CxxUtils
+
+
+#include "CxxUtils/ConcurrentHashmapImpl.icc"
+
+
+#endif // not CXXUTILS_CONCURRENTHASHMAPIMPL_H
diff --git a/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc
new file mode 100644
index 000000000000..63830114c683
--- /dev/null
+++ b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc
@@ -0,0 +1,725 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/ConcurrentHashmapImpl.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Hash table allowing concurrent, lockless reads.
+ */
+
+
+#include <cassert>
+
+
+namespace CxxUtils {
+namespace detail {
+
+
+/**
+ * @brief Constructor.
+ * @param hash The hash of the entry we're looking for.
+ * @param mask Table mask; i.e., the table capacity - 1.
+ * @param maskBits Number of 1 bits in mask.
+ * @param probeLimit Maximum number of probes to try before failing.
+ */
+template <unsigned ENTRIES_PER_CACHELINE>
+inline
+CHMTableIterator<ENTRIES_PER_CACHELINE>::CHMTableIterator
+  (size_t hash, size_t mask, size_t maskBits, size_t probeLimit)
+    // Mask limited to the table.  Also mask off the part within a cache line.
+  : m_mask ((mask & ~ENTRIES_PER_CACHELINE_MASK)),
+    // Offset of hash within a cache line.
+    m_boffs (hash & ENTRIES_PER_CACHELINE_MASK),
+    // Starting increment between hash probes.
+    // Must be large enough to go to a new cache line, which is why
+    // we or in ENTRIES_PER_CACHELINE.
+    m_stride (((hash >> maskBits) | hash | ENTRIES_PER_CACHELINE) & ENTRIES_PER_CACHELINE_MASK),
+    m_probeLimit (probeLimit),
+    // Index at the start of the cache line containing hash.
+    m_bucket (hash & m_mask),
+    m_nprobes (0)
+{
+}
+
+
+/**
+ * @brief Offset of the element currently being probed.
+ */
+template <unsigned ENTRIES_PER_CACHELINE>
+inline
+size_t CHMTableIterator<ENTRIES_PER_CACHELINE>::offset() const
+{
+  // m_bucket the starting index of the current cache line.
+  // Count within the cache line in a circular manner starting
+  // at m_boffs.
+  return m_bucket + ((m_nprobes + m_boffs)&ENTRIES_PER_CACHELINE_MASK);
+}
+
+
+/**
+ * @brief Return the number of probes performed so far.
+ */
+template <unsigned ENTRIES_PER_CACHELINE>
+inline
+size_t CHMTableIterator<ENTRIES_PER_CACHELINE>::nprobes() const
+{
+  return m_nprobes;
+}
+
+
+/**
+ * @brief Move to the next probe.
+ * Returns true if we should continue, or false if we've hit the maximum
+ * number of probes.
+ */
+template <unsigned ENTRIES_PER_CACHELINE>
+inline
+bool CHMTableIterator<ENTRIES_PER_CACHELINE>::next()
+{
+  // Increment number of probes and stop if we've hit the maximum.
+  if (++m_nprobes >= m_probeLimit) {
+    return false;
+  }
+  // We've finished a cache line if the low bits are back to 0.
+  if ((m_nprobes & ENTRIES_PER_CACHELINE_MASK) == 0) {
+    // Move to a different cacheline.  
+    // cf knuth AOCP exercise 6.4.20.
+    // By contruction, the low bits (within the cacheline) of
+    // m_bucket, m_nprobes, and m_stride should all be 0.
+    m_bucket = (m_bucket + m_nprobes + m_stride) & m_mask;
+  }
+  return true;
+}
+
+
+//*****************************************************************************
+
+
+#define T_CHMIMPL \
+  template <template <class> class UPDATER,     \
+            typename HASHER,                    \
+            typename MATCHER,                   \
+            uintptr_t NULLVAL>
+
+#define CHMIMPL ConcurrentHashmapImpl<UPDATER, HASHER, MATCHER, NULLVAL>
+
+
+/**
+ * @brief Constructor.
+ * @param capacity Number of entries in the table.  Must be a power of 2.
+ * @param hasher Hash object to use.
+ * @param matcher Key match object to use.
+ */
+T_CHMIMPL
+CHMIMPL::Table::Table (size_t capacity,
+                       const HASHER& hasher /*= HASHER()*/,
+                       const MATCHER& matcher /*= MATCHER()*/)
+  : m_capacity (capacity),
+    m_maxProbe (capacity / 4),
+    m_mask (capacity-1),
+    m_maskBits (count_trailing_zeros (capacity)),
+    m_hasher (hasher),
+    m_matcher (matcher),
+    m_longestProbe (0)
+{
+  // Clear all the keys.
+  for (size_t i = 0; i < capacity; i++) {
+    m_entries[i].m_key = NULLVAL;
+  }
+}
+
+
+/**
+ * @brief Allocator for table objects.
+ * @param capacity Size of the table (must be a power of 2).
+ *
+ * Allocate with enough space for the table of entries.
+ * Also align on a cache line.
+ */
+T_CHMIMPL
+void* CHMIMPL::Table::operator new (size_t, size_t capacity)
+{
+  void* memptr = nullptr;
+  // Allocate aligned memory block.
+  // The Table structure includes one entry at the end,
+  // so subtract 1 from capacity.
+  posix_memalign (&memptr, CACHELINE, sizeof(Table) + (capacity-1)*sizeof(entry_t));
+  if (!memptr) std::abort();
+  return memptr;
+}
+
+
+/**
+ * @brief Deallocator for table objects.
+ */
+T_CHMIMPL
+void CHMIMPL::Table::operator delete (void* p)
+{
+  free (p);
+}
+
+
+/**
+ * @brief Find a table entry for reading.
+ * @param key The key for which to search.
+ * @param hash The hash of the key.
+ *
+ * Returns the matching entry, or nullptr.
+ */
+T_CHMIMPL
+size_t CHMIMPL::Table::probeRead (val_t key, size_t hash) const
+{
+  // Iterate over table probes.
+  // We don't need to check more than the longest probe sequence
+  // used so far.
+  TableIterator it (hash, m_mask, m_maskBits, m_longestProbe);
+  do {
+    size_t offset = it.offset();
+    const entry_t* ent = m_entries + offset;
+    if (ent->m_key == nullval) {
+      // If we hit an empty key, report failure.
+      return INVALID;
+    }
+    if (m_matcher (ent->m_key, key)) {
+      // Found a matching key.
+      return offset;
+    }
+  } while (it.next());
+  // Too many probes --- return failure.
+  return INVALID;
+}
+
+
+/**
+ * @brief Find a table entry for writing.
+ * @param key The key for which to search.
+ * @param hash The hash of the key.
+ * @param entry[out] The entry found.
+ *
+ * If we find the entry, return true with @c entry pointing at it.
+ * If we don't find it, and there's still room in the table, return false
+ * with @c entry pointing at the next empty entry.
+ * Otherwise, return false with @c entry set to nullptr.
+ */
+T_CHMIMPL
+size_t CHMIMPL::Table::probeWrite (val_t key, size_t hash, bool& insert)
+{
+  // Iterate over table probes.
+  TableIterator it (hash, m_mask, m_maskBits, m_maxProbe);
+  do {
+    size_t offset = it.offset();
+    entry_t* ent = m_entries + offset;
+    if (ent->m_key == nullval) {
+      // We hit an empty key; a new entry could be added here.
+      // Update the longest probe count.
+      CxxUtils::atomic_fetch_max (&m_longestProbe, it.nprobes()+1);
+      insert = true;
+      return offset;
+    }
+    if (m_matcher (ent->m_key, key)) {
+      // Found a matching key.
+      insert = false;
+      return offset;
+    }
+  } while (it.next());
+  // Too many probes --- return failure.
+  return INVALID;
+}
+
+
+/**
+ * @brief The number of entries in the table.
+ */
+T_CHMIMPL
+inline
+size_t CHMIMPL::Table::capacity() const
+{
+  return m_capacity;
+}
+
+
+/**
+ * @brief Return the entry for an offset.
+ * @param offset The index of the desired entry.
+ */
+T_CHMIMPL
+inline
+const typename CHMIMPL::entry_t& CHMIMPL::Table::entry (size_t offset) const
+{
+  return m_entries[offset];
+}
+
+
+/**
+ * @brief Return the entry for an offset (non-const).
+ * @param offset The index of the desired entry.
+ */
+T_CHMIMPL
+inline
+typename CHMIMPL::entry_t& CHMIMPL::Table::entry (size_t offset)
+{
+  return m_entries[offset];
+}
+
+
+//*****************************************************************************
+
+
+/**
+ * @brief Constructor.
+ * @param updater Object used to manage memory
+ *                (see comments at the start of the class).
+ * @param capacity Minimum initial table size.
+ * @param hasher Hash object to use.
+ * @param matcher Key match object to use.
+ * @param ctx Execution context.
+ */
+T_CHMIMPL
+CHMIMPL::ConcurrentHashmapImpl (Updater_t&& updater,
+                                size_t capacity_in,
+                                const HASHER& hasher,
+                                const MATCHER& matcher,
+                                const typename Updater_t::Context_t& ctx)
+  : m_updater (std::move (updater)),
+    m_hasher (hasher),
+    m_matcher (matcher),
+    m_size (0)
+{
+  // Round up capacity to a power of 2.
+  size_t capacity = round_up (capacity_in);
+
+  m_table = new (capacity) Table (capacity, hasher, matcher);
+  m_updater.update (std::unique_ptr<Table> (m_table), ctx);
+}
+
+
+/**
+ * @brief Add an entry to the table.
+ * @param key The key to insert.
+ * @param hash The hash of the key.
+ * @param val The value to insert.
+ * @param overwrite If true, then overwrite an existing entry.
+ *                  If false, an existing entry will not be changed.
+ * @param ctx Execution context.
+ *
+ * If the key already exists, then its value will be updated.
+ * Returns an iterator pointing at the entry and a flag which is
+ * true if a new element was added.
+ */
+T_CHMIMPL
+std::pair<typename CHMIMPL::const_iterator, bool>
+CHMIMPL::put (val_t key, size_t hash, val_t val, bool overwrite,
+              const typename Updater_t::Context_t& ctx)
+{
+  assert (key != nullval);
+  lock_t lock (m_mutex);
+
+  do {
+    bool insert;
+    size_t offset = m_table->probeWrite (key, hash, insert);
+    if (offset != INVALID) {
+      entry_t& ent = m_table->entry (offset);
+      if (insert) {
+        // Found a place to put it.
+        // Be sure not to set the key until the value is in place.
+        ent.m_val = val;
+        ent.m_key = key;
+        ++m_size;
+      }
+      else {
+        // Found --- update the entry if wanted.
+        if (overwrite) {
+          if (val != ent.m_val) {
+            ent.m_val = val;
+          }
+        }
+      }
+      return std::make_pair (const_iterator (*m_table, offset), insert);
+    }
+
+    // Need to grow the table.
+  } while (grow (lock, ctx));
+
+  // grow() failed.
+  return std::make_pair (end(), false);
+}
+
+
+/**
+ * @brief Look up an entry in the table.
+ * @param key The key to find.
+ * @param hash The hash of the key.
+ *
+ * Returns an iterator pointing at the found entry, or end().
+ */
+T_CHMIMPL
+typename CHMIMPL::const_iterator CHMIMPL::get (val_t key, size_t hash) const
+{
+  const Table& table = m_updater.get();
+  size_t offset = table.probeRead (key, hash);
+  // Offset will be -1 if not found --- invalid iterator.
+  return const_iterator (table, offset);
+}
+
+
+/**
+ * @brief Return the number of items currently stored.
+ */
+T_CHMIMPL
+size_t CHMIMPL::size() const
+{
+  return m_size;
+}
+
+
+/**
+ * @brief Return the current table size.
+ */
+T_CHMIMPL
+size_t CHMIMPL::capacity() const
+{
+  const Table& table = m_updater.get();
+  return table.capacity();
+}
+
+
+/** 
+ * @brief Return the hasher object.
+ */
+T_CHMIMPL
+inline
+const typename CHMIMPL::Hasher_t& CHMIMPL::hasher() const
+{
+  return m_hasher;
+}
+
+
+/** 
+ * @brief Return the matcher object.
+ */
+T_CHMIMPL
+inline
+const typename CHMIMPL::Matcher_t& CHMIMPL::matcher() const
+{
+  return m_matcher;
+}
+
+
+/**
+ * @brief Constructor.
+ * @param table The table instance we're referencing.
+ * @param end If true, initialize this to an end iterator.
+ *            Otherwise, initialize it to a a begin iterator.
+ */
+T_CHMIMPL
+inline
+CHMIMPL::const_iterator::const_iterator (const Table& table, bool end)
+  : m_table (table),
+    m_offset (INVALID)
+{
+  // For an end iterator, we want offset to be -1.
+  // For a begin iterator, we need to advance to the first non-null entry.
+  if (!end) {
+    next();
+  }
+}
+
+
+/**
+ * @brief Constructor.
+ * @param table The table instance we're referencing.
+ * @param offset Offset of the iterator within the table.
+ *               (Must point at an occupied entry.)
+ */
+T_CHMIMPL
+CHMIMPL::const_iterator::const_iterator (const Table& table, size_t offset)
+  : m_table (table),
+    m_offset (offset)
+{
+  assert (offset == INVALID || m_table.entry (offset).m_key != nullval);
+}
+
+
+/**
+ * @brief Advance the iterator to the next occupied entry.
+ */
+T_CHMIMPL
+inline
+void CHMIMPL::const_iterator::next()
+{
+  do {
+    ++m_offset;
+    if (m_offset >= m_table.capacity()) {
+      m_offset = INVALID;
+      break;
+    }
+  } while (m_table.entry (m_offset).m_key == nullval);
+}
+
+
+/**
+ * @brief Move the iterator back to the previous occupied entry.
+ */
+T_CHMIMPL
+inline
+void CHMIMPL::const_iterator::prev()
+{
+  if (m_offset == INVALID) {
+    m_offset = m_table.capacity();
+  }
+  do {
+    --m_offset;
+    if (m_offset >= m_table.capacity()) {
+      m_offset = INVALID;
+      break;
+    }
+  } while (m_table.entry (m_offset).m_key == nullval);
+}
+
+
+/**
+ * @brief Return the key for this iterator.
+ */
+T_CHMIMPL
+inline
+typename CHMIMPL::val_t CHMIMPL::const_iterator::key() const
+{
+  return m_table.entry (m_offset).m_key;
+}
+    
+
+/**
+ * @brief Return the value for this iterator.
+ */
+T_CHMIMPL
+inline
+typename CHMIMPL::val_t CHMIMPL::const_iterator::value() const
+{
+  return m_table.entry (m_offset).m_val;
+}
+
+
+/**
+ * @brief Compare two iterators.
+ */
+T_CHMIMPL
+inline
+bool CHMIMPL::const_iterator::operator!= (const const_iterator& other) const
+{
+  if (m_offset != other.m_offset) return true;
+  if (m_offset == INVALID) return false;
+  return &m_table != &other.m_table;
+}
+
+
+/**
+ * @brief Check that the iterator is valid (not pointing at the end).
+ */
+T_CHMIMPL
+inline
+bool CHMIMPL::const_iterator::valid() const
+{
+  return m_offset != INVALID;
+}
+
+
+/**
+ * @brief Return a range that can be used to iterate over the container.
+ */
+T_CHMIMPL
+inline
+typename CHMIMPL::const_iterator_range CHMIMPL::range() const
+{
+  const Table& table = m_updater.get();
+  return const_iterator_range (const_iterator (table, false),
+                               const_iterator (table, true));
+}
+
+
+/** 
+ * @brief A begin iterator for the container.
+ */
+T_CHMIMPL
+inline
+typename CHMIMPL::const_iterator CHMIMPL::begin() const
+{
+  const Table& table = m_updater.get();
+  return const_iterator (table, false);
+}
+
+
+/** 
+ * @brief An end iterator for the container.
+ */
+T_CHMIMPL
+inline
+typename CHMIMPL::const_iterator CHMIMPL::end() const
+{
+  const Table& table = m_updater.get();
+  return const_iterator (table, true);
+}
+
+
+/**
+ * @brief Erase the table and change the capacity.
+ * @param capacity The new table capacity.
+ * @param ctx Execution context.
+ *
+ * Returns an iterator pointing at the start of the old table.
+ */
+T_CHMIMPL
+typename CHMIMPL::const_iterator
+CHMIMPL::clear (size_t capacity,
+                const typename Updater_t::Context_t& ctx)
+{
+  capacity = round_up (capacity);
+  lock_t lock (m_mutex);
+  std::unique_ptr<Table> new_table (new (capacity) Table (capacity,
+                                                          m_hasher,
+                                                          m_matcher));
+
+  // Save an iterator to the old table.
+  const_iterator it = begin();
+
+  // Publish the new table.
+  m_size = 0;
+  m_table = new_table.get();
+  m_updater.update (std::move (new_table), ctx);
+  return it;
+}
+
+
+/**
+ * @brief Erase the table (don't change the capacity).
+ * @param ctx Execution context.
+ *
+ * Returns an iterator pointing at the start of the old table.
+ */
+T_CHMIMPL
+typename CHMIMPL::const_iterator
+CHMIMPL::clear (const typename Updater_t::Context_t& ctx)
+{
+  const Table& table = m_updater.get();
+  // Possible race here in that the container capacity could increase
+  // before we take out the lock in clear().  In practice, this should
+  // not actually be a problem.
+  return clear (table.capacity(), ctx);
+}
+
+
+/**
+ * @brief Increase the table capacity.
+ * @param capacity The new table capacity.
+ * @param ctx Execution context.
+ *
+ * No action will be taken in @c capacity is smaller
+ * than the current capacity.
+ */
+T_CHMIMPL
+void CHMIMPL::reserve (size_t capacity,
+                       const typename Updater_t::Context_t& ctx)
+{
+  lock_t lock (m_mutex);
+  if (capacity < m_table->capacity()) return;
+  grow (lock, round_up (capacity), ctx);
+}
+
+
+/**
+ * @brief Called when this thread is no longer referencing anything
+ *        from this container.
+ * @param ctx Execution context.
+ */
+T_CHMIMPL
+void CHMIMPL::quiescent (const typename Updater_t::Context_t& ctx)
+{
+  m_updater.quiescent (ctx);
+}
+
+
+/**
+ * @brief Make the table larger.
+ * @param ctx Execution context.
+ *
+ * Must be holding a lock on the mutex to call this.
+ */
+T_CHMIMPL
+bool CHMIMPL::grow (lock_t& lock, const typename Updater_t::Context_t& ctx)
+{
+  // Allocate a new table with twice the capacity.
+  return grow (lock, 2*m_table->capacity(), ctx);
+}
+
+
+/**
+ * @brief Make the table larger.
+ * @param new_capacity The new table capacity (must be a power of 2).
+ * @param ctx Execution context.
+ *
+ * Must be holding a lock on the mutex to call this.
+ */
+T_CHMIMPL
+bool CHMIMPL::grow (lock_t& /*lock*/,
+                    size_t new_capacity,
+                    const typename Updater_t::Context_t& ctx)
+{
+  // The current table.
+  const Table& table = *m_table;
+
+  std::unique_ptr<Table> new_table (new (new_capacity) Table (new_capacity,
+                                                              m_hasher,
+                                                              m_matcher));
+
+  // Copy data from the existing table to the new one.
+  size_t capacity = table.capacity();
+  for (size_t i = 0; i < capacity; i++) {
+    const entry_t& ent = table.entry(i);
+    if (ent.m_key != nullval) {
+      size_t hash = m_hasher (ent.m_key);
+      bool insert;
+      size_t offset = new_table->probeWrite (ent.m_key, hash, insert);
+      if (offset == INVALID) {
+        std::abort();
+      }
+      entry_t& new_entry = new_table->entry (offset);
+      new_entry.m_key = static_cast<val_t> (ent.m_key);
+      new_entry.m_val = static_cast<val_t> (ent.m_val);
+    }
+  }
+
+  // Publish the new table.
+  m_table = new_table.get();
+  m_updater.update (std::move (new_table), ctx);
+    
+  return true;
+}
+
+
+/**
+ * @brief Round up to a power of 2.
+ * https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
+ */
+T_CHMIMPL
+uint64_t CHMIMPL::round_up (uint64_t x)
+{
+  if (x <= 64) return 64;
+  --x;
+  x |= (x>>1);
+  x |= (x>>2);
+  x |= (x>>4);
+  x |= (x>>8);
+  x |= (x>>16);
+  x |= (x>>32);
+  ++x;
+  return x;
+}
+
+
+#undef CHMIMPL
+#undef T_CHMIMPL
+
+
+
+} // namespace detail
+} // namespace CxxUtils
diff --git a/Control/CxxUtils/share/ConcurrentHashmapImpl_test.ref b/Control/CxxUtils/share/ConcurrentHashmapImpl_test.ref
new file mode 100644
index 000000000000..e5e8e0345742
--- /dev/null
+++ b/Control/CxxUtils/share/ConcurrentHashmapImpl_test.ref
@@ -0,0 +1,5 @@
+CxxUtils/ConcurrentHashmapImpl_test
+test1
+test2
+test3
+test4
diff --git a/Control/CxxUtils/test/ConcurrentHashmapImpl_test.cxx b/Control/CxxUtils/test/ConcurrentHashmapImpl_test.cxx
new file mode 100644
index 000000000000..a76085545fd8
--- /dev/null
+++ b/Control/CxxUtils/test/ConcurrentHashmapImpl_test.cxx
@@ -0,0 +1,571 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/test/ConcurrentHashmapImpl_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Tests for ConcurrentHashmapImpl.
+ */
+
+
+#undef NDEBUG
+#include "CxxUtils/ConcurrentHashmapImpl.h"
+#include <mutex>
+#include <thread>
+#include <shared_mutex>
+#include <vector>
+#include <memory>
+#include <iostream>
+#include <cassert>
+#include <unistd.h>
+
+
+const int nslots = 4;
+
+
+// Needed to access internals of ConcurrentHashmapImpl.
+class ConcurrentHashmapImplTest
+{
+public:
+  static void test2();
+};
+
+
+struct Context_t
+{
+  Context_t (int the_slot = 0) : slot (the_slot) {}
+  int slot;
+};
+
+
+template <class T>
+class TestUpdater
+{
+public:
+  using Context_t = ::Context_t;
+
+  TestUpdater()
+    : m_p (nullptr),
+      m_inGrace (0)
+  {
+  }
+
+  TestUpdater (TestUpdater&& other)
+    : m_p (static_cast<T*> (other.m_p)),
+      m_inGrace (0)
+  {
+  }
+
+  TestUpdater& operator= (const TestUpdater&) = delete; // coverity
+
+  ~TestUpdater()
+  {
+    delete m_p;
+    for (T* p : m_garbage) delete p;
+  }
+
+  void update (std::unique_ptr<T> p, const Context_t& ctx)
+  {
+    std::lock_guard<std::mutex> g (m_mutex);
+    if (m_p) m_garbage.push_back (m_p);
+    m_p = p.release();
+    m_inGrace = (~(1<<ctx.slot)) & ((1<<nslots)-1);
+  }
+
+  void discard (std::unique_ptr<T> p)
+  {
+    std::lock_guard<std::mutex> g (m_mutex);
+    m_garbage.push_back (p.release());
+    m_inGrace = ((1<<nslots)-1);
+  }
+
+  const T& get() const { return *m_p; }
+
+  void quiescent (const Context_t& ctx)
+  {
+    unsigned int mask = (1<<ctx.slot);
+    std::lock_guard<std::mutex> g (m_mutex);
+    if ((m_inGrace & mask) == 0) return;
+    m_inGrace &= ~mask;
+    if (!m_inGrace) {
+      for (T* p : m_garbage) delete p;
+      m_garbage.clear();
+    }
+  }
+
+  static Context_t defaultContext() { return 0; }
+
+
+private:
+  std::mutex m_mutex;
+  std::atomic<T*> m_p;
+  std::vector<T*> m_garbage;
+  unsigned int m_inGrace;
+};
+
+
+struct TestHash
+{
+  size_t operator() (size_t x) const { return x; }
+};
+
+
+using CHMImpl = CxxUtils::detail::ConcurrentHashmapImpl<TestUpdater, TestHash>;
+
+
+// Test CHMTableIterator
+void test1()
+{
+  std::cout << "test1\n";
+  using TableIterator = CxxUtils::detail::CHMTableIterator<4>;
+  // table capacity = 64
+  TableIterator it (12345, 0x3f, 6, 16);
+  std::vector<size_t> offsets;
+  do {
+    offsets.push_back (it.offset());
+  } while (it.next());
+  assert ((std::vector<size_t> {57, 58, 59, 56, 61, 62, 63, 60, 5, 6, 7, 4, 17, 18, 19, 16 }) == offsets);
+}
+
+
+// Test ConcurrentHashmapImpl::Table.
+void ConcurrentHashmapImplTest::test2()
+{
+  std::cout << "test2\n";
+  using entry_t = CHMImpl::entry_t;
+  using Table = CHMImpl::Table;
+  std::unique_ptr<Table> table (new (16) Table (16));
+
+  assert (table->capacity() == 16);
+
+  size_t nstored = 0;
+  while (true) {
+    size_t key = 23*nstored + 100;
+    size_t hash = TestHash() (key);
+
+    bool insert;
+    size_t offset = table->probeWrite (key, hash, insert);
+    if (offset == CHMImpl::INVALID) {
+      break;
+    }
+    assert (insert);
+    entry_t& ent = table->entry (offset);
+    ent.m_val = key+1;
+    ent.m_key = key;
+    const Table* ctable = table.get();
+    const entry_t& cent = ctable->entry (offset);
+    assert (cent.m_val == key+1);
+    assert (cent.m_key == key);
+    ++nstored;
+  }
+  assert (nstored == 16);
+
+  for (size_t i = 0; i < nstored; ++i) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+    {
+      size_t offset = table->probeRead (key, hash);
+      assert (offset != CHMImpl::INVALID);
+      const entry_t& ent = table->entry (offset);
+      assert (ent.m_key == key && ent.m_val == key+1);
+    }
+    {
+      bool insert;
+      size_t offset = table->probeWrite (key, hash, insert);
+      assert (offset != CHMImpl::INVALID);
+      assert (!insert);
+      entry_t& ent = table->entry (offset);
+      assert (ent.m_key == key && ent.m_val == key+1);
+    }
+  }
+
+  size_t key = 23*nstored + 100;
+  size_t hash = TestHash() (key);
+  assert (table->probeRead (key, hash) == CHMImpl::INVALID);
+  bool insert;
+  assert (table->probeWrite (key, hash, insert) == CHMImpl::INVALID);
+}
+
+
+void test3()
+{
+  std::cout << "test3\n";
+  CHMImpl chm (CHMImpl::Updater_t(), 50,
+               CHMImpl::Hasher_t(),
+               CHMImpl::Matcher_t(),
+               CHMImpl::Context_t());
+
+  assert (chm.size() == 0);
+  assert (chm.capacity() == 64);
+
+  assert (chm.hasher()(12345) == CHMImpl::Hasher_t()(12345));
+  assert (chm.matcher() (4321, 4321));
+  assert (!chm.matcher() (4321, 4322));
+
+  {
+    auto [begin, end] = chm.range();
+    assert (!(begin != end));
+  }
+
+  for (size_t i = 0; i < 1000; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+
+    auto [it, flag] = chm.put (key, hash, key+1, true, Context_t());
+    assert (flag);
+    assert (it.valid());
+    assert (it.key() == key);
+    assert (it.value() == key+1);
+  }
+  assert (chm.size() == 1000);
+  assert (chm.capacity() == 1024);
+
+  for (size_t i = 0; i < 1000; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+
+    CHMImpl::const_iterator it = chm.get (key, hash);
+    assert (it.valid());
+    assert (it.value() == key+1);
+  }
+
+  for (size_t i = 0; i < 1000; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+
+    auto [it, flag] = chm.put (key, hash, key+2, true, Context_t());
+    assert (!flag);
+    assert (it.valid());
+    assert (it.key() == key);
+    assert (it.value() == key+2);
+  }
+  assert (chm.size() == 1000);
+  assert (chm.capacity() == 1024);
+
+  std::vector<size_t> exp;
+  for (size_t i = 0; i < 1000; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+
+    CHMImpl::const_iterator it = chm.get (key, hash);
+    assert (it.valid());
+    assert (it.value() == key+2);
+
+    exp.push_back (key);
+  }
+  std::sort (exp.begin(), exp.end());
+
+  std::vector<size_t> seen;
+  {
+    auto [begin, end] = chm.range();
+    for (auto it = begin; it != end; it.next()) {
+      assert (it.key()+2 == it.value());
+      seen.push_back (it.key());
+    }
+  }
+  std::sort (seen.begin(), seen.end());
+  assert (exp == seen);
+
+  seen.clear();
+  {
+    CHMImpl::const_iterator begin = chm.begin();
+    CHMImpl::const_iterator it = chm.end();
+    assert (it != begin);
+    do {
+      it.prev();
+      assert (it.key()+2 == it.value());
+      seen.push_back (it.key());
+    } while (it != begin);
+  }
+    
+  std::sort (seen.begin(), seen.end());
+  assert (exp == seen);
+
+  {
+    size_t key = 23*500 + 100;
+    size_t hash = TestHash() (key);
+    auto [it, flag] = chm.put (key, hash, 200, false, Context_t());
+    assert (!flag);
+    assert (it.valid());
+    assert (it.key() == key);
+    assert (it.value() == key+2);
+
+    CHMImpl::const_iterator it2 = chm.get (key, hash);
+    assert (it2.valid());
+    assert (it2.value() == key+2);
+  }
+
+  {
+    size_t key = 23*1500 + 100;
+    size_t hash = TestHash() (key);
+    auto [it, flag] = chm.put (key, hash, 200, false, Context_t());
+    assert (flag);
+    assert (it.valid());
+    assert (it.key() == key);
+    assert (it.value() == 200);
+
+    CHMImpl::const_iterator it2 = chm.get (key, hash);
+    assert (it2.valid());
+    assert (it2.value() == 200);
+  }
+
+  assert (chm.size() == 1001);
+  assert (chm.capacity() == 1024);
+
+  {
+    size_t iseen = 0;
+    CHMImpl::const_iterator it = chm.clear (Context_t());
+    while (it.valid()) {
+      ++iseen;
+      it.next();
+    }
+    assert (iseen == 1001);
+  }
+  assert (chm.size() == 0);
+  assert (chm.capacity() == 1024);
+
+  chm.clear (200, Context_t());
+  assert (chm.size() == 0);
+  assert (chm.capacity() == 256);
+
+  chm.reserve (100, Context_t());
+  assert (chm.size() == 0);
+  assert (chm.capacity() == 256);
+
+  chm.reserve (300, Context_t());
+  assert (chm.size() == 0);
+  assert (chm.capacity() == 512);
+}
+
+
+//***************************************************************************
+// Threaded test.
+//
+
+
+std::shared_timed_mutex start_mutex;
+
+
+class test4_Base
+{
+public:
+  static constexpr size_t nwrites = 10000;
+  
+  test4_Base (int slot);
+  int ctx() const { return m_slot; }
+  void setContext();
+
+  
+private:
+  int m_slot;
+};
+
+
+test4_Base::test4_Base (int slot)
+  : m_slot (slot)
+{
+}
+
+
+void test4_Base::setContext()
+{
+}
+
+
+
+class test4_Writer
+  : public test4_Base
+{
+public:
+  test4_Writer (int slot, CHMImpl& map);
+  void operator()();
+
+private:
+  CHMImpl& m_map;
+};
+
+
+test4_Writer::test4_Writer (int slot, CHMImpl& map)
+  : test4_Base (slot),
+    m_map (map)
+{
+}
+
+
+void test4_Writer::operator()()
+{
+  setContext();
+  std::shared_lock<std::shared_timed_mutex> lock (start_mutex);
+
+  for (size_t i=0; i < nwrites; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+    assert (m_map.put (key, hash, key+2, true, Context_t()).second);
+    m_map.quiescent (ctx());
+    if (((i+1)%128) == 0) {
+      usleep (1000);
+    }
+  }
+
+  for (size_t i=0; i < nwrites; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+    assert (!m_map.put (key, hash, key+3, true, Context_t()).second);
+    m_map.quiescent (ctx());
+    if (((i+1)%128) == 0) {
+      usleep (1000);
+    }
+  }
+
+  for (size_t i=0; i < nwrites; i++) {
+    size_t key = 23*i + 100;
+    size_t hash = TestHash() (key);
+    assert (!m_map.put (key, hash, key+4, true, Context_t()).second);
+    m_map.quiescent (ctx());
+    if (((i+1)%128) == 0) {
+      usleep (1000);
+    }
+  }
+
+  {
+    size_t key = 23*nwrites + 100;
+    size_t hash = TestHash() (key);
+    assert (m_map.put (key, hash, key+3, true, Context_t()).second);
+  }
+}
+
+
+
+class test4_Iterator
+  : public test4_Base
+{
+public:
+  test4_Iterator (int slot, CHMImpl& map);
+  void operator()();
+
+private:
+  CHMImpl& m_map;
+};
+
+
+test4_Iterator::test4_Iterator (int slot, CHMImpl& map)
+  : test4_Base (slot),
+    m_map (map)
+{
+}
+
+
+void test4_Iterator::operator()()
+{
+  setContext();
+  std::shared_lock<std::shared_timed_mutex> lock (start_mutex);
+
+  while (true) {
+    auto [begin, end] = m_map.range();
+    while (begin != end) {
+      size_t key = begin.key();
+      size_t val = begin.value();
+      assert (val == key+2 || val == key+3 || val == key+4);
+      begin.next();
+    }
+
+    auto [begin2, end2] = m_map.range();
+    if (begin2 != end2) {
+      do {
+        end2.prev();
+        size_t key = end2.key();
+        size_t val = end2.value();
+        assert (val == key+2 || val == key+3 || val == key+4);
+      } while (begin2 != end2);
+    }
+
+    m_map.quiescent (ctx());
+    if (m_map.size() > nwrites) break;
+  }
+}
+
+
+class test4_Reader
+  : public test4_Base
+{
+public:
+  test4_Reader (int slot, CHMImpl& map);
+  void operator()();
+
+private:
+  CHMImpl& m_map;
+};
+
+
+test4_Reader::test4_Reader (int slot, CHMImpl& map)
+  : test4_Base (slot),
+    m_map (map)
+{
+}
+
+
+void test4_Reader::operator()()
+{
+  setContext();
+  std::shared_lock<std::shared_timed_mutex> lock (start_mutex);
+
+  while (true) {
+    for (size_t i = 0; ; ++i) {
+      size_t key = 23*i + 100;
+      size_t hash = TestHash() (key);
+      CHMImpl::const_iterator it = m_map.get (key, hash);
+      if (!it.valid()) {
+        break;
+      }
+      assert(it.value() == key+2 || it.value() == key+3 || it.value() == key+4);
+    }
+
+    m_map.quiescent (ctx());
+    if (m_map.size() > nwrites) break;
+  }
+}
+
+
+void test4_iter()
+{
+  CHMImpl chm (CHMImpl::Updater_t(), 50,
+               CHMImpl::Hasher_t(),
+               CHMImpl::Matcher_t(),
+               CHMImpl::Context_t());
+
+  const int nthread = 4;
+  std::thread threads[nthread];
+  start_mutex.lock();
+
+  threads[0] = std::thread (test4_Writer (0, chm));
+  threads[1] = std::thread (test4_Iterator (1, chm));
+  threads[2] = std::thread (test4_Reader (2, chm));
+  threads[3] = std::thread (test4_Reader (3, chm));
+
+  // Try to get the threads starting as much at the same time as possible.
+  start_mutex.unlock();
+  for (int i=0; i < nthread; i++)
+    threads[i].join();
+}
+
+
+void test4()
+{
+  std::cout << "test4\n";
+
+  for (int i=0; i < 5; i++) {
+    test4_iter();
+  }
+}
+
+
+int main()
+{
+  std::cout << "CxxUtils/ConcurrentHashmapImpl_test\n";
+  test1();
+  ConcurrentHashmapImplTest::test2();
+  test3();
+  test4();
+  return 0;
+}
-- 
GitLab


From 7896d364b0efafd1153fe61bc6babf6e7d57c96d Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 14 Dec 2020 16:49:50 -0500
Subject: [PATCH 063/308] CxxUtils: Add ConcurrentStrMap.

Add ConcurrentStrMap, a hash map from strings to something that will fit
in a uintptr_t.  Allows for concurrent lockless reads.
---
 Control/CxxUtils/CMakeLists.txt               |   9 +
 Control/CxxUtils/CxxUtils/ConcurrentStrMap.h  | 527 ++++++++++
 .../CxxUtils/CxxUtils/ConcurrentStrMap.icc    | 619 ++++++++++++
 .../CxxUtils/share/ConcurrentStrMap_test.ref  |   5 +
 .../CxxUtils/test/ConcurrentStrMap_test.cxx   | 924 ++++++++++++++++++
 5 files changed, 2084 insertions(+)
 create mode 100644 Control/CxxUtils/CxxUtils/ConcurrentStrMap.h
 create mode 100644 Control/CxxUtils/CxxUtils/ConcurrentStrMap.icc
 create mode 100644 Control/CxxUtils/share/ConcurrentStrMap_test.ref
 create mode 100644 Control/CxxUtils/test/ConcurrentStrMap_test.cxx

diff --git a/Control/CxxUtils/CMakeLists.txt b/Control/CxxUtils/CMakeLists.txt
index f4f725e30015..1ca2f75bb18a 100644
--- a/Control/CxxUtils/CMakeLists.txt
+++ b/Control/CxxUtils/CMakeLists.txt
@@ -97,6 +97,15 @@ if ( IS_DIRECTORY /usr/include/ck )
     PRIVATE "-DHAVE_CK" )
 endif()
 
+atlas_add_test( ConcurrentStrMap_test
+  SOURCES test/ConcurrentStrMap_test.cxx
+  INCLUDE_DIRS ${TBB_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CK_INCLUDE}
+  LINK_LIBRARIES CxxUtils TestTools ${TBB_LIBRARIES} ${Boost_LIBRARIES} ${CK_LIBRARIES} )
+if ( IS_DIRECTORY /usr/include/ck )
+  target_compile_definitions(CxxUtils_ConcurrentStrMap_test
+    PRIVATE "-DHAVE_CK" )
+endif()
+
 atlas_add_test( exctrace2_test
    SOURCES test/exctrace2_test.cxx
    LINK_LIBRARIES CxxUtils
diff --git a/Control/CxxUtils/CxxUtils/ConcurrentStrMap.h b/Control/CxxUtils/CxxUtils/ConcurrentStrMap.h
new file mode 100644
index 000000000000..df1286a5eea6
--- /dev/null
+++ b/Control/CxxUtils/CxxUtils/ConcurrentStrMap.h
@@ -0,0 +1,527 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/ConcurrentStrMap.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Hash map from strings allowing concurrent, lockless reads.
+ */
+
+
+#ifndef CXXUTILS_CONCURRENTSTRMAP_H
+#define CXXUTILS_CONCURRENTSTRMAP_H
+
+
+#include "CxxUtils/ConcurrentHashmapImpl.h"
+#include "CxxUtils/concepts.h"
+#include "boost/iterator/iterator_facade.hpp"
+#include "boost/range/iterator_range.hpp"
+#include <type_traits>
+#include <stdexcept>
+
+
+namespace CxxUtils {
+
+
+/**
+ * @brief Hash map from strings allowing concurrent, lockless reads.
+ *
+ * This class implements a hash map from strings.
+ * The mapped type may be a pointer or any numeric type that can
+ * fit in a uintptr_t.
+ * It allows for concurrent access from many threads.
+ * Reads can proceed without taking out a lock, while writes are serialized
+ * with each other.  Thus, this is appropriate for maps which are read-mostly.
+ *
+ * This is based on ConcurrentHashmapImpl.
+ *
+ * Besides the mapped value type,
+ * this class is templated on an UPDATER class, which is used to manage
+ * the underlying memory.  The requirements are the same as for the 
+ * UPDATER template argument of ConcurrentTangeMap; see there for
+ * further details.  (AthenaKernel/RCUUpdater is a concrete version
+ * that should work in the context of Athena.)
+ *
+ * This mostly supports the interface of std::unordered_map, with a few
+ * differences / omissions:
+ *
+ *  - Dereferencing the iterator returns a structure by value, not a reference.
+ *  - No try_emplace.
+ *  - No insert methods with hints.
+ *  - No swap().  Could probably be implemented if really needed, but would
+ *    require support in ConcurrentHashmapImpl and in the Updater classes.
+ *  - No clear().  Could be implemented if really needed; we would need
+ *    to be able to attach the key strings to be deleted to the old
+ *    table instance.
+ *  - No erase() methods.  In addition to what's needed for clear(),
+ *    the underlying hash table would need to support tombstones.
+ *  - No operator==.
+ *  - Nothing dealing with the bucket/node interface or merge().
+ *
+ * Possible improvements:
+ *
+ *  - We could speed up lookups further by storing the hash along with
+ *    the string.  That way, we should almost always not have to do
+ *    the full string comparison more than once.
+ *
+ *  - We could use a more efficient allocator for the string keys
+ *    that we need to save.  That could in particular help for updates,
+ *    where currently we always need to allocate a string, and then
+ *    need to delete it if it turns out we're doing an update rather
+ *    than in insertion.
+ */
+template <class VALUE, template <class> class UPDATER>
+// FIXME: Check UPDATER too.
+ATH_REQUIRES (std::is_pod_v<VALUE> &&
+              (sizeof (VALUE) <= sizeof (uintptr_t)))
+class ConcurrentStrMap
+{
+private:
+  /// The underlying uint->uint hash table.
+  struct Hasher;
+  struct Matcher;
+  using Impl_t = typename detail::ConcurrentHashmapImpl<UPDATER, Hasher, Matcher>;
+  /// Representation type in the underlying map.
+  using val_t = CxxUtils::detail::ConcurrentHashmapVal_t;
+
+
+public:
+  /// Standard STL types.
+  using key_type = std::string;
+  using mapped_type = VALUE;
+  using size_type = size_t;
+  /// Updater object.
+  using Updater_t = typename Impl_t::Updater_t;
+  /// Context type.
+  using Context_t = typename Updater_t::Context_t;
+
+  /// Ensure that the underlying map can store our mapped_type.
+  static_assert( sizeof(typename Impl_t::val_t) >= sizeof(mapped_type) );
+
+
+  /**
+   * @brief Constructor.
+   * @param updater Object used to manage memory
+   *                (see comments at the start of the class).
+   * @param capacity The initial table capacity.
+   *                 (Will be rounded up to a power of two.)
+   * @param ctx Execution context.
+   */
+  ConcurrentStrMap (Updater_t&& updater,
+                    size_type capacity = 64,
+                    const Context_t& ctx = Updater_t::defaultContext());
+
+  /** 
+   * @brief Constructor from another map.
+   * @param updater Object used to manage memory
+   *                (see comments at the start of the class).
+   * @param capacity The initial table capacity of the new table.
+   *                 (Will be rounded up to a power of two.)
+   * @param ctx Execution context.
+   *
+   * (Not really a copy constructor since we need to pass @c updater.)
+   */
+  ConcurrentStrMap (const ConcurrentStrMap& other,
+                    Updater_t&& updater,
+                    size_t capacity = 64,
+                    const Context_t& ctx = Updater_t::defaultContext());
+
+
+  /** 
+   * @brief Constructor from a range.
+   * @param f Start iterator for the range.
+   * @param l End iterator for the range.
+   * @param updater Object used to manage memory
+   *                (see comments at the start of the class).
+   * @param capacity The initial table capacity of the new table.
+   *                 (Will be rounded up to a power of two.)
+   * @param ctx Execution context.
+   *
+   * Constructor from a range of pairs.
+   */
+  template <class InputIterator>
+  ConcurrentStrMap (InputIterator f,
+                    InputIterator l,
+                    Updater_t&& updater,
+                    size_type capacity = 64,
+                    const Context_t& ctx = Updater_t::defaultContext());
+
+
+  /// Copy / move / assign not supported.
+  ConcurrentStrMap (const ConcurrentStrMap& other) = delete;
+  ConcurrentStrMap (ConcurrentStrMap&& other) = delete;
+  ConcurrentStrMap& operator= (const ConcurrentStrMap& other) = delete;
+  ConcurrentStrMap& operator= (ConcurrentStrMap&& other) = delete;
+
+
+  /**
+   * @brief Destructor.
+   */
+  ~ConcurrentStrMap();
+
+
+  /**
+   * @brief Return the number of items currently in the map.
+   */
+  size_type size() const;
+
+
+  /**
+   * @brief Test if the map is currently empty.
+   */
+  bool empty() const;
+
+
+  /**
+   * @brief Return the current size (capacity) of the hash table.
+   */
+  size_t capacity() const;
+
+
+  /**
+   * @brief Value structure for iterators.
+   *
+   * For a map from K to V, a STL-style iterator should dereference
+   * to a std::pair<const K, V>.  However, we don't actually store an object
+   * like that anywhere.  In order to be able to have STL-like iterators,
+   * we instead use a pair where the first element is a const reference
+   * to the std::string key.  We will
+   * return this _by value_ when we deference an iterator.
+   * (The compiler should be able to optimize out the redundant
+   * packing and unpacking of fields.)
+   */
+  using const_iterator_value = std::pair<const key_type&, mapped_type>;
+
+
+  /**
+   * @brief Iterator class.
+   *
+   * This uses boost::iterator_facade to define the methods required
+   * by an STL iterator in terms of the private methods below.
+   *
+   * Since dereference() will be returning a const_iterator_value by value,
+   * we also need to override the reference type.
+   */
+  class const_iterator
+    : public boost::iterator_facade<const_iterator,
+                                    const const_iterator_value,
+                                    std::bidirectional_iterator_tag,
+                                    const const_iterator_value>
+  {
+  public:
+   /**
+     * @brief Constructor.
+     * @param it Iterator of the underlying table.
+     */
+    const_iterator (typename Impl_t::const_iterator it);
+
+
+    /**
+     * @brief Test if this iterator is value.
+     *
+     * This should be the same as testing for != end().
+     */
+    bool valid() const;
+
+
+  private:
+    /// Required by iterator_facade.
+    friend class boost::iterator_core_access;
+
+
+    /**
+     * @brief iterator_facade requirement: Increment the iterator.
+     */
+    void increment();
+
+
+    /**
+     * @brief iterator_facade requirement: Decrement the iterator.
+     */
+    void decrement();
+
+
+    /**
+     * @brief iterator_facade requirement: Equality test.
+     */
+    bool equal (const const_iterator& other) const;
+
+
+    /**
+     * @brief iterator_facade requirement: Dereference the iterator.
+     */
+    const const_iterator_value dereference() const;
+
+
+    /// The iterator on the underlying table.
+    typename Impl_t::const_iterator m_impl;
+  };
+
+
+  /// A range defined by two iterators.
+  typedef boost::iterator_range<const_iterator> const_iterator_range;
+
+
+  /**
+   * @brief Return an interator range covering the entire map.
+   */
+  const_iterator_range range() const;
+
+
+  /**
+   * @brief Iterator at the start of the map.
+   */
+  const_iterator begin() const;
+
+
+  /**
+   * @brief Iterator at the end of the map.
+   */
+  const_iterator end() const;
+
+
+  /**
+   * @brief Iterator at the start of the map.
+   */
+  const_iterator cbegin() const;
+
+
+  /**
+   * @brief Iterator at the end of the map.
+   */
+  const_iterator cend() const;
+
+
+  /**
+   * @brief Test if a key is in the container.
+   * @param key The key to test.
+   */
+  bool contains (const key_type& key) const;
+
+
+  /**
+   * @brief Return the number of times a given key is in the container.
+   * @param key The key to test.
+   *
+   * Returns either 0 or 1, depending on whether or not the key is in the map.
+   */
+  size_type count (const key_type& key) const;
+
+
+  /**
+   * @brief Look up an element in the map.
+   * @param key The element to find.
+   *
+   * Returns either an iterator referencing the found element or end().
+   */
+  const_iterator find (const key_type& key) const;
+
+
+  /**
+   * @brief Look up an element in the map.
+   * @param key The element to find.
+   *
+   * Returns the value associated with the key.
+   * Throws @c std::out_of_range if the key does not exist in the map.
+   */
+  mapped_type at (const std::string& key) const;
+
+
+  /**
+   * @brief Return a range of iterators with entries matching @c key.
+   * @param key The element to find.
+   *
+   * As keys are unique in this container, this is either a single-element
+   * range, or both iterators are equal to end().
+   */
+  std::pair<const_iterator, const_iterator>
+  equal_range (const key_type& key) const;
+
+
+  /**
+   * @brief Add an element to the map.
+   * @param key The key of the new item to add.
+   * @param val The value of the new item to add.
+   * @param ctx Execution context.
+   *
+   * This will not overwrite an existing entry.
+   * The first element in the returned pair is an iterator referencing
+   * the added item.  The second is a flag that is true if a new element
+   * was added.
+   */
+  std::pair<const_iterator, bool>
+  emplace (const key_type& key, mapped_type val,
+           const Context_t& ctx = Updater_t::defaultContext());
+
+
+  /**
+   * @brief Add an element to the map, or overwrite an existing one.
+   * @param key The key of the new item to add.
+   * @param val The value of the new item to add.
+   * @param ctx Execution context.
+   *
+   * This will overwrite an existing entry.
+   * The first element in the returned pair is an iterator referencing
+   * the added item.  The second is a flag that is true if a new element
+   * was added.
+   */
+  std::pair<const_iterator, bool>
+  insert_or_assign (const key_type& key, mapped_type val,
+                    const Context_t& ctx = Updater_t::defaultContext());
+
+
+  /**
+   * @break Add an element to the map.
+   * @param p The item to add.
+   *          Should be a pair where first is the string key
+   *          and second is the integer value.
+   *
+   * This will not overwrite an existing entry.
+   * The first element in the returned pair is an iterator referencing
+   * the added item.  The second is a flag that is true if a new element
+   * was added.
+   */
+  template <class PAIR>
+  std::pair<const_iterator, bool> insert (const PAIR& p);
+
+
+  /**
+   * @brief Insert a range of elements to the map.
+   * @param first Start of the range.
+   * @param last End of the range.
+   *
+   * The range should be a sequence of pairs where first is the string key
+   *  and second is the integer value.
+   */
+  template <class InputIterator>
+  void insert (InputIterator first, InputIterator last);
+
+
+  /**
+   * @brief Increase the table capacity.
+   * @param capacity The new table capacity.
+   * @param ctx Execution context.
+   *
+   * No action will be taken in @c capacity is smaller
+   * than the current capacity.
+   */
+  void reserve (size_type capacity,
+                const Context_t& ctx = Updater_t::defaultContext());
+
+
+  /**
+   * @brief Increase the table capacity.
+   * @param capacity The new table capacity.
+   *
+   * No action will be taken in @c capacity is smaller
+   * than the current capacity.
+   */
+  void rehash (size_type capacity);
+
+
+  /**
+   * @brief Called when this thread is no longer referencing anything
+   *        from this container.
+   * @param ctx Execution context.
+   */
+  void quiescent (const Context_t& ctx);
+
+
+private:
+  /**
+   * @brief Convert an underlying key value to a string pointer.
+   * @param val The underlying key value.
+   */
+  static const std::string* keyAsString (val_t val);
+
+
+  /**
+   * @brief Convert a string pointer to an underlying key value.
+   * @param val The string pointer.
+   */
+  static val_t keyAsVal (const std::string* s);
+
+
+  /**
+   * @brief Convert an underlying mapped value to this type's mapped value.
+   * @param val The underlying mapped value.
+   */
+  static mapped_type mappedAsMapped (val_t val);
+
+
+  /**
+   * @brief Convert this type's mapped value to an underlying mapped value.
+   * @param val THe mapped value.
+   */
+  static val_t mappedAsVal (mapped_type val);
+
+
+  /**
+   * @brief Do a lookup in the table.
+   * @param key The key to look up.
+   *
+   * Returns an iterator of the underlying map pointing at the found
+   * entry or end();
+   */
+  typename Impl_t::const_iterator get (const key_type& key) const;
+
+
+  /**
+   * @brief Insert / overwrite an entry in the table.
+   * @param key The key of the new item to add.
+   * @param val The value of the new item to add.
+   * @param overwrite If true, allow overwriting an existing entry.
+   * @param ctx Execution context.
+   *
+   * The first element in the returned pair is an iterator referencing
+   * the added item.  The second is a flag that is true if a new element
+   * was added.
+   */
+  std::pair<const_iterator, bool>
+  put (const key_type& key,
+       mapped_type val,
+       bool overwrite = true,
+       const Context_t& ctx = Updater_t::defaultContext());
+
+
+  /**
+   * @brief Hash functional for keys.
+   *
+   * The key can be either a std::string or the representation type
+   * used by the underlying map.
+   */
+  struct Hasher
+  {
+    /// Hash function from the underlying representation type.
+    size_t operator() (const val_t p) const;
+    /// Hash function from a std::string.
+    size_t operator() (const std::string& s) const;
+    /// Hash functional.
+    std::hash<std::string> m_hash;
+  };
+
+
+  /**
+   * @brief Matching functional for keys.
+   */
+  struct Matcher
+  {
+    /// Compare two keys (as the underlying representation type) for equality.
+    bool operator() (const val_t a, const val_t b) const;
+  };
+
+
+  /// The underlying hash table.
+  Impl_t m_impl;
+};
+
+
+} // namespace CxxUtils
+
+
+#include "CxxUtils/ConcurrentStrMap.icc"
+
+
+#endif // not CXXUTILS_CONCURRENTSTRMAP_H
diff --git a/Control/CxxUtils/CxxUtils/ConcurrentStrMap.icc b/Control/CxxUtils/CxxUtils/ConcurrentStrMap.icc
new file mode 100644
index 000000000000..0dcb244ebbec
--- /dev/null
+++ b/Control/CxxUtils/CxxUtils/ConcurrentStrMap.icc
@@ -0,0 +1,619 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/ConcurrentStrMap.icc
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Hash map from strings to integers allowing concurrent, lockless reads.
+ */
+
+
+namespace CxxUtils {
+
+
+#define T_CONCURRENTSTRMAP template <class VALUE, template <class> class UPDATER>
+#define CONCURRENTSTRMAP ConcurrentStrMap<VALUE, UPDATER>
+
+
+/**
+ * @brief Constructor.
+ * @param updater Object used to manage memory
+ *                (see comments at the start of the class).
+ * @param capacity The initial table capacity.
+ *                 (Will be rounded up to a power of two.)
+ * @param ctx Execution context.
+ */
+T_CONCURRENTSTRMAP
+CONCURRENTSTRMAP::ConcurrentStrMap (Updater_t&& updater,
+                                    size_type capacity /*= 64*/,
+                                    const Context_t& ctx
+                                      /* = Updater_t::defaultContext()*/) 
+  : m_impl (std::move (updater),
+            capacity,
+            Hasher(),
+            Matcher(),
+            ctx)
+{
+}
+
+
+/** 
+ * @brief Constructor from another map.
+ * @param updater Object used to manage memory
+ *                (see comments at the start of the class).
+ * @param capacity The initial table capacity of the new table.
+ *                 (Will be rounded up to a power of two.)
+ * @param ctx Execution context.
+ *
+ * (Not really a copy constructor since we need to pass @c updater.)
+ */
+T_CONCURRENTSTRMAP
+CONCURRENTSTRMAP::ConcurrentStrMap (const ConcurrentStrMap& other,
+                                    Updater_t&& updater,
+                                    size_type capacity /*= 64*/,
+                                    const Context_t& ctx
+                                      /*= Updater_t::defaultContext()*/)
+  : m_impl (std::move (updater),
+            capacity,
+            Hasher(),
+            Matcher(),
+            ctx)
+{
+  for (const auto& p : other) {
+    this->put (p.first, p.second, true, ctx);
+  }
+}
+
+
+/** 
+ * @brief Constructor from a range.
+ * @param f Start iterator for the range.
+ * @param l End iterator for the range.
+ * @param updater Object used to manage memory
+ *                (see comments at the start of the class).
+ * @param capacity The initial table capacity of the new table.
+ *                 (Will be rounded up to a power of two.)
+ * @param ctx Execution context.
+ *
+ * Constructor from a range of pairs.
+ */
+T_CONCURRENTSTRMAP
+template <class InputIterator>
+CONCURRENTSTRMAP::ConcurrentStrMap (InputIterator f,
+                                    InputIterator l,
+                                    Updater_t&& updater,
+                                    size_t capacity /*= 64*/,
+                                    const Context_t& ctx
+                                      /*= Updater_t::defaultContext()*/)
+  : m_impl (std::move (updater),
+            capacity,
+            Hasher(),
+            Matcher(),
+            ctx)
+{
+  for (; f != l; ++f) {
+    this->put (f->first, f->second, true, ctx);
+  }
+}
+
+
+/**
+ * @brief Destructor.
+ */
+T_CONCURRENTSTRMAP
+CONCURRENTSTRMAP::~ConcurrentStrMap()
+{
+  // Need to delete the strings that we've stored.
+  auto [begin, end] = m_impl.range();
+  while (begin != end) {
+    if (begin.key() != Impl_t::nullval) {
+      delete keyAsString (begin.key());
+    }
+    begin.next();
+  }
+}
+
+
+/**
+ * @brief Return the number of items currently in the map.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::size() const -> size_type
+{
+  return m_impl.size();
+}
+
+
+/**
+ * @brief Test if the map is currently empty.
+ */
+T_CONCURRENTSTRMAP
+inline
+bool CONCURRENTSTRMAP::empty() const
+{
+  return !m_impl.size();
+}
+
+
+/**
+ * @brief Return the current size (capacity) of the hash table.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::capacity() const -> size_t
+{
+  return m_impl.capacity();
+}
+
+
+/**
+ * @brief Constructor.
+ * @param it Iterator of the underlying table.
+ */
+T_CONCURRENTSTRMAP
+inline
+CONCURRENTSTRMAP::const_iterator::const_iterator (typename Impl_t::const_iterator it)
+  : m_impl (it)
+{
+}
+
+
+/**
+ * @brief Test if this iterator is value.
+ *
+ * This should be the same as testing for != end().
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::const_iterator::valid() const -> bool
+{
+  return m_impl.valid();
+}
+
+
+/**
+ * @brief iterator_facade requirement: Increment the iterator.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::const_iterator::increment() -> void
+{
+  m_impl.next();
+}
+
+
+/**
+ * @brief iterator_facade requirement: Decrement the iterator.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::const_iterator::decrement() -> void
+{
+  m_impl.prev();
+}
+
+
+/**
+ * @brief iterator_facade requirement: Dereference the iterator.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::const_iterator::dereference() const
+  -> const const_iterator_value
+{
+  return const_iterator_value (*keyAsString (m_impl.key()),
+                               mappedAsMapped (m_impl.value()));
+}
+
+
+/**
+ * @brief iterator_facade requirement: Equality test.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::const_iterator::equal (const const_iterator& other) const
+  -> bool
+{
+  return !(m_impl != other.m_impl);
+}
+
+
+/**
+ * @brief Return an interator range covering the entire map.
+ */
+T_CONCURRENTSTRMAP
+auto CONCURRENTSTRMAP::range() const -> const_iterator_range
+{
+  auto [begin, end] = m_impl.range();
+  return const_iterator_range (begin, end);
+}
+
+
+/**
+ * @brief Iterator at the start of the map.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::begin() const -> const_iterator
+{
+  return const_iterator (m_impl.begin());
+}
+
+
+/**
+ * @brief Iterator at the end of the map.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::end() const -> const_iterator
+{
+  return const_iterator (m_impl.end());
+}
+
+
+/**
+ * @brief Iterator at the start of the map.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::cbegin() const -> const_iterator
+{
+  return begin();
+}
+
+
+/**
+ * @brief Iterator at the end of the map.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::cend() const -> const_iterator
+{
+  return end();
+}
+
+
+/**
+ * @brief Test if a key is in the container.
+ * @param key The key to test.
+ */
+T_CONCURRENTSTRMAP
+inline
+bool CONCURRENTSTRMAP::contains (const key_type& key) const
+{
+  return get(key).valid();
+}
+
+
+/**
+ * @brief Return the number of times a given key is in the container.
+ * @param key The key to test.
+ *
+ * Returns either 0 or 1, depending on whether or not the key is in the map.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::count (const key_type& key) const -> size_type
+{
+  return contains (key) ? 1 : 0;
+}
+
+
+/**
+ * @brief Look up an element in the map.
+ * @param key The element to find.
+ *
+ * Returns either an iterator referencing the found element or end().
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::find (const key_type& key) const -> const_iterator
+{
+  return const_iterator (this->get (key));
+}
+
+
+/**
+ * @brief Look up an element in the map.
+ * @param key The element to find.
+ *
+ * Returns the value associated with the key.
+ * Throws @c std::out_of_range if the key does not exist in the map.
+ */
+T_CONCURRENTSTRMAP
+auto CONCURRENTSTRMAP::at (const key_type& key) const -> mapped_type
+{
+  typename Impl_t::const_iterator it = this->get (key);
+  if (!it.valid()) {
+    throw std::out_of_range ("ConcurrentStrMap::at");
+  }
+  return mappedAsMapped (it.value());
+}
+
+
+/**
+ * @brief Return a range of iterators with entries matching @c key.
+ * @param key The element to find.
+ *
+ * As keys are unique in this container, this is either a single-element
+ * range, or both iterators are equal to end().
+ */
+T_CONCURRENTSTRMAP
+auto CONCURRENTSTRMAP::equal_range (const key_type& key) const
+  -> std::pair<const_iterator, const_iterator>
+{
+  const_iterator i1 = find (key);
+  const_iterator i2 = i1;
+  if (i2.valid()) {
+    ++i2;
+  }
+  return std::make_pair (i1, i2);
+}
+
+
+/**
+ * @brief Add an element to the map.
+ * @param key The key of the new item to add.
+ * @param val The value of the new item to add.
+ * @param ctx Execution context.
+ *
+ * This will not overwrite an existing entry.
+ * The first element in the returned pair is an iterator referencing
+ * the added item.  The second is a flag that is true if a new element
+ * was added.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::emplace (const key_type& key,
+                                mapped_type val,
+                                const Context_t& ctx
+                                  /*= Updater_t::defaultContext()*/)
+  -> std::pair<const_iterator, bool>
+{
+  return put (key, val, false, ctx);
+}
+
+
+/**
+ * @brief Add an element to the map, or overwrite an existing one.
+ * @param key The key of the new item to add.
+ * @param val The value of the new item to add.
+ * @param ctx Execution context.
+ *
+ * This will overwrite an existing entry.
+ * The first element in the returned pair is an iterator referencing
+ * the added item.  The second is a flag that is true if a new element
+ * was added.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::insert_or_assign (const key_type& key,
+                                         mapped_type val,
+                                         const Context_t& ctx
+                                           /*= Updater_t::defaultContext()*/)
+  -> std::pair<const_iterator, bool>
+{
+  return put (key, val, true, ctx);
+}
+
+
+/**
+ * @break Add an element to the map.
+ * @param p The item to add.
+ *          Should be a pair where first is the string key
+ *          and second is the integer value.
+ *
+ * This will not overwrite an existing entry.
+ * The first element in the returned pair is an iterator referencing
+ * the added item.  The second is a flag that is true if a new element
+ * was added.
+ */
+T_CONCURRENTSTRMAP
+template <class PAIR>
+inline
+auto CONCURRENTSTRMAP::insert (const PAIR& p)
+  -> std::pair<const_iterator, bool>
+{
+  return emplace (p.first, p.second);
+}
+
+
+/**
+ * @brief Insert a range of elements to the map.
+ * @param first Start of the range.
+ * @param last End of the range.
+ *
+ * The range should be a sequence of pairs where first is the string key
+ *  and second is the integer value.
+ */
+T_CONCURRENTSTRMAP
+template <class InputIterator>
+void CONCURRENTSTRMAP::insert (InputIterator first, InputIterator last)
+{
+  for (; first != last; ++first) {
+    emplace (first->first, first->second);
+  }
+}
+
+
+/**
+ * @brief Increase the table capacity.
+ * @param capacity The new table capacity.
+ * @param ctx Execution context.
+ *
+ * No action will be taken in @c capacity is smaller
+ * than the current capacity.
+ */
+T_CONCURRENTSTRMAP
+inline
+void CONCURRENTSTRMAP::reserve (size_type capacity,
+                                const Context_t& ctx
+                                  /*= Updater_t::defaultContext()*/)
+{
+  return m_impl.reserve (capacity, ctx);
+}
+
+
+/**
+ * @brief Increase the table capacity.
+ * @param capacity The new table capacity.
+ *
+ * No action will be taken in @c capacity is smaller
+ * than the current capacity.
+ */
+T_CONCURRENTSTRMAP
+inline
+void CONCURRENTSTRMAP::rehash (size_type capacity)
+{
+  return reserve (capacity);
+}
+
+
+/**
+ * @brief Called when this thread is no longer referencing anything
+ *        from this container.
+ * @param ctx Execution context.
+ */
+T_CONCURRENTSTRMAP
+inline
+void CONCURRENTSTRMAP::quiescent (const Context_t& ctx)
+{
+  return m_impl.quiescent (ctx);
+}
+
+
+/**
+ * @brief Convert an underlying key value to a string pointer.
+ * @param val The underlying key value.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::keyAsString (val_t val) -> const std::string*
+{
+  return reinterpret_cast<std::string*> (val);
+}
+
+
+/**
+ * @brief Convert a string pointer to an underlying key value.
+ * @param val The string pointer.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::keyAsVal (const std::string* s) -> val_t
+{
+  return reinterpret_cast<val_t> (s);
+}
+
+
+/**
+ * @brief Convert an underlying mapped value to this type's mapped value.
+ * @param val The underlying mapped value.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::mappedAsMapped (val_t val) -> mapped_type
+{
+  return reinterpret_cast<mapped_type> (val);
+}
+
+
+/**
+ * @brief Convert this type's mapped value to an underlying mapped value.
+ * @param val THe mapped value.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::mappedAsVal (mapped_type val) -> val_t
+{
+  return reinterpret_cast<val_t> (val);
+}
+
+
+/**
+ * @brief Do a lookup in the table.
+ * @param key The key to look up.
+ *
+ * Returns an iterator of the underlying map pointing at the found
+ * entry or end();
+ */
+T_CONCURRENTSTRMAP
+auto CONCURRENTSTRMAP::get (const key_type& key) const
+  -> typename Impl_t::const_iterator
+{
+  size_t hash = m_impl.hasher() (key);
+  return m_impl.get (keyAsVal(&key), hash);
+}
+
+
+/**
+ * @brief Insert / overwrite an entry in the table.
+ * @param key The key of the new item to add.
+ * @param val The value of the new item to add.
+ * @param overwrite If true, allow overwriting an existing entry.
+ * @param ctx Execution context.
+ *
+ * The first element in the returned pair is an iterator referencing
+ * the added item.  The second is a flag that is true if a new element
+ * was added.
+ */
+T_CONCURRENTSTRMAP
+auto CONCURRENTSTRMAP::put (const key_type& key,
+                            mapped_type val,
+                            bool overwrite /*= true*/,
+                            const Context_t& ctx /*= Updater_t::defaultContext()*/)
+  -> std::pair<const_iterator, bool>
+{
+  size_t hash = m_impl.hasher() (key);
+  std::string* newkey = new std::string (key);
+  auto [it, flag] = m_impl.put (keyAsVal(newkey), hash,
+                                mappedAsVal (val),
+                                overwrite, ctx);
+  if (!flag) delete newkey;
+  return std::make_pair (const_iterator (it), flag);
+}
+
+
+/**
+ * @brief Hash function from the underlying representation type.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::Hasher::operator() (const val_t p) const -> size_t
+{
+  return m_hash (*keyAsString(p));
+}
+
+
+/**
+ * @brief Hash function from a std::string.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::Hasher::operator() (const std::string& s) const -> size_t
+{
+  return m_hash (s);
+}
+
+
+/**
+ * @brief Compare two keys (as the underlying representation type) for equality.
+ */
+T_CONCURRENTSTRMAP
+inline
+auto CONCURRENTSTRMAP::Matcher::operator() (const val_t a, const val_t b) const -> bool
+{
+  // First test if the keys (pointers) themselves are equal.
+  if (a == b) return true;
+  // Otherwise, need to test the strings to which they point.
+  return *keyAsString(a) == *keyAsString(b);
+}
+
+
+#undef T_CONCURRENTSTRMAP
+#undef CONCURRENTSTRMAP
+
+
+} // namespace CxxUtils
diff --git a/Control/CxxUtils/share/ConcurrentStrMap_test.ref b/Control/CxxUtils/share/ConcurrentStrMap_test.ref
new file mode 100644
index 000000000000..446c7706dc0f
--- /dev/null
+++ b/Control/CxxUtils/share/ConcurrentStrMap_test.ref
@@ -0,0 +1,5 @@
+CxxUtils/ConcurrentStrMap_test
+test1
+test2
+test3
+test4
diff --git a/Control/CxxUtils/test/ConcurrentStrMap_test.cxx b/Control/CxxUtils/test/ConcurrentStrMap_test.cxx
new file mode 100644
index 000000000000..1499b8d08abb
--- /dev/null
+++ b/Control/CxxUtils/test/ConcurrentStrMap_test.cxx
@@ -0,0 +1,924 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/test/ConcurrentStrMap_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Tests for ConcurrenStrMap.
+ */
+
+
+#undef NDEBUG
+#include "CxxUtils/ConcurrentStrMap.h"
+#include "CxxUtils/StrFormat.h"
+#include "CxxUtils/MurmurHash2.h"
+#include "TestTools/expect_exception.h"
+#include "TestTools/random.h"
+#include "tbb/concurrent_unordered_map.h"
+#include "boost/timer/timer.hpp"
+#ifdef HAVE_CK
+extern "C" {
+#include "ck_ht.h"
+}
+#endif
+#include <unordered_map>
+#include <mutex>
+#include <thread>
+#include <shared_mutex>
+#include <vector>
+#include <memory>
+#include <iostream>
+#include <sstream>
+#include <cassert>
+
+
+const int nslots = 4;
+
+struct Context_t
+{
+  Context_t (int the_slot = 0) : slot (the_slot) {}
+  int slot;
+};
+
+
+template <class T>
+class TestUpdater
+{
+public:
+  using Context_t = ::Context_t;
+
+  TestUpdater()
+    : m_p (nullptr),
+      m_inGrace (0)
+  {
+  }
+
+  TestUpdater (TestUpdater&& other)
+    : m_p (static_cast<T*> (other.m_p)),
+      m_inGrace (0)
+  {
+  }
+
+  TestUpdater& operator= (const TestUpdater&) = delete; // coverity
+
+  ~TestUpdater()
+  {
+    delete m_p;
+    for (T* p : m_garbage) delete p;
+  }
+
+  void update (std::unique_ptr<T> p, const Context_t& ctx)
+  {
+    std::lock_guard<std::mutex> g (m_mutex);
+    if (m_p) m_garbage.push_back (m_p);
+    m_p = p.release();
+    m_inGrace = (~(1<<ctx.slot)) & ((1<<nslots)-1);
+  }
+
+  void discard (std::unique_ptr<T> p)
+  {
+    std::lock_guard<std::mutex> g (m_mutex);
+    m_garbage.push_back (p.release());
+    m_inGrace = ((1<<nslots)-1);
+  }
+
+  const T& get() const { return *m_p; }
+
+  void quiescent (const Context_t& ctx)
+  {
+    unsigned int mask = (1<<ctx.slot);
+    std::lock_guard<std::mutex> g (m_mutex);
+    if ((m_inGrace & mask) == 0) return;
+    m_inGrace &= ~mask;
+    if (!m_inGrace) {
+      for (T* p : m_garbage) delete p;
+      m_garbage.clear();
+    }
+  }
+
+  static Context_t defaultContext() { return 0; }
+
+
+private:
+  std::mutex m_mutex;
+  std::atomic<T*> m_p;
+  std::vector<T*> m_garbage;
+  unsigned int m_inGrace;
+};
+
+
+using TestMap = CxxUtils::ConcurrentStrMap<size_t, TestUpdater>;
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  TestMap map {TestMap::Updater_t()};
+
+  const size_t MAXKEYS = 1000;
+  std::vector<std::string> keys;
+
+  for (size_t i = 0; i < MAXKEYS; i++) {
+    std::ostringstream ss;
+    ss << i;
+    keys.push_back (ss.str());
+  }
+
+  assert (map.size() == 0);
+  assert (map.capacity() == 64);
+  assert (map.empty());
+
+  for (size_t i = 0; i < MAXKEYS; i++) {
+    auto [it, flag] = map.emplace (keys[i], i);
+    assert (flag);
+    assert (it.valid());
+    assert (it->first == keys[i]);
+    assert (it->second == i);
+  }
+
+  assert (map.size() == MAXKEYS);
+  assert (map.capacity() == 1024);
+  assert (!map.empty());
+
+  for (size_t i = 0; i < MAXKEYS; i++) {
+    TestMap::const_iterator it = map.find (keys[i]);
+    assert (it.valid());
+    assert (it != map.end());
+    assert (it->first == keys[i]);
+    assert (it->second == i);
+  }
+  assert (map.count (keys[10]) == 1);
+  assert (map.count ("foobar") == 0);
+  assert (map.contains (keys[10]));
+  assert (!map.contains ("foobar"));
+  assert (map.find ("foobar") == map.end());
+  assert (!map.find ("foobar").valid());
+
+  {
+    auto [i1, i2] = map.equal_range (keys[10]);
+    assert (i1.valid());
+    assert (i1 != i2);
+    assert (i1->first == keys[10]);
+    assert (i1->second == 10);
+    ++i1;
+    assert (i1 == i2);
+  }
+
+  {
+    auto [i1, i2] = map.equal_range ("foobar");
+    assert (!i1.valid());
+    assert (i1 == map.end());
+    assert (i1 == i2);
+  }
+
+  assert (map.at (keys[10]) == 10);
+  EXPECT_EXCEPTION (std::out_of_range, map.at ("fooabr"));
+
+  for (size_t i = 0; i < MAXKEYS; i++) {
+    auto [it, flag] = map.insert_or_assign (keys[i], i+10000);
+    assert (!flag);
+    assert (it.valid());
+    assert (it->first == keys[i]);
+    assert (it->second == i+10000);
+  }
+
+  assert (map.size() == MAXKEYS);
+  assert (map.capacity() == 1024);
+
+  for (size_t i = 0; i < MAXKEYS; i++) {
+    TestMap::const_iterator it = map.find (keys[i]);
+    assert (it.valid());
+    assert (it != map.end());
+    assert (it->first == keys[i]);
+    assert (it->second == i+10000);
+  }
+
+  std::vector<size_t> exp;
+  for (size_t i = 0; i < MAXKEYS; i++) {
+    exp.push_back (i);
+  }
+
+  std::vector<size_t> seen;
+  for (const auto& p : map.range()) {
+    size_t i = p.second - 10000;
+    assert (i < MAXKEYS);
+    assert (p.first == keys[i]);
+    seen.push_back (i);
+  }
+
+  std::sort (seen.begin(), seen.end());
+  assert (seen == exp);
+
+  seen.clear();
+  for (const auto& p : map) {
+    size_t i = p.second - 10000;
+    assert (i < MAXKEYS);
+    assert (p.first == keys[i]);
+    seen.push_back (i);
+  }
+
+  std::sort (seen.begin(), seen.end());
+  assert (seen == exp);
+
+  {
+    auto [it, flag] = map.insert (std::make_pair ("baz", 99999));
+    assert (flag);
+    assert (it.valid());
+    assert (it->first == "baz");
+    assert (it->second == 99999);
+  }    
+  {
+    auto [it, flag] = map.insert (std::make_pair ("baz", 99998));
+    assert (!flag);
+    assert (it.valid());
+    assert (it->first == "baz");
+    assert (it->second == 99999);
+  }    
+}
+
+
+// Bulk copy / insert.
+void test2()
+{
+  std::cout << "test2\n";
+  std::vector<std::pair<std::string, size_t> > data
+    { {"zero",  0},
+      {"one",   1},
+      {"two",   2},
+      {"three", 3},
+      {"four",  4},
+      {"five",  5},
+      {"six",   6},
+      {"seven", 7},
+      {"eight", 8},
+      {"nine",  9},
+    };
+  
+  TestMap map1 (data.begin(), data.end(), TestMap::Updater_t());
+  assert (map1.size() == 10);
+  {
+    TestMap::const_iterator it = map1.find ("four");
+    assert (it.valid());
+    assert (it != map1.end());
+    assert (it->first == "four");
+    assert (it->second == 4);
+  }
+
+  TestMap map2 (map1, TestMap::Updater_t());
+  assert (map2.size() == 10);
+  {
+    TestMap::const_iterator it = map2.find ("six");
+    assert (it.valid());
+    assert (it != map2.end());
+    assert (it->first == "six");
+    assert (it->second == 6);
+  }
+
+  TestMap map3 {TestMap::Updater_t()};
+  assert (map3.capacity() == 64);
+  assert (map3.size() == 0);
+
+  map3.reserve (200);
+  assert (map3.capacity() == 256);
+  map3.reserve (100);
+  assert (map3.capacity() == 256);
+  map3.quiescent (Context_t());
+  assert (map3.size() == 0);
+
+  map3.insert (std::begin(data), std::end(data));
+  assert (map3.size() == 10);
+  assert (map3.at ("five") == 5);
+}
+
+
+// With a pointer value.
+void test3()
+{
+  std::cout << "test3\n";
+
+  using PtrMap = CxxUtils::ConcurrentStrMap<const int*, TestUpdater>;
+  PtrMap map {PtrMap::Updater_t()};
+
+  int v[10] = {0};
+
+  map.emplace ("one", &v[1]);
+  map.emplace ("three", &v[3]);
+  map.emplace ("five", &v[5]);
+
+  assert (map.at("three") == &v[3]);
+  assert (map.find("three")->first == "three");
+  assert (map.find("three")->second == &v[3]);
+}
+
+
+//***************************************************************************
+// Threaded test.
+//
+
+
+std::shared_timed_mutex start_mutex;
+
+
+class test4_Base
+{
+public:
+  static constexpr size_t nwrites = 10000;
+  
+  test4_Base (int slot);
+  int ctx() const { return m_slot; }
+  const std::string& key (size_t i) const { return m_keys[i]; }
+  void setContext();
+
+
+private:
+  int m_slot;
+  std::vector<std::string> m_keys;
+};
+
+
+test4_Base::test4_Base (int slot)
+  : m_slot (slot)
+{
+  for (size_t i = 0; i < nwrites; i++) {
+    std::ostringstream ss;
+    ss << i;
+    m_keys.push_back (ss.str());
+  }
+}
+
+
+void test4_Base::setContext()
+{
+}
+
+
+
+class test4_Writer
+  : public test4_Base
+{
+public:
+  test4_Writer (int slot, TestMap& map);
+  void operator()();
+
+private:
+  TestMap& m_map;
+};
+
+
+test4_Writer::test4_Writer (int slot, TestMap& map)
+  : test4_Base (slot),
+    m_map (map)
+{
+}
+
+
+void test4_Writer::operator()()
+{
+  setContext();
+  std::shared_lock<std::shared_timed_mutex> lock (start_mutex);
+
+  for (size_t i=0; i < nwrites; i++) {
+    assert (m_map.emplace (key(i), i).second);
+    m_map.quiescent (ctx());
+    if (((i+1)%128) == 0) {
+      usleep (1000);
+    }
+  }
+
+  for (size_t i=0; i < nwrites; i++) {
+    assert (!m_map.insert_or_assign (key(i), i + 10*nwrites).second);
+    m_map.quiescent (ctx());
+    if (((i+1)%128) == 0) {
+      usleep (1000);
+    }
+  }
+
+  for (size_t i=0; i < nwrites; i++) {
+    assert (!m_map.insert_or_assign (key(i), i + 20*nwrites).second);
+    m_map.quiescent (ctx());
+    if (((i+1)%128) == 0) {
+      usleep (1000);
+    }
+  }
+
+  assert (m_map.emplace ("fin", nwrites).second);
+}
+
+
+class test4_Iterator
+  : public test4_Base
+{
+public:
+  test4_Iterator (int slot, TestMap& map);
+  void operator()();
+
+private:
+  TestMap& m_map;
+};
+
+
+test4_Iterator::test4_Iterator (int slot, TestMap& map)
+  : test4_Base (slot),
+    m_map (map)
+{
+}
+
+
+void test4_Iterator::operator()()
+{
+  setContext();
+  std::shared_lock<std::shared_timed_mutex> lock (start_mutex);
+
+  while (true) {
+    for (const auto& p : m_map) {
+      if (p.second == nwrites) continue;
+      size_t i = p.second % nwrites;
+      assert (key(i) == p.first);
+      assert (p.second == i || p.second == i+10*nwrites || p.second == i +20*nwrites);
+    }
+
+    TestMap::const_iterator_range range = m_map.range();
+    TestMap::const_iterator begin2 = range.begin();
+    TestMap::const_iterator end2 = range.end();
+    while (begin2 != end2) {
+      --end2;
+      if (end2->second == nwrites) continue;
+      size_t i = end2->second % nwrites;
+      assert (key(i) == end2->first);
+      assert (end2->second == i || end2->second == i+10*nwrites || end2->second == i +20*nwrites);
+    }
+
+    m_map.quiescent (ctx());
+    if (m_map.size() > nwrites) break;
+  }
+}
+
+
+class test4_Reader
+  : public test4_Base
+{
+public:
+  test4_Reader (int slot, TestMap& map);
+  void operator()();
+
+private:
+  TestMap& m_map;
+};
+
+
+test4_Reader::test4_Reader (int slot, TestMap& map)
+  : test4_Base (slot),
+    m_map (map)
+{
+}
+
+
+void test4_Reader::operator()()
+{
+  setContext();
+  std::shared_lock<std::shared_timed_mutex> lock (start_mutex);
+
+  while (true) {
+    for (size_t i = 0; ; ++i) {
+      TestMap::const_iterator it = m_map.find (key(i));
+      if (it == m_map.end()) break;
+      assert(it->second == i || it->second == i+10*nwrites || it->second == i+20*nwrites);
+    }
+
+    m_map.quiescent (ctx());
+    if (m_map.size() > nwrites) break;
+  }
+}
+
+
+void test4_iter()
+{
+  TestMap map {TestMap::Updater_t()};
+
+  const int nthread = 4;
+  std::thread threads[nthread];
+  start_mutex.lock();
+
+  threads[0] = std::thread (test4_Writer (0, map));
+  threads[1] = std::thread (test4_Iterator (1, map));
+  threads[2] = std::thread (test4_Reader (2, map));
+  threads[3] = std::thread (test4_Reader (3, map));
+
+  // Try to get the threads starting as much at the same time as possible.
+  start_mutex.unlock();
+  for (int i=0; i < nthread; i++)
+    threads[i].join();
+}
+
+
+void test4()
+{
+  std::cout << "test4\n";
+
+  for (int i=0; i < 5; i++) {
+    test4_iter();
+  }
+}
+
+
+//***************************************************************************
+// Optional performance test test.
+//
+
+
+class ConcurrentStrMapAdapter
+  : public TestMap
+{
+public:
+  ConcurrentStrMapAdapter()
+    : TestMap (TestMap::Updater_t(), 512)
+  {
+  }
+  static std::string name() { return "ConcurrentStrMap"; }
+
+  uintptr_t get (const std::string& s) const
+  {
+    auto it = find (s);
+    if (it.valid()) return it->second;
+    return 0;
+  }
+
+  static const std::string& key (const const_iterator& i)
+  { return i->first; }
+  static uintptr_t value (const const_iterator& i)
+  { return i->second; }
+};
+
+
+class UnorderedMapAdapter
+{
+public:
+  typedef std::unordered_map<std::string, uintptr_t> map_t;
+  typedef map_t::const_iterator const_iterator;
+  
+  static std::string name() { return "UnorderedMap"; }
+
+  void emplace (const std::string& s, uintptr_t p)
+  {
+    lock_t lock (m_mutex);
+    m_map.emplace (s, p);
+  }
+
+
+  uintptr_t get (const std::string& s) const
+  {
+    lock_t lock (m_mutex);
+    auto it = m_map.find (s);
+    if (it != m_map.end()) return it->second;
+    return 0;
+  }
+
+  const_iterator begin() const { return m_map.begin(); }
+  const_iterator end() const { return m_map.end(); }
+  static const std::string& key (const const_iterator& i)
+  { return i->first; }
+  static uintptr_t value (const const_iterator& i)
+  { return i->second; }
+
+  
+private:
+  map_t m_map;
+
+  typedef std::mutex mutex_t;
+  typedef std::lock_guard<mutex_t> lock_t;
+  mutable mutex_t m_mutex;
+};
+
+
+class ConcurrentUnorderedMapAdapter
+{
+public:
+  typedef tbb::concurrent_unordered_map<std::string, uintptr_t> map_t;
+  typedef map_t::const_iterator const_iterator;
+
+  static std::string name() { return "concurrent_unordered_map"; }
+
+  void emplace (const std::string& s, uintptr_t p)
+  {
+    m_map.emplace (s, p);
+  }
+
+
+  uintptr_t get (const std::string& s) const
+  {
+    auto it = m_map.find (s);
+    if (it != m_map.end()) return it->second;
+    return 0;
+  }
+
+  const_iterator begin() const { return m_map.begin(); }
+  const_iterator end() const { return m_map.end(); }
+  static const std::string& key (const const_iterator& i)
+  { return i->first; }
+  static uintptr_t value (const const_iterator& i)
+  { return i->second; }
+
+private:
+  map_t m_map;
+};
+
+
+#ifdef HAVE_CK
+class CKHTAdapter
+{
+public:
+  CKHTAdapter();
+  static std::string name() { return "ck_ht"; }
+
+  struct const_iterator
+  {
+    const_iterator (ck_ht_t* ht)
+      : m_ht (ht)
+    {
+      if (m_ht) {
+        ck_ht_iterator_init (&m_it);
+        if (!ck_ht_next (m_ht, &m_it, &m_entry)) {
+          m_entry = nullptr;
+        }
+      }
+      else {
+        m_entry = nullptr;
+      }
+    }
+
+    const_iterator& operator++()
+    {
+      if (!ck_ht_next (m_ht, &m_it, &m_entry)) {
+        m_entry = nullptr;
+      }
+      return *this;
+    }
+
+    bool operator!= (const const_iterator& other) const
+    {
+      return m_entry != other.m_entry;
+    }
+
+    ck_ht_t* m_ht;
+    ck_ht_iterator_t m_it;
+    ck_ht_entry_t* m_entry;
+  };
+
+  void emplace (const std::string& s, uintptr_t p)
+  {
+    ck_ht_entry_t entry;
+    ck_ht_hash_t h;
+    ck_ht_hash (&h, &m_ht, s.c_str(), s.size());
+    ck_ht_entry_set (&entry, h, s.c_str(), s.size(),
+                     reinterpret_cast<const void*>(p));
+    ck_ht_put_spmc (&m_ht, h, &entry);
+  }
+
+
+  uintptr_t get (const std::string& s) const
+  {
+    ck_ht_entry_t entry;
+    ck_ht_hash_t h;
+    ck_ht_hash (&h, &m_ht, s.c_str(), s.size());
+    ck_ht_entry_key_set (&entry, s.c_str(), s.size());
+    if (ck_ht_get_spmc (&m_ht, h, &entry)) {
+      return reinterpret_cast<uintptr_t>(ck_ht_entry_value (&entry));
+    }
+    return 0;
+  }
+
+  static const std::string key (const const_iterator& i)
+  {
+    void* key = ck_ht_entry_key (i.m_entry);
+    uint16_t len = ck_ht_entry_key_length (i.m_entry);
+    return std::string (reinterpret_cast<const char*>(key), len);
+  }
+  static uintptr_t value (const const_iterator& i)
+  { return reinterpret_cast<uintptr_t>(ck_ht_entry_value(i.m_entry)); }
+
+  const_iterator begin() const
+  {
+    return const_iterator (&m_ht);
+  }
+
+  const_iterator end() const
+  {
+    return const_iterator (nullptr);
+  }
+
+
+private:
+  static void hash (ck_ht_hash_t* h,
+                    const void* key,
+                    size_t key_length,
+                    uint64_t seed)
+  {
+    // Same as used by libstdc++.
+    h->value = CxxUtils::MurmurHash64A (key, key_length, seed);
+  }
+
+  static void ht_free (void *p, size_t /*b*/, bool /*r*/) { free(p); }
+
+  ck_malloc m_alloc;
+  mutable ck_ht_t m_ht;
+};
+
+
+CKHTAdapter::CKHTAdapter()
+{
+  m_alloc.malloc = malloc;
+  m_alloc.free = ht_free;
+  if (!ck_ht_init (&m_ht,
+                   CK_HT_MODE_BYTESTRING,
+                   hash, // ck_ht_hash_cb_t
+                   &m_alloc, // ck_malloc*
+                   128, // initial size
+                   6602834))
+  {
+    std::cout << "ck_hs_init error\n";
+  }
+}
+#endif // HAVE_CK
+
+
+class Timer
+{
+public:
+  Timer();
+
+  class RunTimer
+  {
+  public:
+    RunTimer (boost::timer::cpu_timer& timer) : m_timer (&timer)
+    { timer.resume(); }
+    RunTimer (RunTimer&& other) : m_timer (other.m_timer) { other.m_timer = nullptr; }
+    ~RunTimer() { if (m_timer) m_timer->stop(); }
+  private:
+    boost::timer::cpu_timer* m_timer;
+  };
+  RunTimer run() { return RunTimer (m_timer); }
+
+  std::string format() const { return m_timer.format(3); }
+
+private:
+  boost::timer::cpu_timer m_timer;
+};
+
+
+Timer::Timer()
+{
+  m_timer.stop();
+}
+
+
+class TesterBase
+{
+public:
+  TesterBase();
+
+  Timer::RunTimer run_lookup_timer() { return m_lookup_timer.run(); }
+  Timer::RunTimer run_iterate_timer() { return m_iterate_timer.run(); }
+
+  void report();
+
+private:
+  Timer m_lookup_timer;
+  Timer m_iterate_timer;
+};
+
+
+TesterBase::TesterBase()
+{
+}
+
+
+void TesterBase::report()
+{
+  std::cout << "lookup:  " << m_lookup_timer.format();
+  std::cout << "iterate: " << m_iterate_timer.format();
+}
+
+
+template <class CONT>
+class Tester
+  : public TesterBase
+{
+public:
+  static constexpr size_t NCONT = 1000;
+  static constexpr size_t NEACH = 10000;
+  static constexpr size_t LOG_NENT = 11;
+  static constexpr size_t NENT = 1<<LOG_NENT;
+  static constexpr size_t ENT_MASK = NENT-1;
+  
+  Tester();
+  void lookup_test();
+  void iterate_test();
+
+  void test();
+  std::string name() { return CONT::name(); }
+
+private:
+  std::vector<std::string> m_keys[NCONT];
+  CONT m_cont[NCONT];
+  uint32_t m_seed;
+};
+
+
+template <class CONT>
+Tester<CONT>::Tester()
+  : m_seed (1235)
+{
+  for (size_t j=0; j < NCONT; j++) {
+    for (size_t i = 0; i < NENT; i++) {
+      m_keys[j].push_back (CxxUtils::strformat ("key%03lu%08lu", j, i));
+    }
+    for (size_t i = 0; i < NENT; i++) {
+      m_cont[j].emplace (m_keys[j][i],
+                         reinterpret_cast<uintptr_t>(&m_keys[j][i]));
+    }
+  }
+}
+
+
+template <class CONT>
+void Tester<CONT>::lookup_test()
+{
+  auto timer = run_lookup_timer();
+  for (size_t irep = 0; irep < NEACH; irep++) {
+    for (size_t icont = 0; icont < NCONT; icont++) {
+      uint32_t ient = Athena_test::rng_seed (m_seed) & ENT_MASK;
+      const std::string& key = m_keys[icont][ient];
+      uintptr_t val = m_cont[icont].get (key);
+      assert (val == reinterpret_cast<uintptr_t>(&key));
+    }
+  }
+}
+
+
+template <class CONT>
+void Tester<CONT>::iterate_test()
+{
+  auto timer = run_iterate_timer();
+  int icount = 0;
+  for (size_t irep = 0; irep < 100; irep++) {
+    for (size_t icont = 0; icont < NCONT; icont++) {
+      const CONT& cont = m_cont[icont];
+      typename CONT::const_iterator it = cont.begin();
+      typename CONT::const_iterator end = cont.end();
+      while (it != end) {
+        const std::string& key = CONT::key (it);
+        const uintptr_t  val= CONT::value (it);
+        if (((++icount) % 128) == 0) {
+          assert (key == *reinterpret_cast<const std::string*>(val));
+        }
+        ++it;
+      }
+    }
+  }
+}
+
+
+template <class CONT>
+void Tester<CONT>::test()
+{
+  lookup_test();
+  iterate_test();
+}
+
+
+template <class CONT>
+void perftest_one()
+{
+  Tester<CONT> tester;
+  std::cout << tester.name() << "\n";
+  tester.test();
+  tester.report();
+}
+
+
+void perftest()
+{
+  perftest_one<ConcurrentStrMapAdapter>();
+  perftest_one<UnorderedMapAdapter>();
+  perftest_one<ConcurrentUnorderedMapAdapter>();
+#ifdef HAVE_CK
+  perftest_one<CKHTAdapter>();
+#endif
+}
+
+
+int main (int argc, char** argv)
+{
+  if (argc >= 2 && strcmp (argv[1], "--perf") == 0) {
+    perftest();
+    return 0;
+  }
+
+  std::cout << "CxxUtils/ConcurrentStrMap_test\n";
+  test1();
+  test2();
+  test3();
+  test4();
+  return 0;
+}
-- 
GitLab


From 88287e1429c91123f11dffcd2e7f17efce123d68 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 16 Dec 2020 12:18:53 -0500
Subject: [PATCH 064/308] CxxUtils: Add SimpleUpdater.

Add a simple implementation of the Updater interface.
It doesn't keep track of slots, and does not attempt to delete any garbage
until the SimpleUpdater object itself is deleted.

This can be appropriate for something like a ConcurrentStrMap if one
has a good guess in advance of the size of the table.
---
 Control/CxxUtils/CMakeLists.txt               |   2 +-
 Control/CxxUtils/CxxUtils/SimpleUpdater.h     | 109 ++++++++++++++++++
 Control/CxxUtils/CxxUtils/SimpleUpdater.icc   |  90 +++++++++++++++
 Control/CxxUtils/share/SimpleUpdater_test.ref |   2 +
 .../CxxUtils/test/ConcurrentStrMap_test.cxx   |   3 +-
 Control/CxxUtils/test/SimpleUpdater_test.cxx  |  62 ++++++++++
 6 files changed, 266 insertions(+), 2 deletions(-)
 create mode 100644 Control/CxxUtils/CxxUtils/SimpleUpdater.h
 create mode 100644 Control/CxxUtils/CxxUtils/SimpleUpdater.icc
 create mode 100644 Control/CxxUtils/share/SimpleUpdater_test.ref
 create mode 100644 Control/CxxUtils/test/SimpleUpdater_test.cxx

diff --git a/Control/CxxUtils/CMakeLists.txt b/Control/CxxUtils/CMakeLists.txt
index 1ca2f75bb18a..ab2cbba9e410 100644
--- a/Control/CxxUtils/CMakeLists.txt
+++ b/Control/CxxUtils/CMakeLists.txt
@@ -128,7 +128,7 @@ foreach( test sincos_test ArrayScanner_test Arrayrep_test
       MurmurHash2_test bitmask_test crc64_test Ring_test
       restrict_test vectorize_test get_unaligned_test aligned_vector_test
       vec_int_test vec_float_test vec_fb_int_test vec_fb_float_test
-      ConcurrentHashmapImpl_test )
+      ConcurrentHashmapImpl_test SimpleUpdater_test )
    atlas_add_test( ${test}
       SOURCES test/${test}.cxx
       LOG_IGNORE_PATTERN "no version information available"
diff --git a/Control/CxxUtils/CxxUtils/SimpleUpdater.h b/Control/CxxUtils/CxxUtils/SimpleUpdater.h
new file mode 100644
index 000000000000..393b62b0cbda
--- /dev/null
+++ b/Control/CxxUtils/CxxUtils/SimpleUpdater.h
@@ -0,0 +1,109 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/SimpleUpdater.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Simple (non-deleting) Updater implementation.
+ */
+
+
+#ifndef CXXUTILS_SIMPLEUPDATER_H
+#define CXXUTILS_SIMPLEUPDATER_H
+
+
+#include <atomic>
+#include <vector>
+#include <memory>
+
+
+namespace CxxUtils {
+
+
+/**
+ * @brief Simple (non-deleting) Updater implementation.
+ *
+ * This is a simple implementation of the Updater interface as described
+ * in @c ConcurrentRangeMap that does not delete any memory until
+ * the @c SimpleUpdater itself is deleted.  This can be useful for,
+ * say, a @c ConcurrentStrMap if you have a good initial guess
+ * for the size of the table.
+ */
+template <class T>
+class SimpleUpdater
+{
+public:
+  /// Context object.  Required by the interface, though we don't
+  /// really use it.
+  struct Context_t {};
+
+  /// We need a default constructor.
+  SimpleUpdater() = default;
+
+
+  /**
+   * @brief Move constructor.
+   */
+  SimpleUpdater (SimpleUpdater&& other);
+
+
+  /**
+   * @brief Return a reference to the current object.
+   */
+  const T& get() const;
+
+
+  /**
+   * @brief Install a new object.
+   * @param p The new object to install.
+   * @param ctx Current execution context.
+   *
+   * The existing object should not be deleted until it can no longer
+   * be referenced by any thread.
+   */
+  void update (std::unique_ptr<T> p, const Context_t&);
+
+
+  /**
+   * @brief Queue an object for later deletion.
+   * @param p The object to delete.
+   *
+   * The object @c p will be queued for deletion once a grace period
+   * has passed for all slots.  In contrast to using @c update,
+   * this does not change the current object.
+   */
+  void discard (std::unique_ptr<T> p);
+
+
+  /**
+   * @brief Mark that an event slot is not referencing this object.
+   *
+   * A no-op for @c SimpleUpdater.
+   */
+  void quiescent (const Context_t&);
+
+
+  /**
+   * @brief Return the current event context.
+   */
+  static const Context_t defaultContext();
+
+
+private:
+  /// Pointer to the current object.
+  std::atomic<const T*> m_obj = 0;
+
+  /// List of all allocated objects.
+  std::vector<std::unique_ptr<T> > m_objs;
+};
+
+
+} // namespace CxxUtils
+
+
+#include "CxxUtils/SimpleUpdater.icc"
+
+
+#endif // not CXXUTILS_SIMPLEUPDATER_H
diff --git a/Control/CxxUtils/CxxUtils/SimpleUpdater.icc b/Control/CxxUtils/CxxUtils/SimpleUpdater.icc
new file mode 100644
index 000000000000..3332fab5958a
--- /dev/null
+++ b/Control/CxxUtils/CxxUtils/SimpleUpdater.icc
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/SimpleUpdater.icc
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Simple (non-deleting) Updater implementation.
+ */
+
+
+namespace CxxUtils {
+
+
+/**
+ * @brief Move constructor.
+ */
+template <class T>
+SimpleUpdater<T>::SimpleUpdater (SimpleUpdater&& other)
+  : m_obj (static_cast<const T*> (other.m_obj)),
+    m_objs (std::move (other.m_objs))
+{
+}
+
+
+/**
+ * @brief Return a reference to the current object.
+ */
+template <class T>
+inline
+const T& SimpleUpdater<T>::get() const
+{
+  return *m_obj;
+}
+
+
+/**
+ * @brief Install a new object.
+ * @param p The new object to install.
+ * @param ctx Current execution context.
+ *
+ * The existing object should not be deleted until it can no longer
+ * be referenced by any thread.
+ */
+template <class T>
+void SimpleUpdater<T>::update (std::unique_ptr<T> p, const Context_t&)
+{
+  m_objs.push_back (std::move (p));
+  m_obj = m_objs.back().get();
+}
+
+
+/**
+ * @brief Queue an object for later deletion.
+ * @param p The object to delete.
+ *
+ * The object @c p will be queued for deletion once a grace period
+ * has passed for all slots.  In contrast to using @c update,
+ * this does not change the current object.
+ */
+template <class T>
+void SimpleUpdater<T>::discard (std::unique_ptr<T> p)
+{
+  m_objs.push_back (std::move (p));
+}
+
+
+/**
+ * @brief Mark that an event slot is not referencing this object.
+ *
+ * A no-op for @c SimpleUpdater.
+ */
+template <class T>
+void SimpleUpdater<T>::quiescent (const Context_t&)
+{
+}
+
+
+/**
+ * @brief Return the current event context.
+ */
+template <class T>
+const typename SimpleUpdater<T>::Context_t SimpleUpdater<T>::defaultContext()
+{
+  return Context_t();
+}
+
+
+} // namespace CxxUtils
+
diff --git a/Control/CxxUtils/share/SimpleUpdater_test.ref b/Control/CxxUtils/share/SimpleUpdater_test.ref
new file mode 100644
index 000000000000..01c775296286
--- /dev/null
+++ b/Control/CxxUtils/share/SimpleUpdater_test.ref
@@ -0,0 +1,2 @@
+CxxUtils/SimpleUpdater_test
+test1
diff --git a/Control/CxxUtils/test/ConcurrentStrMap_test.cxx b/Control/CxxUtils/test/ConcurrentStrMap_test.cxx
index 1499b8d08abb..4ab25b1eedf8 100644
--- a/Control/CxxUtils/test/ConcurrentStrMap_test.cxx
+++ b/Control/CxxUtils/test/ConcurrentStrMap_test.cxx
@@ -13,6 +13,7 @@
 #include "CxxUtils/ConcurrentStrMap.h"
 #include "CxxUtils/StrFormat.h"
 #include "CxxUtils/MurmurHash2.h"
+#include "CxxUtils/checker_macros.h"
 #include "TestTools/expect_exception.h"
 #include "TestTools/random.h"
 #include "tbb/concurrent_unordered_map.h"
@@ -721,7 +722,7 @@ private:
   static void ht_free (void *p, size_t /*b*/, bool /*r*/) { free(p); }
 
   ck_malloc m_alloc;
-  mutable ck_ht_t m_ht;
+  mutable ck_ht_t m_ht ATLAS_THREAD_SAFE;
 };
 
 
diff --git a/Control/CxxUtils/test/SimpleUpdater_test.cxx b/Control/CxxUtils/test/SimpleUpdater_test.cxx
new file mode 100644
index 000000000000..5b4780ef7b26
--- /dev/null
+++ b/Control/CxxUtils/test/SimpleUpdater_test.cxx
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+ */
+/**
+ * @file CxxUtils/test/SimpleUpdater_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Dec, 2020
+ * @brief Tests for SimpleUpdater.
+ */
+
+
+#undef NDEBUG
+#include "CxxUtils/SimpleUpdater.h"
+#include <algorithm>
+#include <vector>
+#include <memory>
+#include <iostream>
+#include <cassert>
+
+
+class Payload
+{
+public:
+  typedef std::vector<int> vec_t;
+  Payload (vec_t& vec, int x) : m_vec(vec), m_x (x)
+  { vec.push_back (x); }
+  ~Payload()
+  {
+    vec_t::iterator i = std::find (m_vec.begin(), m_vec.end(), m_x);
+    if (i != m_vec.end()) m_vec.erase (i);
+  }
+  vec_t& m_vec;
+  int m_x;
+};
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  std::vector<int> log;
+
+  {
+    using SU = CxxUtils::SimpleUpdater<Payload>;
+    SU su;
+    su.update (std::make_unique<Payload> (log, 1), SU::defaultContext());
+    assert (su.get().m_x == 1);
+    su.discard (std::make_unique<Payload> (log, 2));
+    su.update (std::make_unique<Payload> (log, 3), SU::defaultContext());
+    assert (su.get().m_x == 3);
+    su.quiescent (SU::defaultContext());
+    assert (log == (std::vector<int> {1, 2, 3}));
+  }
+  assert (log.empty());
+}
+
+
+int main()
+{
+  std::cout << "CxxUtils/SimpleUpdater_test\n";
+  test1();
+  return 0;
+}
-- 
GitLab


From dad7e96fb88788277d0546a86952e388fb373a86 Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Thu, 17 Dec 2020 07:15:19 +0100
Subject: [PATCH 065/308] update

---
 .../src/PixelConfigCondAlg.cxx                |  16 +-
 .../src/PixelSiLorentzAngleCondAlg.cxx        |   3 +-
 .../src/SensorSimPlanarTool.cxx               |  10 -
 .../PROCTools/data/master_q431_AOD_digest.ref |   2 +-
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 198 +++++++++---------
 5 files changed, 107 insertions(+), 122 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx
index 2df1b67e914d..7024b858a1a6 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.cxx
@@ -174,6 +174,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
   // mapping files for radiation damage simulation
   std::vector<std::string> mapsPath_list;
 
+
   int currentRunNumber = ctx.eventID().run_number();
   if (currentRunNumber<222222) {
     writeCdo -> setBarrelToTThreshold(m_BarrelToTThresholdRUN1);
@@ -465,7 +466,7 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
 
   for (unsigned int i=0; i<mapsPath_list.size(); i++) {
     ATH_MSG_INFO("Using maps located in: "<<mapsPath_list.at(i) << " for layer No." << i);
-    std::unique_ptr<TFile> mapsFile(new TFile((mapsPath_list.at(i)).c_str())); //this is the ramo potential.
+    TFile* mapsFile = new TFile((mapsPath_list.at(i)).c_str()); //this is the ramo potential.
 
     //Setup ramo weighting field map
     TH3F* ramoPotentialMap_hold = 0;
@@ -477,15 +478,10 @@ StatusCode PixelConfigCondAlg::execute(const EventContext& ctx) const {
     }
     ramoPotentialMap.push_back(ramoPotentialMap_hold);
 
-    std::unique_ptr<TH2F> lorentzMap_e_hold((TH2F*)mapsFile->Get("lorentz_map_e"));
-    std::unique_ptr<TH2F> lorentzMap_h_hold((TH2F*)mapsFile->Get("lorentz_map_h"));
-    std::unique_ptr<TH2F> distanceMap_h_hold((TH2F*)mapsFile->Get("edistance"));
-    std::unique_ptr<TH2F> distanceMap_e_hold((TH2F*)mapsFile->Get("hdistance"));
-
-    lorentzMap_e.push_back(lorentzMap_e_hold.get());
-    lorentzMap_h.push_back(lorentzMap_h_hold.get());
-    distanceMap_e.push_back(distanceMap_e_hold.get());
-    distanceMap_h.push_back(distanceMap_h_hold.get());
+    lorentzMap_e.push_back((TH2F*)mapsFile->Get("lorentz_map_e"));
+    lorentzMap_h.push_back((TH2F*)mapsFile->Get("lorentz_map_h"));
+    distanceMap_e.push_back((TH2F*)mapsFile->Get("edistance"));
+    distanceMap_h.push_back((TH2F*)mapsFile->Get("hdistance"));
   }
   writeCdo -> setLorentzMap_e(lorentzMap_e);
   writeCdo -> setLorentzMap_h(lorentzMap_h);
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
index 7ceaf1edc5ea..e3fd0bba45b2 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx
@@ -145,8 +145,7 @@ PixelSiLorentzAngleCondAlg::execute(const EventContext& ctx) const {
     int barrel_ec   = pixelId->barrel_ec(element->identify());
     int layerIndex  = pixelId->layer_disk(element->identify());
 
-//STSTST    double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
-    double LACorr = 1.0;
+    double LACorr = moduleData->getLorentzAngleCorr(barrel_ec,layerIndex);
 
     if (not p_design){
       ATH_MSG_FATAL("Dynamic cast to PixelModuleDesign* failed in PixelSiLorentzAngleCondAlg::execute");
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
index 0e410735e509..da8ac64821e5 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
+++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx
@@ -210,8 +210,6 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
   const EBC_EVCOLL evColl = EBC_MAINEVCOLL;
   const HepMcParticleLink::PositionFlag idxFlag = (phit.eventId()==0) ? HepMcParticleLink::IS_POSITION: HepMcParticleLink::IS_INDEX;
 
-  std::cout << "STSTST SensorSimPlanarTool OK1 " << std::endl;
-
   //**************************************//
   //*** Now diffuse charges to surface *** //
   //**************************************//
@@ -251,8 +249,6 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
     int numBins_weightingPotential_y = 0;
     int numBins_weightingPotential_z = 0;
 
-    std::cout << "STSTST SensorSimPlanarTool OK2 " << m_doRadDamage << " " << !(Module.isDBM()) << " " << Module.isBarrel() << std::endl;
-
     if (m_doRadDamage && !(Module.isDBM()) && Module.isBarrel()) {
       centreOfPixel_i = p_design.positionFromColumnRow(pixel_i.etaIndex(), pixel_i.phiIndex());
 
@@ -267,8 +263,6 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
       nnLoop_pixelPhiMax = std::min( 2,pixel_i.phiIndex() );
       nnLoop_pixelPhiMin = std::max( -2, pixel_i.phiIndex() + 1 - phiCells );
 
-      std::cout << "STSTST SensorSimPlanarTool OK3 " << std::endl;
-
       //Setup values to check for overflow when using maps
       if (m_doInterpolateEfield) {
         numBins_driftTime_e = m_distanceMap_e[layer]->GetNbinsY(); //Returns nBins = totalBins - underflow - overflow 
@@ -278,18 +272,14 @@ StatusCode SensorSimPlanarTool::induceCharge(const TimedHitPtr<SiHit> &phit, SiC
         numBins_weightingPotential_z = m_ramoPotentialMap[layer]->GetNbinsZ();        
       }
       else { // use fluence value from conditions data
-        std::cout << "STSTST SensorSimPlanarTool OK4 " << layer << std::endl;
         numBins_driftTime_e = moduleData->getDistanceMap_e(layer)->GetNbinsY();
         numBins_driftTime_h = moduleData->getDistanceMap_h(layer)->GetNbinsY();   
         numBins_weightingPotential_x = moduleData->getRamoPotentialMap(layer)->GetNbinsX();
         numBins_weightingPotential_y = moduleData->getRamoPotentialMap(layer)->GetNbinsY();
         numBins_weightingPotential_z = moduleData->getRamoPotentialMap(layer)->GetNbinsZ();        
-        std::cout << "STSTST SensorSimPlanarTool OK5 " << std::endl;
       }
     }
 
-    std::cout << "STSTST SensorSimPlanarTool OK6 " << std::endl;
-
     // Distance between charge and readout side.  p_design->readoutSide() is
     // +1 if readout side is in +ve depth axis direction and visa-versa.
     double dist_electrode = 0.5 * sensorThickness - Module.design().readoutSide() * depth_i;
diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref
index 4edd78354a38..fa7194dfd35b 100644
--- a/Tools/PROCTools/data/master_q431_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref
@@ -11,7 +11,7 @@
       330470  1183738949         368         444           9           1
       330470  1183742489         152         127           2           1
       330470  1183743040         285         326           5           0
-      330470  1183746343         492         495          12           0
+      330470  1183746343         492         492          12           0
       330470  1183746710           6           0           0           0
       330470  1183751782         239         246           2           0
       330470  1183752624         347         366           7           2
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 11c66571dfa9..dfa272a87c61 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -71,7 +71,7 @@ HLT_2g10_loose_mu20_L1MU20:
   stepFeatures:
     0: 3
     1: 3
-    2: 4
+    2: 5
 HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I:
   eventCount: 0
 HLT_2g20_tight_L12EM15VH:
@@ -585,7 +585,7 @@ HLT_e17_lhloose_mu14_L1EM15VH_MU10:
   stepFeatures:
     0: 4
     1: 5
-    2: 4
+    2: 6
     3: 4
     4: 4
     5: 4
@@ -603,7 +603,7 @@ HLT_e17_lhvloose_nod0_L1EM15VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 5
+    2: 7
     3: 5
     4: 5
 HLT_e17_lhvloose_nod0_L1EM15VHI:
@@ -617,7 +617,7 @@ HLT_e17_lhvloose_nod0_L1EM15VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
@@ -649,7 +649,7 @@ HLT_e24_lhvloose_L1EM20VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 5
+    2: 7
     3: 5
     4: 5
 HLT_e26_etcut_L1EM22VHI:
@@ -675,7 +675,7 @@ HLT_e26_lhloose_L1EM15VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 5
+    2: 7
     3: 5
     4: 5
 HLT_e26_lhloose_L1EM22VHI:
@@ -689,7 +689,7 @@ HLT_e26_lhloose_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhmedium_L1EM15VH:
@@ -703,7 +703,7 @@ HLT_e26_lhmedium_L1EM15VH:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhmedium_L1EM22VHI:
@@ -717,7 +717,7 @@ HLT_e26_lhmedium_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhmedium_mu8noL1_L1EM22VHI:
@@ -733,7 +733,7 @@ HLT_e26_lhmedium_mu8noL1_L1EM22VHI:
   stepFeatures:
     0: 10
     1: 10
-    2: 8
+    2: 10
     3: 8
     4: 8
     5: 4
@@ -749,7 +749,7 @@ HLT_e26_lhtight_L1EM15VH:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhtight_L1EM22VHI:
@@ -763,7 +763,7 @@ HLT_e26_lhtight_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhtight_gsf_L1EM22VHI:
@@ -777,7 +777,7 @@ HLT_e26_lhtight_gsf_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhtight_ivarloose_L1EM22VHI:
@@ -791,7 +791,7 @@ HLT_e26_lhtight_ivarloose_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 3
 HLT_e26_lhtight_ivarmedium_L1EM22VHI:
@@ -805,7 +805,7 @@ HLT_e26_lhtight_ivarmedium_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 3
 HLT_e26_lhtight_ivartight_L1EM22VHI:
@@ -819,7 +819,7 @@ HLT_e26_lhtight_ivartight_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 3
 HLT_e26_lhtight_nod0_L1EM22VHI:
@@ -833,7 +833,7 @@ HLT_e26_lhtight_nod0_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e26_lhtight_nod0_L1EM24VHI:
@@ -847,7 +847,7 @@ HLT_e26_lhtight_nod0_L1EM24VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 4
+    2: 6
     3: 4
     4: 4
 HLT_e300_etcut_L1EM22VHI:
@@ -896,9 +896,9 @@ HLT_e5_lhloose_L1EM3:
     4: 6
   stepFeatures:
     0: 60
-    1: 145
-    2: 81
-    3: 46
+    1: 146
+    2: 78
+    3: 44
     4: 7
 HLT_e5_lhloose_noringer_L1EM3:
   eventCount: 6
@@ -910,8 +910,8 @@ HLT_e5_lhloose_noringer_L1EM3:
     4: 6
   stepFeatures:
     0: 56
-    1: 128
-    2: 84
+    1: 130
+    2: 88
     3: 46
     4: 7
 HLT_e5_lhmedium_L1EM3:
@@ -926,7 +926,7 @@ HLT_e5_lhmedium_L1EM3:
     0: 58
     1: 132
     2: 76
-    3: 44
+    3: 42
     4: 5
 HLT_e5_lhmedium_noringer_L1EM3:
   eventCount: 4
@@ -954,7 +954,7 @@ HLT_e5_lhtight_L1EM3:
     0: 57
     1: 129
     2: 74
-    3: 43
+    3: 41
     4: 5
 HLT_e5_lhtight_nod0_L1EM3:
   eventCount: 4
@@ -968,7 +968,7 @@ HLT_e5_lhtight_nod0_L1EM3:
     0: 57
     1: 129
     2: 74
-    3: 43
+    3: 41
     4: 5
 HLT_e5_lhtight_noringer_L1EM3:
   eventCount: 4
@@ -980,8 +980,8 @@ HLT_e5_lhtight_noringer_L1EM3:
     4: 4
   stepFeatures:
     0: 45
-    1: 92
-    2: 61
+    1: 94
+    2: 60
     3: 36
     4: 5
 HLT_e5_lhtight_noringer_nod0_L1EM3:
@@ -994,8 +994,8 @@ HLT_e5_lhtight_noringer_nod0_L1EM3:
     4: 4
   stepFeatures:
     0: 45
-    1: 92
-    2: 61
+    1: 94
+    2: 60
     3: 36
     4: 5
 HLT_e60_lhmedium_L1EM22VHI:
@@ -1009,7 +1009,7 @@ HLT_e60_lhmedium_L1EM22VHI:
   stepFeatures:
     0: 2
     1: 2
-    2: 2
+    2: 4
     3: 2
     4: 2
 HLT_e60_lhmedium_nod0_L1EM22VHI:
@@ -1023,7 +1023,7 @@ HLT_e60_lhmedium_nod0_L1EM22VHI:
   stepFeatures:
     0: 2
     1: 2
-    2: 2
+    2: 4
     3: 2
     4: 2
 HLT_e7_etcut_L1EM3:
@@ -1053,7 +1053,7 @@ HLT_e7_lhmedium_mu24_L1MU20:
   stepFeatures:
     0: 18
     1: 17
-    2: 15
+    2: 17
     3: 14
     4: 4
     5: 4
@@ -1085,7 +1085,7 @@ HLT_g12_loose_LArPEB_L1EM10VH:
   stepFeatures:
     0: 11
     1: 11
-    2: 22
+    2: 24
     3: 6
     4: 6
 HLT_g140_etcut_L1EM22VHI:
@@ -1104,7 +1104,7 @@ HLT_g20_loose_L1EM15VH:
   stepFeatures:
     0: 9
     1: 9
-    2: 15
+    2: 17
     3: 6
 HLT_g20_loose_L1EM15VHI:
   eventCount: 5
@@ -1116,7 +1116,7 @@ HLT_g20_loose_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 9
+    2: 11
     3: 5
 HLT_g20_loose_LArPEB_L1EM15:
   eventCount: 6
@@ -1129,7 +1129,7 @@ HLT_g20_loose_LArPEB_L1EM15:
   stepFeatures:
     0: 9
     1: 9
-    2: 15
+    2: 17
     3: 6
     4: 6
 HLT_g20_medium_L1EM15VH:
@@ -1142,7 +1142,7 @@ HLT_g20_medium_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 14
+    2: 15
     3: 6
 HLT_g20_medium_L1EM15VHI:
   eventCount: 5
@@ -1154,7 +1154,7 @@ HLT_g20_medium_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 9
+    2: 11
     3: 5
 HLT_g20_tight_L1EM15VH:
   eventCount: 5
@@ -1166,7 +1166,7 @@ HLT_g20_tight_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 14
+    2: 15
     3: 5
 HLT_g20_tight_L1EM15VHI:
   eventCount: 5
@@ -1178,7 +1178,7 @@ HLT_g20_tight_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 9
+    2: 11
     3: 5
 HLT_g20_tight_icaloloose_L1EM15VH:
   eventCount: 5
@@ -1190,7 +1190,7 @@ HLT_g20_tight_icaloloose_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 14
+    2: 15
     3: 5
 HLT_g20_tight_icaloloose_L1EM15VHI:
   eventCount: 5
@@ -1202,7 +1202,7 @@ HLT_g20_tight_icaloloose_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 9
+    2: 11
     3: 5
 HLT_g20_tight_icalomedium_L1EM15VH:
   eventCount: 5
@@ -1214,7 +1214,7 @@ HLT_g20_tight_icalomedium_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 14
+    2: 15
     3: 5
 HLT_g20_tight_icalomedium_L1EM15VHI:
   eventCount: 5
@@ -1226,7 +1226,7 @@ HLT_g20_tight_icalomedium_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 9
+    2: 11
     3: 5
 HLT_g20_tight_icalotight_L1EM15VH:
   eventCount: 0
@@ -1237,7 +1237,7 @@ HLT_g20_tight_icalotight_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 14
+    2: 15
 HLT_g20_tight_icalotight_L1EM15VHI:
   eventCount: 0
   stepCounts:
@@ -1247,7 +1247,7 @@ HLT_g20_tight_icalotight_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 9
+    2: 11
 HLT_g22_tight_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -1258,7 +1258,7 @@ HLT_g22_tight_L1EM15VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 11
+    2: 12
     3: 5
 HLT_g25_etcut_L1EM20VH:
   eventCount: 7
@@ -1280,7 +1280,7 @@ HLT_g25_loose_L1EM20VH:
   stepFeatures:
     0: 9
     1: 9
-    2: 15
+    2: 17
     3: 7
 HLT_g25_medium_L1EM20VH:
   eventCount: 6
@@ -1292,7 +1292,7 @@ HLT_g25_medium_L1EM20VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 11
+    2: 12
     3: 6
 HLT_g25_medium_mu24_ivarmedium_L1MU20:
   eventCount: 0
@@ -1308,7 +1308,7 @@ HLT_g25_medium_mu24_ivarmedium_L1MU20:
   stepFeatures:
     0: 4
     1: 4
-    2: 4
+    2: 6
     3: 4
     4: 4
     5: 2
@@ -1324,7 +1324,7 @@ HLT_g25_tight_L1EM20VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 11
+    2: 12
     3: 5
 HLT_g300_etcut_L1EM22VHI:
   eventCount: 0
@@ -1342,7 +1342,7 @@ HLT_g35_loose_mu18_L1EM24VHI:
   stepFeatures:
     0: 4
     1: 4
-    2: 4
+    2: 6
     3: 4
     4: 4
     5: 2
@@ -1359,7 +1359,7 @@ HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
   stepFeatures:
     0: 10
     1: 10
-    2: 11
+    2: 13
 HLT_g3_loose_LArPEB_L1EM3:
   eventCount: 9
   stepCounts:
@@ -1385,7 +1385,7 @@ HLT_g40_loose_LArPEB_L1EM20VHI:
   stepFeatures:
     0: 5
     1: 5
-    2: 8
+    2: 10
     3: 5
     4: 5
 HLT_g5_etcut_L1EM3:
@@ -1408,7 +1408,7 @@ HLT_g5_loose_L1EM3:
   stepFeatures:
     0: 56
     1: 56
-    2: 101
+    2: 103
     3: 14
 HLT_g5_medium_L1EM3:
   eventCount: 9
@@ -1420,7 +1420,7 @@ HLT_g5_medium_L1EM3:
   stepFeatures:
     0: 48
     1: 48
-    2: 83
+    2: 81
     3: 12
 HLT_g5_tight_L1EM3:
   eventCount: 8
@@ -1432,7 +1432,7 @@ HLT_g5_tight_L1EM3:
   stepFeatures:
     0: 45
     1: 45
-    2: 76
+    2: 73
     3: 8
 HLT_g60_loose_LArPEB_L1EM20VHI:
   eventCount: 3
@@ -1445,7 +1445,7 @@ HLT_g60_loose_LArPEB_L1EM20VHI:
   stepFeatures:
     0: 3
     1: 3
-    2: 5
+    2: 7
     3: 3
     4: 3
 HLT_g80_loose_LArPEB_L1EM20VHI:
@@ -1570,15 +1570,15 @@ HLT_j420_subresjesgscIS_ftf_L1J100:
     0: 3
 HLT_j45_L1J15:
   eventCount: 0
-HLT_j45_csskpf_nojcalib_ftf_L1J15:
+HLT_j45_csskpf_nojcalib_ftf_L1J20:
   eventCount: 17
   stepCounts:
-    0: 20
+    0: 19
     1: 17
   stepFeatures:
-    0: 20
+    0: 19
     1: 37
-HLT_j45_cssktc_nojcalib_L1J15:
+HLT_j45_cssktc_nojcalib_L1J20:
   eventCount: 15
   stepCounts:
     0: 15
@@ -1592,75 +1592,75 @@ HLT_j45_ftf_L1J15:
   stepFeatures:
     0: 20
     1: 55
-HLT_j45_ftf_preselj20_L1J15:
+HLT_j45_ftf_preselj20_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 55
-HLT_j45_nojcalib_L1J15:
+HLT_j45_nojcalib_L1J20:
   eventCount: 17
   stepCounts:
     0: 17
   stepFeatures:
     0: 39
-HLT_j45_pf_ftf_010jvt_L1J15:
+HLT_j45_pf_ftf_010jvt_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 55
-HLT_j45_pf_ftf_020jvt_L1J15:
+HLT_j45_pf_ftf_020jvt_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 54
-HLT_j45_pf_ftf_050jvt_L1J15:
+HLT_j45_pf_ftf_050jvt_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 54
-HLT_j45_pf_ftf_L1J15:
+HLT_j45_pf_ftf_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 56
-HLT_j45_pf_ftf_preselj20_L1J15:
+HLT_j45_pf_ftf_preselj20_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 56
-HLT_j45_pf_nojcalib_ftf_L1J15:
+HLT_j45_pf_nojcalib_ftf_L1J20:
   eventCount: 18
   stepCounts:
-    0: 20
+    0: 19
     1: 18
   stepFeatures:
-    0: 20
+    0: 19
     1: 49
-HLT_j45_pf_subjesgscIS_ftf_L1J15:
+HLT_j45_pf_subjesgscIS_ftf_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 52
 HLT_j45_pf_subjesgscIS_ftf_bdl1r70_split_L1J20:
   eventCount: 14
@@ -1682,19 +1682,19 @@ HLT_j45_pf_subjesgscIS_ftf_boffperf_split_L1J20:
     0: 19
     1: 49
     2: 49
-HLT_j45_sktc_nojcalib_L1J15:
+HLT_j45_sktc_nojcalib_L1J20:
   eventCount: 15
   stepCounts:
     0: 15
   stepFeatures:
     0: 26
-HLT_j45_subjesIS_ftf_preselj20_L1J15:
+HLT_j45_subjesIS_ftf_preselj20_L1J20:
   eventCount: 19
   stepCounts:
-    0: 20
+    0: 19
     1: 19
   stepFeatures:
-    0: 20
+    0: 19
     1: 50
 HLT_j45_subjesgscIS_ftf_011jvt_L1J15:
   eventCount: 18
@@ -1739,15 +1739,15 @@ HLT_j45_subjesgscIS_ftf_bdl1r70_split_L1J20:
     1: 47
     2: 23
 HLT_j45_subjesgscIS_ftf_bmv2c1070_split_L1J20:
-  eventCount: 14
+  eventCount: 15
   stepCounts:
     0: 19
     1: 19
-    2: 14
+    2: 15
   stepFeatures:
     0: 19
     1: 47
-    2: 26
+    2: 28
 HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:
   eventCount: 19
   stepCounts:
@@ -2222,7 +2222,7 @@ HLT_mu6_L1MU6:
     1: 12
     2: 13
     3: 13
-HLT_mu6_LRT_idperf_l2lrt_L1MU6:
+HLT_mu6_idperfLRT_l2lrt_L1MU6:
   eventCount: 10
   stepCounts:
     0: 10
@@ -2935,13 +2935,13 @@ HLT_xe100_mhtpufit_pf_subjesgscIS_L1XE50:
     0: 10
     1: 5
 HLT_xe100_pfopufit_L1XE50:
-  eventCount: 5
+  eventCount: 4
   stepCounts:
     0: 10
-    1: 5
+    1: 4
   stepFeatures:
     0: 10
-    1: 5
+    1: 4
 HLT_xe100_pfsum_L1XE50:
   eventCount: 6
   stepCounts:
-- 
GitLab


From b2be19fdf55419f9365ca7ef704eaf8b93417730 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Thu, 17 Dec 2020 10:03:48 +0100
Subject: [PATCH 066/308] Fixed the build of JetRecAlg in AthAnalysis.

---
 Reconstruction/Jet/JetRec/src/JetRecAlg.cxx | 11 +++++------
 Reconstruction/Jet/JetRec/src/JetRecAlg.h   | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/src/JetRecAlg.cxx b/Reconstruction/Jet/JetRec/src/JetRecAlg.cxx
index fba500de2eb5..cf721e0d7db7 100644
--- a/Reconstruction/Jet/JetRec/src/JetRecAlg.cxx
+++ b/Reconstruction/Jet/JetRec/src/JetRecAlg.cxx
@@ -3,14 +3,14 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// JetRecAlg.cxx 
+// JetRecAlg.cxx
 
 #include <memory>
 #include "JetRecAlg.h"
 #include "JetInterface/IJetExecuteTool.h"
 #include "xAODJet/JetAuxContainer.h"
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   #include "AthenaMonitoringKernel/Monitored.h"
 #endif
 
@@ -28,7 +28,7 @@ StatusCode JetRecAlg::initialize() {
   ATH_CHECK(m_jetprovider->initWithOutput(m_output));
 
   ATH_MSG_INFO(" Initialized  IJetProvider : "<< m_jetprovider->name());
-  
+
   ATH_MSG_INFO(" Initialize .... List of modifiers: ");
   ATH_CHECK(m_modifiers.retrieve());
   for(ToolHandle<IJetModifier> t : m_modifiers){
@@ -37,7 +37,7 @@ StatusCode JetRecAlg::initialize() {
 
   ATH_CHECK(m_output.initialize());
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
 #endif
 
@@ -60,7 +60,7 @@ StatusCode JetRecAlg::execute(const EventContext& ctx) const {
   // We can subsequently access the jets from the handle and don't have to
   // worry about memory management.
 
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   auto t_total = Monitored::Timer<std::chrono::milliseconds>( "TIME_total" );
 
   SG::WriteHandle<xAOD::JetContainer> jetContHandle(m_output,ctx);
@@ -117,4 +117,3 @@ StatusCode JetRecAlg::execute(const EventContext& ctx) const {
 }
 
 //**********************************************************************
-
diff --git a/Reconstruction/Jet/JetRec/src/JetRecAlg.h b/Reconstruction/Jet/JetRec/src/JetRecAlg.h
index 80e5229ba37b..acfb4ed1a26c 100644
--- a/Reconstruction/Jet/JetRec/src/JetRecAlg.h
+++ b/Reconstruction/Jet/JetRec/src/JetRecAlg.h
@@ -4,7 +4,7 @@
 */
 
 ////////////////////////////////////////////////////
-/// \class JetRecAlg 
+/// \class JetRecAlg
 ///
 /// Algorithm tasked to create a single JetContainer
 /// This algorithm makes use of 2 types of tools :
@@ -29,9 +29,9 @@
 
 class IJetExecuteTool;
 
-class JetRecAlg : public AthReentrantAlgorithm { 
+class JetRecAlg : public AthReentrantAlgorithm {
 
-public: 
+public:
 
   using AthReentrantAlgorithm::AthReentrantAlgorithm;
 
@@ -46,11 +46,10 @@ private:
   ToolHandle<IJetProvider> m_jetprovider ={this , "Provider" , {} , "Tool providing the jets (fastjet, copy, grooming...)"};
   ToolHandleArray<IJetModifier> m_modifiers = {this , "Modifiers", {}, "moment calculators" };
   SG::WriteHandleKey<xAOD::JetContainer> m_output= {this, "OutputContainer", "AntiKt4LCtopoJets", "The output jet container name"};
-#if !defined (GENERATIONBASE) && !defined (XAOD_STANDALONE)
+#if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
   ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
 #endif
 
-}; 
+};
 
 #endif
-
-- 
GitLab


From 033ced6d190c01f0f7ba6b3ec82f980d0f1ca6de Mon Sep 17 00:00:00 2001
From: Ewelina Maria Lobodzinska <ewelina.maria.lobodzinska@cern.ch>
Date: Thu, 17 Dec 2020 09:24:38 +0000
Subject: [PATCH 067/308] removig Charybdis interface

---
 Generators/Charybdis_i/CMakeLists.txt         |   22 -
 .../Charybdis_i/CharybdisInterface.h          |   24 -
 .../Charybdis_i/Charybdis_i/charybdis1001.inc |   17 -
 .../Charybdis_i/Charybdis_i/charybdis1003.inc |   22 -
 Generators/Charybdis_i/doc/Charybdis.pdf      |  Bin 48116 -> 0 bytes
 Generators/Charybdis_i/doc/Charybdis.tex      |  152 --
 Generators/Charybdis_i/doc/packagedoc.h       |   20 -
 .../share/jobOptions.CharybdisHerwig.py       |   99 -
 .../Charybdis_i/src/CharybdisInterface.cxx    |  315 ---
 Generators/Charybdis_i/src/initcharybdis.F    |  401 ----
 Generators/Charybdis_i/src/usecharybdis.F     | 2083 -----------------
 Projects/AthGeneration/package_filters.txt    |    1 -
 12 files changed, 3156 deletions(-)
 delete mode 100644 Generators/Charybdis_i/CMakeLists.txt
 delete mode 100644 Generators/Charybdis_i/Charybdis_i/CharybdisInterface.h
 delete mode 100644 Generators/Charybdis_i/Charybdis_i/charybdis1001.inc
 delete mode 100644 Generators/Charybdis_i/Charybdis_i/charybdis1003.inc
 delete mode 100644 Generators/Charybdis_i/doc/Charybdis.pdf
 delete mode 100644 Generators/Charybdis_i/doc/Charybdis.tex
 delete mode 100644 Generators/Charybdis_i/doc/packagedoc.h
 delete mode 100644 Generators/Charybdis_i/share/jobOptions.CharybdisHerwig.py
 delete mode 100644 Generators/Charybdis_i/src/CharybdisInterface.cxx
 delete mode 100644 Generators/Charybdis_i/src/initcharybdis.F
 delete mode 100644 Generators/Charybdis_i/src/usecharybdis.F

diff --git a/Generators/Charybdis_i/CMakeLists.txt b/Generators/Charybdis_i/CMakeLists.txt
deleted file mode 100644
index 37ff118e17c9..000000000000
--- a/Generators/Charybdis_i/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# Declare the package name:
-atlas_subdir( Charybdis_i )
-
-# External dependencies:
-find_package( Herwig )
-find_package( Lhapdf )
-
-# Remove the --as-needed linker flags:
-atlas_disable_as_needed()
-
-# Component(s) in the package:
-atlas_add_library( Charybdis_i
-   Charybdis_i/*.h Charybdis_i/*.inc src/*.cxx src/*.F
-   PUBLIC_HEADERS Charybdis_i
-   PRIVATE_INCLUDE_DIRS ${HERWIG_INCLUDE_DIRS} ${LHAPDF_INCLUDE_DIRS}
-   LINK_LIBRARIES GeneratorFortranCommonLib
-   PRIVATE_LINK_LIBRARIES ${HERWIG_LIBRARIES} ${LHAPDF_LIBRARIES} )
-
-# Install files from the package:
-atlas_install_joboptions( share/*.py )
diff --git a/Generators/Charybdis_i/Charybdis_i/CharybdisInterface.h b/Generators/Charybdis_i/Charybdis_i/CharybdisInterface.h
deleted file mode 100644
index 9cc61f657ec0..000000000000
--- a/Generators/Charybdis_i/Charybdis_i/CharybdisInterface.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-/**
-@class CharybdisInterface
-
-@author Nick Brett [ n.brett1@physics.ox.ac.uk ] - 03-02-05
-
- a set of c++ functions that act as an interface between
- Athenas C++ herwig command sting handeler and charybdis
- (a FORTRAN program for simulation of Micro Black Holes)
-*/
-#ifndef CHARYBDISINTERFACE_H
-#define CHARYBDISINTERFACE_H
-
-extern void WriteCharybdisParam(int,int,double);
-extern "C" void readcharybdisparamint_(int*,int*);
-extern "C" void readcharybdisparamdbl_(int*,double*);
-
-#endif
-
-
diff --git a/Generators/Charybdis_i/Charybdis_i/charybdis1001.inc b/Generators/Charybdis_i/Charybdis_i/charybdis1001.inc
deleted file mode 100644
index ee1ca352316f..000000000000
--- a/Generators/Charybdis_i/Charybdis_i/charybdis1001.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-C--include file for Black Hole generator
-      IMPLICIT NONE
-C--common block for the probabilities of SM particles
-      DOUBLE PRECISION PQUARK,PLEPT,PNEUT,PGLUON,PGAMMA,PWBOSN,
-     & PZBOSN,PHIGGS,PFERM(3),PBOSON(5)
-      COMMON /BHPROB/PQUARK,PLEPT,PNEUT,PGLUON,PGAMMA,PWBOSN,
-     & PZBOSN,PHIGGS,PFERM,PBOSON
-C--common block for the main parameters
-      INTEGER MSSDEF,NBODY,IPRINT,MSSDEC
-      DOUBLE PRECISION MPLNCK,MINMSS,MAXMSS,INTMPL
-      LOGICAL TIMVAR,GTSCA,GRYBDY,KINCUT
-      COMMON /BHPARM/MPLNCK,MINMSS,MAXMSS,INTMPL,MSSDEF,NBODY,IPRINT,
-     &     MSSDEC,TIMVAR,GTSCA,GRYBDY,KINCUT
-C--common block for decay of the black hole
-      DOUBLE PRECISION RHFACT,BHMASS
-      INTEGER TOTDIM
-      COMMON /BLACKH/ RHFACT,BHMASS,TOTDIM
diff --git a/Generators/Charybdis_i/Charybdis_i/charybdis1003.inc b/Generators/Charybdis_i/Charybdis_i/charybdis1003.inc
deleted file mode 100644
index 751fd43e65b1..000000000000
--- a/Generators/Charybdis_i/Charybdis_i/charybdis1003.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-C--include file for Black Hole generator
-C--common block for the probabilities of SM particles
-      DOUBLE PRECISION PQUARK,PLEPT,PNEUT,PGLUON,PGAMMA,PWBOSN,
-     & PZBOSN,PHIGGS,PFERM(3),PBOSON(5)
-      COMMON /BHPROB/PQUARK,PLEPT,PNEUT,PGLUON,PGAMMA,PWBOSN,
-     & PZBOSN,PHIGGS,PFERM,PBOSON
-C--common block for the main parameters
-      INTEGER MSSDEF,NBODY,IBHPRN,MSSDEC
-      DOUBLE PRECISION MPLNCK,MINMSS,MAXMSS,INTMPL
-      LOGICAL TIMVAR,GTSCA,GRYBDY,KINCUT
-C--BW mod 16/08/06: changed IPRINT to IBHPRN (conflict with HERWIG)
-      COMMON /BHPARM/MPLNCK,MINMSS,MAXMSS,INTMPL,MSSDEF,NBODY,IBHPRN,
-     &     MSSDEC,TIMVAR,GTSCA,GRYBDY,KINCUT
-C--common block for decay of the black hole
-      DOUBLE PRECISION RHFACT,BHMASS
-      INTEGER TOTDIM
-      COMMON /BLACKH/RHFACT,BHMASS,TOTDIM
-C--BW mod 16/08/06: new common for version 1.003
-      DOUBLE PRECISION THWMAX,RMMINM
-      LOGICAL YRCSEC,RMBOIL
-      COMMON /BH1003/THWMAX,RMMINM,RMBOIL,YRCSEC
-      
diff --git a/Generators/Charybdis_i/doc/Charybdis.pdf b/Generators/Charybdis_i/doc/Charybdis.pdf
deleted file mode 100644
index 99fe972509863df77ba12ea88d1d03f479dc9f4b..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 48116
zcmce-WmsL!)+HK(Z`|FT02_CAg1b8#3-0a~2oAyB-66QU1a}B7!6CRc$$8H?@9FRB
z+kN|a?)}B8+H1|4RkLJ_Q4<OUQE_@E1{MIt;Bj;=fSs6;*w)Arz{?Ai0oj;2nG<uo
z)hGeQEv%eC4#YrlD?=xcD9G5>1jNq|aCCA28CnC}(hIa?<5vbyuHB^th$RN7nzw@Y
z(1^IiYIWxeNeAs4<02R|kXwTw-=o8vdR!gN1Rkc?#1J>gji@R@@+7C6`aC~42WF|0
z#(vm*>Gdr;ncFYp=uDpLeffFyQO+0es<JZIs(nZHq@P0ZQLC<{z4P*HI5B~=#xk*l
zl<DxNi|6%2tL**wNtHUSG&2c{hEr>Y$20G$ERu5^P3(5BbDb-a?>F6Na5=X7`rQVp
z%fzw7kJGEx+T^sZx1O$!*L!=tmiUO*b7{U+J9BBbr@rgYPXtenSI<Ao%7|<Vy?qu=
zu2_e^Y%bWo9G{X~8_m$IzF2eUu2TjxqGqwpu#_0+=3FdkAl-sgTLm;y!svLjte`~_
z*Z@Rx#%_G_^!%QwgxwL`a7DAup%ZlV2uB05kw{`Ba9%JrM44yj2g1}muC>gc)tJ-u
zTt3|@M35t#b@ul<$C^3GarC3E7LiO#8IsIybbLw_BA&5wM&LPc(t1)>mgVsiaU^iL
zW956Fuq#%5u%-|le}W6&(6g}}UDdiX@htTMYO?p0s}o&@N!<5VK8g47knfIV{&v%p
zUmn+66#e6yfG*Z@utrs7w@z2Q_W6RyetRMnX(CNW;aJnmoWuDi6huW~baR`QxDCem
z+~xsFF433e{EdE#lSrgasq%!)XZvJ^;;zpvFd-F4bBn(SPPN}LkZ^AxG*yLI(?j&@
zVy(HgcDreYiQ<;8CaT^a8rJp-VkaQFz=tvfapdj7ARjtVDO0`kH-@v0dbd^E+t*K&
zI)VqTIPwKypzYHr&B#Y`O6hUM1Toyarw-dstYmZco6u*_b}>UNA5#yV!*pT?Tfd5|
zkO_kbqhD)If9Bvnl63J#cXSdxoYcFf`nmS3%a4D%_*~lEt6A^<o(EY)FDxODFGaz`
z3ChYqeZh_fuV-sq5%C6iTdZP#0p8g<++B8Yn&uF_X_O}aSZEh59AqWT?B`4)R{FD5
z9Vs*?6Lq;XKihkdkS}fdV5yg1P-I&3>}a#ZJsEyDPDNbg^x3)_S;(Z3W<lf!+aq%q
zH>9zXk0?E|u{87@w#?Ci%SM!CI^6=zDy7jf<oF=iwCq^V<QJHR^y<sS1h?T;lR=yq
zDz3FBTj%q-f^ThSNEoIu#FDmlH0R*-^kt<)^TVWK-?*tAz`vNk7i;tGo5{8eLjEeN
zy?#GiO*(86^h36ZM`i#gKA#l#mSq{P53ig$)ImG&>LwzAlw`Y>Za3kQBDoOXB}j~H
z$d0HzpkNeTfperULBJ{&#Zh<#H7r!&u9mlL`NuX(#Wu^kpMEsz$aNJ*>KUOeqf?~I
z(-5~buH%x}ttoYMcHo?}T~^y4Fp1}o#jL$bCLmI@5=l-jz4WHrL7Q{So>DA8f0QFg
z4@CE2>?$jXdaST4cyq4+KYWyXRJOjl_JaUtzXiJq;~AtObA>Kub#v;(mnB=i0*ole
zUVhgDvF?(xBZ(f-Aj6fd&#7tyg0&mMw5P_9YWpI_Ch!OzUOo{NbnemGFlq*g*1q9A
z&R2lmjrVxAj5Z-J=hfZ0r6t8*g({~SJ8xWle{l7{H6?1coqWjpE+~kzc2jNJ0$tCo
zdOQZH$E_a8=%nyz(|aOd)CxDB%A}cTDw(2M*C2=-{eZ6L+GXbPUBG4Bs`qYK>N;xU
zC<%5kwi>S{494)*lt8Q~(HESCJi&1B)z|{TmE%EdWg*^bh`4!aSV7tygKy7h)8CX>
z49g&Y5tP1raDtpxw$pZr@0mihuwOyi^-1yXt^MQ&#CO%3C3$}TjLxemH+uD)qb*V?
zqZk?o^BEt*V<}UKQ`fC<t<lZU9Irm#?F5Ao2W0iUa$0}9AfoJ=c-yQ98$`OzpOqM3
zmL<qVt^fn?P%J|(1*xNkt+m%6Kxcf&WAU1OLY>%l=T}^~)6sZJ*yc7lkqZ;yt=ia;
z8<@TGy-CnG)3u=&3p75U?`9--k}ps|)GrwWzryia5?cqrYxfL6lGm^D#S29}>`{uU
zz=L^QpPGPJKxZIwykmqXL^UWKlWA+-hw2_G`?=DnDZvsMmGdc$UJd&^f`W9hVTi(x
zzyfnIq9ivdJN}S9N{(3E^UFlSV^td&r)Z5`luY*d2#g_78#;EGB$J!4obO1m;A>s_
zea(w{z_6l%!|H0@lhONBQb_3}Qa0TI;XY%37<ee)<mcEV$dmT7mBB9Od@(F1NXQ=K
z5OxIWpE<&Xrq@=E3_=*vlWUXU&o)f$Dfq4hFl=8MsOU{6Krcx-23!uD=*i453Vy5L
zvJ7U;w>#1W6v_`Gc;sJAR$D4b>auE5cT^C+m%*I=7^2@wNX^MqCJ69(2U?-CHD1R9
zRQ}>mk||$(7)3Wh=sC}47?z=!5GiL^d-znw3KWL-bgFYuuHa3-j91^Y>!p)7%g<;I
z$2JTf!S|?C!N++&3^FeD5eR&+fF^x6!_24r3Slv>@v0%EVUirX)DJQA`Xj*4t0iA&
z#o?R<YyUf3iQd6MZ(-STFK$7WKc-l$uy&jek^Yf@ltA01*Ik@Q^5w{Nz@<?@+p7P>
z0P`m94rhunD8Pd{%bDF3Wm8jKvBIBWVSt$_6R=PR>4mc}K;vMC((9bg<o~5WZx78T
z?I+zg>apZ5`}w|`yK)9;5_>U9E{6Mr2$acS8g(Y{xYlk$F=}N>p3V}P<}hs{1>SB=
zT3svQjat!G<ffVuJKwxb9j>x{6g*-DKq;Gi<k{%PY3d?wYp-Uh;v6{?CrEhyAyidl
zi7#k=D!(WlItB@6rx@QkX~tsK{G2^=d^b6P7xi<SiXkPKk}9)5bd2TL@LKJtm(HC3
zPJ>bJQ1Iu4=@pqO6LRd;FK0R3$^K0d8t;;Butkgu9M-Rt-M-HT^t9afC9u%G{-D;|
z!=iaHBf93LcY3!5AC-NOpNw>?<4Li-5Uc;wdLN@6Y^6TR?sjUd0buK^udaCa-pGAc
zUP+@_o^hJ4h>`cB{@0#31Xt?djAofY0}3u1b;_c!lnAWZzI3z?Fa<L|?8Vb&iorn}
z<(O-?IUsr+aMvgIFt%|OWsRn_>)!bV>61cQrsfb4#yJM_L>%KsA<u|%a;c9mN=>_q
zyboOEWOS+Q0$D%P7~wFZ+_$?LL^nT_O!Is9#JO8%3k{#}7A(l7v*8uJ+luu!U+W5#
zZJ+1F8FGKbi`cWugh8|lQO>G9{(AY%5L!~Pyzv>CB0y%zP>7|jnaF{LNPTTV9@~5#
z-sYK`!D_i?DHxG`yN6pGI0N@FF=vZnnYZAc(&9=}k86<pj+1P}BO+i8cY)UaP$4rn
zKwbAf*H-$<o$j%*Z+3_KJZ!_?4RJdX=*_rMtTI>}6v1r636)<!gCF@RWj{%}pYIoy
zCj@!mA<3AO278n&UU~Mrxo8-17sGP%%EY21q#BgC%3v6)^9wditWlcz>w5GO0lFH-
z)$#B!85+AZuS6~a(rw%_bzF$ZuExg?opRD0i0SI+HR#1o7rc<iVCpS<ttX#|=h$*5
z#wpC|tT(8SM@$iViP|SKky_8=r&)s|rimxAl;z4uq!-&tpqn@MX>GbZ?BS(^f6D0E
z5f`L@f!pB6Dlr7Xc<VO!RTk2&RM{h8yv+VE1R3%jS2?p$9wY|{4nj@VFl0E)VYhG&
zOIb@4hPXabdf}UGKVGP4pY~FPSsb9QaLa$5T!o><4Lyy&?L0z*NbH-eHCKqm2TR%y
z3z4_MTyzm26*?IGVN8^I&X<M|X(VR$(RR93GVR7GlbuOX!_yzSNLw6dtN^Y|R~oDR
z&UxrFZSLiHf%fIp^jQm9OR}u-dZ;EAm3lPSr$x3TYU?}pA>|$=bBEO=J4?S?vLo-I
z;Uv$j`##1%EeTG<yEgVoU(KR#um)y@hZox%X(%Uh;L{=#>m(nvUp%8q@k92NFM61R
z3-plgaHwgDeGhJ~&%@H{avJwj?p2Piz?yC1#88sQ!*sv!#Ey?XH#u+^=1ezt7h9A9
zq>ojb1o;DB_kM<)`~oxdFv(ttKC@ljp%8+j%a9l79nyd5{rZ^zz!I^(OO#vv+3JZT
zoR-rt;M@!QqX6Ap+b37!!3~bD2b)v~j>A1LiQfK%KdqOXih0Z9B`>8D2(5B#U5NCd
z`Fh0{W)lvLHsk$G+{XqD>-53UW3<X&h4k#MxZTT_?)I|~&I77CMiBb<OxW0-?7#2N
z(5fe1IF`D6<Z4;LvOR#iB6kinGI#UxD>6L#)hm4a!xt<#wx$?lWAYa{d3*XzXnxa}
z-+x({nYaLd)v>Vs7q-Lln*jaq>5le~_?1SK)4HDm!rL9>%0#j;?<7qMk!sRrZK!5g
zn=J@a`OnE$KeJJ+$0mG#Icp{MITj9b+Be}=c6CDsJN9`zX=**_<^I0N&GBmgYI9Q-
zI@g;z{{2ZH?fGH+`scO0On1D@Zg@qNt@;hLm2O#i+)*hl%fQ0I<D9zk>-F`kTKQOh
zF`V13N9%)STUOStrs~`n-x1Ok%hwv_HV!uEHKM`Ox_h)L7S+1tXNxk9NO!F+iR7Kr
z!>8O4boFMt=;ixXXSKw;?b%G+#~D-~t!9ZqMWicS(7*@HkVJj_U-P`cvU1E-AZry_
zZTJV@{B0k-kX~)W6uc`*Q=Khl7Zf!Ufc*N87BeMCxM%piMfTn{)+%Naz-zE~r;d49
z>pjVFth&$H?KopYnp|{BojJY3?u$$Nr@{MrQe)Ee#?CCQqtrMv$V`{nnWr0!eOk2L
z2S7PZe#5EU_Yb`bSJjtiO;N-e7xOfu=T^(t+if<AW~5lW?pq5282z}6g<Wn?4e9{i
z%(N3MT4R^Tg%iEjt9ja6p2wzOXk*n~*LisB?MQI(VvOh}s#+x&+bRy-I{W!ImNWt#
z>fTNJy6x(1mK0jlb`I3jM#idDdx`MyJ>yS~sIDhWJ>)d^oaYp-0%#0z?f{ISNC(<p
zDzx=6yXg({n!)&r@EWE_hQ#R&RMgPBH_mXew95fD-cOT+r>i;S9o+Y1cJCYo@wwhZ
zXmm>-lHJeS^aMd5QB!qmsDWj2z<uMgG-w{_g{BVz3;3w!Q}t+CUlhlBKysO`I8+AX
zG|?*p!F@Rd%D+<1Pl6?+#ujIP_lxoU`JOl69XeDEsFhQT(6!>4dbBIqry(O!4>m}9
z>cE<6a6Aa_y2vHn3IYdHFv*LDJAZ+WQYp+EwO2ogCN%6L2`N9f78UyXD$fCG+KnGR
zoK#neFyoVD1%WTIKXkio(J)D35^}r00eHlnz{Pn+wDq=|8tDo}?1hR+R|xnggs)Q+
zF-mvO;?dhx`mM>KN&Q!b$DN)lP8mffxNdocnYY+xPBX@&st=Hm-WOcmIvChvq2t+U
zQx~=G465I4xq9~~?4gkJ!J9__-qE^CBUPoZadML-s<4mS|DwyP^GhIFj%?ulmRBCg
z!?2~Eu_@}``GZZ``fBP@RPzI-Tu|(`tdPoZ0TE&r!Kw*CRQsnhmkAQ&>Rm@cw|;32
zLY<Fw_eu8{u~mS+5b2V0g#I0hPMLX#xH*}O+qOnJX!Zd%udoU2fX-^<HspEZY-vBf
z-i?NEDwi)WtOy=e6$h+cbUjDgl|+=%fgy(AR$)#fv4%WrRwvs4{s7JId1+*3lodC2
zv&NHH;sKaGMC>1Q>=nVKhL^O{c`6sqE4X6qh8mpDr3JEov=bmb?;J~N3`{kZ#$s8h
z?DSvd26!Y^bKAdG;;j7?%McFlJLb6_9S8TcY8%%`pUZ|IDYrSUu{C8HyMiYrnSAc8
zIayB2X}H&X7f4lWPHI>Np|y)z(f_`3C)?*Xy%3@HQMv!L2kjfqv3$==;K~ejFZ}K3
z1cOy|_^{KZ258nMb}UIUj6{$YK4vO2E#;fU;5{liRWV`Id<sa-Si`McV(QUl0Y1wN
zE$RKVlZNjR`#Y4N#=u#Z)m9yN3{<L}85!vjX$Cj2wiu-m-Wb_;z%YC*2+C3UtS}1P
zZX=5*)pG>rwcZ+>l`{JPQls^eC#bkpSZ)$s=#%)5v&jj;PvcTco~^{r_O}NeWz{wo
zR)`}tRxlD&GRt%&8#iu?5ON=6DldGcRNJI-rcQ4?;1U<we8J{LxjAyF97R<}1y#tA
zvAIV9x^`cfsUpa$Il#M_sf(sq;stX;`sk1L4L%f7(qesl5pzb7une`Dt7mBSxBA{o
z#2#~1xVMoPPHr)(z0u)UV!`oiuvOPL{gpDm#Cxs>L5vX5JqHYYE5jt(X;b(88f|qY
zO&dv73f3$8!TmnPB;@wXqHP=MS5<;k0liadMUTR}byVA70Lpn&%7bD3Xx3~`;utO1
z>&k48sf4z=ku=%9a9VebP_W{?5jI~h<Ib$l;&Qq+?t4TZtFN7%qCChh4pKbR$+vMP
z4qMFO^0Q&d<z9XcU#cpvKO`|fsR6kd?PDJM<U+LDQ*`d^gB#qEMrJ>=P{}Q<1WsBm
zbNwJr_*oRQouf9em@LiBx9EZ;Dyx}IEd{d~({`bNRSGXMTr~b}Bc60rH6iaTWMHX-
zl)<v7+0(?;n%Nb@>sr`#g<@o2`yG?VB6kg9qNjULeTeo?GvX5**vbn#68vO^E#1&D
zyTc;c+}6h>ZA`_6nqS>aRelWLW*F+j!dx6~Od?y27vQ6y9e29DI~Vj;7|YYB(lmuK
zkO{VziM|w`x4Zs0+}po_HB(gU)HyQb)B<4k89M?;gOLsmC?T5F4UoZMx>S@|Q3{?-
ztiiq!58GMdtzf_V6w|{7vuUD4dGNYuvmDq!fXuxQ5<4+L3lQ)yMe37Gcs7qsoEb@S
z(vj&XGv|Y5vQF~>&>=s0H6BW6%M5?<_Rm!zzjx)=0N~OM<ACoRq2uv4#sfz|VxsmD
zCr)ANp~dOm&3NteAgYxJX!w<zXpc!fyq#+b>*_C$bq`hf<!y6~QtBzcP={EMlQpqU
zw)O-9Tm-t+Pc~|ad&4+;QLED3hK3Wi)-wqd#wQ6qmQ5x;Lvl}DGlSHMl_9m!!?J{;
z2W>9D^xgFjNLWrna!v0A<}%lX+W8Q5r2o=IIaGMu)zlSLL35>$jiJZG17OL?eO|`$
zI6_d*<1mN_y=Wx5;a`H`ChH0>^-+WO2YbicNk58an_gGAd*O!bYIw{cogFjdHLRgb
zr*L)8A%Ne8T2V86bC6ES7|I5lvkR#bWi(i(tC9R=1yvWyD4moUQ4+zh&<`DTU)F>I
zIWOm>4)NslTP`u*`%;G*3A=#AynWGN+wTPPQ|;q5dFLtxNFM5$E*Kxf14`~U;LGJi
zKUp(|t6rLdTUzK1eUWzy*kI@<G+4#(QYa?Ag=i8gIM->)FyPMprmdZyA3=`Ho1z&c
zL-jgEn7!&q01nHpQ1GKqTf3FslHe6H<uNz}G@Am(Z*k*MTkwUkouAnzbWjj#KCeeI
z$4+V4am<2elSUnmg&1)Lfm-eQ+&(3yK3Ysz`yo4&N1sk@F|417K%~H%^i{ah=`vce
z$E6!@e51VlbCHDo^^y96)id_@0Iyp^o60g;BRi{tsZEr|amgR2<pEJt$gTsdk<z&K
z0_UGIRi%DrU!nDCR2|9Vog^d+u?b*kDvn-(2UiYRY!`mImE%n%1~7P7S$iA04++Rd
z%2~@S?4bBrO}Zke?9HQ#pJikRDLx@Q5TYi_HwHJeqpVqSeqgX5l{UW)^r_E-i1CN;
zj?MZ;vzF=DKtYmEvbwwcEm~R{7dgfBySm@av<tgc$)|vTGV{{+-;4vY@+A_b@^}c`
z_>4bK#u6?MW0^Fg+J}Ir>|)({`d)qKG90@r^?z5YfbR9f#jKKgXKYN>uhigb{`5x+
zsv}_mgLVsqzJCXugb<fMnb<}Z6y{nBIdx5{xy{#K)4-jRX21kuOgkh;<ibwAcE-;o
zI>YzBZnsW3Ijg_2+US0ouq8-gQoJ5igPvS455&q)FV45)iIM|LMh~=Pwb*d=aI<>O
zu4XlUk4tR(_`ELmm0IRkkfk%OLF8Bs#8T&Duq#%td#e;w#Yuf4^XP>(iE{iS!VMep
zV7K;YKtWSsZd2>D*h)rVbjl!ERz}L;ku|Y^(r`KmpeUhC1N=G+@5sSwNGJQ%x4DL>
zcsSc)q5`PjTrS;05LwlC(6_GccWtz1j;F@_QM$={!JU~H3xSYNMKIA=YcebK*}JH-
z226JVY&^KV-W7DpXCII|_97zKYZ`Fb`go<!D`eR67#%T-iZ(eaJBeMb65QKvbYJOp
z$S+lh_v$=A`CKhP@9VxM-&o0RYvj6PxB3HOO~eL;Ge+Dq8hAn%R>hk1F(LhAC*7|7
z>I!PwnF@xfKoOOMR(R;iMz&~<US$K%S2;wTY3`e)<fP>g2}NN80<3EcY*?rL0+ID2
z^ZFJS;g``|mWqT&A>&Gu<PS{qm&MyAAsi7NZ2VnlKhd*C$5{n%;R`sRao1aeh>>es
zmHRIU(5f%G#iks0bXQ%@o;l!pAE)RgpfMe6M>ebT`-vUyTo;afD+uR9h8FftPcgp#
zbk^LN9y12qeM6B+d;U58ICpd_P##IE+x`L?SF8Gw^6GK5t$nxutiRx^;eG4#GM%J@
z#t``}SQP2V#Hxd8)l@DtZlDawzgPrMoRK1NeY0FComt250HvTe*b0S%+-hNqnNg&L
zan^&fhaAIIUT+|tihxilHZi0Ki-0g!TR1S#??7j<fB4+Wc8G>=+T-?Tb9OWGbpW~R
zAnT6(cZmEC`*kJRai_+u&UKRqFE*FGa*<5aF~<k0ftMD>X>d`~EEG9(j%mzdnpCCH
zE)Z$<R%fg9D%tkI%#?R|8h+D-Yb`P!JdQ>pV(l4cI=<sN;e74PsLnGs1k93WNW0>i
z>1bmikTp{$CZhTBI__xKtiP<cA9KVBARk&c@&ee4fOkWwT%u7xD91d023b*S-VdY^
zXWbHrqm-O65uQa6=o2!THVP<GUc62o<N=BUU*jMsu|$r;9UW1UW?FTy=q0(WOO60j
z?dC7=)~STCF>p_NukePgdyXs1JeFK+wl*z&l*%(DJF}t04pT_RYzCcS3<$_zG|f^@
zInC}t0*jupB~gn{rn4y0`KdJN1%<cs%E?y&n#mCO4_Jh{<{1;K`8OY8NwUfuDBAPt
z(`(6zr(AsEF9@Q=*yw6dty<O_yva<F@@R0z6NE8AkcVHLT$mB{CgA*^n+n2HzJ9rH
zJsZjz^Y#|ry0;Jxca<Fi&}xvCj~0R3JPr5|Y^}?9kYuzjL}cfV`Mw~zh~&@x7c%^Z
z<^EyA9PCX0WW%h?|Ah^+vizU0;W>?^s1<R{3^PN1VFf*Wa@rcTIGnqj75iiHEedNA
zA4xp$a9UTEJyK<p(fh~M<%q)CrNDRK;Ft=uYc03wj!izDGRS(AKeL|c()u6!A1UU|
zPV=n3Cav`E;qKc7T#^rto~#7lgXtN`#0-747(xF2b;a~zqu;Q&<!1B*2>1S0YGQNU
zrPJ-)%jy@2m{gpS=Qm}E_e`-=C46!1+<E9APO_V0?fXXTBO&h#x7H^VulxklFbk@A
zc+f^F@<6O;Ho0<+jvhU``uDFQ0weu<*Qh{t`8nStAW`?=T+^s8J)ypZb{1-tWDGL*
zdXn>0#|(q9D9c3o==bn##f+_VGVx%({)b$_66R0QapY57cA}1(e$DRZqAyNY1rJ8D
zweY*-x|K{~ItNuvP)+IXENcq0P)-R@EUC~@({|sh{lHjGH=lJei8V4!Up_b8d<o7v
zEfa5)AYO$S<(%9*MYF~PS9rM|gNAtO2jeSS{^%)=mH>rb(UgK3SZA+^RS?B0M2B%&
zSV*kiMTvM^q)Sg<3yZ;G^sa=?+4V3T`z0xC7*#?hpyC;c9W{Wt=YBADXEyLQH1_=1
ziagm<-HRN1Yv7cj?hwraoCOb{8gR2ACp^rw)fEf~p5lECN>ELS{oemxw6#uT3Q1K{
z`h*R9%un@Eb#D1casIZ}0?u2GB$U%p;U{-YfXsVAPfbirDZw7dyD~L_%oy$k@(Uf*
zs3IL3p|xeJ5I06o+c*HUUqlD3&YW?$Oq>tANCJy*$_<YMkC3~<260*-KPa5(Cl_@{
z&B6ktpPbh)$}$cARG>RRq|!tWu2jxLHxSzaWq&_j&yrOtJZ@INW9jffklDYXy(82e
z|6(N<zhym)O_tb9XY#O!E6EU(=hk~}1PW%d*x|jGr*7i5!IhjziK9egf8|%tZ7LHE
z`%{y70^v3uZd>9{WLh@FnGfdAOFC%pb-{Mi(dMY<S^eh=f<$N29-yNI(8s$KV87e<
z5cov5-27-VK5MwLU(jql`ZO6{Tg8~<ytY(t(zB2hUjh*ZU7-$Tcc9`A8!xZ$GNTY;
zVi)bNfCeN0u9NRL8=m_`ZOwEZ&whut=ti3@d!5pqdTpu0NmtJ5_B=}U%jW$6f`FQ)
z$;>8qdr`S5`Z@pgkj`vNCShVYuN=gM9YR7xb4!RJQMMSA1q<6cXag!kEu9ID1jQWb
zDT<YiSK^Gu61$i8iu~X@VbKSkm9^Uk6`$@zoR#37T1ion<akuCv&~zheq7(bvBxEI
zPjK+92Svi1#fDNM(EIX6i9I)D*j%zEZ15~i;3*YJ2v|cEvT(ZMV-zwPIv?Eg3qCRr
zDX`a^gnuMo5kON4mlRxuMx`+VMuYTEtZX5=_yoVoG9YKDv>BPP(7yl1!b+aQyQn9a
z!@D!F#X*^P$eNfF_9=J4FU5Py=$p;$INDN2%R&KMh&khqj6nUFghZ8zuYTg?p1-vf
zzNcZ8k@1HL^GRvJ6;=7%0%U01SLAkw<u2F+;9mX3`TpF@;6hbZ=0WHTClRBHV_dh2
zi1pd$>><H$)?wzFX<XEi{Huk<*5>=OxvLL+6Q(hzIgtjjhG5FJsZez<!{{u?>QVPU
z$9=7sg<FsjHwxvlutLF?T|y%sTx_1oLgm=}wZjzDljrcPndAv{k?HS?-!p;6BPLNW
z67}2~j!1g(MCQ;jZeu87_cBGLQ89T_Kjbw{Mc8wG=|#HKn>Uk8eYC%RYQ-8LXGJc@
z9UjZScbjF4tgw2ZB}2;#x8HyH?x<TyOYOajpQ2PmPkv|_)q|IIPe(q3wT~{a2unTc
z74S-k(&*q<XSjDf=wj3L2<nR$jL3GAyUsG)1_g<*@P*19mSHJ#9gdQw{J<z{W+qT#
zy(i0Wv;kM)=!Ke#8lPbGr%`KclK0ADaQp<2X6QHKMtx-&nq(R3Laa+2yfrQS&a%i`
zHW4Nmxp}q+^;}tC=HuF2(>kB(fZa;-`1tu(b4)c$%=ve}{JV2sq|eDeWcm4gdn&1V
z^x=HM)mtsLuW-=$Fc_uGv_}L2r5-x_`fR<?WL(zxxt$%tTzEB%`%uM|M}pQqhxwI&
z)0TTosVtt2O=gIRtS^eJ%ol{0DFy46w0!OFu(XW?B|lQZp(aZzci}V|TJGZ*a}f?V
z3h1;=gTW<0gW2k<pV4}!i(p+^3ZOSli!-Hcn4_MpxYm94!bTjlWl!toM{l@BYYY6i
z)Ku&=)jW7Q=3U;XkQMUt#Z<i^?eSwKJC=(NiNAji!xx8HwId&AuO-(&x|10EXUKP$
zIkMQ<hLfO0GH^Zx7XK^GhSry!k0Fqc`$T-BfSHus0j8~4B76gE6yCIrD>sZb>`<OE
z3XKj@=PdXpl%Ec+<snyICHR+T>AP?T+!=Dk++F40h&)vi%)Oc{xLe5s>7INLhA_R?
ztS#N!j>K6iMJh!DVg@7i@uKk@$<#r!tsBUGeNqAI@BAZE#^-e846qGzpnnRumicyq
zB@QNw{g=c1&msN$FlXXoWc}x1{x@Y?#oZ1BR4_CH0cAlZ7KXyMZp7M*Z|6EY6EiUf
z7qcz^sATK(meoVd`1Y0q$i|8I&#C`b4RW+~b}$Axz9j=GIM^C1gPgR1Z|OqBKq>1t
zbHc<x6_A_L+xKE_P7=z0OtAdM5J~``xb1H<|FH9xCj=CEE5BKGB>p3>1Kz6My732q
zu>Ko#{D1H0AGcV4cV6kY5C3-S&rQIey1)ElW%~c$uRobq|LNBsO!jxbeh=yIapUEE
z8~wMy690*;BQa3g!o-nS8}K{sN&uGMqpAe>(+MSjF7aDOoqq@9Zv+27_3!N!LnlKk
zTeE)}{8#M$IUxUP_)ok4jyX`y&>93(Vg;%w0i{gdf^6aB4wP4rC1wID%Mvp(Ff#uw
z+JA$XO00lCUjFUZe|HY3#KHt%`R$_;P>Gonz|8sABO8GEPZ!^6nE}jyW*boH?M8=*
z>mM&Lu>+X?afPGA!~$UY(~Gwk7y(RwqW<s3{>*}ZjO1HmTmY884E%4*{>{KYZ<O9v
zhY~A0fc39t|8H!)t;BzZ^&g}Ad!mYh9E}|;?3`>J{w$|I!z?1Mq%NlZK}1%GiTO{h
z@Y{0Me(M`OGaC~z2O|eD2OFdA?<_qtM`Bh0P{`5v_kw<_e4Ffsc9I|qGxNWSzs>*t
z?e~`epwwINEsTY1%&gw_0RT|h31qEC%*4nJ0Lof8I$GG6sau%5B?GcBztxDC8#=u0
z1=K*h-`j;1$kgc{PY%D01C4F1tqp;8AO{Ou6QBpk!4_z10|Gj^+5%1Ab`zkD#aqeH
z2`CKw2$TaF0*!#iKoHOzXaW2Lv;o=z?SKwIN1zkX8R!Odr}@WD@|JuEVj*VwGaddN
zfIsEGBB<<a<n()+`@JNXME=TF{Cl$EKeHKG|4bx){(ogIR;anFsO)3-M*F+VLm0DG
zQIvQirOk(jhf~s88bcff2%<wK5=U^;L4|;Y5cDuJj*Vp)4pxu%R3jJ&LSSHE86jg?
zjvJZFvJNcIVx!5X?s@Ly$#x3KE;~-YdhCs*v#|VlUT?o`T9sCgLPVFHsq8okbb0a_
z^!njPTt#t1wA!yfxkU$kkraok!`@-sHd*31U%!YW`N#_J0??<*Ntt^*?<xEc6*G0v
zktv_{uB-}eO=`MzxNU%~-TBt8=y2;t4JxN2`6$)V*J>-hibthv%HX7rM|4JL5-n+u
z6jv}5H)HZhN%S)<Ia^Y7ByJ5H^>#RJ7hUX`S-E3@ib;V)TJE#zKtabIR$|TmF625K
zmM4A6V*s>Ruu_%6QSp8W{Vb{Fhlb2$aqA*>#qI<m4B>m_D;gq8tX=8xLY<QR;-ccB
z5}a8XOF+Nk1iHLsA$DnIrkL3z5`i$jjg%1u7Csi&%Mwjb$=q8W66bc`vFT~Gw=!=b
z@jlxG*@SD+fGpqErFN2664OG#kC~%e>O$|c4L5#NiPT7AqmIaVUt$!#N$bj!5!iNE
z4Lq`iy`E3m5cF0o)ed_xjaslN3dO2P=uc2dt%k6cG?jsXNr9DR1k?2aatjd>6ccjd
zAwouY)t}35J4~A!m`r%}6s6@5!F2eGckpB|le+V3>56G7iE6}21mXOimA>anWr9km
z15JLi>7c?v@u_vi&)+Z-?d-6Y6Ll|p4KeH)kxV|Q9G0JcqRC7=BR6}|P(`QRFs0-r
zdUE5MvBVB=sqRLux0FIiyD|_I^dI9;|E}An(Zmun=>EFB!ypNz3(a%l+4B9$N(ilX
z4cju;5I*=vLbmT`B?chwO+KqBo3^ZT<A+XxW>k62JKjwHtov1PE|Mn19VJ~|h*aSW
zN_n#UN;o+fD0aJD&H8s0ZF9b*w-xE$YM#y#CZ`4>>f;AtksTZ%{P!vjPF@I994u#v
zn4)lKCo=VgT}kpu5e!Ow&(}BmME71{Me~5$FY3Tv=wmA2YM;RVg~t;^DEyd^$SxD%
zcntr6JCoZ?6ov-rSikEx80%dju%*clWBWy4JL{S4DxlpNo;4G5v!!&58r5f+C{f5J
zeGu&l^^GxG>5{Fhw!6K^#U^e$1zFtMh(aBwkk^TcRNxOLdQlF7;WEHaB%;}zdJQ?_
zmKv)ZIqpPQ`-BCRG`7lGSxf}E_w8mbFc$|hBrV2s)$1S%B0b+ON4ULds~43S_yF{i
zYJGC}raQ=u2B-mb5CJZnk1zp{c0H6~YK0#mmw)p1Z7Td?xqRV5tQej<qRqjD2YG;h
z&;wc7ZLO1U3d3xol0d{A2em>QIv5(EU4@Bp_Jv@kh<&HziN_rvmyBp{mhd_^{4)If
z$N(OZ9D0iqYU<(Re^_AnLV>#p2!!ORSTCUtN2a`aCD)t}W5Z7t^v%vOHkh1+JBB8U
zs3FU2*$htF+HELw60#U)5_yc)QA&<EGdWVlqIe^4y=*vLzZmaWj>8M2eItvEo2vFm
zU{ksMsHKBj$~6j9%Nm5IFC#~&4f6Kt^BMv^Po;gM-MPjx=JA5VaBJkB@bR4(su;9v
z{&nIEs}=0f{OFzaQZn+cg;`HEP8S}aW;1TfnD%Lf8~r49bSHv2+?^m!^1@LdC)1@@
zdlJn0oIwMY`0z{gjbL;JfAEJ9xUnr}G6ZmHN5KGoRCRlCYM=rr9~1N9g8l-d3MEX}
znBDq&=;FFY&WDTf-0fi7-33dn=}4}Il9(ZJ%FY(2nX+~yrF&Ge17{CwO;~fkacJj4
zKQpG3>`I!2Bl<`$cM9yEcpkkW*(i&)6Y%;(%Rf{#==+>#Y1!Lj6*iTj$*hWY@AOf0
zYZ%wNj#LvB0LNg|94|%Q+21-|cZq>LdY!9oYM~u*{5>AEuxMXj^Ma8z!d5fuaxhFE
z=BZQX$c4)Kx$sl1d+TC-OI7x9SbS?jWIKa-aOj!~c|8v|`fu-=l$%&OE{nbKHf+e`
zZQLzM<7Rtqa#C(#J5YDX<m@Ue=KJzzS;d4M#T|=k8a@y5BJS*r?fx`+Z!#J!m`UzV
z;AiMIlbNC~b#Ex-<W&y;eixYO1l>;mU?=ZZ?XQX1aSF1%{#?iVklbB&GL8d2jtchO
znE0I$_YDWt^?n9rms58dds;&d)|<o~qp)pa%w9|j4N1-%Jpho>Sq@fuphOc0`+|QE
zQ7VX3kQ7o{S{a2uqy3A#%E=m)ToCmbqCmGRvV{Xck|rzvefA>xTUmVaz!SOX%_aBH
z5qbUVyD5R>(fxHjP+Z#X_xU2#JrRbqlrlN8P;L0YplONjcM>O|7|2MUpO0BlrpK^4
zFt4mwy*}^hCxy-Q+cx)tcGbgb$Uk`tAwF(GD#WyLr|=ZGGxdl<)R9|B+bw@B-Gt~6
zSu+eGY~*UCkV{FxYqw$DxEXYnhyj0Hv>K-#opmq{Dt^(eH*+eNB7K2R;p$1~2<xrU
z-E>Cj@_2-P9F}dK-y0a%d%+$;DVLDLee~n=(c7aq2A$iCr|zDkwm#SnW4$m=x=!~c
z1v?MmL(Vhn+~(LZIOCxu<c=hEFL|un#$25*5#h8H?UOr*0NbaGH+%&R0VVQuwZ<{u
zmpr23Q|O)t<yBmkpuO_d;2tUWuNgdVKQ$oqo2;5)>|vF$S2;bdEu_|NSr&U?(vCzD
zxYWlr@CXUD<OT~q-p?3JYoVJ1Zk$-mN5em-vUOfjyYZ27k_sqEyqvMcM8!`T`YGRZ
z6eWC}6(L|%QJb5c*G9bIaBUoH?62=<EsTSU5Goi^Tg=mf)jF|@5sh5T6DFRCneKlP
zTosE>@P@_toL7Z=yZsVRbeo!7TY94mN}NB)t9@;B9lojFDdy}(9`i?mhsI6yj9P;7
zKe?ksvi+ffoQO)6KX?}T1F{==C1dWU1#%>N>SgxgQZisyrS8DyH9rS-DzDfEeF|dg
zwtr10Uao3qJHILlQibaM<CBs6*4~W3_0!|fg$Uocu=7xf6El&`g3o7al`jjqDT`>f
zU5+(ah`riVbZxjN$1UcJx>)Pw!g6a0-_<Zg*!AhgN%)2p-Nh!xZzu*@P#n!+m;D-Z
zmdp{gqB6yRt;TC{TfunSbD`W2o!j^(ehlg~(J=DM;K$1quE>!Gn>-7M8Io&rG_wW%
zh|G%;Q2~MU2fL5I^v6)^^MYEFUEH#G$=IX}Kb{l|C}`?+Cw=|-Sw<6lr<8-L9koWA
zdg`EFp{I0oZg<Xj0r@I<)55x)<21FOYn*jekb;9e7o2-w^GQFrBMwz*Ib%#+@<Rh3
zhFzHT2onVb$czFqJ-j6{Q@oP=5n?uopo*>^@e0$B<Je{4sJmf3XU3FJpzg~RbpN5S
zvI}tP=3RPVe8uxXBl`++8$zQl+eb%gx<GuFW~-NJDn$3JkVn)VfuRN(`r*sBe}NH}
z4r!<uo_--$yt;FY?`;Y{=3AM1#9vkMMQ3T;FSJ#rwhDH>Jiz$;0tx0vldOI?Q+Ilv
zT1I2G!Jf`-jCXq9bq)z%$BC-Htp_e(43&E&VF17Gk7rl0>9w6Wli?DA^g$Ll57lkC
z_zurd*2e(K<@|eCLzU<aL>SDY)!-Pb$6hJKb+ltT#;-%Ka3l3!RsP89fTE2GHJ6^D
zKJ&}3mlqBeX`B2gT|#&G%V7{(DFvw<9)v*qKG}{(_*euuevwDpkD|WysnUs-wJIxc
zwGn{8u#{R(!DZ8SyXJ<J<IL0jiLNA3sEAilOg@+1RV-J+Kqcu<-s+wqG&Krv+z7T0
z+mjcH2DTZRP3D>h%h}`a5eF^gXh_F-Q;olkU9P!Icap$9uuulpqr+=Pc6xt9a0d^E
zKz9hBBcOArBpJm?sKu}p89rL?Ak2B1;QHv=CEp##&3paj(f!z=_v~FYXg4IBs$db>
z7L80&pUyWX+cyd>9d^V~6?aJa!p)p?Kq?9slVxi8Jy9)^bVbNfeA!lLGzXf#>^RBh
zOlTw580A!Anq5D|YX(qD8ue5h3UL51`O7+NEkLJD;>w?1@lym_w)Ge);TTtFJD9|K
zMA+Uk$-s0tz~^IDEBofg@|yuqefZ0w&RSAH3>**rICIB9fcBB1Q6#zqfq~UTp0c~y
z;I3&B&7LJz(i9YydiVoJhQ|A_-=fBUW*z>a8-H{TrZ)=q7nT0aH2>l)e<Y9p71@)K
z7Sd2q`9t<N{wK1>$U@A{&h?w{{WoNfk>fwe-tXeS$sQxi|B~#z@xK2gdyH?y@Ly!l
z*w)I{1}Fp+`HQrfywNt(Kg7-EFUscnKM}USsMbHb{k!=8ny&p}<$tGZs-6mObggqC
zxP1Z3GSxaK)pKE<9M=-oT8mVQEi9TzGB<1h`2*c3?a-&J>JNxWu4{vQkAAv@k9JGC
z8?;6$TX4k~>c~d*QIS#J$;pR(`4;6CvvLpg&&kWJY?L@@hx!?h3%BEEUi(iI_s<g)
zpMz*1q~cf>_DrnxlCn}W(vmV!I%5X*;%eNLjpW0Y?KVXp`aXRQ-Jg0gmSlpa&kCM4
zMI(*VNmP!}tza!4ZA`K(fUCojnn|J?jxklGodr2)CbFs*(yOYB)c52Fx8!K)6;9&%
z(2bWC$L#f!u}<>_i|14-COlDDxHuOm6{!{%G|y20oH2xu9c$rLFXOEG*&7N~wADU*
zm>>@$LWb-s>jM~3)c9$Ll~b}K-}m7fkzFv?q-e;QpgDdXgy4q|d&iaZD<(@eR<@Z^
zi!_{^obneXgCw2&mvFXOm5(Cr?pZosjxN*BG*t5_U3m`tH(p_)w^VA<V|r<Iu&G_9
zYzy1d!z;rNk(UEX*{Uj&_VC;}&{0B7k$WZdh%-V5erghRc@*K86l9%u)@}98U{(fF
zikSYHii+(~ER)c@=|0G{u<!~$<c)o;6awPTPeiRSsMe?i9<B*=u*24Nqy}w8YtHht
z<1()TU5H>%Jmkg?bD&%VD@3R_>C4)2zf792q~S4sZjHNeVl_W~$FZnPsvBh!QpDOw
zst|}eB7_yq2}f^g%caFi^Km`As6?$ISX_Yzp_@S>4e4gu6Yr^^Wk46|{-U(IhAgj0
z<cq@h&h@1CMDb8Vqlzl182vus6H*~*{9QA8bUtDo5u2xB7xe?87;Nh;`v{n~ihu|%
z3F4I#Y~<og#ydZ&sD9@JvHMx7yiV`iRI_nBc=i`yeoRxlf(3l;P~s;cR0h%|Rg{*9
zQ>kBb3R-KRUoD;)p;hJltxi4<q)(i3_rI1}&0UCcmvz%;Ot!vxz?F@RmC?WFHaq0h
z3iENYHhDTo<`?MUH!y+k^FbAyd%h?F?<HmBtdY5l5#|F~Fmxot{)&go>K}f~8j*TD
zmIqH-9Y1yejQ=9PoNZa7FIrp_D3Og<Cs(jgu>3SiJ38i(UFLHjfj4O?>Uu8nTzaBg
z-UL-{kPQif<kl<Qrc!c8^&y%G5=GnTgNq|J`(eEK4GK*;S@C?LOya9BKrdv*j+SA7
zf*L^}P)|6*Hm5nv5`4jiOvBZ&97Q_o1&1<d%Wgn*M~pw={?t0b%^1a$M>CYTNiBP&
z8|A4bkXt|tCG3h7wl^&hmz)8MGdr@Q^@5BpGwT99Gq}_9!!=w2<GI*kJG2$$#Jqu_
zQ`yz1ULYy;Pc=jp_+HMZ@Ww|9oB9nT=;&?`_DIb(gg@4O#*}jacbr@OrGuxRm+f8r
zC}}-sqe4I*Z{d{81vJ$}`mYE2LiPdkGA932wcs!O`a`{)4eipIw-NMLIK0o0bDnp5
z3zpcZ^^<VD)xgS-V<_w|jx=9yd`o%^MPa!zg(BlR319DAZ8*%FS+ZG5STkf_qQX31
zyDt@%Y6&z8Wa&aBnF>2q(|)8HdkSex_FwU%Mr99>k^YjSyW0HX!p5jJdP-SV@HDCR
zD3@I$+2P~;u$H>ccO3i>Mqzc%F6vaB@zsL8kWbzIu+YEeq00thdC0zjPEQc$SVy{U
z?bO0lOY3=!-kN0BaE^M?HzM<SyV^nD8(Mow{pVNrOCGg{4c_rb@zbZg-9raxV-5~S
zxoqw3=A`Ekob74v*=XsVPcE#C_`*iK&mX4aUj;+}WQ<V8@X=p`hLG~YV8azGy{452
zr4=iMth5zUUmWptZ%Oz?55cI2J)R~P+4j;6!5co_OKT?b{xUPnLPq1Og9OYxPN8uG
z8HOupSt+41IaxY;1gc@px{7fJ>cVG+FTjQ1U-L3I#rF)Hgltb@0If1Ac46?)l#z}>
z@Pm7o<hZzK{grUiEUZ3bn@w=VT5@-SKy!C9FUXsv8{D8o^V*Zf6wK|+9jYmsw3VM=
z>HuGu_dO%C%O=?<$h4CK7i8}m&zD*8<@CbjlG_8E(~)9v!AhVA5`<*&x!#@3-w>E%
zX3DtC@dQ(?Z8)$#p5?^ubZ*D)=`y6@De-PNwY1sq>%g$%f)_I&w|MAQ@4Ktud+Q$@
zkpGP7qTr<CX*n6sZDh{Y9~;%JJMpXNU)f#yk!SnEg2^#G5ka35j~D*eVQde4qk?%K
zU^`@_p&(>INC^0>fkl9G%7bNyAN;rrE*P5Eadccv673;oQ4S1Y0Us;08Fp+AzOPF9
zg+y>JK8VO%bQAdvk^4ZxCC{LtORU=x4Jh4FQv5wo<t%ZXo@#WEc=w8jV~Y2e+e4B3
zF6Jq9i3vd(1u{et(CgR9)Sg^6(rQ`nk-h(U=%k9(3HApwJf2`gs6(K$9k}y4@n#4N
zXh4aaufaccIhDJCTLlX-7@QBjBmP|9Rm$1_GYAa-P;icriNUhq&SL6ttR6z-`b&v_
zBMwXMIt~l$)(_cy;PQV1V*UwOm^itZ|9P4-{p~pae?&1tk}?YFGJjAE<G)c1{hR*&
zraUvgY0QjoIOhLCw0=V?|GjAaTh9JZ9K-U4dH#iCOih8N7C?}jv6Z1U(B9eB31nhq
z^$+R#ztywttehSH61C0U?aV<o|J1e}tqdK_|5M?1GIs#Ip`zb9x2c5-2<T|x26P0u
zynXXWcz-kV4-6&zhN47)VnA`A1W*zv^(KW&17(1+Z-TfyPywg}R0gU5)qv{%fwav2
zU@glxncNC!{g+g3|1YuJ1?c))Fb8`4r)2);O6hNs`QPp={*NW|w;;V;!~7kCX~JqK
zFEsKa4|8crY|&)jh-zz_eW1;)Q0sOV?bl3jk8w}H=|PsPjbr>Sf@=EyJt?QczGZ`!
z&D^JoMa#1O%|@-V3Rj|*<|<nv!IeiF+aHhXo;#0s9psNY$In&1&qw-4$qIooG-zn?
zhAw6E)~g*h%hT6s6=twRU-k!6&$ngnIYdu29wXYQmdY(w)1>y=mZ;G=-na9_p{694
zYqWl{P_T14;J3{>zlcwg!?A5Q@IP^DefNFR`?S)3d!aSt(GBWbNIb{OHbLO(t$T>X
zcYNFZGXbAEJF&&P@l3<aoJT&s2b&gFYGO{(RTihG2V$h}lY-%K^x9@v1P2}K{FFn+
zz0(Hrp&$}HyrfW%DwwOKHfFD^?NXQ@^kuh?6`y~(t~IjLc3HQMr(G2yG-U7_zI;hJ
zYv&pDxJe&&ENU}dHet?B0c02B%%;sUjQDGbkLR!Fx+vq7?9R5%idv#I1f+_!%UTzz
zDb3IFB#<?Pr;1wVs3|)Z56`MuBCsW;3R~yRE3wb2Sn@PPrHY?q&nw>~(6ePMOIc@s
zRk|u!D3Kfq!2M`rB88AAL-WCslPv&OIx=5eaW5eVR~DgA!!m3b*^;X}Ew_YkRyST!
zIku$LqKaC`$#Jqr2y2`@Ipa<KBgz(YdiNZ(G~mU$Xll2Myc?sh$AXx__Un-Gq#79V
zo$zHXtRCf7qLRSfBjKJp_};{^pieK3bJ>Ws`mFBN?YX>POS%S>Hm6fIV;mCA#r+kp
z)zxbE8_xFE=qubJJlCs8dfNnhk!J1^jh_sBeEj$7@z>fMh-XaTWDW}#=~FxI91n#b
z`+f-DTNP{ExbPANCxO)o9_NqQBwSwq0;7J2`otREj#1Zzz-xeVXO8pw@u5(BkN%`0
zzdf-Q=^LYOhYW8URm#&(IkHYIv-f;1q%Y%{&Q@AE%siMzLL~ALgQx93G{w*CqE||d
zo(=)mhO#W!n+df-{n&>YIjVD7&Y4<dd?9pW$YJu^I6s{t@uw@^<C7#`6{R((ZxZ8&
z7?-+G7=I}wAm-PeA2I;X8YE>|1%;6H_4=|A*c+0&uqAkpOJK`xd_oa`cCMRCk}H+=
zTcyy!DF%d^+f9oW4-<YVjl+fsCQoFhzaS{D?ISgj{H|;&7^3P7m*6PQE!v=k1Kzz+
zi8vVp#~<WCeJP~uDN8qly5+qKi=rK%Rvyd>6I#q{EFJ~+G5Ke4-1$&gkYD@BIu%1h
z29Nr1tgh_L#CtN^c|t?RvzGc(z-5~eiG^t40aL{FFFl-cQfMostl3#XHlZCqzad&2
z{KQ=6U-Aq5EnYOfN2Z8_uW5-Z!#FC}@DBN#4A{?U+tS|7X<dZrIsx-6aYq6(ZUJLs
zSskhIEz;ai>haqoMIhDU3q$Ed*j1qwqHyFreX}+6%Xg9n!Xu=g%A5<Xv*>M}-$i?1
zDZ7yqKKGjRWiug|o9pSJQpY78I#6J7I?Co^F|O?4i?a{ixI7-NO4FWEUOwjP<Pm=1
zqYTn+@Y+=;B|l5)p~ORnAcF#4R-xZ2O9(*+&h&Nk;xDiYli{ng!-l575U?qAXv&h^
z3&^mbF~?tZ(Gt~j;oM8kv5YCLdCKy3aoI=Qu$WU+bqYoVFojGJQD3DMcu}mC4|fi$
z;$D#2!}!s%;X+^QRg(*GHaU|SniqjJ;Ereg5ZWhN5om}xr%vDi#fIC=nz-7T=ik}S
zv{`?0T{4ROCB*#r?P&ybm)?APYW>8$@ae(wHnDzZKWUbTN?h%>_0`3;8-b2CrgE@J
zgSS+`SAlI=@^zBmajy0RjuKH2N%hG*5cWJ!><RnDnw^7)HKrTAP>?mWDgv}PQ2sIf
zy1WfC<$YkE(dr}*ohH;r$-40GlnJ7)eFa0^bSmjzLXTYs;Jcl|+&HUZR4?k_g?W$8
z!rTOQMsug)^)?LMW>u_&9a5hyaB;tcJl{b`apDJLXkgjRLleRAy~oN)5p*lOlpL=?
zd?w+1A4*oLTdHe-<`%$V6=@f>c!d8AE!hWk6dvWIEfLJUAuZlB(N#-w>n_%8X^u5D
z!PYcCsmO#V=~7_IZR<mip|6%h8`ork$B_o_&NxkSe;ieO?A_%QID)EDK2eaaMO@5B
zO_{FKb`*wcthTaV#E^QL2_d|CbB0-hIXooxOn*xAXqMCQXc9?L7H=h%uIm3m+&czI
zqGoH`U0tr~vTfV8ZFgB+wr$(CZQC}wY}>B4X3y-IJ?G4e6W@>TU#=%2BQrAYd@|O$
z*L@{$13uysLz)z|Y)Kv%I?mHlNElxcxv~=JJbAF5>)2<!NrAml>KB3Hu;`Jyaa>BV
ztk#Fj_so{eE4|Vu@=y@SU9l~`a|^PKk=xgl6SPRj<Wesc*Vf{L1#U1CP0%Fsw&y-K
z6OAiuS$;UNph!RuqG@ij%w;IVL?-~N8Y<IIvzj9{sA2}h;1x&=E)MiJIDIrpNj}+A
z#WiF#I4#CiB;XMtdq5*jbFgHq@wSt_yc8#Cs5covh1LoVaQj4XA%=6=!!-GAB}MUG
zWWXLpJ>t6YsWf&K2l)7Xm|Zm*cH`RO<hsHVGG)Y)AG-Z`B40|)xkeXmyX$!oNw83C
z3C|W^*v||C{DRn_3_!lNL@KAmhnM#FRKOF3RMTRgxcB7yuvz|>gm9pv7!RDwSPt+U
zIZCr>-;bb*DDcB%Cz9Ateb3C$UyN_0@Ck<nzh+|-ZV(IRjdPg@d!((aV64EOVA*q0
z<W7H6GVY(20(Nsw_33i~5uv&38VEW}y^#ZG9UkUl%iKi^Q9Gma*+6N97;m*KL$&3m
zI3uh3EM}Yhf?gThwz_IMW8^&0Q1pkG=Ez!a3EEH(w6j6;?0e7z;C-tw_vUhP8Bvf^
zn9_TIfk-Vur4qzU4QI}saHgys3@dQH;~A`b54hIp`pJpp^<4#Dnwq1XZYeNcm@?G%
zY6A(a-DQr$1Ds$!_d`~yB6J=cO@ZJ3lfrXP2)XKw!T;F~uKtjcVPtm&s7c~7YG6D~
z;ri5he%A@suHoD|gRfNRgEEuXPupHrP?f)3yBdM^0izXswo0?(_BrX?t_j>$e_h)l
z{MW@28%Uf+2Fzv1G=wL9SidkQD&3A1&)ZdSBdUB@OaI*w5SU@F1islxs6zskR>W%J
z)GD)2-yQ#_#?!%AM`I}mV}msq`xdO++IxLQcJp4gLvO@%kEy*FFH(jxHGj+zL>O|&
zjI5x?{oTl()is9v+m6%AvwVMAeO6qpC#)s!oE3g0ZvkcL(NMES_(8Y7rZlhVO!}s!
zV^1(T4A_IAN<y)*dzJ_I07KvTH9Y=zWx$uRHW{AD$25`(e#0C+jFeBsN%Vry*Mv-@
zJT%$50w9SLavRuC+S86JQ@0lt#;0^=h&cP4TqwoMNfak4LXnwRYUByRm5q0yMi51G
z>6}nWe^_Es9AnZl@?XEMs_beWwf5ns#4Pa@&?UU)1m3g!MkuN^fLGi<P9cDh4y?&<
zKx(^Y>__=;oDf43tL?T;gd$pVn#EHUWaZqzlHF*@I92yiP{^gke!$p*8redxqR$tS
zf*#ByP_Ss|Y4B6zPk^Q}jEUxq09A-5W)k}e5*O0e5LR)v<ucav5X`Dw9E`Rwx0(`o
zr?lt|fKGx;mA=pVH~-SU(k0~D(mpZ?w-3Iy18_1rhS8X|X51@^)0Da<ahkVXHD&1m
z+2Q?(t8|`Jvk3+j4S-a@4kC6{b;dy<oyqN3y&tUnQu9QO4#cdHbe@hcDCeO|7@`*h
zhjkjZlSqD-xFz6*T-!19!36D3teG#_&;$63Sm$|mE~i>7RMF}9@>XkbiFw2c-Po@d
zWQRjBypTUZAN)YnT?|%9u<FNKyRBU@*eC2jtQT^u<(^MtP2k;XO?CY5?cL7d#n&|!
zx%6Dwgcu;n@A<+KHAGl|CC@3Q4lZm(Gv0;eZ^5T>37N&D9%nROTv)PMs<`(SSHm_F
zx`ZrPw<<`PICF~YjwmTc>aS+34z|=i8D#$Bw#QNRvKX`R(aGIpvvIL=NSO_mup&?F
zYjz2FGGek){`GkI${$P42MLB}WevodzWRvQZnDI$Zehldlh8FA;SlenADRQ_RPUd*
z@dhZH;gFHE(YzVV*$Vwk>q6uPjZe>y3&^pkh>=>=#omDsq_n?o86C0#54h3eBR93+
z9<VbhJyN^5E6-ZNG{+xR-<UG{x4YhazA>6r-M2KGdBkABev229kj7R2`Tcyl{xX~8
zsgGP0@WLX~V#9d<zS}-wqjJL6U7jaSK}r6ZKI=$!8JLV@7l+8*1kJ-mWjE2b)?;Qk
zFQ1p>RJJ(AYxS4(=y1Db7f4V2T30`^FsAJkC^3p{Xu)u%<;3t?Jfa)T0<z(^=046V
z;s|L#4{eIu*vbMTEN9q6LePqyw$vAhyU9UFFE5=4lH=yhCF6L(&(4omCUY)^l=)96
zXY9-fO|gp9u*2+$rLOXiCvV*8lFd<3sEm98K4C^}<C_U2#zJxbGoTR9vEWVqQ~rTc
zV1V7Cd<MA9Eq3%M=lEs!iiZ`$i=Rixsf-(1Wm|k?$25|vcxl1>Il46CtJ;(#oo8_B
zlU6#{&OXRl2cscZs9GRxd>+CIVwg$_Uezi^#*N}cJVsZbzXN4GqP+yIMXT}pRW%B%
zP=9F#52YxXK`-DX%@`*&#Vl)!OgT#+M=@8@Jg@>DR#axTEC+0`Y(2Zxu{L1tJp+b|
zxV>zNDwV)1uw_jEI9OWLfn(yYvLPH~HC{p_9u#FswxjonVlU(`7A?9S3)}?H=p~;2
zG{tCUy?tV~oI@KhRH`GV0Y;>`ohhNgsar^WGl!m6x7an=?Ht=!C&U5udIn12*7R6a
zCONkf=Ap|4^q{&Zv4q>~<Ix9Y2ds(eja=4{QN4M!L?+o%Aocl}WBSzG<{vmhr2e>N
z>av?PIzP~SpU^?%c|bOk$_uG7XC$K!9*py(z@#{8X;WEQEp$rXnPvgpwD-|#M3gB&
z>7itN&m(Banzwm($hzw$+Pu;A@b?ZX^3)O_y@tGjC#BPDzA~!JM%+E_7-2S>>&>C{
zr<j~Z;)7Das(^$Djr{TZLvFeSBkQMUx0tJ&5p*eJ*^eJTAR&L0|0pXfD@VM*PuA{j
z0d_T5()+GNT7<D5EzenJ46qv3FURW3NG~*8*bFD-M~_eCBJROHjGK;!dg1rP!sg^<
zllFjyNl<k-EqrBDwCSG<$PX$KpI=N#kR>Y57Cjc`5mqhL6?%z*vSzgbyFkSc$1mCN
z+|+D}rv)ii&#9xU-ClaEvEt)QW&qg&i-+7KN~pfAtWC*(6cGBM3L8f}cdH*9bhs<@
z_R~ITqJorbt;Caw8qAL?6}9K7srW`L3nu?lDybvFj`A9J9+!sjrn08gGJqZ*8-QHI
z@X2b|S0WmZ=1v5Gu68_hDIbX+&tT7J4@y<wJGN#Je{ic)=ro>UZz-dRT6RFV8On_<
zb%y!UQ2-YZIXrH#z1}I)buad)k_)}4_wZAHydoz6Ow(T9G0*&m@DBA!Ha2t#G?}*P
zr`^lV?=*xJEW8zRa$>H~@=_(Q@)-fF`H~ZVB`sKh%%Xtz6nBa++H?`Wr*|M!Mlh)s
z3V!1mgNOBu$kjcH?RFNY((KMwHc=GB8k&vY7pVe|b*Cy;dlCz5Kv94{x?(ITd?kS3
zjSGrK!GG#PJI7Wt&dK2Rh^$Oy0xSop%~TbqQE})}n!`t8^65l*^DdW#z(=l?(+kEq
z*~%6YjrX=B#>ok|`h+H<m8B|A$7leRI+FI`e*69^XXOKLsKsB%$%D%=3R0vdEz(;5
zJ!j0brISbexLWF*s+<P^IP^P@LFA`p3R;yETyFlzDCG+rlLmJm6&n3EK^gz_gGi;e
zshi|WUt_y5)T`ANPeq9@`K(!EJ9!6xnq@E@K99%5I}Fr;wcVqDf!n@oLI9z1;Du+8
zQS(x><F~vn)w_hdJXsM}h2ozFX`YO60@92neia*3*cBWSj(~MK0dptcG$kD@QYu?<
zD{P|F)#vOvy8x1R4>^q_Iz*4-&t)l9${|&2Y3w;z87{e?JLX-^WJTDLLJ#WVj*cZB
z&)4@C?RU&yvFdTd2=vf$E>m#*^_q%@{JSQQ8|LRdi2ZxDk1HYYrY&dv!E#s&W`lTH
z^GWx_*|b*MHsLvL&|T!TA?7pu$iG)M=>d!Nt#9RCBUe5tCMUb(Hg9NC*5%P71;|3A
zj*sIPcC}#~^#!xb>{+PQL;T*~OXq%0SQ!-!B7GCZcj+@)7I7B9kv9wwpzkLpg4=M~
zQAj*m`IIY3nhoYF{Kd3rOms-ho2%pvDhQ!mY&E$I1p0aqey6;g1!uk26wid<&rd~Y
zj<4Z$wRJses&A)Z6ZB0vm_8e(+#(fd`^eQ$`g?yY6-oZc5>4&TJAK=)FTof@XqcUY
z$Ei|TLQOSJ`h3rKm?~fOh3zXqBdQEc-s5_g$HIuwcizt8Mbw1_Lb26^gzriC^(6ta
zKLT3^!@MePhhrKp#$%8MW8XxjBO#H6%kEF27(r&`8cR=JWne47s}NwD5I}T383WGB
zxTHR{{f0kJhvl#8=rXS#&u$(&(X}_8Xm-awR><bA5nc;rH8YCezM2D8^<EhLnFX)e
zUJ<2w^$Z2YxgOD--mq0CPwt2PE&Wj#)%M{5GIr(C0U}D<JaCDHXQB$6jENHeylG7N
zW3}_b^&gg71@>TTZJV2OPGz*Ir9aF<mJmXy34TGtYofA6Gk5uic&6~q7M`tbw=3&T
zVrJi|z;XFDyqnyjBupkDLbu=t<WJ0Nu}E+x$;cX#)&&PHWCfjc)~o#<(nX2*^4Hm>
z1$>%xTZj@LR&+763TI1e`ChG*H@(B_ztil^uj-dbEfOPr9~nLi=dbsksu#SxH@f%w
zweU$MU_hFSoWjj_`eS$}lI^W}H8{6b%x}a>$W8Tb#kVMV<sANWcOvJ!UV0;0+#fii
z`6ZiHA||C&-WOjAJ*Az(7Kv`etv2J1Or40-N6a@~m5f_jL_l1wQ8+E3XFsVv{TV`<
zZy_`N2%aVa^vr;;%NvH(za`McIp7QrZ^NDaK%a^Y{W>h7Kq(=CPO0;nyTr}BQj&-$
z$mM}67A$u};{MkNWE=@deLpTg!&BQ?Ky@B9_e>8SUO~@9Yi>K`4m*=+13D^Hf6;3J
zwPur6YO<(ffsQ=G9K-FUyHB9?uhrAfw6T}zoz3#*+b!7ywlxuKn5DI*=sSFgJ0uOU
zJW9seX9L4F_bi_<yP%Gb1e?Ivm$gO6Nu0@{yld6*9oUjRlyZUbS`pE^_03_2*x#G_
zGvZZPZ3Jw0=$$>4e%_EbJ4et@u~(&K+sE&*`qdl52`)X*v$JP`8FU)}&~CwE7_bx1
zuJ(7Z?1c<`89{<?KM?zJL2TsMj_l=NX$GK*<$eO~$Hc%QO>GOWi4KYI84$+klHp(W
zU&9v6@wv=gVoRVZ*au%&GAD1I2%cg?C|?7$3ZzEs{|2{||9Nf96oE3c%*m!K^wBLY
zwhRXoz6Xu%JKoQ;#&sv=VJF`lX{Rvihnsj^Ax&CUOj`2kEYY?u`L+UW-m81fGm-Rh
z1bswI)z3TS<yz;R?s6mmhcn)#V;2xxX>8q!3Il4W>&k{e{xD$KZ*MALOM`@LVC)dX
zKZ)y9L+Oae9CFn#sP9pOxIrwr?skTXIk77}Ypv|Yd?+a_G_y{S^<&<#y&=kc6Rxm=
zQg^{r>1`z&YEoLhB|V+CBMKF`$rA6yRyFNaf;s`wV1KW}yid!$;BeQT_=?}Z@oroP
z!*7hA-#5>rWpQKugw;VDKy}}TSwVBOen;)B>&4W^l8XRrLE0aOZ$YG2Mpe`jU&9lo
zt%&>mTRc4qk42Z``^`f^8kZx-lXW2LLlxDK3?Ip@^+StV+(um*TE*|xi~fC*Mt|j)
z&Qdpp?1<exI)u!M7qk=)r^CyM+Puv3pYhzxR_Ay|u@o8@b8uHVUKWZX-^_K+63w-B
z>h9t=4l$^`=I}6$-xni>w>hu94Dl6%Fqdze%@N*jlHW-<-$6xCRlR*d7O(m~9pElr
z{4#x2bSgejM80EN;q5HlvDT#YJNX2T$V?^-6p;{-vA#8ZR?A4>u4m7RC#I!q$HycU
zodZrx>;Gm6nrtE1(VTWb?v#9;J-p@Gq#?Bd2Cas%Njq-Bw}5Mhk)SVMMaJ>GbltOI
z1=K!@a$mA0s)MwoTgK2f=F-tux_hjJyn^Kp9GgzDE5z(@Bxr&_&tYhFx6LG=40P!K
zRUTgvk=DtkLjz_iE?+$0>~B4{V+VI~gf^k<OPsFJ<p})*zONzTd7{WPC$YjWl*@ET
zf*R{)9o&9#j|R`Pq8_t}4~DfS$n*I|Kt{?#a0rTzKlET;%u0p3z(z*RWXN=V@I#Bp
z^BQx4e=UIFY91n_qN~5JCS|>?4ok+nvA!g`g1vQxL<pQ5SmpXSCGobKll5)G_tA-Z
ztyU|vNk=>7ij-_Tv}nLXuuYh9x*vjZZ%77gdpg@?YWfuhg{LW62Lel&r>@CtQk!Ua
zE%SD!-U*q5@_|Wk0nH(>6+s$y2rbG9nHg}-k-3*$u7#{$4ZYee3turI7eb+sKa^Yv
zSS&nWg?KDb{v!Cvacq>#c`cOJIEknL=T$UqHXMX?m=W~!d*9nmhB23Vgyi%UC`{(M
z*3x}q=4n=V`(CdL+zWb9?RPjm@oQ3piy&rzRDj_R+*%QW>0*99h<ZuKR^?2C4tNP>
zTaIcId}KJD8d4k>j<5;pEjXv8J%G4`oQVs-mEb{C7nKY)@~)P%)PTJq^?GlieY*gW
zFvm5|96Bx`Oec=?3o}Vjqq@h;*;tW5u{TTj+45zB0NULi6xYX;oYJKl{&2)MojR`-
z_F57*D-m_%R)b&5$OZ@A!prWdK;fKRn$n~{v8g=hpD{B5ml3Y?Xxe{7^&f!0BZ+3l
zWF|O$G7vr|bA(7jMuT-COCF7SLK+LE^z!1kIB>U;>@<M^60C?SCc!y*E!*6|7{5$#
zgJQC<yA>AM_)tZr^mI!OjXO$;eTu+`w|}Gseak;<*NH)Ue{y^+8ZyiC4pS0@h$#Ds
zr5-1#zHA_BKr019;?lb8Z6+?K(}~)KG(Cu?qO}|Nqjmub%X}D%{Vvq<h&J>^Cemc@
z?7thLe>h@)TV-NqWn=lLA^Kk<cmKP!E)ij6c{!OcLzG|j-$FdBUxp|x-B--zD~iNI
z`=3%gwEv#s`CIvy#jgKtiihRDEq1Xm{lyUF`?4YbZbJUueEh5J_;=IsUxwqK*_<!C
z@!yTc{}Sb*`&<1#UH1A)F#WsHn4xT@sGx$}i5Kn0XHY(=R2~adrWdB{UY={=;R7Nh
z*A1!~N(lCS-^3X#*Bcdogjn=@=nV)QoE|`c=m36#c+twWTv?gf{EVT)QQzVs@}nVi
zT{?ofMbe}?gV~~(=iWv}-Q&mPqsMD7ss@HIAw1hNDKijAxy|FlEkq{M>Px>;GA=yv
z3K;c{I6V6dv&;16MSp(`hDhE8(cLG)B=$hC5dJ_Z>}7xc4+lv_`%w4P$Fdu>+e5d}
zq<)c7edaRwJ<rnkqhV(yh<7*=?X+e#VtS%ohv(R4R+sF1oRORE;XP3Yb%Xx7`i+ol
zu@bTv(-v(#!F+Zf-Q*AncxDn|LZQlQ6%n%7JU|7##G*>k+jZokP#74!WU+B{BeLBo
zO8xJsz`H%;dW-a9Xe>rpb-pQm<;LzQDk)IoW|FYGlRylf;V5;f*G30))b+-Li6cfA
zVeUdA=IIvp%w53*{WvS^s~Zh&V;7AEE%{j)J%x3fHeoHAYnrbv4_<cGwxp=r%(=rh
zrL?`rA*{S4ppdSrK%1s9)h5>5RVDLCL|=1ibtw=sRM)fe5g<*yPIfPt{O?IQ@tDl+
z-y^2KY4c`8)>W6lf``09N_6Wiulng{)Ck*VIxkPiil;)sWJ9HHlN1;E%&FO`4DZDd
zoI4s6^_xsXQ~LU;*`o<HgA3_xgFRet24)d6Z+Omx>F2xF$3z3SoyVUQ5eG-dP(ToA
z7&k+R9J!{d`_NI+v$#^%FA~zk#s;DQs*>RGR0*Lj;eWRm#Ic8kocT4CbkJQX*}<(r
zv5-$fl?9Gz1Dw9`Tg7|VI=w`uXyNppy@Qg6#|*TXZK3A;p2-4KdL6&qhD(l;08@9Q
z-^w@_W73p=lF-3bkAWj7$3=@7=8#NCq-NSXgi|{C88AhN^RSbDFxKXs!5Z0h;~hXm
zBE$#i%78Nay+YwiS1GLgLD0AWm^&~rKeYdZ6wDXa5_?*(J$@(NxR7J_<zjmx0+HOE
z^=RNTaEzF_fxKLfFD;qT0Xim5#nTyZD2q$UkeeD(PfoYKuG$lwl^OvkF*xwzwsfIK
zO^(qOaVxoN_N>98ws3=6AFICa3%G+Sf)ERZoUYf{Ys7^~U;(;Ga?$>MN$f;Hrj!Q&
zS`+&dt0?#G-p#<*>#A{iqLzVD?dGgHFf@w?GGKbL$?-lO2lS$j+iOR%&>6H!k=#sX
zV1(2?cY(`=s<{ykg<FWWNt+UASGjW%>|TUvNkC>q5z7n)Xu6bZBbi?q;h6x&UgUAo
zC$ttTI;mu8YBbK`UNZ)npP=x_hQF$OW^r1}y1lTV^!Z&Kk~0u~N3}X8&s}>#JAR#+
zb#xR=r3XcGz|Y}{DQZSAR3Rjl5CLUJI9C*LG=ze9hDbyuJT?~3Hs&!vNh$^>$UWyh
zkoi8TclA6;TB}8U6O?5e!Em>5(OaI!+RudTmYIB>?lc~<J2h(NXW<LESs!-TuWv(J
zWU25N*O*a|L{E!LPS|)1@6ahU7^#(*sIFV3@r>x$0+5<fIWh9f2?I$1pq!Kb&)gK<
zapUoDXb+<4nZeX&k}pcUJUsl;;c&^LX;Q49=LH;gjH`HlkStbJRV*s?PM}!eE*!!+
zD`HGUiP0`oW+&`i`NAvxc&S#@ukjOv^=QVA+E#<*`uNQOBY=Y%dYECI?n{eWq+e{Q
z%=a5{Cw_?sZZ-YqoDQTwcPge}O6qf+m+d~#GE-<n#<KWr6Eu_AD*-s7p1Ys<r^wV{
zt0)_A1gn{ua8PpD<*V{>Dd~qv-+j_QjmK<|I$d7#PPKs<OC<{Mf|PqPP5E`Rsbo`Y
zSF<5PAx9r@wygbQvLKUqp1x6Uc0h(s%gT-?+{eOxgi)yR&CCGAt4+#vSfES_q$H?z
z%-NB?MBL2@%{UFRVeRk*^#H$3bA>v7(yoyDC?EN_S*JG24C?QyJ+$r6(x`!AD~Yu`
z2DL~m&D^>Q`PyY~oZ_O5IH=BCp6C`+?u!UngEP>C1jO{>cS1;V+}KCA3AB>%h~!Pk
zP;Tnwi-(a^0ibb!ixe=M7(%JrZD_H^xbZ`gTjqe~16PrIMUzgHEuxr%QbXM+82B5`
z@hKS5^SU(LSt}XeiO7QQPVGn(uy&f2xo8wnzNv=WymuzNE}aEYU(~tD`swY`H}I)P
zEBz?wUf|WuIAif@co_^s=D5!&xK?I&r+LmZoqE?seib|;u$W*jQmbAFr%IerPHf6K
zZKmV!?^8CB`bDQ55Y-$MXNkab9KFtv`pGGItDQNEsqvdGgO%U*dup9o6Lv&Soe`Vn
z_Bx$$uGO)b&uhuuM^ET_fZDOERH9blI%-lP7zLl5jgyyF)B(Eg_<Vnvi(V9!J<1(r
z`em0iPg1*(814xwv+<&DSg8;T86p8kKPr*rwoPq-<X{7Nh^P8+y~*>M8;cmisVl|)
zNkd%6Qa)EHuA`7U{~CI;stA=9BTZ0_B7Cb?|A?Zko+LKn?fE5>kpIwtpfK}5Jq`;?
zgT#n@tuMRXCeFM=O5`YkwXUkBr*9ilRsYI>eVH_*vU;GJ3t+~8--zGt6F?ZD&*Uy?
z>t3|ZRy<&S>{|CI0OaeM9Yx@oow84cv!8wEQ@RJcK=WpZH(>9HF(6^GX1&S1?||FM
zl=wAABB^InkY@Snfd5cXWsg)?{gxCs^|MFv@+`NYgMF~7KPWQX$}IF1*!edLs#wwt
zjN&6(KT>t_6=*KpM)AghD_Hg;S1>B&95t3|@FU%Nrtem8;BCMp8;XrhPn^>fLh;g|
z+tEPmVEGu;Pz~x4*mo<M^m;N6aM)45Ga5wY?Z<wJeh2DSMz_x#C=ke#n1xzlN7aTN
z2#hs7>0}-=538LBk|Q^-RfWR&LQtxzN}smt#uPim;Uz|@%Qz3I7uu61Wx$~$<bwyi
zfSE{$2@zoKON-183JH}7pm?E$|M+P6Tq6(%zP?M>9>WfY6}~A9<)33S`wiYo>B_qu
z&9ug%VT)e->$jWZ2yqOc{{VAa6jiK222TZha${r6;9X5XTUhPG0rJ7Q1PIm94b#h;
z5Mg%;t*T*!^vv`0kt&$a)Ap})y1Q61{i;Ib!OJ3Xno8_$@k0Q4tyt4{woYV-h(hrT
zmRbmy)}R!0o};lY(%UIA8jP)5WAern`yh4nK$fkar?ANS%?ot#&ViSYFY(QlM9}Io
zN_N71GlQv(<Wl<&@A7sdcqe0P1rNi|wG)&nQV0HUHK4Yu)Lt&Fy9N#BkfdJmjuNJ!
zIgP|9j-$#*ylnF}g7afjSL4ARBx`RyJkcgEox`EWGuxqF9Wa4h@1dZVvVA8}tODjm
zou>$CWE1VX3XSk<c*8VQ{;xPR!MSP1lTC|-)K5_t_u7EVJR4oqpW&|+NjbrX-`;Ed
zDvC>s$*V3lteFq}9ay2)2FZ@-ce!n@y;!)Ie<~yPc5ONo*7|i~02_>lO2H<#3n8Q2
zTvV!F`A}(cm>rk=KEdL&H3Jb*75p@Z&%7!W_q%RPP{Am{{7yF4f%|*3Y_>|L2;1Jx
z)^P7Uhj)jd|F?%(O#g{i5y~~IvjyuB^QtuJ4t+l?u*ZAEg0fb@T6n;5HnwL(%jZt`
zDrALZZaE#=*o=fMTi#>zXfoSdJw)h3YAI{c*(_g`ydHT^wJA6_Qw=gGVnj6iva2%3
z3J!&hy`Wsi?(laJlE7z{7mSd*|IlpwNot^HrDgiF*`WXP@C!chf84&5lUI@#5dTNB
z;Yr8zuMNzv1<wC}`i-yc%YWa0l=x%w@n3t7e}@A6Jzrw{2N>YLHz5BN4nY53@D6{}
z|KkSa51zzdHXSomTz(>|G*&j|l<~^uDahqI`h@DyUVx{DV31al`i6!|u=vi_jw}X`
zb~<KRCU^uH!SStrBd_QI3L!Rv&+BP!mz?iEys?KTF|xlxY}rd{0j6d+pt^PIT7BbN
zsIZ&jI^@`Vjts9k85%aIT~dB2f4ElNIoaOtbR3=UC$o}($>`svw-MyA$#3^H$J9ky
zKezBO?>BP-)$cQFcERoB3XT~w$Q*m)!guT!F=+%IVr_K}cS@(XD@@yMug)f&Kz3-(
zOJXNxC6&Yy_yl*ji&)MD4-LsWVx?i6pAmV%Uzs5xWhWKKKwNgJ6%kyHTu#m=6{!mD
z&MvkN6vIZq=^Pm2!nbZ2ip+l2=s*#)xD9_$L(RL^L~J7`RO~Q1o~-`Hp@x7kNPC)s
zH12MM&+yf0Ak)Sr(~XM{#@QGl(<>y`gwxaoqYaho71B|Un;L;LWS~uz>uwk&(rJZr
z><&umEYgjk!I%!G1p3$L)uv<_bk@GUE8j7UiHvGg7^yO;fA+BVzt|0s3i<9}GzJp=
zOqeiFJ8hJ1%y|cWoI3if$Ov0k<EW2n=wik-z-6d5k6y@Dtoiibe5p9o83w6)Di8u8
zjSDl`;pHwe(B5#_qAV9q0tToCwBOR-Q!LMcg0HJ%xcmLR2JdwQr+VfkTnMg00}Kup
zdIMIBCBt~8Y>17443Cpxgs+XP-wwcl51#N46)Hk#x;G_HN;hXleIgLyWXjUh{a!G^
zmbZyXRZyd@9Ko<z>}DG`bJq*(Df;gA3L>*i?xZHmcU-(qxhCt7Kbx1@rF0p6*N|0o
z38{F-23cmldiduh>!x{VW**^v*Jd{~Y#l>te~#2$qGL0x#l9Zx%9YSabgf2}%&21F
z<yy@zc<X*}>)sJN5X?{kyQyRPd)E$W8UtgJ3m;Nx4+E8ql7i-QVqH6BgehQu0!p;&
zK0?eO1!%maGR&*AgtEDxu4zHYYAR_@g6xHGL05#D?mP?e5bD;r=t?S6Lcske_c3bM
zt*joL)^y}T5!X{47oMx9mOm&4I9;utxH|w!*{;KV23j+VUgPZKM|*NGZ6O{|^z@y&
zbOSSkq{)RkuE8;LPQmBrqB8n}G?8<48=@gf)GfQMY_|~*RIdma7G;~PaX&~RqjAn1
z4@*ey>};sQ7_8RbuY=Gs`nk2c>Fz<T_%WO|&)HKd3Cl)+vCXXMUY8lo)_r+l^a!G_
z_c*Y5_`Q%VM#1Y$QVukGArQqC;?U4{S;jl)sQEcsRHNWHp|kD~Qux;jqll~GavnE(
z$&MUfNifR^g==F;ssLBk%>AOs)BI2LNhm0<z!}d;ql#BRJh!GMzM&gv^@;|js1Gij
zcMRH*N?yg-2N)+W_YW#tT3+RYV=_6S+Ysh?xq@O%)+?n(L3mQS9;j-lR@t+X2jfc^
za6LNT-!z1*9$oNx3s6tbm1+137*FlbciXVSS#3}XQRTiE5;Lsq{W|sxk|CSN*f}ze
z`HUh=Rimpo<kOAi)BXY75UoHE%%WP%j0$~LMyrfQ?p;<xs%KyKi%zK94OSqmB(MUM
zVBUzu0PPNT?7qEEzKfWUK@9n>te1%RM|A0;7-Ritn?h^REmJj%GTTz$<9zOl3!<rs
z0lp2fhS;}Al3lr=%;BAH^;A=|XJTSL1|8Aj#IPGy5R^V9NS)e1P5$WsioMzrRrMKM
zUgvT>WX&MIsw@d_BTAlS1+jqiD|qer7FDNzQ!2$N*0C|pJ#pLYbJ-;1Qa=dJ8+UIH
z7j15<DoVFY1iDp4K>o&0HyUY2VOooOG!1bL9eO@cz%mr^dA&(zK@(2rTBKGgDP83!
zG8jp8GGNTH0-U@6R5|fzX+|b^PQ@%Xlk94&k&<nCL9WVANqLK8K$FD8kr7t0=lZRr
z)e1`Qcv^?R;6F?h*6?8;REHgug@j%nJ_IEqC6y4gS=HFBFiheY=petsGU1i!h>0JW
zoiKY-D{oZW459f8*g}LV#TziBiMQPgYcvezTIzxM=PctZ6OdvhXfI&R?_HF3Jm=lq
za|Q3zgl7lZdJwM~oq9FL`w`8(Jyc@$+v4izk0>M=>i87M2v^NWTN&{a>S<dI=pme9
zOL8t7ca77x5kYK0)`DBk1*IDatF_9RVy14W;sV+<YF%Hk%lt(Njq1E5D{}!7Hs-A&
z&PnAh9Go@R@Ns_)gTiTsoJ-<RkX?mexu;}|qVYXD7&`*kBt7E+VLcI&@WI|#5a>^<
zIV1DdWx!+7a(#W)#6m0R<=YDoRA^le$Tms*kriJEIb@)5IQ1I2isZChM<rK%G->56
z4IM3capy`UxJa@^F0Z1ZO(%H=4TZVdTX2rd>yNl0dDicAi7baZjP-KFghiLW&eYxQ
zWtEdZJ=@nWvp?O?WgNa+0NVnmT$@rjGhxER#Y6<zoV=R_(On1su++0xnUrGdjFfm%
zh%wHI|E}nAkS1}yEhPrbFQ9hbX{+yO<cLgYyAqoL3LUSQYPt(krUbC!TtT1BOzTC}
zQE0nx2Al&7P=T(yH2I{n3{sj}QMf*XrbV~a=i=1@mbBfr>E(VtIT~1uU*L5vp9~^b
zjYbbux|WYz?9VA+qDvR_ZufLN{oDgO?efa(Y`F%OITujZpVehcHbcYeOeFMCZDFi2
z=><>#e>Ei?y|c;d<#C-Qylb_}6?WOOiXxsWs>sV=->vx+t(C>9(}(sj)IM?HF=8#V
zdRF>VD2G<vXD)lP!+&|sVEQQQM29qwoq2SNV(mTQXFbZ{RYG(di2!JcTfExuk>ix#
zaE2Ooq+)?FEI#er5TFCtqlhOA6KJnnswXw1vUYVOevaq0wLx&B;p82<DAwx3k#JyR
z7yfs%KMCTM$Y2yRe|(^lcW?jbRQ881!k@4~;_rr&nmq9>2%v!2Mtt1Yq|M<p=8Kmz
z5gm{FH3;NpcC^0_nJ^({Q~{hev21`wx!nq!5eWU80J|HszJf7@rf+C1Pi_-|#xUw0
zQital_+j(aJ7VH2I&N9p<_9#1k_fXYE;8~A(sU&omb-#B)Y@j~MM8Yhxzt*TjLbY_
z$|-*XTs7h>P2u{~k!Y7VDnkO05@$^hu_^HS!{nV-L6-CfX$uNNRUCXxmk{RKP_Kdw
zYJu+Bz^59#P$ca4F<m;!BF;$ZNlJ?kIE~yLcmaj^EkJ4_EtT&w!k;0rXq?nt_O-iS
z2O2+&Kb^F`GNmR%Hrt}ZBr|S46u!RnC+X!4O(=E9=?X+`d}1q|N|CFCy=eM)`qL^E
z(``>}%?5U>R?!0Ga}&v9Dl+LErDw9QHDP_d0xI1D=%q#m46#Iu@T*>fboG+^sOwaR
zQC2*NsIaBr5bXJEp7ZWU&9UPoVI~CJk1|NV!SCydryiB_la5AbGh+;njiN@ju(eu9
zhJM<hUCL*8poup--nIn6SXto;NR4)=PpfcC@VM5&W6ssxla+`sypYbd=2^{_MP)Js
z3?nmHkcz=dzhaF$!{3rNimFslNt*|IH>8WdV%MY!`wL^H70#=4Z!{l9-(C3S_e5)F
zQ&Nu8RF=Kk?@kDo$VqihFWjS4xd|$ha9X`M&-x-IZn(Bl?=!Z#k!~8w`Ol?W=8eJi
znn<^a0=GmWX(B%)9K!$jt@4B<v*TcU^EmaJTeq*F3$|;Sh}tX1bg|ZsnJSBkrR*Xc
z-pe55P+~_ycS!Sxm%1C0rD}Yj6B6rXL2pegdat*|MEuXo^hDh{d%y0Bl((u~L>t0^
zR;8Gz+I9_AkY)@nr{FSioAsyU&>@~4uWpABzMlgeOKLCdQ&d@Zr$mq@!bfIWALkvk
z%>hQ(pq~}R*|c2<n3U%E)X<ImgijBp$c@F!98?qp5=98Z@bru7itiGqpLf9gCpot%
z?p}UW6y#KumAr2BE~=L33sSDsM9}c@<c*8YK9=S|@V^Q)ey_uVjs*I5sJX>SG#`Q?
z;XFJeEq3^SzRPJpV&C82@@+MF=2^;J^m)6cQ<s3VfrttOLCD-buJe#cclI;SNqMk#
zcGmRF%cp47l*yV*RuuqEdN^?YDy$A5QW&Y95adQ{X`Zy=Hs_KfG6!Cm8g&dHgDEW;
zm4Qt}%l=`?iqA3DwU3Nb%iaCf<ArB;RP|~iHKKBYsUWrfPE~ucWf?d{wxME;)NC7u
zuXqSxqWCg#38}|qc<(oo0^S$gN|Nj!O120?848<00VJnq<3rkdh#dyi^)MARwv^-}
zfQHE1DJD<L!R_Q;sS`LN6!AnIRnlD2Ov`gw8DEaXj%Dsko4jD=m#I+36Wx3K8(YKn
zH+t763qVJPhdZd>u&(|?r{u7$s1{5Oqgqe|Og1q3Hcdy*Mo(p6`8%0>rWUVg;3KT_
z-gHhiE6*jz2%h#ybRcvzd2lplDWhTG>5&YHB+jMp!(v4&xt3_rG_C4-+pZZh2?7qg
zWVnR5s7w|BH2DKV-q*i{LQO+}5=EcQUraH1<FUv%`!AA`^i?d73sqd>?|+Rx$qTq3
z^T|!lfT!wa?CdtP+Fy~ecrHORiIw$PD1ZE}So1K`J(jly=Ao(Jd9<3$t;Hzn`c)a3
zalbj4`*{fRkTsMsNuo*$e%7s0{ccC0p{1s!ro7O3AbCS4Hf`?_HOYEY;bxHk7?^<v
z(Cg{-@vcxrp?=)P#~Vnw0mMC{5g_{sMTS=m+n6a{eBf$q^|pV9RL>yRiU??e#09T%
zt!6MzkT^KmxTUI#(9c9Jpa7qT7rUyC<I(S4UARA9C^G~PoRW?AFj_+saNHG-{^1L`
z+=}T@&0G2YQNbF66|Fdbt|e%DYh#z-Yd&sB)ku0;Ro`G+R$IpwYh@f%i_YQZxBe~g
z8T9&T*XTcV`+t%E8JJoBnYE<<OKk7|-0jQAs`5#Eb^8ixtpDot|JE9_d?CN-Ss4DL
zMSS^x|3CwN9sZRT@kjZmsrcm^{^yA07f+Ff&+#8jK-MolBaM`<^WO=9f3N<^4E*Ed
zpYclz6H5oXfAbFM{{SccE2Q{G{XcHq{~$g7rFGXg(9zY?F)-MJx`PR}zFTyBfQqdD
z22T1BZS;oMcPEh8()MaR@>o#L#TjnbWenlb1pj6^`MJ*P?UNESGr=*+)|FjL%D|N;
z$k(T)&@(+d`?H6RrGb=zjZUVArG}7ziKPZ;ctj3tQf5+;s$^cldi<;SeoU$iCQc<y
zMJ^!)uzHf7r6H>xtDe7=mKCcWKh!<lJ>1<Kt&0W-OGigfZ*u+qwbU!|q}3T$^IF7s
zJLP@3pUZ&aNTaT}qDk?2NUvdG;v_cGdy#VEJ`m=$LZkCa#hBtjvV?GvQRnQ8iuz43
zKt}IBXy{LlCOyNy21b7|WdDy6;un=yQ5E|`LUe!0>;9pkuc;FQ^FN6r|I*Oc;a@fM
zNBMu%5bc+0{;44r*1vhwe`@IO)n7IA$H_l6WM^VwVy<iZ?<)F-0RA~4`}0Hinvng!
zM_vD6WB-#5`A-$u-GD(vUCsYZMU0H!LjGMwCoo2f*w}+an@M0EPH=A*!=LNo-aY|e
zG9qCg`TwjVpXJkk*O5wkN?J;sYX6s<NPC*oYQg}5lTp!9a-TmK?66Uus9l~oHgyLt
zvRcP^6uNleHK&;?N^0_2Ya}YA2G~}rR*N`HI(F4A39fJTTG`?~kQ_oum}F8HS-NCA
zdz~UzF<|VoPBvma7jEsRA3`<PF|%YmJ&2}MTCa-U`5QOCBP_Gnacw2;>d|FQ^|iPl
z!@vLnehY&)Px%i@{8M!dU)Y&{&~F(2UxVYqLUIa1e;ZvYD*jc8RE%G9OL{h3rY{gI
zGaKWdH`>2or(cJERpTG!pKAQuGygZ28q42qvA=5W>jnO@CGlrcoW|0@LeJ3F&cygD
z2>ze=r+>+d|0f9Q|1Bc^2OrhW(8A>JS#d)f2VL_o>dxOLrvJ)||Cts4S5jQhR#)H5
z(Ebk?tKQeczlYQRar*akyMv{{*ZbDDvi;(({()WnbHe&}`09V3vHl}d{%>D1hX0Z%
z|D*mNU)FyheE)J;N2vZiQI2PAtC$`v((O7`GpSHvw@|8-4iT!%R|Abp3O^`{3h3_=
zZEk>UAejstzoQD89x5QaI#|=NAU%81u$a@}G+_DC*(CFw*yDcP?YS59^(>>~QT_Du
zvtbcVZc#a2l<=g<e#Eqih#CR8rL|2ag_0A^$XUPu)zt7Qh!v0mN{L3(96bnn-4JvN
z)Hjz$5{)-RD7S!unL74Tmi+DAV7qUS8lA;_^z8TL4-M3_va8J#Ec)>Uj-Lk@XIRo8
ze0^(s8t)!`32}i`KOoQ>g`b3%tC>1=J3~b`EeaJ-M*N%v{a?ugTSl9n$@xh`U9ATA
z4TqIgNS+%L!W^F}S2_i^n;0b<jntaER$t*RCS!c$_%=>+{X960%+uL)=Qt2prqH?F
zX2GhQNMur299EW(cS%pEOj#Rz)P<-DiRB22VTy_7SLa1dnHu6#C8_d+6)fjp=TS#9
zYzqtJ^h+AzA(=AJMJn=)WOvD6Oo1CRZ41(ior+;f622I($V|zp62BE1=Q&4xP9!FZ
zFv;kc{7+=m6d;Rp=6OdWcSy;Yf=`5M6s=4FuBlRNi>N~ugQ+#Hl@I&v`pK^m%xF%_
zn5CHwnLh=r3c8Xg^@VAHI|lD(@3dB4#j|QWX3a@{V_&=)X)A4py$j!)opfb;-F#aG
zzythXs_vE6TcX4wxR2pRXVjOy%6{PUs;ygo_bcg1@xwUhI*&W6VzY+EgT`TlwlTMT
zTY{a!d;OvG{zFOBSoT;@`vgylCa@q7!JI==J_<dJUk)?Mc(z8Dl(ZQ+;if{f^!y;E
zCvhW5dwJYRoKf_YMnEoRO+KBN?&2{G`p!vc7#0_#W1Bk7oi_o=pI??z{9(YOtsa^j
zF>;n3VQw~7mJ{J;&}hq{y%5wF0^|95q3d_IWUH%xgf=2uDTvb5)bS1bd^3rM6F+rU
zB9_k%tRD(m@3PFbG4rwyvB=J^4Baki#Sg#bEraae!mag*XUKtiE^A?t3fWuP=!%0Z
z(_z(KZx4)yrqOw+(p8d+h04;tia{$~lwO9q2vB|3W9fwPA@h->3UnM=a61=CXhp(m
zEx^BE6w1nF&w}LwT`xCR9_~<C5%;ZyPjdtgE9+jRVJ=+Vj+1DIXoD?;3pChB*p>Mj
zD+P$&=+?Fkv3nR>{ZW_maZ#>(iR$l`=QKd2v#4UKcC6=_Lu@oVsxPR<9Bl6D?nMqe
zFOPAssM6C4{b(HU^Mk6TYjin+mjhwrk<;SQ5=ILKM6A?<lT*Sf-|cGw2(JPkaK#Vm
z3=&Gw`{#d+J#Jw7a9;Z=IUg~azfQ^NfWCcbkGjOs5!_7|BV<?vtvJ$QGA&nwdye3l
z;Dx73v(rI^GTg?RB8mo}vczRI6sKIui+v|(%W$6BTNOnd#^A3b6iTboc}#!uz2fR@
zDRChiC>i(#Lrz9YIx_hReG@uGucn!EXVz67%V;L2kmu_?8}Y!0R=OuUXx}G_<$Q9+
zy(EzCNpRf^P>ArOkN2gGeCb;j@8R{EDEi{)Zwe)xEIzF9iG;`M<i41C^7x-kiQT!K
z5<(K%XVt+$sUT?*8BTW?Rg)!q88&ob1+d_l@0xjWhk+J2l8039nq?>$Z@9tftjFMu
zgNt#4J3gu}zwlLk7V@%sBKtO+LE5J8ANsN?wK_a^L&x^SDj|_m8?Bdm4%w?`e#dy+
z46pBQMJbfy$YbqT&KfrKugT``a6!4)E38<4c76XvPGzx*v8B+s4@H?u3ny{yjWhJQ
z;hFDg1qkD_7)E57S$9CA<<N0^Xr@x7`SnwFs73c~${`r5T1mI2gYYn5c*#3X&mdyj
zrU-F+<ix;$2;zbaMbYYb5tC4I8m+Hy^8m0BtwQ0_up`CbVA{54>XQ`0F5ojGmZc4k
zkqhOtOs|MhE-51}bx6-3Yt)XPty^crmBS#x$pX~2wa@#}tE1C-`DUYyDlQ2vf|ufc
z(#)pI9h}0s>x2rk>-p4iJ4=#w7=QJfu1yaEZqBzJy(dF8$FB)ED0P|S>6Uuj$M#_-
zpf1Tu(>j$~H)Jf<rS_GCjdSIt`f+B@sNehOnjo70v!tuNWkvyQZ%P8^a)R>uJ*=z^
z{e!1+mKgI#2asQI0!#Ky>oP6MnyLknDX{A^jWg{9gYJ)us8=owC`#7!ry6CQ0(wJZ
zdvcr_Pm5YiDqcwG0naG|O+5)qt+zdNd{`yKNCQd_6`60uevp)yA?Dqc%S^VQ+@Vpw
zoV+Q@i%WwDFduq=&lvNkiPObdBRqMtvZ3!>X0EwV(n2qDR*Q*R<~y7b*i49Qg~AY)
zh+6}MrG+G;lzVtHzyeQkK5+v%b2Fx=_@Q1ivM=2O(ObfMEvQmYY6B%MbC;bCtuiMo
zF!W=I@Rp~nhkmh3>nLEM@j+>-FJ*8E&lL*b+iw-rwN-+;z0<uD!zb}zpDu4<7sdYU
zecX!`R}``pGe8_6LJz5j#P8PH@zc|I$SW1U(0#NohY33GfuvuWnIYBdg7vy6>=%ux
z)H+CGoJF?%;c;Jm2kLfAC)+LlkcHwE*!fdg)kTp?@2mH}PxU9LTclB`v_33&c`vM}
zPDlZDvKhj>1rr}9)~liWB&F%;z0LaRJCSrY9q^0q1x8ENqfhIlN>H{(&#~e$r0$UC
z<7vEwAZ@YY`sQY<Xn6T-9B|tr*v0x**jWE&BN;?X<7ZqQ35Au2!--{oyb8)?MWm&A
zS~K5ySIXB?gp#H3xJDSt_?kSnEc%25T>@$vCLAZwh&W;ZI3(8$ef;paa}7L5Pc{nH
zW&^oQMb+WXZAV!lt`T^K?~dGPC2M>jyg0nXJbFFk{u%km?+IQU_Y|zUt)n5NfQbq8
z&c<@sbwNpz<!m%9$j0#FNdSOe5qk+30kOCKD{RJU+IUZkpMm_}47!M^0VifQmI@$f
zqjX}?tg!8)s#jtZ5bXKb-HsVpp@7Yur4<|TSqP2Q=-7wnnOL}93JF;m)5b!7BhAfM
zd~*%KrPf6&otK=HI1R`RDR0N%UcEd=p@UIuzthziUAjIEG~dLgb&1oM!2(XwijhMM
zMFp^Ua~7kNXGBgkY(TcN@HA$?2&R{`_&C_JN?rgtaCGY_p2yeMLc!SZ+bw7N>=hr`
zL~NC~w~~MJirJESdDd-uJg+?IQM;^If_>=kHHh7|oQC24(Afo<T8MiVVr&Mj&1zIW
znbtjceZ1J-z|_(!85Eq;j>wJ*C>Hoe#pMuGDHu_#riB!OAI)OR*OTD0-vd?i3TM}H
zFb6mx7!=nlSDh*|vW86{GBl+n3_P;%vv<R~qI8&0iB<{}2V<c$lGT{%sg`MB@J<MI
zc4$1E!2WyVMzsl+-a$JkVz^IJ=f}PD*uJ%7!fl)04g5)~K6pD_a?EkahfR99jadl`
zc;UI|8;Ii|g=b&n^x<2~peYoNPp%{^<Mx5wdKEg{kJ&y&U-<xBqdLld^F^+gg!b`F
z%f+f!XA-V$yRNjR3+(f9UUfBZcKSetwn{u^hTEAG^-dAt3+@KM*CGiqAZ-31T`;rQ
zkZt4@V?PdSZAkMhM#uqc^_THzlXX}*q9hT);e91IC@3W*sGm`@t2t$|jth^a)h-zG
zbx<aof;q?GLy0g4qbz&#R{QOz43WhY^ZO^E-InuuUu5gD8}U@g7J;7DWeT9i@rc(9
zmA6R3vuzLP^WiL&9?`6ck}K*53qBG|nWl_(=njcZh|%3zg3wt;t_??8IT9{n)__|R
zHH|Z|b}B7er-Rp_j4tq9yZNX-2}gBg4gBxIXd!hBJ~@Wh=5WXAXCa1L&r82QA!1^1
z`(luphP923GiytBl>)G!ycp}$eAE?vP{&HaFFFcMZ%792<JrJ{>}EQ@!mgi_>OVzg
zri0cw-JP8T%32KYn;qx<0QnZkavJTOBf2~IK=bo~uB2mC7>s*rB=+&>Flw(pNi$5W
zP?zec3}cj`RkK4+<aI~&+`IL#h|J?{KrG`V&>i1`9zescEGT_fnW3sKozYFAw}J*f
z^78~D6N=H1&KZ)xJ?wL(<(aYZO@F-e>CNfcgoz<*;zt<ogfL(A?xCREK3iy(LLuum
zOus`p9amY!DBd-e95U$THo3gw=0&Kh7K7I4809WktI;YPf%Znn4#BIV2{%><C%9w0
z<8fQ$6*8RcM3G=BYi+0z3WyP+5DK43u7|dSlg>6fcblX!EA*j7=4yLrhM_-8G&7KJ
za$LaLa{AXoQrI^<)`{1aB~!95<sm(eijhT@@D3Cs87A#3(jCA~vIJh$Sqdea=Dhle
zovDUhb3snQcm^DhwHEQiR2Lxp1kWXaQl2nZnijhU=x0<+NyWa*Upqs@_9a|e@(dHP
zL<>mwZKz=?fC{Kk!z3Rbo&CC+R{S8~ZU<7b2ios|v}zF^KdpPC3z9T5n;iF8GPdBw
z)^8*I?Kfgp<2~szNrCAqxnE%#JvJfoY=I&qW+1p2>HFaTNUYyPSE;u0B&X+ckv+LP
zQM;&LI_9bPKi6XAGS}EQwvMK6ni6o}q>jlq&ou%c@P}L#Lm)J?0YcKZXu3svzC-C-
zK&!QzAAy)5l^&u*dS0eTX*OLCrc7TDx&#MqI8$PK8!wwP@dRjbb?Cu<a@}3_zgz6V
zajBjda_g5F$~kvpy@285$ibos*Q7+qiH0Qe)}b{E?4bPi==VUtCy2p;86%u+oa`fk
zR!Qn_wpJwyxe(iK`m8<Tp%zQ}1v{<a=dsf?($f5X6Z#D?*jGsxE*u<P{hPkmlctOp
z>(ExW@0eL>1SdO$P^>|5$$q}YMv$1(?cioA##_$4)W~Klp8nCcH+CXqja(R%E&O{f
zcF;tFti=kXS5__kf&dlCwM<(rICJrBY+0WieU2)kI6mU4KTAOyd}z*32g4IKm_FLE
zBnmsJZByO=cVv$|i8zWfJOf)wLG*f!xC}4o9Xn{a(tYR5zR~h=cOk4%l3OOyrh>NN
zU$Z?wdgCS?TxAigI0J?K2q*-!O1R;El=~>!(S(*AdC%|hVylS9leV|ulQ=m6sBF47
z?|j$Gr@6qgvvqO0E_K=)gXE66ZD|317VSHOq6rI!l-^)IT_w_i0?c{?+cCcN!Ye>z
zb4$F~2g8F5hAPu~Fq|l2O_P4MYat}1G2sE7L_W)Wvh^?V_gjQcma2S5DrV;jry&LD
zmN5r!f1YxCobgmlOiq*boQ;kJFAFX$TZm_Ae9pl5U+q14IMiSFBtlv!B$`I4>}Fq>
z?9rlZ*|%hgvXrGzNM&oXZ)K}UQT8mAC`(EUk&rEtz9m`8+Ejk`GmK`2zVGvWpWh$v
z`#kT=bD#UU=iYO-bI(2Zp1Wzc_ln+;n|Oas?kJzJ!gkh1xwmIzUcQnqhzr)d5V37p
z^@w!~yYmrplii1`Z%<sq)eNu7E8Q09S2%7iKmMre_OM)X?|u8I1639>&&xQz?eZ=9
zzMfYq)7qL~(Rs$y)K)y;akceQiwmZ<D6u^~Bb+4jXyspV#a9l(g8FzpmP8jvK6<3#
z>R=UggmeGa^VTn)mA)D4lIZ6R2|Z8Nz5ZUz?#AfIm&?!GVz>|9j7+~?bUzJlGg(hk
zIlxyOWLQc5D|91;??P{&SD;dNKt6xEDyvL?|BjP)%^d<uAMQG#t6y+LP||v-mD`lC
ze2$icc)Zg2kPqc$?oJs6K2`Sxe5#cjzeyc*sI%`g$3NO?EB0mo^>p#AxtQzsr>BYe
zP0k7*i?Jla%M*DAtt|aoa!<MM4|IbmdQaPzdMTJ)%MA4of4D}bw*ETq_1f1K@@>)~
zC1tRi<3k#RcvZpA?|rg=YEkO)hLYcYEU10`EObUP<mbI##=`Oqok`xyCM!#ZpQqgZ
zFcoYS=+<N<s4hEmpfYlF)s0H!{F6s#Mx7JL%ZoeBJD=CPxwL+kHUIUga++T%LB8w-
z-%57AYSOzY%}H3OXwA{U7mB@BtF@!eb{;Hgg$?#c@+WL~bNaBZ%MQc4${{i{et~u2
zZ#KM?Z0l|08a)xh9~7nYcxx}~x7vO1nu%xUrJvQkc%jy>6{ff5X2^N2mD$Ex_q3Mj
zE#*14Vrgn*(4+66#v~tsN-1A|N#hivzTeckV9gKt?k&E@KL>yQf)B@?(~KMSWPS8`
z*Q&&<di77@+qVg9K@S~ieU54|5j*qVi06cSTT9P9Wvd-JFDGhWeqbx!ySLU`hUWoC
zdS2yGR&U`N4k@qTpH(~u4&7U#(UFW%8p+tB9Nn?LL}4Y7<LZUgo~j~4pAlb+wf}mR
z_wbicPEEQq?&3y~Yc|LHV*{Em6pCqd#Fm$O2^w+ybn^3k;ZC}^nqt(qax?po_I-^Z
zc@w9L+oQ1PFZaA%(LR-z+VYU?uKB;p*c3k&+V{17*La+9?aTg*G~><rxBL{BwOr=F
zQ@#g2{n_7NSYlLuPA3m0Cbpcndwq@w`$QYJSp>4;fZ4Q2$60=3r9e^Trf43){BPz@
zR@7EG{ERWf=Y>_<j2H`co=na9j2wHleOvVCD%B{duDs#2SA2X;#J87Vp^cXc2A*h%
z9a_u(DI+fU+saeVJzrdsMz)R<?TN|KQ*5N%t~KWGWN~+@^h>-pj@BL5yVbX?=&-_Q
zouZ1fWlyNnE~!ggtM895OIfXKZ@McSZQ-!3Aa~8~@plcf`E?SGpLRatbUjA&I<V=G
z#pJUP2V!u{C-M#d3g5Ap{S$pgFI#!q!Yjfkz1{AI8alfpjdOEkUB&mkjY)2ZgDEwR
zaUC4;z3bf`z2a6%*U5E$ySxf6$QyZ9t^8>i(941R@vy|d`6w*K#)aq`w59EMU2O(y
zv1C}j$*%UHlsD%3uRO1=r2L4zeCTMhljhQm>ux?7duATP8?3{*`KLi7-w@&F`!UKb
zqkB0Q?|b?+hU!G0{rYX^%A27r;#Hg9ExDm+x%Z>pOxM}qR=kCW%i1LhW)zf`jh0IN
z5tIFiiRsd{Y!zKR;hfoxuh<?|M_zt<{;Ru=gnnc$*NRHBd^Xt{-*9cm=}3jo9vwLx
zNYA^8XNFwjn}mF#9>R_YZakgh<VJcb<|d?bvAsq`_PV)D;_b;7Djw_u;og{4mM<xK
z%YP7w8-ki%kLvRHm6EMhSR0&2-0N;BoL#2Uu>8)GO&@PhYre_y#0wS$i)us(#PJ!$
zCYHqnn;7pue+Vv!u~+yoDjd@nt=FV05)&<GP$pQiI!ogH_bmcKS2)Y~n~X2XHIBDT
z_WGDf^_P@;l$7{%RID9;Ff70B<02|_+Oa|`nlOLX5DhKI%xPW!b~Q&=eV_3@6QD!a
zqgxNeKpJ!;97Di?OXRVOD9~|`;(PwJFc60RoZ+928RAh)`g1fE(!<l<3WFX11J|K4
zD3gH}pL*brwlqL>|6^tH-16c4nhk3&E9@65%hDw*tgNg&bTt6EVN=4aQzA>IHn5c*
zpYoZOVb7h?;hV(pPRgyClv>Tg#>%R(+eFRvs5ez-4i{IGfFp@SJY2;YJZNTP?E>Fx
z?creOZ0!LYPH=r!8%H}2Z&|pClM`GIdj8BE4qi>Pb31Nl3)Q)rtMgG$@Mr{luPe~K
zyRfjZEWx2zSOi(tu&{ybu`FXrVda})Jt%o)<;;>b$}GpTri5;E{&hQpl{`2Z@ri8`
zHu;vH+#TJV_av*lqUb64GWl*unuBF%up{|2r*oQ5dP-(|!DGw&NXkZvC}kbRiIP6a
zw{x)U!Nrn0u-k<>#pHLKlY-)ZQP|WDSeSaiCiy8X{D$Pi`KNAp+zD+U7jO<$zHTee
zI_8iHyJAnaBpZXj)rmvLEF8S8$egpeB6m#=kA2BzC67&d46se+P9ES-N-WM!x>Q$F
zTSflBIk|jW8-<s`LqecT3(sA;ax<~ufeG0kmf2i??LL|FV;Kp*SyhR`O<4itG)2Jw
zG&z*)CN#B?BXd%d-H9XQ#90%6ufVfP<dbAh3V5vH_?2m;E0m1HN!K_Iigo<5Z0^?O
zFz%)J%RF2+B6)aPlXzCJunhFo=Pkl5P-B2v5a#zy#TXg~{j0t5M!E)uTF~Qq;9xG@
z(kEb*xsCET3|Mg@EW$8Euy#bpFp%^2iWBsT!s5&5c)%bGOHOD4{Y}NtTMJs$yMSkp
z<U;E;vj=jIFg%pU{O$taZw9uay8kg-%`NoIvz4de$^C1L)?Z#1Bb1f4MMK${Lt0Np
z&&ngmIfwg<K&7BI@(QconI~$ToS7l2m^yqfud=!&s|s&GCTCU1su6=?&tjkK)Dr)x
zk0!+>g%({3V}+l)59D}G4qkG%ukW1x&`tU2_h6V}!HYe$ZVO-NV6|b;IgWGQQ%ik<
z8<MSskMVB}ITu=e?nI4%2=N#JpRd)VIGPi@(&1Id6Msx1Hi(a`?#FuMRJ4AfUSA)^
zG(kd9-@?8=Md7iXb(%a@Q6ug>UuM(c=1@r)?>9Ysu_9~oTI_v$3XfKEBp8$^HJKY`
zy=u-98fZ&+_FZh-^=n67XUPWC6$~_solmP}mwvuGe0-PgjoJ*yqEVGkm0U^t8?D#&
z@7kNTDU&}|u3sbP+K){5VJ?0x-+h5PzhVXXcl+*S*XfPL_pAA;6Qg+~5>0oHhu+^|
zP~9zLC^fM<fgITDA7{JAFTOs0;L}|X?9bR<4X+Cy3n}ETFu^ouQK>;Io+GX$EOMlt
z9U-bQFLzjydO{|i#Wj&0IFXjian$bhI=ywIsn|#Q45#t(p)0ZnVnf!SIxUfLG^NB}
z)bNJR!_6lwNAmb9ANmzUVtTeTICpZqiR3B!`t>#fKShplAuGBnB7}B-;vG7dB@|v|
zLdZVk)!xH?^3EAlxQ%w2E}w0bWzA5uqgZwi(nD3DGZ@D=p%}K2i_1;y(F?w0i7jRk
z16BcXhP@=YCF<nBCDzwE&B1B<CARe#wKOEZp6JuqO62bLX7-K?WhKI4($@=kpXroe
zOGwDYKgX=E6G+!;6#K{>7QgD=;nr(;yNvI1CYPQGcqSz-lbv@OcYTYq)hRbUdndw1
z-_eQbJ%3F|4F(F|JFa5C<w(R1dyJv9$c|lZ7(XAS)U!&7NFjwj<m6km%U86A$I~0R
z&CjsCH|7Yr*UEn5rs<o+>J9O*kEg?5c&^_=T3Wrnb~z%@jyu|<{-=2gHcGI@u&A)1
zvP6})E=e^uUD|BwQo^zi)w+gW8a8i9q0tq#LB;~XjfJV{x2n&#YCjx`v9~cA94mEn
zc$%<n0*krLi!n8ouH4h;PL#dkUYK^4i?<E-GV}AcE2X329nF;q*lMDKcIKXgoavX3
zeRlKi#S0gvo~h6z9e`bw$O~x7-oT;em-_A-f55hc{c;?KoT^g2Bn_?kH)-3dK8so!
zrs3hNn2>UttuV|<5f-5-;~wmdIAqn9@YKD-r844Z35#yRgI@!mPnKz~QSTZ3AulcU
z<UP;$LyX&XjfpKw39*{FhAPd1uZE7U&=vESsI<;b9~9WFqV(iyP@kk^dqj$CF58EJ
zH+F5TW#5CQT@6%S*Cv%MBV=0V_DZ>RuaZeuz&<YB$i`7VGr5tMoP3B><+5BAZ|i9C
zrZ2S>ar2Ezz4oq+J+g`6t9>mIA_zWAP#7#J?T99;%*Vb2kH5AHEN?vb<sPc-ZFbq+
z?_!idY*BlJ@<4xo(A(O+%M}rd>bK=D8yOs`s&}fce<6>vd2w^8KVR=*_4*ra@x9m6
z&4V*C3d+mxbG_t5SZnT6YvJq4lHOEYw5(jX^U$8}#KIG?T^i+mUUKi%tX!2RwD~n`
zTI_coOk3rA_^`aKqtcqDwI76U%PZfC^c3X^Q}W9R-6M7hm;0=Fg=P=8@i>pJOn6b6
zqmr-9j&_@sBTocF8#jpsQ7TSsu$y_lV~a!FDV+J2fit%zhpVGA#f?!(k0v_$yBu%u
ztXQgCTA|Q7-5f6yH(0rw?1(?q=Gew6zqMHMRzbl{dn@1LX72?uEN>e|8RQm9i-F^b
z4d23Y!xXRC#bED^N3xo6Z*E_+?hQ*^`eZ%lx{ckXED}+}Da%_|eXy`>y2&Y@FG4!7
zS-onXOAc|8bHAENZ}&UC4}2@5(s`Tg#R4AQX<JQN8FAs`P=%L}WQe8uUs7ZbL+dKh
zWgm5X&z3|bttchbJbQqk40EL39b0|aWy3CRS-qoXcTxlnOsME?r)+T6AD3mbt(C+L
zHLiWk5)-1tGPq7ZNiXR|$&v7nF0OXAtFrHz5v6M7F0TBPE9`pQMSn26jms=x7h6jF
zqfPQ_j_*&}o8Ow&bH&9qAWNYa)4b%>1x1$k-FLJ0x}Oen-YuS58tg6M>}AlA=TW|L
z*9N<WrKIr8;$%Mox3TRJBXI*BfxO#e!OMkq+8o-yN|oz29$p_hG-2*iZ2R1(=lhI7
z{>QQ8BkGlMUYG}lV{9h%;ezSvl?M9~amO`Pc4v*2he+s;X?3phQu^X1_cO`0tiEf1
zvTo2T@|vb-qpCQcrg-&l_*BvM!Qqpq?FpE4p|<*#NZ6*F)sm09OSW51sd>IIkH}(M
zStW5cZV(X}Kc2v4)c?58)ZjBF(eraVCS^lQOW%V@`KH6ax<0XVMQOh*-geoO_|%1a
zs7jic+9{&HzM0!f{sipK*jU*wFH(V}?nRCuqxV-c)CT*7!aCgfb&nVwrzGTxZg)(K
zcq}#(zjKd#$C}2(2zAE`gS|hWOZr;WcFU|#H-4TN<~Lmb_|@UYW>R3m`twazyq}cR
zZL{iZWpzDH_-`21Il+_M*tutCQ$)>1f2H&w-`B}~^{YiVPpUmHAAD|FITLgW7Iuof
zg|xl-s-4A>9eo*jpOGP{!mxp#mnyCr1;ENj?WDeZ_5CgvhVR)|TIJWXuJLiow@piq
zD<b<z2cNbF5Wo8SiobX$&m||bBf4-nN*GbPZ1{k7Mp5bM{UhvdQJQiEy9XsYr{gt-
zRo`s0Gk!YqAZg2`AtP8|l=IBML^KimH6H&uVQs5n(M?kWnVU_{aY@PzgHO(g1V$@5
z+<VL)z;7Cs!x7YQy)~c$af7cx?btpCbN@#}dfyC=e)zQ3S5l&N?Fin{+0bki`}b(l
zeLihZzD+ZOI%l_qa{q{JsupoAtg<E`#a1YN&*&N~<g^Lt;xVpa`&9FUJh3+3JYVQ;
z{5tRTmn<B2m%gxUw|V~hv!}*(1+IjH5{ILb`!l#|5o((<mF?QK4$8iae|>;u^I+j4
z-}7fvwqETj$#+mILaxU>G}Zs1v+k=%5&Dpziz~}t9OBYwqwSjg`x=f-3)_^ONs%Qw
z-L@(E0smUWrvMuj@)7oaBZ*VXFOzx85;dcf9N7|IUGZJyiFLxU{AB||vC2xuWBjT2
zxI2au%S&Y3{lAIsd90GA7V}PdR5VxQqM7r}X(y6QpWvqg?`5f^Znm(xdlMV{v(xuQ
zh1oy7(Fl9xu2*f-9v)NuCi{F0dtL*FKyM2E`{PJC`}FZDTjGEp+xRw;g^9j_g-P`j
z`ER>@RAE}m`u-bGDh--mg_8r<_BuKthhoxIef&E@uPZk7ePNCGYM?q&YmAeSN8wpd
ziI$w8ST1=q5>&SQt2CQlRdY?R>8NY@l6XO*W7j{NF^yrDbUv4{4jUw{qXw^ua^KX&
zvh9k5pxinhx2g)&*!SBkZ?>GQk`D>gR#DqD)b!YVRQ<=`jPH)=89sj3UuUD<?S3zF
zPF{4l@+DqFh|<}`)?Ie&n8f+QoyV?S`tT)kOeU~vgjl>;vnWY3T)l~Hv*xkQUnB;U
zibtE?EHbjE?SVz%@JQN(k^1KLVk28QRcm)U=mH)&#zFo3WSRDAIgYwb78<P2KD7;}
z&KC5*3({`x9?;|!j>F1nS<ihVQAj!JHdl8uH~~k1gYi0?0N##=?7uTOB8uLhn?5WK
zY@s3`e)}Vl1U!A<#lEQ#U~vdIgbYOn*;uem82ZNIk+X1c!k6lYz%axC{JCj(7(5D;
z7(q2O7_C4!1jd5y!FcKe>3?6>j63$2>l#gDu50R6K>E5yV-~M#sA#hWOWpSe?fsiI
z^l;{HEcb6bn%|#nC_c!K-iGjLZW<o5n;yQvZw{XsPVa`kX@(Zpd_ERQpFRxzH+`J*
z@VW9Y>Ni(jYFGv`)1545*f;x|rRY>DzYm|!F%%lPfXLL7*>ntrMf@f*7BkOJSg`LK
zsEp<faMR}tMYnDAPx+$X{m$I_P_qg!I!*`l2GeA^jM3!_iJND1Zm@qH1pJ#n_uu$I
zc>nW<gF0j&CY?&=55#2LhrWQCvlkiAQ<JLnpra;=zAqu*=i3?BO3p~k|B;8WKA2s9
zs2@;|3?!u;Tw&gCPuFiS-$k*2swn2p1L)ouc@*53_gfm{vGY{Lp@0O%14%q<xaq!W
zuzzCzN8l4ML@+V{BMc-kI5ZrOL4k__QE&n@>Hr1<1U#02q<%x?MIt~TswW1+jR%q)
z0unG_bO0&`PndIK(cp?f97Am_Rx{KZz=9MZWGuLskZL2r2@nhtjs^HQAh*zv8zh2-
z#y8-bh@MRh_;b@Jg292M27m(@Y8*tUL?BLpL&ck=7;_%}BPj6iwjxkYdfq_N9?<(U
zZ!o-)$IKVV1tTZw>wEOF3yEBuFR*~@&_EFlC^Kic>Aq>Oe_~VdQFsg-Lj=<Lcf7y9
z3DAIZ)(`4!p|EJMwljwVbn~;ge`iDSQt=kXPfZ_>!2@0ZJONrE9!r4Z03YDMYs*l2
zkRKYfP%IKhb>qOuf(Tk16$czNg2F=aLucZkx`E=Lx&a;%0d*t`6QzeyGXP~CLdJk`
zG0jFJ@YG6y+|<kiH#Dq-zM)YyH5@pd0@)B8O#}%;22>Ue24#jeY=z=pBrpFj1Y9KE
z#nM^~_HU;@*BBXCgSKGvXVzf6FLeQLESSL|si#ZmMgo798KCNa_dfsCJq{=bHU9+A
zz2k{MZh-bq06c&Pb1Xa(0mK4mf_TEL%)o;gC*TvP>_BD!2Oc0mG6Os*4gm>(F`({!
zUS<G6^bcePBm+Rhr^*aqgVfPL2tf@Tf}_EEpHL!LAP1mtA~i7(4hJ|B@&|qxh_L_;
z1`Sr+ptz_q1IQg<Q}I9;C>)dducjcVa0bTs)A_~U<0&-_J)<4adZiv{;S2Zz%{-O@
zErM|@g`uDD&}lZ%Q2z)SXhsGM3MdrlY|wuLX+CElIP^^mOS2b)&G~_52D(^)N7ahV
zr9s1^x1kn9@5ZC4c--``f8(2q59JRU-C)qOY0zvaJ_t@LGZq@*%;k|9o`~dzY$}Xa
zPr#msLHGa%7zS!WbB@1Po@nh+G1l2nr6ztMHD}kO>E=7strK*e9F{;g0H7l#^u{h4
zsz^q|4Y_f|Sw9@a_l*Ak%1y=phdA_cQt=@+$09(d1T<7M8wENkC|=0DSl%Hx@c*4Y
z7IXtpgM#e2GSJF{A>iqWKsQ6tadWlxw6Sv&*W70S*K}}o_n1`x!tt^Qyo93S+*wsG
zH#>VU{lOBr5%WKw5X1smZV#V>5%JJnbI=d&G6%zev-?1~zyL!KabS4C48sE@A~OsL
zIyNR40s#p%=r^AR0*wZ>#s~v9heJDq7{VdJMFOBJVSr(97)bTT07D`$py@KhkVxh{
zW3WU#b2t<lw;(<g8Vy<%V|*AaazS2@I5dvAY)CLKV9p;92Lxsq3KWew4HO^`a~)vN
z&_shVFK8qN3>TSUC@^AUgn^C$NJ2&!8bQD@*8v)VTbO4Q4s01=!UekC1?l3UDIQ}u
z3<?W%*wF7c&4~o)ye%^fNN{EtBygEvXf%pBF9<vm%Z!Ugp`qytLmFr#VL><y3bCMG
z5MZYibG;yl7%;+Rj1Qy>xSR<_L;~d>BMeY{L3=@iQ4Mn%7$go%G8u8fyW(KN$pk~=
zKu^I0!x9(J9JJj9Z3DC`XnPv;o2Lh$`2t)p4F>vqrf{IyFM#3k3)>_ChghU+;HmWa
z_&nUK9i8mlxJe|qoW7%v9q60ja(b?=9&oCr1TMGB#oiST^>liW?%v(Q+RcO7i-A4~
OkLTX9Wrwx~_x}OK$XxUQ

diff --git a/Generators/Charybdis_i/doc/Charybdis.tex b/Generators/Charybdis_i/doc/Charybdis.tex
deleted file mode 100644
index 9e594d9bc403..000000000000
--- a/Generators/Charybdis_i/doc/Charybdis.tex
+++ /dev/null
@@ -1,152 +0,0 @@
-\documentclass[11pt]{article}
-\newdimen\SaveHeight \SaveHeight=\textheight
-\textwidth=6.5in
-\textheight=8.9in
-\textwidth=6.5in
-\textheight=9.0in
-\hoffset=-.5in
-\voffset=-1in
-\def\topfraction{1.}
-\def\textfraction{0.}   
-\def\topfraction{1.}
-\def\textfraction{0.}  
-         
-\title{Chayrbdis\_i: An interface between the Charybdis and Athena }
-\author{ Nick Brett (n.brett1@physics.ox.ac.uk) }
-
-\begin{document}
-
-\thispagestyle{empty}
-
-\maketitle           
-
-\section*{Introduction}
-
-This pacakge runs the Charybdis Micro Black Hole Monte Carlo Generator
-from within Athena. The Charybdis generator has been configured to use Herwig for
-hadronisation and interacts with it via the Les Houches accord.
-
-\section*{Available Input Parameters}
-
-Charybdis has a number of user defined input parameters which can be used to alter its behavior. Some but not all of these parameters can be modified through a jobOptions file using the Athena interface to Charybdis. Those that are available are listed bellow.
-
-\subsection*{Plank Mass}
-
-This is the fundamental Plank mass as experienced by any physics on length scales smaller than the size of the extra dimensions. Current collider limits place the fundamental Plank mass above ~800 GeV. If extra dimensions are to solve the hierarchy problem then the fundamental Plank mass would ideally be on the order of 1 TeV.
-
-\subsection*{Total Number of Dimensions}
-
-This is the total number of large dimensions including the (3+1) dimensions that are apparent in current physics.
-
-\subsection*{Black Hole Mass}
-
-Micro Black Holes produced through particles collisions will have a range of masses defined by the range of center of mass energies of those collisions.
-
-\subsection*{Number of Particles in Remnant Decay}
-
-Micro Black Holes may be considered to follow the normal rules of
-General Relativity and Hawking radiation provided that their mass is
-more than a few multiples of the fundamental Plank mass. As a Micro
-Black Hole decays via Hawking radiation its mass falls until
-eventually ( $\sim 10^{-26}$ seconds later !) it can no longer be considered
-as a "classical" object. At this point some new unknown physics must
-begin to define the Black Holes behavior. The Black Hole However, will
-still have some mass and possibly carry some other conserved
-quantities such as electric charge. The Charybdis Monte Carlo program
-deals with this remaining object (a Remnant of a black hole) by
-causing it to spontaneously decay into a user defined number of
-Standard model particles. This option sets the number of those particles.
-
-\subsection*{Time Variation of Black Hole Temperature}
-
-A Black Holes Hawking temperature if defined by its mass and the
-number of dimensions in which it exists. As a Black Hole evaporates
-(by emitting particles via the Hawking process) its mass falls and so
-its temperature increases. However, because Micro Black Holes have a
-very high Hawking temperature the time between particle emissions is
-extremely short. This leads to the question of whether or not a Micro
-Black Hole has time to reach thermal equilibrium in between each
-particle emission. When this option is set to true the Charybdis
-assumes that the Black Hole decays in quasi-static equilibrium and
-its temperature is always a function of its immediate mass. When it is
-false the Black Holes temperature remains constant throughout its decay.
-
-\subsection*{Grey Body Factors}
-
-To first order a Black Hole behaves like a perfect black body thermal
-emitter. However, the gravitational field surrounding a Black Hole as
-well as any charge or angular momentum it may have define a set of
-potentials in its vicinity. Particles emitted by the black hole
-interact with this potential in different ways depending on their
-charge, spin etc. As a result the spectra of emitted particles is
-modified, transforming the black body spectrum into what is know as a
-Grey body spectrum. Setting this option true causes Charybdis to take
-account of these Grey body factors.
-
-\subsection*{Kinematic Cut}
-
-This parameter determines whether Charybdis conserves energy and
-momentum as it decays. When set true any generated decays which exceed
-the kinematic limit will be disregarded and replaced by a newly
-generated decay.
-
-\section*{How to Write a JobOptions File}
-
-All the parameters detailed above can be configured through a
-JobOptions file using the Herwig Command string. Commands consist of
-two integers proceeded by the phrase "charyb", as in the following example:
-
-\begin{verbatim}
-Herwig.HerwigCommand += [ "charyb 2 6" ]     # Total number of dimensions
-\end{verbatim}
-
-The phrase "charyb" indicates that the command should be interpreted by the Charybdis interface rather than any other part of Herwig\_i. The first of the two integers indicates which parameter is to be modified and the second provides the value which should be assigned to the parameter.
-
-Each of the parameters has a default value which will be passed to Charybdis unless a modified value is defined by the user.
-Table of Parameters
-
-\subsection*{Command Summary}
-
-The table bellow lists all available parameters along with the relevant number and the default values:
-
-\begin{tabular}{ l c c }
-Option &	Number &	Default\\
-\hline 
-Plank Mass &	1 &	1000 (GeV)\\
-Total number of dimensions &	2 &	8\\
-Minimum Black Hole Mass &	3 &	5000 (GeV)\\
-Maximum Black Hole Mass &	4 &	14000 (GeV)\\
-Number of particles in remnant decay &	5 &	2\\
-Time variation of Black hole temperature &	6 & 	1 (true)\\
-Grey Body factors &	7 &	1 (true)\\
-Kinematic cut enabled &	8 &	0 (false)\\
-\end{tabular}
-
-\subsection*{Example Configuration}
-
-Bellow is an example of a complete Charybdis configuration. Herwig is selected as a generator and provided with random number seeds as usual, then options are passed to Charybdis as described above:
-
-\begin{verbatim}
-AtRndmGenSvc = Service( "AtRndmGenSvc" )
-AtRndmGenSvc.Seeds =["HERWIG 1804289383 846930886", "HERWIG\_INIT 1681692777 1714636915"];
-
-theApp.TopAlg += ["Herwig"]
-
-Herwig = Algorithm( "Herwig" )
-Herwig.OutputLevel = INFO
-Herwig.HerwigCommand =  [ "iproc charybdis" ]     # Set Herwig to run charybdis
-
-Herwig.HerwigCommand += [ "charyb 2 6" ]     # Total number of dimensions
-Herwig.HerwigCommand += [ "charyb 3 6000" ]  # Min Black Hole mass
-Herwig.HerwigCommand += [ "charyb 4 6500" ]  # Max Black Hole mass
-Herwig.HerwigCommand += [ "charyb 6 0" ]     # Time Variation of mass
-Herwig.HerwigCommand += [ "charyb 7 0" ]     # Grey body factors
-\end{verbatim}
-
-\section*{Further Reading}
-\begin{description}
-\item[ATLAS TWiki page] https://twiki.cern.ch/twiki/bin/view/AtlasProtected/CharybdisForAtlas
-\item[Charybdis Authors website] http://www.ippp.dur.ac.uk/montecarlo/leshouches/generators/charybdis/
-\end{description}
-
-\end{document}
diff --git a/Generators/Charybdis_i/doc/packagedoc.h b/Generators/Charybdis_i/doc/packagedoc.h
deleted file mode 100644
index 37833d98f164..000000000000
--- a/Generators/Charybdis_i/doc/packagedoc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
- <i>This pacakge runs the Charybdis Micro Black Hole Monte Carlo Generator
-from within Athena. The Charybdis generator has been configured to use Herwig for
-hadronisation and interacts with it via the Les Houches accord.
-More information about the generator can be found here:
-https://svnweb.cern.ch/trac/atlasoff/browser/Generators/Charybdis_i/trunk/doc/Charybdis.pdf
-
-@author Nick Brett (n.brett1@physics.ox.ac.uk)
-</i>
-
-@page Charybdis_i_page 
-
-
-
-*/
diff --git a/Generators/Charybdis_i/share/jobOptions.CharybdisHerwig.py b/Generators/Charybdis_i/share/jobOptions.CharybdisHerwig.py
deleted file mode 100644
index aa3286d6516b..000000000000
--- a/Generators/Charybdis_i/share/jobOptions.CharybdisHerwig.py
+++ /dev/null
@@ -1,99 +0,0 @@
-###################################################
-# Job options to run Charybdis/Herwig/Jimmy with
-# release 13.0.X and after
-#
-# Modified: K.Loureiro, August 29, 2008
-#           Added additional parameters for Charybdis_i
-#
-# It also runs well wiht 14.0.0.Y (April 3, 2008)
-###################################################
-###############################################################
-#
-# Job options file
-#
-#==============================================================
-#
-# last modified - 11/05/08 - Cano Ay [aycano@cern.ch]
-# last modified - 9/09/2008 - Karina Loureiro [karina.Loureiro@cern.ch]
-
-#--------------------------------------------------------------
-# General Application Configuration options
-#--------------------------------------------------------------
-import AthenaCommon.AtlasUnixGeneratorJob
-
-from AthenaCommon.AppMgr import theApp
-from AthenaCommon.AppMgr import ServiceMgr
-
-# make sure we are loading the ParticleProperty service
-from PartPropSvc.PartPropSvcConf import PartPropSvc
-ServiceMgr += PartPropSvc()
-
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-ServiceMgr.MessageSvc.OutputLevel = INFO
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = 50
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-ServiceMgr.AtRndmGenSvc.Seeds = ["HERWIG 468703135 2145174067", "HERWIG_INIT 468703135 2145174067"]
-# AtRndmGenSvc.ReadFromFile = true;
-
-from AthenaCommon.AlgSequence import AlgSequence
-job=AlgSequence()
-from Herwig_i.Herwig_iConf import Herwig
-job += Herwig()
-job.Herwig.HerwigCommand = ["modpdf 10042",
-                            "maxpr 5",
-                            "autpdf HWLHAPDF",
-                            "msflag 1",  #calls jimmy
-                            "jmbug 0",
-                            "iproc charybdis",  # select user process
-                            "charyb 2 6",       # total number of dimensions 
-                            "charyb 3 5000",    # minimum mass
-                            "charyb 4 14000",    # maximum mass
-                            "charyb 5 2",       # number of partiles in remant decay
-                            "charyb 6 1",       # time variation of temperature
-                            "charyb 7 1",       # grey body factors
-                            "charyb 8 1",       # kinematic limit
-                            #Options below have their default values assigned to them
-                            "charyb 13 2",      # MSSDEF=1 -> M_GT, MSSDEF=2 ->M_DL and MSSDEF=3 -> M_D
-                            "charyb 14 0",      # Momentum scale for calling PDFs
-                            "charyb 15 3",      # =1 no heavy particles, =2 t,W,Z, =3 t,W,Z,Higgs
-                            "charyb 16 1",      # 0=no printout, 1=errors only, 2=errors+info
-                            "charyb 17 5000"    # setting the beam energy
-                            ]
-
-from TruthExamples.TruthExamplesConf import DumpMC
-job += DumpMC()
-
-
-#---------------------------------------------------------------
-# Pool Persistency
-#---------------------------------------------------------------
-from PoolSvc.PoolSvcConf import PoolSvc
-ServiceMgr += PoolSvc()
-
-from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-Stream1 = AthenaPoolOutputStream( "StreamEVGEN" )
-Stream1.OutputFile = "charybdisHerwig.evgen.pool.root"
-Stream1.ItemList += [ "EventInfo#*", "McEventCollection#*" ]
-
-#---------------------------------------------------------------
-    
-#---------------------------------------------------------------
-# Ntuple service output
-#---------------------------------------------------------------
-#==============================================================
-#
-# End of job options file
-#
-###############################################################
diff --git a/Generators/Charybdis_i/src/CharybdisInterface.cxx b/Generators/Charybdis_i/src/CharybdisInterface.cxx
deleted file mode 100644
index 9ca578cce5d5..000000000000
--- a/Generators/Charybdis_i/src/CharybdisInterface.cxx
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// CharybdisInterface.cxx
-//
-// Nick Brett [ n.brett1@physics.ox.ac.uk ] - 03-02-05
-//
-// a set of c++ functions that act as an interface between 
-// Athenas C++ herwig command sting handeler and charybdis 
-// (a FORTRAN program for simulation of Micro Black Holes)
-
-#ifndef CHARYBDIS_INTERFACE
-#define CHARYBDIS_INTERFACE
-
-#include <cstdlib>
-#include <cstdio>
-
-#include "Charybdis_i/CharybdisInterface.h"
-
-int WriteCharybdisParamInit=0;
-
-struct CharybdisParams
-{
-  double Mplank;
-  int TotDim;
-  double MinMbh;
-  double MaxMbh;
-  int RemnantDecay;
-  int TimeVariation;
-  int GreyBodyFactor;
-  int KinCut;
-  int Yrcsec;
-  double Thwmax;
-  int Rmboil;
-  double Rmminm;
-  int MssDef;
-  int Gtsca;
-  int MssDec;
-  int IbhPrn;
-  double Ebmup;
-
-};
-
-struct CharybdisParams param;
-
-
-
-
-// This function should be called from c++ and used to write parameters
-// to a temporary store
-extern void WriteCharybdisParam( int index, int iparameter, double dparameter )
-{
-  // Write default values into CharybdisParam when function is run for the first time
-  if(WriteCharybdisParamInit < 1)
-  {
-    WriteCharybdisParamInit = 10;
-
-    param.Mplank=1000;          // 1
-    param.TotDim=8;             // 2
-    param.MinMbh=5000;          // 3
-    param.MaxMbh=14000;         // 4
-    param.RemnantDecay=2;       // 5
-    param.TimeVariation=1;      // 6
-    param.GreyBodyFactor=1;     // 7
-    param.KinCut=0;             // 8
-    param.Yrcsec=0;             // 9
-    param.Thwmax=1000;          //10
-    param.Rmboil=0;             //11
-    param.Rmminm=1000;          //12
-    param.MssDef=2;             //13
-    param.Gtsca=1;              //14  Boolean
-    param.MssDec=3;             //15
-    param.IbhPrn=1;             //16
-    param.Ebmup=7000;           //17
-
-
-
-  }
-
-  if(index == 1)
-  {
-      param.Mplank = dparameter;
-  }
-
-  else if(index == 2)
-  {
-      param.TotDim = iparameter;
-  }
-
-  else if(index == 3)
-  {
-      param.MinMbh = dparameter;
-  }
-
-  else if(index == 4)
-  {
-      param.MaxMbh = dparameter;
-  }
-
-  else if(index == 5)
-  {
-      param.RemnantDecay = iparameter;
-  }
-
-  else if(index == 6)
-  {
-    param.TimeVariation = iparameter;
-  }
-
-  else if(index == 7)
-  {
-      param.GreyBodyFactor = iparameter;
-  }
- 
-  else if(index == 8)
-  {
-      param.KinCut = iparameter;
-  }
-  else if(index == 9)
-  {
-      param.Yrcsec = iparameter;
-  }
-  else if(index == 10)
-  {
-      param.Thwmax = dparameter;
-  }
-  else if(index == 11)
-  {
-      param.Rmboil = iparameter;
-  }
-  else if(index == 12)
-  {
-      param.Rmminm = dparameter;
-  }
-  else if(index == 13)
-  {
-      param.MssDef = iparameter;
-  }
-  else if(index == 14)
-  {
-      param.Gtsca = iparameter;
-  }
-  else if(index == 15)
-  {
-      param.MssDec = iparameter;
-  }
-  else if(index == 16)
-  {
-      param.IbhPrn = iparameter;
-  }
-  else if(index == 17)
-  {
-      param.Ebmup = dparameter;
-  }
-
-}
-
-// This function should be called from FORTRAN and used to read parameters
-// stored by the write function
-extern "C" void readcharybdisparamint_(int* index, int* parameter)
-{
-  // Write default values into CharybdisParam if WriteCharybdisParam has never been run
-  if(WriteCharybdisParamInit < 1)
-  {
-    WriteCharybdisParamInit = 10;
-
-    param.Mplank=1;            //1
-    param.TotDim=2;            //2
-    param.MinMbh=5000;         //3
-    param.MaxMbh=14000;        //4
-    param.RemnantDecay=2;      //5
-    param.TimeVariation=1;     //6
-    param.GreyBodyFactor=1;    //7
-    param.KinCut=0;            //8
-    param.Yrcsec=0;            //9
-    param.Thwmax=1000;         //10
-    param.Rmboil=0;            //11
-    param.Rmminm=1000;         //12
-    param.MssDef=2;            //13
-    param.Gtsca=1;             //14
-    param.MssDec=3;            //15
-    param.IbhPrn=1;            //16
-    param.Ebmup=7000;          //17
-  }
-
-
-  if(*index == 2)
-  {
-      *parameter = param.TotDim;
-  }
-
-  else if(*index == 5)
-  {
-     *parameter = param.RemnantDecay;
-  }
-
-  else if(*index == 6)
-  {
-    *parameter = param.TimeVariation;
-  }
-
-  else if(*index == 7)
-  {
-     *parameter = param.GreyBodyFactor;
-  }
-
-  else if(*index == 8)
-  {
-    *parameter =  param.KinCut;
-  }
-
-  else if(*index == 9)
-  {
-    *parameter =  param.Yrcsec;
-  }
-
-  else if(*index == 11)
-  {
-    *parameter =  param.Rmboil;
-  }
-
-  else if(*index == 13)
-  {
-    *parameter = param.MssDef;
-  }
-  else if(*index == 14)
-  {
-    *parameter = param.Gtsca;
-  }
-  else if(*index == 15)
-  {
-    *parameter = param.MssDec;
-  }
-  else if(*index == 16)
-  {
-    *parameter = param.IbhPrn;
-  }
-
-
-
-  else
-  {
-    //log << MSG:: INFO << " Charybdis Interface -> Incorrect type cast for charybdis variable OR Incorrect index\n"  << endmsg;
-  }
-    
-}
-
-extern "C" void readcharybdisparamdbl_(int* index, double* parameter)
-{
-  // Write default values into CharybdisParam if WriteCharybdisParam has never been run
-  if(WriteCharybdisParamInit < 1)
-  {
-    WriteCharybdisParamInit = 10;
-
-    param.Mplank=1;            //1
-    param.TotDim=2;            //2
-    param.MinMbh=5000;         //3
-    param.MaxMbh=14000;        //4
-    param.RemnantDecay=2;      //5
-    param.TimeVariation=1;     //6
-    param.GreyBodyFactor=1;    //7
-    param.KinCut=0;            //8
-    param.Yrcsec=0;            //9
-    param.Thwmax=1000;         //10
-    param.Rmboil=0;            //11
-    param.Rmminm=1000;         //12
-    param.MssDef=2;            //13
-    param.Gtsca=1;             //14
-    param.MssDec=3;            //15
-    param.IbhPrn=1;            //16
-    param.Ebmup=7000;          //17
-  }
-
-  if(*index == 1)
-  {
-      *parameter = param.Mplank;
-  }
-
-  else if(*index == 3)
-  {
-     *parameter = param.MinMbh;
-  }
-
-  else if(*index == 4)
-  {
-     *parameter = param.MaxMbh;
-  }
-
-  else if(*index == 10)
-  {
-    *parameter =  param.Thwmax;
-  }
-
-  else if(*index == 12)
-  {
-    *parameter =  (double)(param.Rmminm);
-  }
-  else if(*index == 17)
-  {
-    *parameter =  (double)(param.Ebmup);
-  }
-
-
-
-  else
-  {
-    //log << MSG:: INFO << " Charybdis Interface -> Incorrect type cast for charybdis variable OR Incorrect index\n"  << endmsg;
-  }
-
-    
-}
-
-
-#endif
diff --git a/Generators/Charybdis_i/src/initcharybdis.F b/Generators/Charybdis_i/src/initcharybdis.F
deleted file mode 100644
index 7b6588297de5..000000000000
--- a/Generators/Charybdis_i/src/initcharybdis.F
+++ /dev/null
@@ -1,401 +0,0 @@
-CDECK  ID>, INITUSER.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Chris Harris and Peter Richardson
-C----------------------------------------------------------------------
-      SUBROUTINE INITCHARYBDIS
-C----------------------------------------------------------------------
-C     Les Houches initialisation routine
-C----------------------------------------------------------------------
-#include "Charybdis_i/charybdis1003.inc"
-      external chdata
-
-C--Les Houches run common block
-      INTEGER MAXPUP
-      PARAMETER(MAXPUP=100)
-      INTEGER IDBMUP,PDFGUP,PDFSUP,IDWTUP,NPRUP,LPRUP
-      DOUBLE PRECISION EBMUP,XSECUP,XERRUP,XMAXUP
-      COMMON /HEPRUP/ IDBMUP(2),EBMUP(2),PDFGUP(2),PDFSUP(2),
-     &                IDWTUP,NPRUP,XSECUP(MAXPUP),XERRUP(MAXPUP),
-     &                XMAXUP(MAXPUP),LPRUP(MAXPUP)
-C--event common block
-      INTEGER MAXNUP
-      PARAMETER (MAXNUP=500)
-      INTEGER NUP,IDPRUP,IDUP,ISTUP,MOTHUP,ICOLUP
-      DOUBLE PRECISION XWGTUP,SCALUP,AQEDUP,AQCDUP,PUP,VTIMUP,SPINUP
-      COMMON/HEPEUP/NUP,IDPRUP,XWGTUP,SCALUP,AQEDUP,AQCDUP,
-     &              IDUP(MAXNUP),ISTUP(MAXNUP),MOTHUP(2,MAXNUP),
-     &              ICOLUP(2,MAXNUP),PUP(5,MAXNUP),VTIMUP(MAXNUP),
-     &              SPINUP(MAXNUP)
-C--local variables
-      INTEGER NCHSRCH,I
-      DOUBLE PRECISION CHWSUM,CHWSQ,SPNZRO,SPNHLF,SPNONE,PTOTAL
-      DOUBLE PRECISION PPROBS(6,3)
-      DATA PPROBS /1.0d0, 1.0d0, 1.0d0, 1.0d0, 1.0d0, 1.0d0,
-     &     0.773d0, 0.776d0, 0.761d0, 0.743d0, 0.726d0, 0.711d0,
-     &     0.688d0, 0.827d0, 0.909d0, 0.959d0, 0.990d0, 1.011d0/
-
-C--DEV added by nick brett
-      INTEGER arg
-      INTEGER index
-C--DEV end
-
-C--parameters for the initial maximum weight search
-      DATA NCHSRCH /10000/
-C--BW mod 16/08/06: set default values in BLOCK DATA CHDATA,
-C  so that they can be reset in main program.
-C--You can still change them here instead if you want.
-C--Beam particles and energies (only proton=2212 and antiproton=-2212)
-C--N.B.for HERWIG these are overidden by the values in the main program
-      IDBMUP(1) = 2212
-      IDBMUP(2) = 2212
-C--      EBMUP(1)  = 7000.0D0
-C--      EBMUP(2)  = 7000.0D0
-C--      EBMUP(1)  = 5000.0D0
-C--      EBMUP(2)  = 5000.0D0
-      index=17
-      CALL readcharybdisparamdbl(index,EBMUP(1))
-      CALL readcharybdisparamdbl(index,EBMUP(2))
-
-
-
-C--Set MPLNCK and define what is meant by it:
-C--MSSDEF=1 means M_GT, MSSDEF=2 means M_DL and MSSDEF=3 means M_D
-C      MPLNCK=1000.0D0
-C      MSSDEF=2
-      index=1
-      CALL readcharybdisparamdbl(index,MPLNCK)      
-      index=13
-      CALL readcharybdisparamint(index,MSSDEF)
-C--Set number of dimensions (number of EXTRA dimensions is n=TOTDIM-4)
-C--TOTDIM can be in the range 6-11
-C      TOTDIM=6
-      index=2
-      CALL readcharybdisparamint(index,TOTDIM)
-C--Use Giddings+Thomas momentum scale for calling pdfs?
-C--(See page 12 of hep-ph/0106219)
-C      GTSCA=.FALSE.
-      index=14
-      CALL readcharybdisparamint(index,arg)
-      if(arg.EQ.0)then
-         GTSCA=.FALSE.
-      else
-         GTSCA=.TRUE.
-      endif
-C--Set mass window for black holes produced
-C      MINMSS=5000.0D0
-C      MAXMSS=EBMUP(1)+EBMUP(2)
-      index=3
-      CALL readcharybdisparamdbl(index,MINMSS)
-      index=4
-      CALL readcharybdisparamdbl(index,MAXMSS)
-C--Set NBODY decay of BH remnant - NBODY can be in range 2-5.
-C      NBODY=2
-      index=5
-      CALL readcharybdisparamint(index,NBODY)
-C--Turn time variation of BH Hawking temperature in decay on or off
-C      TIMVAR=.TRUE.
-      index=6
-      CALL readcharybdisparamint(index,arg)
-      if(arg.EQ.0)then
-         TIMVAR=.FALSE.
-      else
-         TIMVAR=.TRUE.
-      endif
-C--Set which decay products are to be used:
-C--MSSDEC=1 gives no heavy particles
-C--MSSDEC=2 gives t, W and Z as well
-C--MSSDEC=3 gives t, W, Z and Higgs as well  
-C      MSSDEC=3
-      index=15
-      CALL readcharybdisparamint(index,MSSDEC)
-
-C--Turn grey-body factors on/off
-C      GRYBDY=.TRUE.
-      index=7
-      CALL readcharybdisparamint(index,arg)
-      if(arg.EQ.0)then
-         GRYBDY=.FALSE.
-      else
-         GRYBDY=.TRUE.
-      endif
-C--Turn kinematic cut-off of decay on (rather than M=MPLANCK cut-off)
-C      KINCUT=.FALSE.
-      index=8
-      CALL readcharybdisparamint(index,arg)
-      if(arg.EQ.0)then
-         KINCUT=.FALSE.
-      else
-         KINCUT=.TRUE.
-      endif
-C--BW mod 16/08/06: new parameters for version 1.003
-C--Use Yoshino-Rychkov factors in cross-section
-C      YRCSEC= .FALSE.
-      index=9
-      CALL readcharybdisparamint(index,arg)
-      if(arg.EQ.0)then
-         YRCSEC=.FALSE.
-      else
-         YRCSEC=.TRUE.
-      endif
-C--Max Hawking temperature
-C      THWMAX =1000.0D0
-      index=10
-      CALL readcharybdisparamdbl(index,THWMAX)
-C--Remnant decay model: boiling at THWMAX
-C      RMBOIL = .FALSE.
-      index=11
-      CALL readcharybdisparamint(index,arg)
-      if(arg.EQ.0)then
-         RMBOIL=.FALSE.
-      else
-         RMBOIL=.TRUE.
-      endif
-C--Min BH mass, ends boiling
-C      RMMINM = 1000.D0
-      index=12
-      CALL readcharybdisparamdbl(index,RMMINM)
-C--print out option (0=no printout, 1 =errors only, 2=errors+info)
-C      IBHPRN = 1
-      index=16
-      CALL readcharybdisparamint(index,IBHPRN)
-C--pdf's for the beams (use the generator default)
-C--MUST BE THE SAME FOR BOTH BEAMS
-      PDFGUP(1) = -1
-      PDFGUP(2) = -1
-      PDFSUP(1) = -1
-      PDFSUP(2) = -1
-C--------------------------------------------------------------------
-C     END OF USER VARIABLES DON'T TOUCH ANYTHING BELOW HERE
-C--------------------------------------------------------------------
-c#if !defined(PYTHIA)
-C--HERWIG beams now passed from main program
-c      CALL HWUIDT(3,IDBMUP(1),I,PART1)
-c      CALL HWUIDT(3,IDBMUP(2),I,PART2)
-c      EBMUP(1)=PBEAM1
-c      EBMUP(2)=PBEAM2
-c#endif
-C--end mod
-C--probabilities for particles of different spin
-C--(arbitrary normalisation)
-      IF (GRYBDY) THEN
-         SPNZRO = PPROBS(TOTDIM-5,1)
-         SPNHLF = PPROBS(TOTDIM-5,2)
-         SPNONE = PPROBS(TOTDIM-5,3)
-      ELSE
-         SPNZRO = 1d0
-         SPNHLF = 0.750d0
-         SPNONE = 1d0
-      ENDIF
-C--calculation of probability of emission for different particle types
-C--only light SM particles
-      IF (MSSDEC.EQ.1) THEN
-         PTOTAL = (78.0d0*SPNHLF)+(18.0d0*SPNONE)
-         PQUARK = (60.0d0*SPNHLF)/PTOTAL
-         PLEPT  = (12.0d0*SPNHLF)/PTOTAL
-         PNEUT  = (6.0d0*SPNHLF)/PTOTAL
-         PGLUON = (16.0d0*SPNONE)/PTOTAL
-         PGAMMA = (2.0d0*SPNONE)/PTOTAL
-         PWBOSN = 0.0D0
-         PZBOSN = 0.0D0
-         PHIGGS = 0.0D0   
-C--light SM partcles + top W/Z      
-      ELSEIF (MSSDEC.EQ.2) THEN
-         PTOTAL = (3.0d0*SPNZRO)+(90.0d0*SPNHLF)+(24.0d0*SPNONE)
-         PQUARK = (72.0d0*SPNHLF)/PTOTAL
-         PLEPT  = (12.0d0*SPNHLF)/PTOTAL
-         PNEUT  = (6.0d0*SPNHLF)/PTOTAL
-         PGLUON = (16.0d0*SPNONE)/PTOTAL
-         PGAMMA = (2.0d0*SPNONE)/PTOTAL
-         PZBOSN = (SPNZRO+(2.0d0*SPNONE))/PTOTAL
-         PWBOSN = 2.0d0*PZBOSN
-         PHIGGS = 0.0D0 
-C--light SM particles +top W/Z and Higgs
-      ELSE
-         PTOTAL = (4.0d0*SPNZRO)+(90.0d0*SPNHLF)+(24.0d0*SPNONE)
-         PQUARK = (72.0d0*SPNHLF)/PTOTAL
-         PLEPT  = (12.0d0*SPNHLF)/PTOTAL
-         PNEUT  = (6.0d0*SPNHLF)/PTOTAL
-         PGLUON = (16.0d0*SPNONE)/PTOTAL
-         PGAMMA = (2.0d0*SPNONE)/PTOTAL
-         PZBOSN = (SPNZRO+(2.0d0*SPNONE))/PTOTAL
-         PWBOSN = 2.0d0*PZBOSN
-         PHIGGS = SPNZRO/PTOTAL
-      ENDIF
-C--what do do with the weights(here are generating weighted events)
-      IDWTUP = 1
-C--only one process
-      NPRUP  = 1
-C--communication code
-      LPRUP(1) = 1
-C--calculate the maximum weight
-      CHWSUM = 0.0D0
-      CHWSQ = 0.0D0
-      XMAXUP(1) = 0.0D0
-      DO I=1,NCHSRCH
-         CALL CHEVNT(.FALSE.)
-         CHWSUM = CHWSUM+XWGTUP
-         CHWSQ  = CHWSQ+XWGTUP**2
-         XMAXUP(1) = MAX(XMAXUP(1),XWGTUP)
-      ENDDO
-      CHWSUM = CHWSUM/DBLE(NCHSRCH)
-      CHWSQ  = MAX(CHWSQ/DBLE(NCHSRCH)-CHWSUM**2,0.0D0)
-      CHWSQ  = SQRT(CHWSQ/ DBLE(NCHSRCH))
-C--cross section
-      XSECUP(1) = CHWSUM
-C--error on the cross section
-      XERRUP(1) = CHWSQ
-C--output initialisation information
-C--header
-      WRITE(*,10)
-C--beam parameters
-      WRITE(*,11) IDBMUP(1),EBMUP(1),IDBMUP(2),EBMUP(2)
-C--basic parameters
-      WRITE(*,12) MINMSS,MAXMSS,MPLNCK,THWMAX,RMMINM,MSSDEF,TOTDIM,
-     &     YRCSEC,TIMVAR,GRYBDY,KINCUT,RMBOIL
-      IF (RMBOIL) THEN
-         IF (KINCUT) THEN
-            WRITE (*,8)
- 8          FORMAT(/10X,'KINEMATIC CUT INCONSISTENT'/
-     &              10X,'WITH BOILING REMNANT MODEL:'/
-     &              10X,'RESETTING KINCUT = .FALSE.'/)
-            KINCUT=.FALSE.
-         ENDIF
-      ELSE
-         IF (RMMINM.LT.MPLNCK) THEN
-            WRITE (*,9)
- 9          FORMAT(/10X,'BOILING REMNANT MODEL NOT USED:'/ 
-     &              10X,'RESETTING MIN REMNANT MASS = MPLNCK'/)
-            RMMINM=MPLNCK
-         ENDIF
-      ENDIF
-C--choice of outgoing particles
-      IF(MSSDEC.EQ.1) THEN
-         WRITE(*,13)
-      ELSEIF(MSSDEC.EQ.2) THEN
-         WRITE(*,14)
-      ELSEIF(MSSDEC.EQ.3) THEN
-         WRITE(*,15)
-      ENDIF
-C--choice of scale
-      IF(GTSCA) THEN
-         WRITE(*,17)
-      ELSE
-         WRITE(*,18)
-      ENDIF
-C--information on the cross section
-      WRITE(*,19) XSECUP(1),XERRUP(1),XMAXUP(1)
-C--particle production probabilites
-      WRITE(*,20) PQUARK,PLEPT,PNEUT,PGLUON,PGAMMA,PZBOSN,PWBOSN,PHIGGS
-      RETURN
-C--format statements for the output
- 10   FORMAT(//10X,'       CHARYBDIS 1.003   August 2006          ',//,
-     &         10X,'Please reference: C.M.Harris, P.Richardson &',/,
-     &         10X,'B.R.Webber,JHEP0308(2003)033 [hep-ph/0307305]'/)
- 11   FORMAT(/10X,'INPUT CONDITIONS FOR THIS RUN'//
-     &        10X,'BEAM 1 (',I8,') ENG. =',F10.2/
-     &        10X,'BEAM 2 (',I8,') ENG. =',F10.2/)
- 12   FORMAT(
-     &     10X,'MINIMUM BH MASS    =',F11.2/
-     &     10X,'MAXIMUM BH MASS    =',F11.2/
-     &     10X,'PLANCK MASS        =',F11.2/
-     &     10X,'MAX HAWKING TEMP   =',F11.2/
-     &     10X,'MIN REMNANT MASS   =',F11.2/
-     &     10X,'DEFN OF PLANCK MASS=',I5/
-     &     10X,'NO. OF DIMENSIONS  =',I5/
-     &     10X,'YOSHINO-RYCHKOV C-S=',L5/
-     &     10X,'TIME VARIATION     =',L5/
-     &     10X,'GREY BODY EFFECTS  =',L5/
-     &     10X,'KINEMATIC CUT      =',L5/
-     &     10X,'BOILING REMN. MODEL=',L5)
- 13   FORMAT(
-     &     10X,'ONLY LIGHT SM PARTICLES PRODUCED')
- 14   FORMAT(
-     &     10X,'ALL SM PARTICLES BUT HIGGS PRODUCED')
- 15   FORMAT(
-     &     10X,'ALL SM PARTICLES PRODUCED')
-      WRITE(*,16) NBODY
- 16   FORMAT(
-     &     10X,'PRODUCING ',I1,' PARTICLES IN REMNANT DECAY')
- 17   FORMAT(
-     &     10X,'USING BLACK HOLE RADIUS AS SCALE')
- 18   FORMAT(
-     &     10X,'USING BLACK HOLE MASS AS SCALE')
- 19   FORMAT(
-     &     10X,'CROSS SECTION (PB) =',G12.4/
-     &     10X,'ERROR IN C-S  (PB) =',G12.4/
-     &     10X,'MAXIMUM WEIGHT     =',E12.4)
- 20   FORMAT(/10X,'PARTICLE PRODUCTION PROBABILITIES'//
-     &        10X,'QUARK                  =',F10.4/
-     &        10X,'CHARGED LEPTON         =',F10.4/
-     &        10X,'NEUTRINO               =',F10.4/
-     &        10X,'GLUON                  =',F10.4/
-     &        10X,'PHOTON                 =',F10.4/
-     &        10X,'Z BOSON                =',F10.4/
-     &        10X,'W BOSON                =',F10.4/
-     &        10X,'HIGGS BOSON            =',F10.4)
-      END
-
-*DECK  ID>, CHDATA.
-*CMZ :-        -21/08/06  10.33.53  by  Peter Richardson
-*-- Author :    
-C-----------------------------------------------------------------------
-      BLOCK DATA CHDATA
-C-----------------------------------------------------------------------
-C    BLOCK DATA TO SET INITIAL VALUES OF PARAMETERS
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-#include "Charybdis_i/charybdis1003.inc"
-C--Les Houches run common block
-      INTEGER MAXPUP
-      PARAMETER(MAXPUP=100)
-      INTEGER IDBMUP,PDFGUP,PDFSUP,IDWTUP,NPRUP,LPRUP
-      DOUBLE PRECISION EBMUP,XSECUP,XERRUP,XMAXUP
-      COMMON /HEPRUP/ IDBMUP(2),EBMUP(2),PDFGUP(2),PDFSUP(2),
-     &                IDWTUP,NPRUP,XSECUP(MAXPUP),XERRUP(MAXPUP),
-     &                XMAXUP(MAXPUP),LPRUP(MAXPUP)
-C--event common block
-C--Set MPLNCK and define what is meant by it:
-C--MSSDEF=1 means M_GT, MSSDEF=2 means M_DL and MSSDEF=3 means M_D
-      DATA MPLNCK /1000.0D0/
-      DATA MSSDEF /2/
-C--Set number of dimensions (number of EXTRA dimensions is n=TOTDIM-4)
-C--TOTDIM can be in the range 6-11
-      DATA TOTDIM/6/
-C--Use Giddings+Thomas momentum scale for calling pdfs?
-C--(See page 12 of hep-ph/0106219)
-      DATA GTSCA /.FALSE./
-C--Set mass window for black holes produced
-      DATA  MINMSS /5000.0D0/
-      DATA  MAXMSS /14000.0D0/
-C--Set NBODY decay of BH remnant - NBODY can be in range 2-5.
-      DATA NBODY /2/
-C--Turn time variation of BH Hawking temperature in decay on or off
-      DATA TIMVAR /.TRUE./
-C--Set which decay products are to be used:
-C--MSSDEC=1 gives no heavy particles
-C--MSSDEC=2 gives t, W and Z as well
-C--MSSDEC=3 gives t, W, Z and Higgs as well  
-      DATA MSSDEC /3/
-C--Turn grey-body factors on/off
-      DATA GRYBDY /.TRUE./
-C--Turn kinematic cut-off of decay on (rather than M=MPLANCK cut-off)
-      DATA KINCUT /.FALSE./
-C--BW mod 16/08/06: new parameters for version 1.003
-C--Use Yoshino-Rychkov factors in cross-section
-      DATA YRCSEC /.FALSE./
-C--Max Hawking temperature
-      DATA THWMAX /1000.0D0/
-C--Remnant decay model: boiling at THWMAX
-      DATA RMBOIL /.FALSE./
-C--Min BH mass, ends boiling
-      DATA RMMINM /1000.D0/
-C--print out option (0=no printout, 1 =errors only, 2=errors+info)
-      DATA IBHPRN /1/
-C--pdf's for the beams (use the generator default)
-C--MUST BE THE SAME FOR BOTH BEAMS
-      DATA PDFGUP /-1,-1/
-      DATA PDFSUP /-1,-1/
-C--Beam particles and energies (only proton and/or antiproton)
-      DATA IDBMUP /2212,2212/
-      DATA EBMUP /7000.0D0,7000.0D0/
-      END
diff --git a/Generators/Charybdis_i/src/usecharybdis.F b/Generators/Charybdis_i/src/usecharybdis.F
deleted file mode 100644
index 53ae3e7bd5e5..000000000000
--- a/Generators/Charybdis_i/src/usecharybdis.F
+++ /dev/null
@@ -1,2083 +0,0 @@
-CDECK  ID>, USEUSER.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Chris Harris and Peter Richardson
-C----------------------------------------------------------------------
-      SUBROUTINE USECHARYBDIS
-C----------------------------------------------------------------------
-C     Les Houches event routine
-C----------------------------------------------------------------------
-      IMPLICIT NONE
-      CALL CHEVNT(.TRUE.)
-      END
-
-CDECK  ID>, CHDFIV.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Ian Knowles
-C-----------------------------------------------------------------------
-      SUBROUTINE CHDFIV(P0,P1,P2,P3,P4,P5,OKDEC)
-C-----------------------------------------------------------------------
-C     Generates 5-body decay 0->1+2+3+4+5 using pure phase space
-C     (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRGEN,P0(5),P1(5),P2(5),P3(5),P4(5),P5(5),B,C,
-     & AA,BB,CC,DD,EE,FF,TT,S1,RS1,GG,S2,RS2,HH,S3,PP,QQ,RR,SS,P1CM,
-     & P2345(5),P2CM,P345(5),P3CM,P45(5),P4CM
-      DOUBLE PRECISION TWO
-      INTEGER MTRY,NTRY
-      PARAMETER (MTRY=1000000)
-      PARAMETER (TWO=2.D0)
-      EXTERNAL CHRGEN
-      LOGICAL OKDEC
-      OKDEC=.FALSE.
-      B=P0(5)-P1(5)
-      C=P2(5)+P3(5)+P4(5)+P5(5)
-      IF (B.LT.C) RETURN
-      AA=(P0(5)+P1(5))**2
-      BB=B**2
-      CC=C**2
-      DD=(P3(5)+P4(5)+P5(5))**2
-      EE=(P4(5)+P5(5))**2
-      FF=(P4(5)-P5(5))**2
-      TT=(B-C)*P0(5)**11/729
-      NTRY=0
-C Select squared masses S1, S2 and S3 of 2345, 345 and 45 subsystems
-  10  S1=BB+CHRGEN(1)*(CC-BB)
-      NTRY=NTRY+1
-      IF (NTRY.GT.MTRY) RETURN
-      RS1=SQRT(S1)
-      GG=(RS1-P2(5))**2
-      S2=DD+CHRGEN(2)*(GG-DD)
-      RS2=SQRT(S2)
-      HH=(RS2-P3(5))**2
-      S3=EE+CHRGEN(3)*(HH-EE)
-      PP=(AA-S1)*(BB-S1)
-      QQ=((RS1+P2(5))**2-S2)*(GG-S2)/S1
-      RR=((RS2+P3(5))**2-S3)*(HH-S3)/S2
-      SS=(S3-EE)*(S3-FF)/S3
-      IF (PP*QQ*RR*SS*((GG-DD)*(HH-EE))**2.LT.TT*S1*S2*S3*CHRGEN(4)**2)
-     & GOTO 10
-C Do two body decays: 0-->1+2345, 2345-->2+345, 345-->3+45 and 45-->4+5
-      P1CM=SQRT(PP/4)/P0(5)
-      P2345(5)=RS1
-      P2CM=SQRT(QQ/4)
-      P345(5)=RS2
-      P3CM=SQRT(RR/4)
-      P45(5)=SQRT(S3)
-      P4CM=SQRT(SS/4)
-      CALL CHDTWO(P0   ,P1,P2345,P1CM,TWO,.TRUE.)
-      CALL CHDTWO(P2345,P2,P345 ,P2CM,TWO,.TRUE.)
-      CALL CHDTWO(P345 ,P3,P45  ,P3CM,TWO,.TRUE.)
-      CALL CHDTWO(P45  ,P4,P5   ,P4CM,TWO,.TRUE.)
-      OKDEC=.TRUE.
-      END
-CDECK  ID>, CHDFOR.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Ian Knowles
-C-----------------------------------------------------------------------
-      SUBROUTINE CHDFOR(P0,P1,P2,P3,P4,OKDEC)
-C-----------------------------------------------------------------------
-C     Generates 4-body decay 0->1+2+3+4 using pure phase space
-C     (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRGEN,P0(5),P1(5),P2(5),P3(5),P4(5),B,C,AA,BB,
-     & CC,DD,EE,TT,S1,RS1,FF,S2,PP,QQ,RR,P1CM,P234(5),P2CM,P34(5),P3CM
-      DOUBLE PRECISION TWO
-      INTEGER MTRY,NTRY
-      PARAMETER (MTRY=1000000)
-      PARAMETER (TWO=2.D0)
-      EXTERNAL CHRGEN
-      LOGICAL OKDEC
-      OKDEC=.FALSE.
-      B=P0(5)-P1(5)
-      C=P2(5)+P3(5)+P4(5)
-      IF (B.LT.C) RETURN
-      AA=(P0(5)+P1(5))**2
-      BB=B**2
-      CC=C**2
-      DD=(P3(5)+P4(5))**2
-      EE=(P3(5)-P4(5))**2
-      TT=(B-C)*P0(5)**7/16
-      NTRY=0
-C Select squared masses S1 and S2 of 234 and 34 subsystems
-  10  S1=BB+CHRGEN(1)*(CC-BB)
-      NTRY=NTRY+1
-      IF (NTRY.GT.MTRY) RETURN
-      RS1=SQRT(S1)
-      FF=(RS1-P2(5))**2
-      S2=DD+CHRGEN(2)*(FF-DD)
-      PP=(AA-S1)*(BB-S1)
-      QQ=((RS1+P2(5))**2-S2)*(FF-S2)/S1
-      RR=(S2-DD)*(S2-EE)/S2
-      IF (PP*QQ*RR*(FF-DD)**2.LT.TT*S1*S2*CHRGEN(3)**2) GOTO 10
-C Do two body decays: 0-->1+234, 234-->2+34 and 34-->3+4
-      P1CM=SQRT(PP/4)/P0(5)
-      P234(5)=RS1
-      P2CM=SQRT(QQ/4)
-      P34(5)=SQRT(S2)
-      P3CM=SQRT(RR/4)
-      CALL CHDTWO(P0  ,P1,P234,P1CM,TWO,.TRUE.)
-      CALL CHDTWO(P234,P2,P34 ,P2CM,TWO,.TRUE.)
-      CALL CHDTWO(P34 ,P3,P4  ,P3CM,TWO,.TRUE.)
-      OKDEC=.TRUE.
-      END
-CDECK  ID>, CHDTHR.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHDTHR(P0,P1,P2,P3,OKDEC)
-C-----------------------------------------------------------------------
-C     GENERATES THREE-BODY DECAY 0->1+2+3 DISTRIBUTED
-C     ACCORDING TO PHASE SPACE * WEIGHT
-C     (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRGEN,CHRUNI,A,B,C,D,AA,BB,CC,DD,EE,FF,PP,QQ,WW,
-     & RR,PCM1,PC23,P0(5),P1(5),P2(5),P3(5),P23(5),TWO,ONE
-      EXTERNAL CHRGEN,CHRUNI
-      PARAMETER (ONE=1.0D0,TWO=2.D0)
-      INTEGER MTRY,NTRY
-      PARAMETER (MTRY=1000000)
-      LOGICAL OKDEC
-      OKDEC=.FALSE.
-      A=P0(5)+P1(5)
-      B=P0(5)-P1(5)
-      C=P2(5)+P3(5)
-      IF (B.LT.C) RETURN
-      D=ABS(P2(5)-P3(5))
-      AA=A*A
-      BB=B*B
-      CC=C*C
-      DD=D*D
-      EE=(B-C)*(A-D)
-      A=0.5D0*(AA+BB)
-      B=0.5D0*(CC+DD)
-      C=4.0D0/(A-B)**2
-      NTRY=0
-C
-C  CHOOSE MASS OF SUBSYSTEM 23 WITH PRESCRIBED DISTRIBUTION
-C
-   10 FF=CHRUNI(0,BB,CC)
-      NTRY=NTRY+1
-      IF (NTRY.GT.MTRY) RETURN
-      PP=(AA-FF)*(BB-FF)
-      QQ=(CC-FF)*(DD-FF)
-      WW=ONE
-      RR=EE*FF*CHRGEN(0)
-      IF (PP*QQ*WW.LT.RR*RR) GOTO 10
-C
-C  FF IS MASS SQUARED OF SUBSYSTEM 23.
-C
-C  DO 2-BODY DECAYS 0->1+23, 23->2+3
-C
-      P23(5)=SQRT(FF)
-      PCM1=SQRT(PP)*0.5D0/P0(5)
-      PC23=SQRT(QQ)*0.5D0/P23(5)
-      CALL CHDTWO(P0,P1,P23,PCM1,TWO,.TRUE.)
-      CALL CHDTWO(P23,P2,P3,PC23,TWO,.TRUE.)
-      OKDEC=.TRUE.
-      END
-CDECK  ID>, CHDTWO.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber & Mike Seymour
-C-----------------------------------------------------------------------
-      SUBROUTINE CHDTWO(P0,P1,P2,PCM,COSTH,ZAXIS)
-C-----------------------------------------------------------------------
-C     GENERATES DECAY 0 -> 1+2
-C
-C     PCM IS CM MOMENTUM
-C
-C     COSTH = COS THETA IN P0 REST FRAME (>1 FOR ISOTROPIC)
-C     IF ZAXIS=.TRUE., COS THETA IS MEASURED FROM THE ZAXIS
-C     IF .FALSE., IT IS MEASURED FROM P0'S DIRECTION 
-C     (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRUNI,ONE,ZERO,PCM,COSTH,C,S,P0(5),P1(5),P2(5),
-     & PP(5),R(9)
-      LOGICAL ZAXIS
-      EXTERNAL CHRUNI
-      PARAMETER (ZERO=0.D0, ONE=1.D0)
-C--CHOOSE C.M. ANGLES
-      C=COSTH
-      IF (C.GT.ONE) C=CHRUNI(0,-ONE,ONE)
-      S=SQRT(ONE-C*C)
-      CALL CHRAZM(PCM*S,PP(1),PP(2))
-C--PP IS MOMENTUM OF 2 IN C.M.
-      PP(3)=-PCM*C
-      PP(4)=SQRT(P2(5)**2+PCM**2)
-      PP(5)=P2(5)
-C--ROTATE IF NECESSARY
-      IF (COSTH.LE.ONE.AND..NOT.ZAXIS) THEN
-        CALL CHUROT(P0,ONE,ZERO,R)
-        CALL CHUROB(R,PP,PP)
-      ENDIF
-C--BOOST FROM C.M. TO LAB FRAME
-      CALL CHULOB(P0,PP,P2)
-      CALL CHVDIF(4,P0,P2,P1)
-      END
-CDECK  ID>, CHEVNT.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Chris Harris
-C----------------------------------------------------------------------
-      SUBROUTINE CHEVNT(GENEVT)
-C----------------------------------------------------------------------
-C     Black Hole Production and Decay
-C----------------------------------------------------------------------
-      IMPLICIT NONE
-c      INCLUDE 'charybdis1003.inc'
-#include "Charybdis_i/charybdis1003.inc"
-C--Les Houches run common block
-#include "GeneratorFortranCommon/heprup.inc"
-#include "GeneratorFortranCommon/hepeup.inc"
-C--Local Variables
-      DOUBLE PRECISION ECMS,ONE,TWO,PIFAC,THREE,ZERO,
-     &     CHRGEN,RPOW,A0,A1,EMJ,FACT,QSQ,HCS,PROB,
-     &     FACTR,RCS,BHPOW,DISF1,DISF2,OMEGAD,DL2GT,PSTEST,
-     &     RHORSQ,PLPOW,MPFACT,PA(5),PB(5),PC(5),PCM,CHUPCM,PCMF(5),
-     &     XXMIN,XLMIN,EMSCA,XX(2),DISF(13,2),GEV2PB,CHFMAS,YRF(7)
-      INTEGER STAT,IBARYN,IQRK(MAXPUP),IGLU(MAXPUP),IQBR(MAXPUP),MTRY,
-     &     NQRK,NGLU,NQBR,JQRK,JGLU,JQBR,J,ISTART,CHST,iline,FSTAT(5),
-     &     IP,IQ,PT,I,BHCHRG,IDN(2),NTRY,NHTRY,SAVCHR,SAVBRN,ID(5),
-     &     MHTRY,LTRY,LHTRY,CHFCHG,SPIN,FSPIN(5)
-      LOGICAL GENEVT,CHRLOG,FIRST,OKDEC
-      EXTERNAL CHFMAS,CHRGEN,CHUPCM,CHRLOG,CHFCHG
-      PARAMETER(ONE=1.0D0,TWO=2.0D0,THREE=3.0D0,ZERO=0.0D0,NHTRY=200)
-      PARAMETER(MHTRY=20,LHTRY=200,GEV2PB=389379.D3)
-      SAVE HCS,BHPOW,PLPOW,RPOW,A0,A1,FACT,MPFACT
-      DATA FIRST/.TRUE./
-C--BW mod 16/08/06: Yoshino-Rychkov factors for cross section,
-C  from Phys.Rev.D71:104028,2005 [hep-th/0503171]
-      DATA YRF/1.54,2.15,2.52,2.77,2.95,3.09,3.20/
-C--end mod
-      PIFAC = ACOS(-ONE)
-      IF(FIRST) THEN
-C--Convert MPLNCK to M_GT if above value is M_DL
-         IF (MSSDEF.EQ.2) THEN
-            DL2GT=(TWO**(TOTDIM-6)*PIFAC**(TOTDIM-5))**(1/(TOTDIM-TWO))
-            INTMPL=DL2GT*MPLNCK
-C--Convert MPLNCK to M_GT if above value is M_D
-         ELSEIF (MSSDEF.EQ.3) THEN
-            INTMPL=MPLNCK*TWO**(1/(TOTDIM-TWO))
-         ELSE
-            INTMPL=MPLNCK
-         ENDIF
-C--Calculate other parameters
-         PLPOW=TWO/(TOTDIM-THREE)
-         BHPOW=PLPOW-7.0D0
-         RPOW=1/BHPOW
-         A0=MINMSS**BHPOW
-         A1=(MAXMSS**BHPOW-A0)
-         IF (TOTDIM.EQ.11) THEN
-            OMEGAD=(PIFAC**5)/12
-         ELSEIF (TOTDIM.EQ.10) THEN
-            OMEGAD=(32*PIFAC**4)/105
-         ELSEIF (TOTDIM.EQ.9) THEN
-            OMEGAD=(PIFAC**4)/3
-         ELSEIF (TOTDIM.EQ.8) THEN
-            OMEGAD=(16*PIFAC**3)/15
-         ELSEIF (TOTDIM.EQ.7) THEN
-            OMEGAD=PIFAC**3
-         ELSEIF(TOTDIM.EQ.6) THEN
-            OMEGAD=(8*PIFAC**2)/3
-         ENDIF
-         MPFACT=INTMPL**(TOTDIM-2)
-         RHFACT=(4*(2*PIFAC)**(TOTDIM-4))/((TOTDIM-2)*OMEGAD*MPFACT)
-         FIRST = .FALSE.
-      ENDIF      
-C--Select a mass for the produced black hole
-      ECMS = 2.0D0*SQRT(EBMUP(1)*EBMUP(2))
-      EMSCA=(A0+A1*CHRGEN(1))**RPOW
-      BHMASS=EMSCA
-      QSQ=EMSCA**2
-      EMJ=EMSCA**(1-BHPOW)/BHPOW*A1
-C--Calculate (r_h)**2 and initial T_H
-      RHORSQ=(RHFACT*EMSCA)**PLPOW
-C--Select initial momentum fractions
-      XXMIN=QSQ/ECMS**2
-      XLMIN=LOG(XXMIN)
-      FACT=-GEV2PB*PIFAC*RHORSQ*EMJ*XLMIN*TWO/EMSCA
-C--BW mod 16/08/06: include Yoshino-Rychkov factor
-      IF (YRCSEC) FACT=FACT*YRF(TOTDIM-4)
-C--end mod
-C--Change momentum scale for calling pdfs (see comment above)
-      IF (GTSCA) EMSCA=1/SQRT(RHORSQ)
-      SCALUP = EMSCA
-      CALL CHPDF(XXMIN,XLMIN,EMSCA,XX,DISF)
-      HCS=ZERO
-      DISF1=ZERO
-      DISF2=ZERO
-      DO 30 IP=1,13
-      DISF1=DISF1+DISF(IP,1)
- 30   DISF2=DISF2+DISF(IP,2)
-      FACTR=FACT*DISF1*DISF2
-      HCS=FACTR
-      XWGTUP = HCS
-      IF(.NOT.GENEVT) RETURN
-      RCS=HCS*CHRGEN(0)
-      HCS = 0.0D0
-      DO 20 IP=1,13
-      DO 10 IQ=1,13
-      FACTR=FACT*DISF(IP,1)*DISF(IQ,2)
-      HCS=HCS+FACTR
-      IF (HCS.GT.RCS) GOTO 99
- 10   CONTINUE
- 20   CONTINUE
-C--Generate event
- 99   IDN(1)=IP
-      IDN(2)=IQ
-C--put the incoming particles in the Les Houches common block
-      NUP = 2
-      DO I=1,2
-         IF(IDN(I).GT.6.AND.IDN(I).LE.12) THEN
-            IDN(I) = -MOD(IDN(I)-1,6)-1
-         ELSEIF(IDN(I).EQ.13) THEN
-            IDN(I) = 21
-         ENDIF
-         IDUP(I) = IDN(I)
-         PUP(1,I) = 0.0D0
-         PUP(2,I) = 0.0D0
-         PUP(3,I) = XX(I)*EBMUP(I)
-         PUP(4,I) = XX(I)*EBMUP(I)
-         ISTUP(I) = -1
-      ENDDO
-      PUP(3,2) = -PUP(3,2)
-      CALL CHVSUM(4,PUP(1,1),PUP(1,2),PCMF)
-      CALL CHUMAS(PCMF)
-C--Calculate BH charge (actually 3*charge)
-      BHCHRG=CHFCHG(IDN(1))+CHFCHG(IDN(2))
-C--Black Hole decay
-      MTRY = 0
-      CHST = BHCHRG
- 35   MTRY = MTRY+1
-      BHCHRG = CHST
-      NUP = 2
-      CALL CHVEQU(5,PCMF,PA)
- 40   NUP = NUP+1
-C--BW mod 16/08/06: allow BH mass down to RMMINM
-C--Check that BH mass > RMMINM if not using KINCUT      
-      IF ((.NOT.KINCUT).AND.(PA(5).LT.RMMINM)) GOTO 55
-C--end mod
-C--Set BHMASS to correct value (necessary in time varying case)
-      IF (TIMVAR) BHMASS=PA(5)
-C--Select the decay product
-      LTRY=0
- 45   IF (MSSDEC.EQ.1) THEN
-         CALL CHHBH1(PT,STAT,SPIN,BHCHRG)
-      ELSEIF (MSSDEC.EQ.2) THEN
-         CALL CHHBH2(PT,STAT,SPIN,BHCHRG)
-      ELSE
-         CALL CHHBH3(PT,STAT,SPIN,BHCHRG)
-      ENDIF
-C--Obtain energy of emitted parton
-      CALL CHUBHS(PC(4),STAT,SPIN)
-      PC(5)=CHFMAS(PT)
-C--Check energy > mass for selected parton
-      IF (PC(4).LT.PC(5)) THEN
-         BHCHRG=BHCHRG+CHFCHG(PT)
-         IF(IBHPRN.EQ.2) WRITE (*,*) 'Not enough energy'
-         GOTO 45
-      ENDIF
-C--Check that emission is kinematically allowed
-      IF (PC(4).GT.(PA(5)**2+PC(5)**2)/(TWO*PA(5))) THEN
-         IF (KINCUT.OR.LTRY.GT.LHTRY) THEN 
-            GOTO 50
-         ELSE
-            LTRY=LTRY+1
-            BHCHRG=BHCHRG+CHFCHG(PT)
-            GOTO 45
-         ENDIF
-      ENDIF
-C--Use 2-body phase space decay 
-      PB(5)=SQRT(PA(5)**2+PC(5)**2-TWO*PA(5)*PC(4))
-C--Calculate centre of mass momentum for decay
-      PCM=SQRT(PC(4)**2-PC(5)**2)
-C--PA is BH 5-momentum before, PB after decay
-      CALL CHDTWO(PA,PB,PC,PCM,TWO,.TRUE.)
-C--Add emitted particle to event record
-      CALL CHVEQU(5,PC,PUP(1,NUP))
-      IDUP(NUP)=PT
-      ISTUP(NUP) = 1
-      MOTHUP(1,NUP) = 1
-      MOTHUP(2,NUP) = 2
-C--Change BH 5-momentum back to PA
-      CALL CHVEQU(5,PB,PA)
-      GOTO 40
- 50   BHCHRG=BHCHRG+CHFCHG(PT)
- 55   NUP = NUP-1
-C--Calculate the baryon number violation
-C--Find the baryon number of the inital state
-      IBARYN = 0
-      DO I=1,2
-        IF(ABS(IDUP(I)).LE.6) IBARYN = IBARYN-SIGN(1,IDUP(I))
-      ENDDO
-C--and the final state
-      DO I=3,NUP
-        IF(ABS(IDUP(I)).LE.6) IBARYN = IBARYN+SIGN(1,IDUP(I))
-      ENDDO
-C--Try to balance this out
-      NTRY = 0
-      SAVCHR = BHCHRG
-      SAVBRN = IBARYN
- 60   NTRY = NTRY+1
-      PCM = PA(5)
-      DO I=1,NBODY
-         IF (MSSDEC.EQ.1) THEN
-            CALL CHHBH1(ID(I),FSTAT(I),FSPIN(I),BHCHRG)
-         ELSEIF (MSSDEC.EQ.2) THEN
-            CALL CHHBH2(ID(I),FSTAT(I),FSPIN(I),BHCHRG)
-         ELSE
-            CALL CHHBH3(ID(I),FSTAT(I),FSPIN(I),BHCHRG)
-         ENDIF
-         IF(ABS(ID(I)).LE.6) THEN
-            IBARYN = IBARYN+SIGN(1,ID(I))
-         ENDIF
-         PCM = PCM-CHFMAS(ID(I))
-      ENDDO
-      IF(((IBARYN.NE.0.OR.BHCHRG.NE.0).OR.
-     &    PCM.LT.0.0D0).AND.NTRY.LE.NHTRY) THEN
-         BHCHRG = SAVCHR
-         IBARYN = SAVBRN
-         GOTO 60
-      ENDIF
-C--Go back if needed
-      IF(NTRY.GT.NHTRY) THEN
-         IF(MTRY.LE.MHTRY) THEN
-            IF(IBHPRN.EQ.2) THEN
-               WRITE (*,*) 'Attempt',MTRY,' failed.'
-               WRITE (*,*) 'Starting whole decay again'
-            ENDIF
-            GOTO 35
-         ELSE
-            IF(IBHPRN.GT.1) 
-     &           PRINT *,'WARNING TOO MANY TRIES NEEDED'
-            XWGTUP = 0.0D0
-            RETURN
-         ENDIF
-      ENDIF
-C--Perform the NBODY decay of the remnant
-C--BW mod 18/08/06: check if there is phase space
-      PSTEST=PA(5)
-      DO I=1,NBODY
-         PUP(5,NUP+I) = CHFMAS(ID(I))
-         PSTEST=PSTEST-PUP(5,NUP+I)
-         ISTUP(NUP+I) = 1
-         IDUP(NUP+I) = ID(I)
-         MOTHUP(1,NUP+I) = 1
-         MOTHUP(2,NUP+I) = 2
-      ENDDO
-C--check if decay is allowed
-      IF (PSTEST.LE.0D0) GOTO 100
-      OKDEC=.TRUE.
-C--end mod
-      IF (NBODY.EQ.2) THEN
-         PCM = CHUPCM(PA(5),PUP(5,NUP+1),PUP(5,NUP+2))
-         CALL CHDTWO(PA,PUP(1,NUP+1),PUP(1,NUP+2),PCM,TWO,.TRUE.)
-      ELSEIF (NBODY.EQ.3) THEN
-         CALL CHDTHR(PA,PUP(1,NUP+1),PUP(1,NUP+2),PUP(1,NUP+3),OKDEC)
-      ELSEIF (NBODY.EQ.4) THEN
-         CALL CHDFOR(PA,PUP(1,NUP+1),PUP(1,NUP+2),PUP(1,NUP+3),
-     &                  PUP(1,NUP+4),OKDEC)
-      ELSEIF (NBODY.EQ.5) THEN
-         CALL CHDFIV(PA,PUP(1,NUP+1),PUP(1,NUP+2),PUP(1,NUP+3),
-     &                  PUP(1,NUP+4),PUP(1,NUP+5),OKDEC)
-      ENDIF
-      IF (OKDEC) GOTO 110
- 100  IF(IBHPRN.GE.1) 
-     &     PRINT *,'FAILED',NBODY,'-BODY REMNANT DECAY: M,Q=',
-     &     PA(5),PSTEST
-      GOTO 35
- 110  NUP = NUP+NBODY
-C--Now sort out the colour connections
-C--First the initial state
-      NQRK = 0
-      NGLU = 0
-      NQBR = 0
-      DO I=1,2
-        IF(IDUP(I).GT.0.AND.IDUP(I).LE.6) THEN
-           NQBR = NQBR+1
-           IQBR(NQBR) = I
-        ELSEIF(IDUP(I).LT.0.AND.IDUP(I).GE.-6) THEN
-           NQRK = NQRK+1
-           IQRK(NQRK) = I
-        ELSEIF(IDUP(I).EQ.21) THEN
-           NGLU = NGLU+1
-           IGLU(NGLU) = I
-        ENDIF
-      ENDDO
-C--Then the final state
-      DO I=3,NUP
-        IF(IDUP(I).GT.0.AND.IDUP(I).LE.6) THEN
-           NQRK = NQRK+1
-           IQRK(NQRK) = I
-        ELSEIF(IDUP(I).LT.0.AND.IDUP(I).GE.-6) THEN
-           NQBR = NQBR+1
-           IQBR(NQBR) = I
-        ELSEIF(IDUP(I).EQ.21) THEN
-           NGLU = NGLU+1
-           IGLU(NGLU) = I
-        ENDIF
-      ENDDO
-C--zero the colour connections
-      DO I=1,NUP
-         DO J=1,2
-            ICOLUP(J,I) = 0
-         ENDDO
-      ENDDO
-C--Now make the colour connections
-      JGLU = 0
-      JQBR = 0
-      JQRK = 0
-      IF(NQRK.GT.0) THEN 
-         I = IQRK(1)
-         JQRK = 1
-         J = 1
-      ELSEIF(NGLU.GT.0) THEN
-         I = IGLU(1)
-         JGLU = 1
-         J = 2
-      ELSE
-         GOTO 200
-      ENDIF
-      ISTART = I
-      ILINE  = 500
-C--Find an antiquark or gluon to pair this with
- 150   IF(J.EQ.1.OR.J.EQ.2) THEN
-         IF(JQBR.EQ.NQBR.and.JGLU.EQ.NGLU) THEN
-            GOTO 250
-         ELSE
-            PROB = DBLE(NQBR-JQBR)/DBLE(NQBR+NGLU-JQBR-JGLU)
-C--Pair with an antiquark
-            IF(CHRLOG(PROB)) THEN
-               IF(JQBR.NE.NQBR) THEN
-                 IF(NGLU.NE.JGLU.and.NQBR-JQBR.EQ.1) GOTO 150
-                  JQBR = JQBR+1
-                  IF(I.LE.2) THEN
-                     ICOLUP(2,I         ) = ILINE
-                  ELSE
-                     ICOLUP(1,I         ) = ILINE
-                  ENDIF
-                  IF(IQBR(JQBR).LE.2) THEN
-                     ICOLUP(1,IQBR(JQBR)) = ILINE
-                  ELSE
-                     ICOLUP(2,IQBR(JQBR)) = ILINE
-                  ENDIF
-                  ILINE = ILINE+1
-                  I = IQBR(JQBR)
-                  J = 3
-                  GOTO 150
-               ELSE
-                  GOTO 250
-               ENDIF
-C--Pair with a gluon
-            ELSE
-               IF(JGLU.NE.NGLU) THEN
-                  JGLU = JGLU+1
-                  IF(I.LE.2) THEN
-                     ICOLUP(2,I         ) = ILINE 
-                  ELSE
-                     ICOLUP(1,I         ) = ILINE 
-                  ENDIF
-                  IF(IGLU(JGLU).LE.2) THEN
-                     ICOLUP(1,IGLU(JGLU)) = ILINE
-                  ELSE
-                     ICOLUP(2,IGLU(JGLU)) = ILINE
-                  ENDIF
-                  ILINE = ILINE+1
-                  I = IGLU(JGLU)
-                  J = 2
-                  GOTO 150
-               ELSE
-                  GOTO 250
-               ENDIF
-            ENDIF
-         ENDIF
-C--Find a quark to pair this with
-      ELSEIF(J.EQ.3) THEN
-         IF(JQRK.NE.NQRK) THEN
-            JQRK = JQRK+1
-            IF(I.LE.2) THEN
-               ICOLUP(2,I         ) = ILINE
-            ELSE
-               ICOLUP(1,I         ) = ILINE
-            ENDIF
-            IF(IQRK(JQRK).LE.2) THEN
-               ICOLUP(1,IQRK(JQRK)) = ILINE
-            ELSE
-               ICOLUP(2,IQRK(JQRK)) = ILINE
-            ENDIF
-            ILINE = ILINE+1
-            I = IQRK(JQRK)
-            J = 1
-            GOTO 150
-         ELSE
-            GOTO 250
-         ENDIF
-      ENDIF
- 250  IF(I.LE.2) THEN
-         ICOLUP(2,I)      = ILINE
-      ELSE
-         ICOLUP(1,I)      = ILINE
-      ENDIF
-      IF(ISTART.LE.2) THEN
-         ICOLUP(1,ISTART) = ILINE
-      ELSE
-         ICOLUP(2,ISTART) = ILINE
-      ENDIF
-C--zero the flavours
- 200  DO I=1,NUP
-         IF(IDUP(I).GT.0.AND.IDUP(I).LE.6) THEN
-            ICOLUP(2,I) = 0
-         ELSEIF(IDUP(I).GE.-6.AND.IDUP(I).lt.0) THEN
-            ICOLUP(1,I) = 0
-         ELSEIF(IDUP(I).NE.21) THEN
-            ICOLUP(1,I) = 0
-            ICOLUP(2,I) = 0
-         ENDIF
-      ENDDO
-      END
-CDECK  ID>, CHFCHG.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Peter Richardson
-C----------------------------------------------------------------------
-      FUNCTION CHFCHG(ID)
-C----------------------------------------------------------------------
-C     Function to return the charge of a SM particle input is PDG code
-C----------------------------------------------------------------------
-      IMPLICIT NONE
-      INTEGER CHFCHG,ID
-      IF(ABS(ID).LE.6) THEN
-         IF(MOD(ID,2).EQ.0) THEN
-            CHFCHG = 2
-         ELSE
-            CHFCHG = -1
-         ENDIF
-      ELSEIF(ABS(ID).GE.11.AND.ABS(ID).LE.16) THEN
-         IF(MOD(ID,2).EQ.0) THEN
-            CHFCHG = 0
-         ELSE
-            CHFCHG = -3
-         ENDIF
-      ELSEIF((ID.GE.21.AND.ID.LE.23).OR.ID.EQ.25) THEN
-         CHFCHG = 0
-      ELSEIF(ABS(ID).EQ.24) THEN
-         CHFCHG = 3
-      ELSE
-         print *,'CHFCHG WARNING UNKNOWN PARTICLE',ID
-         STOP
-      ENDIF
-      IF(ID.LT.0) CHFCHG = -CHFCHG
-      END
-CDECK  ID>, CHFMAS.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Peter Richardson
-C----------------------------------------------------------------------
-      FUNCTION CHFMAS(ID)
-C----------------------------------------------------------------------
-C     Function to return the mass of a SM particle input is PDG code
-C     This is generator dependent
-C----------------------------------------------------------------------
-C--get the masses from the HERWIG common block
-#include "HERWIG65.INC"
-      INTEGER ID
-      DOUBLE PRECISION CHFMAS
-      IF(ABS(ID).LE.6) THEN
-         CHFMAS = RMASS(ABS(ID))
-      ELSEIF(ABS(ID).GE.11.AND.ABS(ID).LE.16) THEN
-         CHFMAS = RMASS(110+ABS(ID))
-      ELSEIF(ID.EQ.21) THEN
-         CHFMAS = RMASS(13)
-      ELSEIF(ID.EQ.22) THEN
-         CHFMAS = 0.0D0
-      ELSEIF(ID.EQ.23) THEN
-         CHFMAS = RMASS(200)
-      ELSEIF(ABS(ID).EQ.24) THEN
-         CHFMAS = RMASS(198)
-      ELSEIF(ID.EQ.25) THEN
-         CHFMAS = RMASS(201)
-      ELSE
-         PRINT *,'CHFMAS WARNING UNKNOWN PARTICLE',ID
-         STOP
-      ENDIF
-      END
-CDECK  ID>, CHHBH1.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :   Chris Harris
-C---------------------------------------------------------------------
-      SUBROUTINE CHHBH1(PT,STAT,SPIN,BHCHRG)
-C---------------------------------------------------------------------
-C     Subroutine to select the type of the next particle
-C---------------------------------------------------------------------
-      IMPLICIT NONE
-#include "Charybdis_i/charybdis1003.inc"
-      INTEGER PT,STAT,SPIN,BHCHRG,CHFCHG,I
-      DOUBLE PRECISION PTYPE,CHRGEN,EPS
-      LOGICAL FIRST
-      DATA FIRST/.TRUE./
-      EXTERNAL CHRGEN,CHFCHG
-      PARAMETER(EPS=1.0D-6)
-C--initialisation on first call
-      IF(FIRST) THEN
-         PFERM (1) = PQUARK
-         PFERM (2) = PFERM(1)+PLEPT
-         PFERM (3) = PFERM(2)+PNEUT
-         PBOSON(1) = PFERM(3)+PGLUON
-         PBOSON(2) = PBOSON(1)+PGAMMA
-C--check the sum
-         IF(ABS(PBOSON(2)-1.0D0).GT.EPS) THEN
-            IF(IBHPRN.GE.1) THEN
-               print *,'WARNING PROBABILITIES DO NOT SUM TO ONE'
-               print *,'RENORMALISING'
-            ENDIF
-            DO I=1,3
-               PFERM(I) = PFERM(I)/PBOSON(2)
-            ENDDO
-            PBOSON(1) = PBOSON(1)/PBOSON(2)
-            PQUARK = PQUARK/PBOSON(2)
-            PLEPT  = PLEPT /PBOSON(2)
-            PNEUT  = PNEUT /PBOSON(2)
-            PGLUON = PGLUON/PBOSON(2)
-            PGAMMA = PGAMMA/PBOSON(2)
-            PBOSON(2) = 1.0D0
-         ENDIF
-         FIRST = .FALSE.
-      ENDIF
-C--Assume decay product is a fermion
-      STAT=-1
-      SPIN=1
-C--Choose decay product
-      PTYPE=CHRGEN(2)
-C--Change STAT to 1 and SPIN to 2 if we have a boson instead
-      IF (PTYPE.GE.PFERM(3)) THEN 
-         STAT=1
-         SPIN=2
-      ENDIF
-C--Choose particle type
-      IF (PTYPE.LT.PFERM(1)) THEN
-C--Quarks
-         PT=1+INT(5*PTYPE/PFERM(1))
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PFERM(2)) THEN
-C--Leptons
-         PT=11+2*INT(3*(PTYPE-PFERM(1))/PLEPT)
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PFERM(3)) THEN
-C--Neutrinos
-         PT=12+2*INT(3*(PTYPE-PFERM(2))/PNEUT)
-         IF(CHRGEN(4).LT.0.5D0) PT = -PT
-      ELSEIF (PTYPE.LT.PBOSON(1)) THEN
-C--Gluons
-         PT=21
-      ELSE
-C--Photons
-         PT=22
-      ENDIF
-C--Calculate new charge of BH
-      BHCHRG=BHCHRG-CHFCHG(PT)
-      END
-CDECK  ID>, CHHBH2.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :   Chris Harris
-C---------------------------------------------------------------------
-      SUBROUTINE CHHBH2(PT,STAT,SPIN,BHCHRG)
-C---------------------------------------------------------------------
-C     Subroutine to select the type of the next particle
-C---------------------------------------------------------------------
-      IMPLICIT NONE
-#include "Charybdis_i/charybdis1003.inc"
-      INTEGER PT,STAT,SPIN,BHCHRG,CHFCHG,I
-      DOUBLE PRECISION PTYPE,CHRGEN,EPS
-      LOGICAL FIRST
-      DATA FIRST/.TRUE./
-      EXTERNAL CHRGEN,CHFCHG
-      PARAMETER(EPS=1.0D-6)
-C--initialisation on first call
-      IF(FIRST) THEN
-         PFERM (1) = PQUARK
-         PFERM (2) = PFERM(1)+PLEPT
-         PFERM (3) = PFERM(2)+PNEUT
-         PBOSON(1) = PFERM(3)+PGLUON
-         PBOSON(2) = PBOSON(1)+PWBOSN
-         PBOSON(3) = PBOSON(2)+PZBOSN
-         PBOSON(4) = PBOSON(3)+PGAMMA
-C--check the sum
-         IF(ABS(PBOSON(4)-1.0D0).GT.EPS) THEN
-            IF(IBHPRN.GE.1) THEN
-               print *,'WARNING PROBABILITIES DO NOT SUM TO ONE'
-               print *,'RENORMALISING'
-            ENDIF
-            DO I=1,3
-               PFERM(I) = PFERM(I)/PBOSON(4)
-               PBOSON(I) = PBOSON(I)/PBOSON(4)
-            ENDDO
-            PQUARK = PQUARK/PBOSON(4)
-            PLEPT  = PLEPT /PBOSON(4)
-            PNEUT  = PNEUT /PBOSON(4)
-            PGLUON = PGLUON/PBOSON(4)
-            PGAMMA = PGAMMA/PBOSON(4)
-            PZBOSN = PZBOSN/PBOSON(4)
-            PWBOSN = PWBOSN/PBOSON(4)
-            PBOSON(4) = 1.0D0
-         ENDIF
-         FIRST = .FALSE.
-      ENDIF
-C--Assume decay product is a fermion
-      STAT=-1
-      SPIN=1
-C--Choose decay product
-      PTYPE=CHRGEN(2)
-C--Change STAT to 1 and SPIN to 2 if we have a boson instead
-C--except for one degree of freedom of massive gauge bosons
-      IF (PTYPE.GE.PFERM(3)) THEN 
-         STAT=1
-         SPIN=2
-         IF ((PTYPE.GE.PBOSON(1)).AND.(PTYPE.LT.PBOSON(3))) THEN
-            IF (3*CHRGEN(3).LT.1.0d0) SPIN=0
-         ENDIF
-      ENDIF
-C--Choose particle type
-      IF (PTYPE.LT.PFERM(1)) THEN
-C--Quarks
-         PT=1+INT(6*PTYPE/PFERM(1))
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PFERM(2)) THEN
-C--Leptons
-         PT=11+2*INT(3*(PTYPE-PFERM(1))/PLEPT)
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PFERM(3)) THEN
-C--Neutrinos
-         PT=12+2*INT(3*(PTYPE-PFERM(2))/PNEUT)
-         IF(CHRGEN(4).LT.0.5D0) PT = -PT
-      ELSEIF (PTYPE.LT.PBOSON(1)) THEN
-C--Gluons
-         PT=21
-      ELSEIF (PTYPE.LT.PBOSON(2)) THEN
-C--W+/W-
-         PT=24
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PBOSON(3)) THEN
-C--Z0
-         PT=23
-      ELSE
-C--Photons
-         PT=22
-      ENDIF
-C--Calculate new charge of BH
-      BHCHRG=BHCHRG-CHFCHG(PT)
-      END
-CDECK  ID>, CHHBH3.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :   Chris Harris
-C---------------------------------------------------------------------
-      SUBROUTINE CHHBH3(PT,STAT,SPIN,BHCHRG)
-C---------------------------------------------------------------------
-C     Subroutine to select the type of the next particle
-C---------------------------------------------------------------------
-      IMPLICIT NONE
-#include "Charybdis_i/charybdis1003.inc"
-      INTEGER PT,STAT,SPIN,BHCHRG,CHFCHG,I
-      DOUBLE PRECISION PTYPE,CHRGEN,EPS
-      LOGICAL FIRST
-      DATA FIRST/.TRUE./
-      EXTERNAL CHRGEN,CHFCHG
-      PARAMETER(EPS=1.0D-6)
-C--initialisation on first call
-      IF(FIRST) THEN
-         PFERM (1) = PQUARK
-         PFERM (2) = PFERM(1)+PLEPT
-         PFERM (3) = PFERM(2)+PNEUT
-         PBOSON(1) = PFERM(3)+PGLUON
-         PBOSON(2) = PBOSON(1)+PWBOSN
-         PBOSON(3) = PBOSON(2)+PZBOSN
-         PBOSON(4) = PBOSON(3)+PHIGGS
-         PBOSON(5) = PBOSON(4)+PGAMMA
-C--check the sum
-         IF(ABS(PBOSON(5)-1.0D0).GT.EPS) THEN
-            IF(IBHPRN.GE.1) THEN
-               print *,'WARNING PROBABILITIES DO NOT SUM TO ONE'
-               print *,'RENORMALISING'
-            ENDIF
-            DO I=1,3
-               PFERM(I) = PFERM(I)/PBOSON(5)
-               PBOSON(I) = PBOSON(I)/PBOSON(5)
-            ENDDO
-            PBOSON(4) = PBOSON(4)/PBOSON(5)
-            PQUARK = PQUARK/PBOSON(5)
-            PLEPT  = PLEPT /PBOSON(5)
-            PNEUT  = PNEUT /PBOSON(5)
-            PGLUON = PGLUON/PBOSON(5)
-            PGAMMA = PGAMMA/PBOSON(5)
-            PZBOSN = PZBOSN/PBOSON(5)
-            PWBOSN = PWBOSN/PBOSON(5)
-            PHIGGS = PHIGGS/PBOSON(5)
-            PBOSON(5) = 1.0D0
-         ENDIF
-         FIRST = .FALSE.
-      ENDIF
-C--Assume decay product is a fermion
-      STAT=-1
-      SPIN=1
-C--Choose decay product
-      PTYPE=CHRGEN(2)
-C--Change STAT to 1 and SPIN to 2 if we have a boson instead
-C--except for one degree of freedom of massive gauge bosons
-      IF (PTYPE.GE.PFERM(3)) THEN
-         STAT=1
-         SPIN=2
-         IF ((PTYPE.GE.PBOSON(1)).AND.(PTYPE.LT.PBOSON(3))) THEN
-            IF (3*CHRGEN(3).LT.1.0d0) SPIN=0
-         ENDIF
-      ENDIF
-C--Choose particle type
-      IF (PTYPE.LT.PFERM(1)) THEN
-C--Quarks
-         PT=1+INT(6*PTYPE/PFERM(1))
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PFERM(2)) THEN
-C--Leptons
-         PT=11+2*INT(3*(PTYPE-PFERM(1))/PLEPT)
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PFERM(3)) THEN
-C--Neutrinos
-         PT=12+2*INT(3*(PTYPE-PFERM(2))/PNEUT)
-         IF(CHRGEN(4).LT.0.5D0) PT = -PT
-      ELSEIF (PTYPE.LT.PBOSON(1)) THEN
-C--Gluons
-         PT=21
-      ELSEIF (PTYPE.LT.PBOSON(2)) THEN
-C--W+/W-
-         PT=24
-C--Ensure BH charge remains close to 0, and antiparticles half time
-         IF (((CHFCHG(PT)*BHCHRG).LT.0).OR.
-     &       ((BHCHRG.EQ.0).AND.(CHRGEN(4).LT.0.5D0))) THEN 
-            PT=-PT
-         ENDIF
-      ELSEIF (PTYPE.LT.PBOSON(3)) THEN
-C--Z0
-         PT=23
-      ELSEIF (PTYPE.LT.PBOSON(4)) THEN
-C--Higgs
-         PT=25
-         SPIN=0
-      ELSE
-C--Photons
-         PT=22
-      ENDIF
-C--Calculate new charge of BH
-      BHCHRG=BHCHRG-CHFCHG(PT)
-      END
-CDECK  ID>, CHPDF.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Peter Richardson
-C----------------------------------------------------------------------
-      SUBROUTINE CHPDF(XXMINB,XLMINB,EMSCAB,XXB,DISFB)
-C----------------------------------------------------------------------
-C     Subroutine to calculate the pdfs
-C     generator dependent
-C----------------------------------------------------------------------
-#include "HERWIG65.INC"
-      DOUBLE PRECISION EMSCAB,XXB(2),DISFB(13,2),XXMINB,XLMINB,
-     &     CHRUNI,UPV,DNV,USEA,DSEA,STR,CHM,BTM,TOP,GLU
-      INTEGER IDB(2),I,J
-      CHARACTER *8 DUMMY
-      DOUBLE PRECISION VALUE(20)
-      CHARACTER*20 PARM(20)
-      LOGICAL FIRST
-      EXTERNAL CHRUNI
-      DATA VALUE/20*0D0/,PARM/20*' '/
-      DATA FIRST/.TRUE./
-C--Les Houches run common block
-#include "GeneratorFortranCommon/heprup.inc"
-C--use generator internal pdfs
-      IF(PDFGUP(1).LT.0) THEN
-C---SET UP INITIAL STATE
-         CALL HWUIDT(1,IDBMUP(1),IDB(1),DUMMY)
-         PART1=DUMMY
-         CALL HWUIDT(1,IDBMUP(2),IDB(2),DUMMY)
-         PART2=DUMMY
-         IPART1 = IDB(1)
-         IPART2 = IDB(2)
-         NHEP=1
-         ISTHEP(NHEP)=101
-         PHEP(1,NHEP)=0.0D0
-         PHEP(2,NHEP)=0.0D0
-         PHEP(3,NHEP)=EBMUP(1)
-         PHEP(4,NHEP)=EBMUP(1)
-         PHEP(5,NHEP)=RMASS(IDB(1))
-         JMOHEP(1,NHEP)=0
-         JMOHEP(2,NHEP)=0
-         JDAHEP(1,NHEP)=0
-         JDAHEP(2,NHEP)=0
-         IDHW(NHEP)=IPART1
-         IDHEP(NHEP)=IDPDG(IDB(1))
-         NHEP=NHEP+1
-         ISTHEP(NHEP)=102
-         PHEP(1,NHEP)=0.0D0
-         PHEP(2,NHEP)=0.0D0
-         PHEP(3,NHEP)=-EBMUP(2)
-         PHEP(4,NHEP)=EBMUP(2)
-         PHEP(5,NHEP)=RMASS(IDB(2))
-         JMOHEP(1,NHEP)=0
-         JMOHEP(2,NHEP)=0
-         JDAHEP(1,NHEP)=0
-         JDAHEP(2,NHEP)=0
-         IDHW(NHEP)=IPART2
-         IDHEP(NHEP)=IDPDG(IPART2)
-C---NEXT ENTRY IS OVERALL CM FRAME
-         NHEP=NHEP+1
-         IDHW(NHEP)=14
-         IDHEP(NHEP)=0
-         ISTHEP(NHEP)=103
-         JMOHEP(1,NHEP)=NHEP-2
-         JMOHEP(2,NHEP)=NHEP-1
-         JDAHEP(1,NHEP)=0
-         JDAHEP(2,NHEP)=0
-         CALL CHVSUM(4,PHEP(1,NHEP-1),PHEP(1,NHEP-2),PHEP(1,NHEP))
-         CALL CHUMAS(PHEP(1,NHEP))
-         XLMIN = XLMINB
-         EMSCA = EMSCAB
-         XXMIN = XXMINB
-         CALL HWSGEN(.TRUE.)
-         DO I=1,2
-            XXB(I) = XX(I)
-            DO J=1,13
-               DISFB(J,I) = DISF(J,I)
-            ENDDO
-         ENDDO
-      ELSE
-C--initialisation
-         IF(FIRST) THEN
-            IF(PDFGUP(1).NE.PDFGUP(2).OR.PDFSUP(1).NE.PDFSUP(2)) THEN
-               print *,'MUST HAVE SAME PDF FOR BOTH BEAMS'
-               STOP
-            ENDIF
-            PARM(1)='NPTYPE'
-            VALUE(1)=1
-            PARM(2)='NGROUP'
-            VALUE(2)=PDFGUP(1)
-            PARM(3)='NSET'
-            VALUE(3)=PDFSUP(1)
-            CALL PDFSET(PARM,VALUE)
-            FIRST = .FALSE.
-         ENDIF
-         XXB(1)=EXP(CHRUNI(0,0.0D0,XLMINB))
-         XXB(2)=XXMINB/XXB(1)
-         DO I=1,2
-            CALL STRUCTM(XXB(I),EMSCAB,
-     &           UPV,DNV,USEA,DSEA,STR,CHM,BTM,TOP,GLU)
-            DISFB( 3,I) = STR
-            DISFB( 4,I) = CHM
-            DISFB( 5,I) = BTM
-            DISFB( 6,I) = TOP
-            DISFB( 9,I) = STR
-            DISFB(10,I) = CHM
-            DISFB(11,I) = BTM
-            DISFB(12,I) = TOP
-            DISFB(13,I) = GLU
-            IF(IDBMUP(I).GT.0) THEN
-               DISFB(1,I) = DNV+DSEA
-               DISFB(2,I) = UPV+USEA
-               DISFB(7,I) = DSEA
-               DISFB(8,I) = USEA
-            ELSE
-               DISFB(1,I) = DSEA
-               DISFB(2,I) = USEA
-               DISFB(7,I) = DNV+DSEA
-               DISFB(8,I) = UPV+USEA
-            ENDIF
-         ENDDO
-      ENDIF
-      END
-CDECK  ID>, CHRAZM.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHRAZM(PT,PX,PY)
-C-----------------------------------------------------------------------
-C     RANDOMLY ROTATED 2-VECTOR (PX,PY) OF LENGTH PT
-C     (taken from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRGEN,PT,PX,PY,C,S,CS,QT,ONE,ZERO
-      PARAMETER(ONE=1.0D0, ZERO=0.0D0)
-      EXTERNAL CHRGEN
-   10 C=2.0D0*CHRGEN(1)-1.0D0
-      S=2.0D0*CHRGEN(2)-1.0D0
-      CS=C*C+S*S
-      IF (CS.GT.ONE .OR. CS.EQ.ZERO) GOTO 10
-      QT=PT/CS
-      PX=(C*C-S*S)*QT
-      PY=2.0D0*C*S*QT
-      END
-CDECK  ID>, CHRGEN.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Peter Richardson
-C-----------------------------------------------------------------------
-      FUNCTION CHRGEN(I)
-C-----------------------------------------------------------------------
-C     random number generator (just calls HERWIG or PYTHIA one)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRGEN
-      INTEGER I
-C--use HERWIG random number generator
-      DOUBLE PRECISION HWRGEN
-      EXTERNAL HWRGEN
-      CHRGEN = HWRGEN(I)
-      END
-CDECK  ID>, CHRLOG.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      FUNCTION CHRLOG(A)
-C-----------------------------------------------------------------------
-C     Returns .TRUE. with probability A
-C     (taken from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHRGEN,A,R
-      LOGICAL CHRLOG
-      EXTERNAL CHRGEN
-      CHRLOG=.TRUE.
-      R=CHRGEN(0)
-      IF(R.GT.A) CHRLOG=.FALSE.
-      END
-CDECK  ID>, CHRUNI.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      FUNCTION CHRUNI(I,A,B)
-C-----------------------------------------------------------------------
-C     Uniform random random number in range [A,B]
-C     (taken from HERWIG)
-C-----------------------------------------------------------------------
-      DOUBLE PRECISION CHRUNI,CHRGEN,A,B,RN
-      INTEGER I
-      EXTERNAL CHRGEN
-      RN=CHRGEN(I)
-      CHRUNI=A+RN*(B-A)
-      END
-CDECK  ID>, CHUBHS.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :   Chris Harris
-C---------------------------------------------------------------------
-      SUBROUTINE CHUBHS(ENERGY,STAT,SPIN)
-C---------------------------------------------------------------------
-C     Calculates energy spectrum for a black hole of given radius
-C---------------------------------------------------------------------
-      IMPLICIT NONE
-#include "Charybdis_i/charybdis1003.inc"
-      DOUBLE PRECISION ENERGY,SPCMAX,SPCVAL,RADHOR,HWKTMP,ETRAT
-      DOUBLE PRECISION MXARRY(6,3),CHRGEN,CHRUNI,CHUTAB
-      DOUBLE PRECISION FLUX(200,6,3),ETVALS(200,6)
-      INTEGER NARRAY(6),STAT,SPIN,POINTS,I
-      EXTERNAL CHRGEN,CHRUNI,CHUTAB
-      DOUBLE PRECISION ONE,TWO,THREE,ZERO,PIFAC,HALF
-      PARAMETER(ONE=1.0D0,TWO=2.0D0,THREE=3.0D0,ZERO=0.0D0,HALF=0.5D0)
-      DATA NARRAY /151,121,131,141,119,151/
-      DATA MXARRY /0.021d0,0.032d0,0.045d0,0.061d0,0.081d0,0.11d0,
-     &     0.017d0,0.026d0,0.036d0,0.045d0,0.056d0,0.068d0,
-     &     0.017d0,0.033d0,0.053d0,0.076d0,0.11d0,0.13d0/
-      DATA (ETVALS(I,1),I=1,151) /0.00837758, 0.0837758, 0.167552, 
-     &0.251327, 0.335103, 0.418879, 0.502655, 0.586431, 0.670206, 
-     &0.753982, 0.837758, 0.921534,  1.00531,  1.08909,  1.17286,  
-     &1.25664,  1.34041,  1.42419,  1.50796,  1.59174,  1.67552,  
-     &1.75929,  1.84307,  1.92684,  2.01062,   2.0944,  2.17817,  
-     &2.26195,  2.34572,   2.4295,  2.51327,  2.59705,  2.68083,   
-     &2.7646,  2.84838,  2.93215,  3.01593,   3.0997,  3.18348,  
-     &3.26726,  3.35103,  3.43481,  3.51858,  3.60236,  3.68614,  
-     &3.76991,  3.85369,  3.93746,  4.02124,  4.10501,  4.18879,  
-     &4.27257,  4.35634,  4.44012,  4.52389,  4.60767,  4.69145,  
-     &4.77522,    4.859,  4.94277,  5.02655,  5.11032,   5.1941,  
-     &5.27788,  5.36165,  5.44543,   5.5292,  5.61298,  5.69675,  
-     &5.78053,  5.86431,  5.94808,  6.03186,  6.11563,  6.19941,  
-     &6.28319,  6.36696,  6.45074,  6.53451,  6.61829,  6.70206,  
-     &6.78584,  6.86962,  6.95339,  7.03717,  7.12094,  7.20472,  
-     &7.28849,  7.37227,  7.45605,  7.53982,   7.6236,  7.70737,  
-     &7.79115,  7.87493,   7.9587,  8.04248,  8.12625,  8.21003,   
-     &8.2938,  8.37758,  8.46136,  8.54513,  8.62891,  8.71268,  
-     &8.79646,  8.88024,  8.96401,  9.04779,  9.13156,  9.21534,  
-     &9.29911,  9.38289,  9.46667,  9.55044,  9.63422,  9.71799,  
-     &9.80177,  9.88554,  9.96932,  10.0531,  10.1369,  10.2206,  
-     &10.3044,  10.3882,   10.472,  10.5558,  10.6395,  10.7233,  
-     &10.8071,  10.8909,  10.9746,  11.0584,  11.1422,   11.226,  
-     &11.3097,  11.3935,  11.4773,  11.5611,  11.6448,  11.7286,  
-     &11.8124,  11.8962,  11.9799,  12.0637,  12.1475,  12.2313,   
-     &12.315,  12.3988,  12.4826,  12.5664/
-      DATA (FLUX(I,1,1),I=1,151) /0.000302416, 0.00291566, 0.00558027, 
-     &0.00800197, 0.0101859, 0.0121371, 0.0138614, 0.015365, 0.0166554, 
-     &0.0177408, 0.0186311, 0.0193371, 0.0198712, 0.0202464, 0.0204769, 
-     &0.0205776, 0.0205633, 0.0204495, 0.0202512, 0.0199826, 0.0196575, 
-     &0.0192887, 0.0188876, 0.0184644, 0.018028, 0.017586, 0.0171441, 
-     &0.0167072, 0.0162784, 0.0158598, 0.0154524, 0.0150562, 0.0146703, 
-     &0.0142933, 0.0139233, 0.0135581, 0.0131954, 0.0128329, 0.0124687, 
-     &0.012101, 0.0117287, 0.0113511, 0.0109679, 0.0105796, 0.010187, 
-     &0.0097913, 0.00939432, 0.00899787, 0.00860399, 0.00821478, 
-     &0.00783223, 0.00745829, 0.00709462, 0.00674274, 0.00640377, 
-     &0.00607866, 0.005768, 0.00547213, 0.00519109, 0.00492474, 
-     &0.00467268, 0.00443436, 0.0042091, 0.0039961, 0.00379453, 
-     &0.0036035, 0.00342213, 0.00324959, 0.00308509, 0.00292792, 
-     &0.00277747, 0.00263322, 0.00249476, 0.00236175, 0.00223397, 
-     &0.00211127, 0.00199352, 0.0018807, 0.00177276, 0.00166969, 
-     &0.0015715, 0.00147816, 0.00138963, 0.00130586, 0.00122677, 
-     &0.00115224, 0.00108214, 0.00101631, 0.000954559, 0.000896698, 
-     &0.000842512, 0.000791779, 0.000744269, 0.000699762, 0.000658029, 
-     &0.000618861, 0.000582052, 0.000547413, 0.000514771, 0.000483972, 
-     &0.000454876, 0.000427365, 0.000401333, 0.000376696, 0.000353375, 
-     &0.000332, 0.000310443, 0.00029073, 0.000272125, 0.000254591, 
-     &0.000238088, 0.000222578, 0.000208022, 0.000194382, 0.000181617, 
-     &0.000169684, 0.0001588, 0.000148148, 0.000138454, 0.0001295,
-     &0.000121, 0.000113152, 0.000105834, 9.90067e-05, 9.26315e-05, 
-     &8.66729e-05, 8.10985e-05, 7.5878e-05, 7.0984e-05, 6.63922e-05, 
-     &6.20809e-05, 5.80306e-05, 5.42246e-05, 5.06479e-05, 4.72874e-05, 
-     &4.41314e-05, 4.11692e-05, 3.83912e-05, 3.57884e-05, 3.33521e-05, 
-     &3.10742e-05, 2.89466e-05, 2.69615e-05, 2.51111e-05, 2.33879e-05, 
-     &2.17842e-05, 2.02926e-05, 1.8906e-05, 1.76171e-05, 1.64192e-05,
-     &1.52e-05/
-      DATA (FLUX(I,1,2),I=1,151) /9.9924e-07, 9.62357e-05, 0.000370872, 
-     &0.000803897, 0.00137345, 0.0020564, 0.00283305, 0.00368963, 
-     &0.00461454, 0.00559229, 0.00660209, 0.00762302, 0.00864035, 
-     &0.00964574, 0.0106307, 0.0115808, 0.0124765, 0.0133006, 0.014044, 
-     &0.0147037, 0.0152769, 0.0157563, 0.0161325, 0.0164003, 0.0165624, 
-     &0.0166267, 0.0166009, 0.0164899, 0.0162981, 0.0160326, 0.0157045, 
-     &0.0153266, 0.0149102, 0.0144638, 0.0139948, 0.0135109, 0.0130204, 
-     &0.0125304, 0.0120465, 0.0115724, 0.0111114, 0.0106658, 0.0102376, 
-     &0.00982739, 0.00943497, 0.00905983, 0.00870158, 0.00835955, 
-     &0.0080324, 0.00771795, 0.00741412, 0.00711948, 0.00683327, 
-     &0.00655479, 0.00628292, 0.0060163, 0.00575402, 0.00549595, 
-     &0.00524262, 0.00499461, 0.00475223, 0.00451558, 0.00428494, 
-     &0.00406101, 0.00384461, 0.00363646, 0.00343697, 0.00324628, 
-     &0.00306453, 0.00289183, 0.00272826, 0.00257377, 0.00242813, 
-     &0.00229105, 0.00216213, 0.00204095, 0.00192704, 0.00181987, 
-     &0.00171899, 0.00162396, 0.00153434, 0.00144968, 0.0013695, 
-     &0.00129338, 0.00122102, 0.0011522, 0.00108673, 0.0010244, 
-     &0.000964981, 0.000908321, 0.00085433, 0.000802968, 0.000754197, 
-     &0.000707961, 0.000664175, 0.000622759, 0.000583662, 0.000546835, 
-     &0.000512222, 0.00047975, 0.000449325, 0.000420846, 0.00039421, 
-     &0.000369318, 0.000346067, 0.000324354, 0.000304076, 0.000285131, 
-     &0.000267413, 0.000250822, 0.000235264, 0.000220659, 0.000206942, 
-     &0.000194046, 0.000181911, 0.000170475, 0.00015969, 0.000149516, 
-     &0.000139925, 0.00013089, 0.000122383, 0.000114375, 0.000106842, 
-     &9.97618e-05, 9.31189e-05, 8.68953e-05, 8.10729e-05, 7.56304e-05, 
-     &7.05476e-05, 6.5805e-05, 6.13842e-05, 5.72669e-05, 5.3435e-05, 
-     &4.98696e-05, 4.65523e-05, 4.34649e-05, 4.05893e-05, 3.79096e-05, 
-     &3.54108e-05, 3.30793e-05, 3.09023e-05, 2.88673e-05, 2.69624e-05, 
-     &2.51775e-05, 2.35042e-05, 2.19355e-05, 2.04652e-05, 1.90868e-05, 
-     &1.77945e-05, 1.6583e-05, 1.54479e-05/
-      DATA (FLUX(I,1,3),I=1,151) /2.36467e-09, 2.27485e-06, 1.74831e-05,
-     &5.67478e-05, 0.000129498, 0.00024372, 0.000406154, 0.000622444, 
-     &0.000897231, 0.00123422, 0.00163621, 0.00210503, 0.00264154, 
-     &0.00324549, 0.00391542, 0.00464852, 0.00544043, 0.00628508, 
-     &0.00717462, 0.00809913, 0.00904674, 0.0100036, 0.010954, 
-     &0.0118809, 0.0127664, 0.0135921, 0.0143404, 0.014995, 0.015542, 
-     &0.0159706, 0.0162738, 0.0164486, 0.0164966, 0.0164228, 0.016236, 
-     &0.0159478, 0.0155716, 0.015122, 0.0146141, 0.0140622, 0.0134802, 
-     &0.0128807, 0.0122745, 0.011671, 0.011078, 0.0105017, 0.00994673, 
-     &0.00941661, 0.00891352, 0.00843877, 0.00799277, 0.00757527, 
-     &0.00718537, 0.00682182, 0.00648292, 0.00616677, 0.00587134, 
-     &0.00559445, 0.00533398, 0.00508784, 0.0048541, 0.00463095, 
-     &0.00441687, 0.00421054, 0.00401094, 0.00381727, 0.00362905, 
-     &0.00344597, 0.00326794, 0.003095, 0.00292736, 0.00276523, 
-     &0.0026089, 0.00245866, 0.00231475, 0.0021774, 0.00204674, 
-     &0.00192284, 0.00180574, 0.00169536, 0.00159159, 0.00149424, 
-     &0.0014031, 0.00131786, 0.00123824, 0.00116391, 0.00109451, 
-     &0.00102969, 0.000969093, 0.000912375, 0.000859198, 0.000809247, 
-     &0.000762232, 0.00071789, 0.000675986, 0.000636318, 0.000598712, 
-     &0.000563024, 0.000529139, 0.000496956, 0.000466402, 0.000437415, 
-     &0.000409939, 0.000383934, 0.000359358, 0.000336172, 0.000314336, 
-     &0.00029381, 0.000274549, 0.000256505, 0.000239628, 0.000223864, 
-     &0.000209157, 0.000195449, 0.00018268, 0.000170793, 0.000159724, 
-     &0.000149417, 0.000139815, 0.000130862, 0.000122505, 0.000114698, 
-     &0.000107393, 0.000100551, 9.41333e-05, 8.81074e-05, 8.24435e-05, 
-     &7.7117e-05, 7.21049e-05, 6.73879e-05, 6.29497e-05, 5.87753e-05, 
-     &5.48516e-05, 5.11669e-05, 4.77097e-05, 4.44701e-05, 4.14379e-05, 
-     &3.86033e-05, 3.59566e-05, 3.34882e-05, 3.11885e-05, 2.9048e-05, 
-     &2.70572e-05, 2.52068e-05, 2.34873e-05, 2.189e-05, 2.0406e-05, 
-     &1.90271e-05, 1.7745e-05, 1.65523e-05, 1.54419e-05/      
-      DATA (ETVALS(I,2),I=1,121) /0.00628319, 0.0628319, 0.125664, 
-     &0.188496, 0.251327, 0.314159, 0.376991, 0.439823, 0.502655, 
-     &0.565487, 0.628319,  0.69115, 0.753982, 0.816814, 0.879646, 
-     &0.942478,  1.00531,  1.06814,  1.13097,  1.19381,  1.25664,  
-     &1.31947,   1.3823,  1.44513,  1.50796,   1.5708,  1.63363,  
-     &1.69646,  1.75929,  1.82212,  1.88496,  1.94779,  2.01062,  
-     &2.07345,  2.13628,  2.19911,  2.26195,  2.32478,  2.38761,  
-     &2.45044,  2.51327,  2.57611,  2.63894,  2.70177,   2.7646,  
-     &2.82743,  2.89027,   2.9531,  3.01593,  3.07876,  3.14159,  
-     &3.20442,  3.26726,  3.33009,  3.39292,  3.45575,  3.51858,  
-     &3.58142,  3.64425,  3.70708,  3.76991,  3.83274,  3.89557,  
-     &3.95841,  4.02124,  4.08407,   4.1469,  4.20973,  4.27257,   
-     &4.3354,  4.39823,  4.46106,  4.52389,  4.58673,  4.64956,  
-     &4.71239,  4.77522,  4.83805,  4.90088,  4.96372,  5.02655,  
-     &5.08938,  5.15221,  5.21504,  5.27788,  5.34071,  5.40354,  
-     &5.46637,   5.5292,  5.59203,  5.65487,   5.7177,  5.78053,  
-     &5.84336,  5.90619,  5.96903,  6.03186,  6.09469,  6.15752,  
-     &6.22035,  6.28319,  6.59734,   6.9115,  7.22566,  7.53982,  
-     &7.85398,  8.16814,   8.4823,  8.79646,  9.11062,  9.42478,  
-     &9.73894,  10.0531,  10.3673,  10.6814,  10.9956,  11.3097,  
-     &11.6239,  11.9381,  12.2522,  12.5664/
-      DATA (FLUX(I,2,1),I=1,121) /0.000404009, 0.00392351, 0.00758112, 
-     &0.0109642, 0.0140671, 0.0168871, 0.019425, 0.0216845, 0.0236723, 
-     &0.0253982, 0.0268742, 0.0281145, 0.0291353, 0.0299539, 0.0305884, 
-     &0.0310576, 0.0313803, 0.0315749, 0.0316592, 0.0316499, 0.0315629, 
-     &0.0314126, 0.0312118, 0.0309721, 0.0307032, 0.0304133, 0.0301092, 
-     &0.0297962, 0.0294781, 0.0291573, 0.0288354, 0.0285125, 0.0281883, 
-     &0.0278615, 0.0275302, 0.0271924, 0.0268457, 0.0264877, 0.0261159, 
-     &0.0257285, 0.0253236,   0.0249, 0.0244569, 0.0239942, 0.0235121, 
-     &0.0230115, 0.0224938, 0.0219609, 0.0214148, 0.0208582, 0.0202936, 
-     &0.0197239, 0.019152, 0.0185805, 0.0180121, 0.0174493, 0.0168942, 
-     &0.0163489, 0.0158149, 0.0152936, 0.0147861, 0.014293, 0.0138149, 
-     &0.0133518, 0.0129037, 0.0124703, 0.0120513, 0.0116459, 0.0112534, 
-     &0.0108733, 0.0105045, 0.0101465, 0.00979838, 0.00945948, 
-     &0.0091292, 0.00880703, 0.0084925, 0.00818535, 0.0078853, 
-     &0.00759225, 0.00730615, 0.00702705, 0.006755, 0.00649014, 
-     &0.00623262, 0.00598259, 0.00574022, 0.00550565, 0.00527895, 
-     &0.00506023, 0.00484951, 0.00464678, 0.00445198, 0.00426498, 
-     &0.00408567, 0.00391383, 0.00374925, 0.00359166, 0.00344078, 
-     &0.00329631, 0.00315796, 0.0025469, 0.00204557, 0.00163075, 
-     &0.0012906, 0.00101732, 0.000801626, 0.000632102, 0.00049774, 
-     &0.000390215, 0.000304261, 0.000236379, 0.000183518, 0.000142612, 
-     &0.000110818, 8.5892e-05, 6.62998e-05, 5.10081e-05, 3.92052e-05, 
-     &3.01586e-05, 2.32131e-05/
-      DATA (FLUX(I,2,2),I=1,121) /1.26e-06, 0.000122431, 0.000476022,  
-     &0.00104, 0.00178939, 0.00269598, 0.003735, 0.00488878, 0.00614213,
-     &0.00747465, 0.0088588, 0.0102671, 0.0116812, 0.0130912, 0.0144878,
-     &0.0158537, 0.0171651, 0.018402, 0.0195553, 0.0206245, 0.0216077, 
-     &0.0224957, 0.0232756, 0.0239401, 0.0244915, 0.0249384, 0.0252869, 
-     &0.0255375, 0.0256892, 0.0257458, 0.0257172, 0.0256153, 0.0254495, 
-     &0.0252251, 0.0249472, 0.0246228, 0.0242616, 0.0238724, 0.0234616, 
-     &0.0230335, 0.0225927, 0.0221441, 0.0216922, 0.0212403, 0.0207899, 
-     &0.0203422, 0.0198992, 0.0194625, 0.0190324, 0.0186078, 0.0181871, 
-     &0.0177698, 0.0173567, 0.016948, 0.0165423, 0.0161373, 0.0157316, 
-     &0.0153252, 0.0149193, 0.0145143, 0.0141098, 0.0137047, 0.0132989, 
-     &0.0128937, 0.0124907, 0.0120913, 0.011696, 0.0113049, 0.0109185, 
-     &0.0105384, 0.0101659, 0.00980213, 0.00944741, 0.00910205, 
-     &0.00876643, 0.00844109, 0.00812641, 0.00782259, 0.00752948, 
-     &0.007247, 0.00697494, 0.00671296, 0.0064607, 0.0062176, 
-     &0.00598332, 0.00575754, 0.00553982, 0.00532963, 0.00512633, 
-     &0.00492941, 0.00473864, 0.00455387, 0.00437493, 0.00420146, 
-     &0.00403308, 0.00386959, 0.00371103, 0.00355747, 0.00340894, 
-     &0.00326531, 0.00312645, 0.0025038, 0.00199701, 0.00159259, 
-     &0.00127038, 0.0010106, 0.000799155, 0.000627867, 0.000491358, 
-     &0.000384293, 0.000300776, 0.000235218, 0.000183312, 0.000142194, 
-     &0.000109933, 8.49344e-05, 6.56842e-05, 5.08066e-05, 3.92136e-05, 
-     &3.01523e-05, 2.31118e-05/
-      DATA (FLUX(I,2,3),I=1,121) /3.71013e-09, 3.60137e-06, 2.79421e-05,
-     &9.15076e-05, 0.000210575, 0.000399441, 0.000670605, 0.0010349, 
-     &0.00150158, 0.00207833, 0.00277124, 0.00358477, 0.00452156, 
-     &0.00558228, 0.00676548, 0.00806727, 0.00948115, 0.0109977, 
-     &0.0126046, 0.0142862, 0.0160239, 0.017796, 0.0195783, 0.0213443, 
-     &0.0230663, 0.024716, 0.0262659,  0.02769, 0.0289652, 0.0300722, 
-     &0.0309962, 0.0317278, 0.0322628, 0.0326024, 0.0327526, 0.0327237, 
-     &0.0325297, 0.0321871, 0.0317142,  0.03113, 0.0304537, 0.0297042, 
-     &0.028899, 0.0280543, 0.027185, 0.0263039, 0.0254221, 0.0245488, 
-     &0.0236917, 0.0228568, 0.0220487, 0.0212707, 0.0205247, 0.0198119, 
-     &0.0191324, 0.0184857, 0.0178703, 0.0172848, 0.016727, 0.0161945, 
-     &0.0156848, 0.0151952, 0.0147233, 0.0142665, 0.0138225, 0.0133894, 
-     &0.0129653, 0.0125488, 0.0121387, 0.0117343, 0.0113352, 0.010941, 
-     &0.010552, 0.0101684, 0.00979058, 0.00941927, 0.0090551, 
-     &0.00869877, 0.00835099, 0.00801245, 0.0076837, 0.00736531, 
-     &0.00705769, 0.00676116, 0.00647592, 0.00620205, 0.00593957, 
-     &0.00568833, 0.00544816, 0.00521873, 0.00499969, 0.00479062, 
-     &0.00459105, 0.0044005, 0.00421842, 0.00404429, 0.00387761, 
-     &0.00371786, 0.00356457, 0.00341728, 0.00327558, 0.00263989, 
-     &0.00210751, 0.00166763, 0.00131391, 0.00103573, 0.000818073, 
-     &0.000645765, 0.000507411, 0.000396169, 0.000307892, 0.000239034, 
-     &0.000185837, 0.000144605, 0.000112303, 8.68411e-05, 6.68717e-05, 
-     &5.14003e-05, 3.95356e-05, 3.04482e-05, 2.3439e-05/
-      DATA (ETVALS(I,3),I=1,131) /0.00502655, 0.0502655, 0.100531, 
-     &0.150796, 0.201062, 0.251327, 0.301593, 0.351858, 0.402124, 
-     &0.452389, 0.502655,  0.55292, 0.603186, 0.653451, 0.703717, 
-     &0.753982, 0.804248, 0.854513, 0.904779, 0.955044,  1.00531,  
-     &1.05558,  1.10584,  1.15611,  1.20637,  1.25664,   1.3069,  
-     &1.35717,  1.40743,   1.4577,  1.50796,  1.55823,   1.6085,  
-     &1.65876,  1.70903,  1.75929,  1.80956,  1.85982,  1.91009,  
-     &1.96035,  2.01062,  2.06088,  2.11115,  2.16142,  2.21168,  
-     &2.26195,  2.31221,  2.36248,  2.41274,  2.46301,  2.51327,  
-     &2.56354,  2.61381,  2.66407,  2.71434,   2.7646,  2.81487,  
-     &2.86513,   2.9154,  2.96566,  3.01593,  3.06619,  3.11646,  
-     &3.16673,  3.21699,  3.26726,  3.31752,  3.36779,  3.41805,  
-     &3.46832,  3.51858,  3.56885,  3.61911,  3.66938,  3.71965,  
-     &3.76991,  3.82018,  3.87044,  3.92071,  3.97097,  4.02124,   
-     &4.0715,  4.12177,  4.17204,   4.2223,  4.27257,  4.32283,   
-     &4.3731,  4.42336,  4.47363,  4.52389,  4.57416,  4.62442,  
-     &4.67469,  4.72496,  4.77522,  4.82549,  4.87575,  4.92602,  
-     &4.97628,  5.02655,  5.27788,   5.5292,  5.78053,  6.03186,  
-     &6.28319,  6.53451,  6.78584,  7.03717,  7.28849,  7.53982,  
-     &7.79115,  8.04248,   8.2938,  8.54513,  8.79646,  9.04779,  
-     &9.29911,  9.55044,  9.80177,  10.0531,  10.3044,  10.5558,  
-     &10.8071,  11.0584,  11.3097,  11.5611,  11.8124,  12.0637,   
-     &12.315,  12.5664/
-      DATA (FLUX(I,3,1),I=1,131) /0.000505327, 0.0049346, 0.00959093, 
-     &0.0139491, 0.0179937, 0.0217143, 0.0251057, 0.0281676, 0.0309046, 
-     &0.0333259, 0.0354444, 0.0372764, 0.038841, 0.0401591, 0.0412527, 
-     &0.0421447, 0.0428579, 0.0434145, 0.0438363, 0.0441431, 0.044354, 
-     &0.0444859, 0.0445537, 0.0445708, 0.0445487, 0.0444965, 0.0444215,
-     &0.04433, 0.0442256, 0.0441111, 0.0439875, 0.0438552, 0.0437129, 
-     &0.043559, 0.043391, 0.0432061, 0.0430015, 0.042774, 0.0425203, 
-     &0.0422381, 0.0419248, 0.0415786, 0.0411982, 0.0407828, 0.0403324, 
-     &0.0398476, 0.0393294, 0.0387796, 0.0382003, 0.0375943, 0.0369644, 
-     &0.0363139, 0.0356461, 0.0349645, 0.0342726, 0.0335736, 0.0328707, 
-     &0.0321668, 0.0314647, 0.0307669, 0.0300755, 0.0293922, 0.0287185, 
-     &0.0280556, 0.0274042, 0.0267649, 0.026138, 0.0255234, 0.024921, 
-     &0.0243305, 0.0237512, 0.0231829, 0.0226246, 0.0220758, 0.0215358, 
-     &0.021004, 0.0204799, 0.019963, 0.0194529, 0.0189494, 0.0184521, 
-     &0.0179612, 0.0174766, 0.0169985, 0.0165271, 0.0160627, 0.0156055, 
-     &0.0151559, 0.0147145, 0.0142814, 0.013857, 0.0134419, 0.0130361, 
-     &0.0126401, 0.012254, 0.0118779, 0.011512, 0.0111562, 0.0108106, 
-     &0.010475, 0.0101493, 0.00866104, 0.00737802, 0.00626206, 
-     &0.00528708, 0.00444089, 0.00371704, 0.00310645, 0.00259473, 
-     &0.00216484, 0.00180149, 0.00149375, 0.00123447, 0.00101818, 
-     &0.000839256, 0.00069163, 0.000569436, 0.000467843, 0.000383349, 
-     &0.000313423, 0.000255983, 0.000209043, 0.00017069, 0.000139245, 
-     &0.000113386, 9.21391e-05, 7.47678e-05, 6.06441e-05, 4.91935e-05, 
-     &3.98982e-05, 3.23278e-05/
-      DATA (FLUX(I,3,2),I=1,131) /1.44805e-06, 0.000141467, 0.00055311, 
-     &0.00121462, 0.00209962, 0.00317696, 0.00441866, 0.00580455, 
-     &0.00731715, 0.00893248, 0.0106181, 0.0123416, 0.0140814, 0.015827,
-     &0.0175681, 0.0192849, 0.0209504, 0.0225421, 0.024051, 0.0254782, 
-     &0.0268224, 0.0280734, 0.0292158, 0.0302412, 0.0311526,  0.03196, 
-     &0.032669, 0.0332779, 0.0337827, 0.0341856, 0.0344962, 0.0347265, 
-     &0.0348843, 0.0349723, 0.0349925, 0.0349516, 0.0348587, 0.0347233, 
-     &0.0345502, 0.0343425, 0.0341041, 0.0338403, 0.033557, 0.0332574, 
-     &0.0329433, 0.0326158, 0.0322779, 0.0319328, 0.0315816, 0.0312234, 
-     &0.0308568, 0.0304819, 0.0301012, 0.0297154, 0.0293238, 0.0289232, 
-     &0.0285119, 0.0280904, 0.027661, 0.0272247, 0.0267802, 0.0263253, 
-     &0.0258593, 0.0253843, 0.0249027, 0.0244162, 0.0239244, 0.0234269, 
-     &0.0229242, 0.0224188, 0.0219133, 0.0214091, 0.0209067, 0.0204063, 
-     &0.0199091, 0.0194168, 0.0189307, 0.0184522, 0.0179811, 0.017518, 
-     &0.0170634, 0.0166178, 0.0161817, 0.0157549, 0.0153376, 0.0149296, 
-     &0.0145312, 0.0141418, 0.0137611, 0.0133886, 0.013024, 0.0126676, 
-     &0.012319, 0.0119777, 0.011643, 0.0113145, 0.0109922, 0.0106765, 
-     &0.0103672, 0.010064, 0.00976629, 0.00836625, 0.00711991, 
-     &0.00603413, 0.00510372, 0.00431049, 0.00363159, 0.00304777, 
-     &0.00254654, 0.00212009, 0.0017616, 0.00146279, 0.00121399, 
-     &0.0010058, 0.000830862, 0.00068412, 0.000561979, 0.000461173, 
-     &0.000378353, 0.000310252, 0.000254053, 0.000207585, 0.000169256, 
-     &0.000137826, 0.000112199, 9.13435e-05, 7.43267e-05, 6.03912e-05, 
-     &4.89718e-05, 3.96479e-05, 3.20759e-05/
-      DATA (FLUX(I,3,3),I=1,131) /5.0498e-09, 4.92905e-06, 3.84715e-05, 
-     &0.000126715, 0.00029321, 0.000559154, 0.000943548, 0.00146328, 
-     &0.00213315, 0.00296582, 0.00397172, 0.00515891, 0.00653277, 
-     &0.00809581, 0.00984729, 0.0117829, 0.0138944, 0.0161692, 
-     &0.0185905, 0.0211371, 0.0237826, 0.0264973, 0.0292472, 0.0319957, 
-     &0.0347041, 0.0373332, 0.0398443, 0.0422007, 0.0443696, 0.0463222, 
-     &0.0480361, 0.0494951, 0.0506894, 0.0516166,  0.05228, 0.0526887, 
-     &0.0528572, 0.0528034, 0.0525478, 0.0521132, 0.0515233, 0.0508015, 
-     &0.0499707, 0.0490532, 0.0480688, 0.0470364, 0.0459726, 0.0448917, 
-     &0.0438063, 0.0427271, 0.0416623, 0.0406194, 0.0396032, 0.0386175, 
-     &0.0376649, 0.0367467, 0.035863, 0.0350132, 0.0341959, 0.0334092, 
-     &0.0326506, 0.0319176, 0.0312069, 0.0305158, 0.0298411, 0.0291798, 
-     &0.0285297, 0.0278879, 0.0272524, 0.0266217, 0.0259942, 0.0253692, 
-     &0.024746, 0.0241244, 0.0235045, 0.022887, 0.0222723, 0.0216615, 
-     &0.0210554, 0.0204554, 0.0198626, 0.019278, 0.018703, 0.0181386, 
-     &0.0175858, 0.0170454, 0.0165183, 0.0160049, 0.0155058, 0.0150213, 
-     &0.0145514, 0.0140963, 0.0136557, 0.0132296, 0.0128175, 0.012419, 
-     &0.0120336, 0.0116609, 0.0113001, 0.0109506, 0.010612, 0.00905965,
-     &0.0077, 0.00650119, 0.00545587, 0.00456275, 0.00381295, 
-     &0.00318752, 0.00266297, 0.00221879, 0.00184112, 0.00152188, 
-     &0.00125524, 0.00103485, 0.000853342, 0.000703293, 0.000578464, 
-     &0.000474399, 0.000388042, 0.000316975, 0.000258894, 0.000211499,
-     &0.000172685, 0.000140756, 0.000114472, 9.29277e-05, 7.53814e-05, 
-     &6.11556e-05, 4.96218e-05, 4.02384e-05, 3.258e-05/
-      DATA (ETVALS(I,4),I=1,141) /0.00418879, 0.0418879, 0.0837758, 
-     &0.125664, 0.167552,  0.20944, 0.251327, 0.293215, 0.335103, 
-     &0.376991, 0.418879, 0.460767, 0.502655, 0.544543, 0.586431, 
-     &0.628319, 0.670206, 0.712094, 0.753982,  0.79587, 0.837758, 
-     &0.879646, 0.921534, 0.963422,  1.00531,   1.0472,  1.08909,  
-     &1.13097,  1.17286,  1.21475,  1.25664,  1.29852,  1.34041,   
-     &1.3823,  1.42419,  1.46608,  1.50796,  1.54985,  1.59174,  
-     &1.63363,  1.67552,   1.7174,  1.75929,  1.80118,  1.84307,  
-     &1.88496,  1.92684,  1.96873,  2.01062,  2.05251,   2.0944,  
-     &2.13628,  2.17817,  2.22006,  2.26195,  2.30383,  2.34572,  
-     &2.38761,   2.4295,  2.47139,  2.51327,  2.55516,  2.59705,  
-     &2.63894,  2.68083,  2.72271,   2.7646,  2.80649,  2.84838,  
-     &2.89027,  2.93215,  2.97404,  3.01593,  3.05782,   3.0997,  
-     &3.14159,  3.18348,  3.22537,  3.26726,  3.30914,  3.35103,  
-     &3.39292,  3.43481,   3.4767,  3.51858,  3.56047,  3.60236,  
-     &3.64425,  3.68614,  3.72802,  3.76991,   3.8118,  3.85369,  
-     &3.89557,  3.93746,  3.97935,  4.02124,  4.06313,  4.10501,   
-     &4.1469,  4.18879,  4.39823,  4.60767,  4.81711,  5.02655,  
-     &5.23599,  5.44543,  5.65487,  5.86431,  6.07375,  6.28319,  
-     &6.49262,  6.70206,   6.9115,  7.12094,  7.33038,  7.53982,  
-     &7.74926,   7.9587,  8.16814,  8.37758,  8.58702,  8.79646,   
-     &9.0059,  9.21534,  9.42478,  9.63422,  9.84366,  10.0531,  
-     &10.2625,   10.472,  10.6814,  10.8909,  11.1003,  11.3097,  
-     &11.5192,  11.7286,  11.9381,  12.1475,  12.3569,  12.5664/
-      DATA (FLUX(I,4,1),I=1,141) /0.000606647, 0.00594603, 0.0116033, 
-     &0.016942, 0.0219381, 0.0265737, 0.0308375, 0.0347254, 0.0382389, 
-     &0.0413862, 0.0441804, 0.0466395, 0.0487846, 0.0506398, 0.0522308, 
-     &0.0535844, 0.0547275, 0.0556864, 0.0564866, 0.057152, 0.0577045, 
-     &0.0581642, 0.0585486, 0.0588735, 0.0591516, 0.0593938, 0.0596084, 
-     &0.0598017, 0.0599782, 0.0601405, 0.0602892, 0.0604241, 0.0605434, 
-     &0.0606449, 0.0607249, 0.0607799, 0.0608058, 0.0607984, 0.0607539, 
-     &0.0606688, 0.0605397, 0.060364, 0.0601398, 0.0598657, 0.0595413, 
-     &0.0591669, 0.0587431, 0.0582717, 0.057755, 0.0571957, 0.0565971, 
-     &0.0559623, 0.0552955, 0.0546007, 0.0538817, 0.0531424, 0.052387, 
-     &0.0516188, 0.0508418, 0.0500589, 0.049273, 0.0484868, 0.0477025, 
-     &0.0469218, 0.0461463, 0.0453773, 0.0446153, 0.0438612, 0.0431151, 
-     &0.0423769, 0.0416466, 0.040924, 0.0402085, 0.0394994, 0.0387965, 
-     &0.0380988, 0.0374063, 0.0367179, 0.0360334, 0.0353527, 0.0346753, 
-     &0.0340011, 0.0333301, 0.0326625, 0.0319982, 0.031338, 0.030682, 
-     &0.0300307, 0.0293846, 0.0287446, 0.0281108, 0.0274843, 0.0268655, 
-     &0.0262549, 0.0256533, 0.0250609, 0.0244783, 0.023906, 0.0233442, 
-     &0.0227931, 0.0222527, 0.0197156, 0.0174381, 0.0153863, 0.0135276, 
-     &0.0118437, 0.0103304, 0.00898649, 0.00780568, 0.00677302, 
-     &0.00586881, 0.00507424, 0.00437536, 0.00376301, 0.00323036, 
-     &0.0027702, 0.00237405, 0.00203276, 0.00173797, 0.00148308, 
-     &0.00126318, 0.00107444, 0.000913232, 0.000775886, 0.000658809, 
-     &0.0005588, 0.000473283, 0.000400276, 0.000338187, 0.000285581, 
-     &0.000241095, 0.000203455, 0.000171549, 0.00014448, 0.000121544, 
-     &0.000102169, 8.58513e-05, 7.21281e-05, 6.058e-05, 5.0847e-05, 
-     &4.2637e-05/
-      DATA (FLUX(I,4,2),I=1,141) /1.58875e-06, 0.000155777, 0.000611358,
-     &0.00134723, 0.0023364, 0.00354585, 0.00494547, 0.00651345, 
-     &0.00823075, 0.0100709, 0.0119976, 0.013975, 0.0159792, 0.0179987, 
-     &0.0200228,  0.02203, 0.0239905, 0.0258797, 0.027689, 0.0294203, 
-     &0.0310734, 0.0326368, 0.0340936, 0.0354346, 0.0366637, 0.0377918, 
-     &0.0388251, 0.0397602, 0.0405913, 0.0413194, 0.0419549,  0.04251, 
-     &0.0429916, 0.0434002, 0.0437363, 0.0440055, 0.0442177, 0.0443814, 
-     &0.0445006, 0.0445768, 0.0446126, 0.0446138, 0.0445866, 0.0445339, 
-     &0.0444561, 0.0443542, 0.0442311, 0.0440908, 0.043935, 0.0437623, 
-     &0.0435705, 0.0433601, 0.043134, 0.0428947, 0.0426409, 0.0423686, 
-     &0.0420758, 0.0417632, 0.0414342, 0.0410905, 0.0407298, 0.0403491, 
-     &0.0399471, 0.0395261, 0.0390897, 0.0386397, 0.0381749, 0.0376934, 
-     &0.0371956, 0.0366852, 0.0361651, 0.0356373, 0.0351016, 0.0345574, 
-     &0.0340063, 0.033451, 0.0328941, 0.0323369, 0.0317793, 0.0312216, 
-     &0.0306655, 0.0301121, 0.0295629, 0.029018, 0.0284776, 0.0279423, 
-     &0.0274126, 0.026889, 0.0263711, 0.025859, 0.0253526, 0.0248524, 
-     &0.0243586, 0.0238707, 0.0233881, 0.0229102, 0.0224376, 0.0219708, 
-     &0.0215097, 0.0210537, 0.0206023,  0.01842, 0.0163737, 0.014485, 
-     &0.0127713, 0.0112347, 0.00986244, 0.00863503, 0.00753484, 
-     &0.00655095, 0.0056776, 0.00491003, 0.00424072, 0.00365878, 
-     &0.00315218, 0.00271025, 0.00232498, 0.00199046, 0.00170169, 
-     &0.00145362, 0.00124088, 0.00105822, 0.00090105, 0.000765812, 
-     &0.000649816, 0.000550817, 0.000466651, 0.000395186, 0.00033444, 
-     &0.000282732, 0.00023872, 0.000201334, 0.000169683, 0.000142962, 
-     &0.000120422, 0.000101383, 8.52738e-05, 7.16414e-05, 6.01294e-05, 
-     &5.04382e-05, 4.22984e-05/
-      DATA (FLUX(I,4,3),I=1,141) /6.3726e-09, 6.24338e-06, 4.89273e-05, 
-     &0.000161789, 0.000375805, 0.000719346, 0.00121828, 0.001896, 
-     &0.00277341, 0.00386878, 0.00519756, 0.00677209, 0.00860124,  
-     &0.01069, 0.0130391, 0.0156443, 0.0184961, 0.0215794, 0.024873, 
-     &0.0283496, 0.0319762, 0.0357137, 0.0395186, 0.0433433, 0.0471377, 
-     &0.0508503, 0.0544308, 0.0578313, 0.0610079, 0.0639223, 0.0665436, 
-     &0.0688485, 0.0708218, 0.0724567, 0.0737543, 0.0747229, 0.0753767, 
-     &0.0757352, 0.0758217, 0.0756625, 0.075285, 0.0747175, 0.0739879, 
-     &0.0731235, 0.0721494, 0.0710899, 0.069966, 0.0687977, 0.0676016, 
-     &0.0663924, 0.0651828, 0.0639829, 0.0628008, 0.0616432, 0.0605145, 
-     &0.0594179, 0.0583553, 0.0573268, 0.0563321, 0.0553697, 0.0544376, 
-     &0.0535328, 0.0526524, 0.0517929, 0.0509508, 0.0501227, 0.0493051, 
-     &0.0484947, 0.0476888, 0.0468848, 0.0460805, 0.0452743, 0.0444649, 
-     &0.0436515, 0.042834, 0.042012, 0.0411865, 0.0403581, 0.0395277, 
-     &0.0386968, 0.0378669, 0.0370395, 0.0362164, 0.035399, 0.0345891, 
-     &0.0337884, 0.0329982, 0.0322198, 0.0314545, 0.0307031, 0.0299666, 
-     &0.0292456, 0.0285406, 0.0278519, 0.0271795, 0.0265236, 0.0258838, 
-     &0.0252599, 0.0246516, 0.0240583, 0.0234793, 0.0207791, 0.0183468, 
-     &0.0161285, 0.0141068, 0.0122877, 0.0106782, 0.00927219, 
-     &0.00804831, 0.00697838, 0.00603684, 0.00520644, 0.00447737, 
-     &0.00384297, 0.0032956, 0.00282521, 0.00242045, 0.00207078, 
-     &0.00176801, 0.00150635, 0.00128146, 0.00108933, 0.000925749, 
-     &0.000786426, 0.00066745, 0.000565638, 0.000478595, 0.000404457, 
-     &0.000341594, 0.000288443, 0.000243503, 0.000205427, 0.000173112, 
-     &0.000145696, 0.000122502, 0.000102951, 8.65082e-05, 7.26804e-05, 
-     &6.10319e-05, 5.12045e-05, 4.29157e-05/
-      DATA (ETVALS(I,5),I=1,119) /0.00359039, 0.0359039, 0.0718078, 
-     &0.107712, 0.143616,  0.17952, 0.215423, 0.251327, 0.287231, 
-     &0.323135, 0.359039, 0.394943, 0.430847, 0.466751, 0.502655, 
-     &0.538559, 0.574463, 0.610367,  0.64627, 0.682174, 0.718078, 
-     &0.753982, 0.789886,  0.82579, 0.861694, 0.897598, 0.933502, 
-     &0.969406,  1.00531,  1.04121,  1.07712,  1.11302,  1.14893,  
-     &1.18483,  1.22073,  1.25664,  1.29254,  1.32844,  1.36435,  
-     &1.40025,  1.43616,  1.47206,  1.50796,  1.54387,  1.57977,  
-     &1.61568,  1.65158,  1.68748,  1.72339,  1.75929,   1.7952,   
-     &1.8311,    1.867,  1.90291,  1.93881,  1.97472,  2.01062,  
-     &2.04652,  2.08243,  2.11833,  2.15423,  2.33375,  2.51327,  
-     &2.69279,  2.87231,  3.05183,  3.23135,  3.41087,  3.59039,  
-     &3.76991,  3.94943,  4.12895,  4.30847,  4.48799,  4.66751,  
-     &4.84703,  5.02655,  5.20607,  5.38559,  5.56511,  5.74463,  
-     &5.92415,  6.10367,  6.28319,   6.4627,  6.64222,  6.82174,  
-     &7.00126,  7.18078,   7.3603,  7.53982,  7.71934,  7.89886,  
-     &8.07838,   8.2579,  8.43742,  8.61694,  8.79646,  8.97598,   
-     &9.1555,  9.33502,  9.51454,  9.69406,  9.87358,  10.0531,  
-     &10.2326,  10.4121,  10.5917,  10.7712,  10.9507,  11.1302,  
-     &11.3097,  11.4893,  11.6688,  11.8483,  12.0278,  12.2073,  
-     &12.3869,  12.5664/
-      DATA (FLUX(I,5,1),I=1,119) /0.000707742, 0.00696306, 0.013622, 
-     &0.0199438, 0.0258963, 0.0314543, 0.0366008, 0.0413272, 0.0456326, 
-     &0.0495235, 0.0530132, 0.0561204, 0.0588688, 0.061285, 0.0633984, 
-     &0.0652395, 0.0668391, 0.0682279, 0.0694351, 0.0704883, 0.0714134, 
-     &0.0722334, 0.0729684, 0.0736363, 0.0742525, 0.0748286, 0.0753746, 
-     &0.0758971, 0.0764006, 0.0768889, 0.0773613, 0.0778171, 0.0782538, 
-     &0.0786693, 0.0790574, 0.0794139, 0.0797338, 0.0800119, 0.0802432, 
-     &0.0804228, 0.0805463, 0.0806106, 0.0806132, 0.0805515, 0.0804249, 
-     &0.080233, 0.0799768, 0.0796578, 0.0792777, 0.0788402, 0.0783479, 
-     &0.0778052, 0.0772162, 0.0765849, 0.0759168, 0.0752153, 0.074486, 
-     &0.0737326, 0.0729594,  0.07217, 0.0713688, 0.0672747, 0.0631895, 
-     &0.0591664, 0.0551559, 0.0511155, 0.0470694, 0.0431013, 0.0393084, 
-     &0.0357573, 0.0324669, 0.0294194, 0.0266, 0.0239432, 0.0215, 
-     &0.0192369, 0.0171849, 0.0153311, 0.0136605, 0.012153, 0.0107899, 
-     &0.00955817, 0.00844947, 0.00745744, 0.00657441, 0.0057905, 
-     &0.00509428, 0.00447488, 0.00392336, 0.00345015, 0.00301986, 
-     &0.00264098, 0.00230825, 0.00201616, 0.00175951, 0.00153379, 
-     &0.00133545, 0.00116159, 0.00100965, 0.000877169, 0.000761744, 
-     &0.000661112, 0.000573298, 0.000496682, 0.000429944, 0.000371949, 
-     &0.000321654, 0.000278075, 0.000240297, 0.000207523, 0.000179083, 
-     &0.000154432, 0.000133102, 0.000114682, 9.87872e-05, 8.5069e-05, 
-     &7.3221e-05, 6.29832e-05, 5.41427e-05/
-      DATA (FLUX(I,5,2),I=1,119) /1.69752e-06, 0.000166876, 0.000656692,
-     &0.00145079, 0.0025219, 0.00383575, 0.00536073, 0.0070739, 
-     &0.00895512, 0.010976, 0.0130975, 0.0152809, 0.0175005, 0.0197445, 
-     &0.0220015, 0.0242486, 0.0264539, 0.0285917, 0.030653, 0.0326409, 
-     &0.0345556, 0.036385, 0.038111, 0.0397236, 0.0412279, 0.0426358, 
-     &0.0439534, 0.0451766, 0.0462981, 0.0473188, 0.0482497, 0.0491032, 
-     &0.0498854, 0.0505955, 0.0512329, 0.0518027, 0.0523152, 0.0527787, 
-     &0.053196, 0.053567, 0.053894, 0.0541827, 0.0544391, 0.0546662, 
-     &0.0548626, 0.0550287, 0.0551678, 0.0552839, 0.0553792, 0.0554513, 
-     &0.0554971, 0.0555166, 0.0555143, 0.0554926, 0.0554502, 0.0553821, 
-     &0.0552856, 0.055162, 0.0550154, 0.0548479, 0.0546569, 0.0532957, 
-     &0.051347, 0.0489391, 0.0462389, 0.0434023, 0.0405365, 0.0376939, 
-     &0.0348892, 0.0321298, 0.0294357, 0.026842, 0.0243855, 0.022091, 
-     &0.0199665, 0.0180056, 0.0161949, 0.0145232, 0.0129848, 0.0115789, 
-     &0.0103044, 0.00915607, 0.00812422, 0.00719702, 0.00636366, 
-     &0.00561573, 0.00494694, 0.0043518, 0.00382449, 0.00335844, 
-     &0.0029466, 0.00258226, 0.00225987, 0.00197508, 0.0017243, 
-     &0.00150417, 0.00131132, 0.00114241, 0.000994366, 0.000864575, 
-     &0.000750893, 0.000651563, 0.00056502, 0.000489769, 0.000424368, 
-     &0.00036749, 0.000318001, 0.000274961, 0.000237584, 0.000205188, 
-     &0.000177153, 0.000152904, 0.000131918, 0.000113742, 9.79971e-05, 
-     &8.43751e-05, 7.26128e-05, 6.24714e-05, 5.3733e-05/
-      DATA (FLUX(I,5,3),I=1,119) /7.67881e-09, 7.54357e-06, 5.92886e-05,
-     &0.000196611, 0.00045797, 0.000879024, 0.0014927, 0.00232918, 
-     &0.00341578, 0.00477676, 0.00643302, 0.00840168, 0.0106956, 
-     &0.0133228, 0.0162858, 0.0195811, 0.0231985, 0.0271202, 0.0313215, 
-     &0.0357694, 0.0404231, 0.0452356, 0.0501528, 0.0551159, 0.0600627,
-     &0.06493, 0.0696545, 0.0741767, 0.0784408, 0.082399, 0.086011, 
-     &0.0892462, 0.0920832, 0.0945115, 0.0965297, 0.0981441, 0.0993701, 
-     &0.100229, 0.100746,  0.10095, 0.100875, 0.100552, 0.100014, 
-     &0.0992936, 0.0984218, 0.097427, 0.0963357, 0.0951719, 0.093957, 
-     &0.0927098, 0.0914464, 0.0901803, 0.0889224, 0.0876818, 0.0864652, 
-     &0.0852772, 0.0841213, 0.0829988,  0.08191, 0.0808538, 0.0798285, 
-     &0.0750509, 0.0705011, 0.0657913, 0.0608118, 0.0557087, 0.0507283, 
-     &0.0460694, 0.0418151, 0.0379423, 0.0343766, 0.0310499, 0.0279327, 
-     &0.025033, 0.0223728, 0.0199657, 0.0178044, 0.0158648, 0.0141164, 
-     &0.0125338, 0.0111013, 0.00981121, 0.00865793, 0.00763366, 
-     &0.00672658, 0.00592251, 0.00520797, 0.00457206, 0.00400705, 
-     &0.00350824, 0.0030683, 0.00268218, 0.00234346, 0.00204591, 
-     &0.00178415, 0.00155392, 0.0013519, 0.00117523, 0.00102119, 
-     &0.000887018, 0.000770095, 0.000668061, 0.000578992, 0.000501331, 
-     &0.000433784, 0.000375185, 0.000324413, 0.000280419, 0.000242259, 
-     &0.000209136, 0.000180402, 0.00015552, 0.000134018, 0.000115463, 
-     &9.9454e-05, 8.56321e-05, 7.36885e-05, 6.33696e-05, 5.44653e-05/
-      DATA (ETVALS(I,6),I=1,151) /0.00314159, 0.0314159, 0.0628319, 
-     &0.0942478, 0.125664,  0.15708, 0.188496, 0.219911, 0.251327, 
-     &0.282743, 0.314159, 0.345575, 0.376991, 0.408407, 0.439823, 
-     &0.471239, 0.502655, 0.534071, 0.565487, 0.596903, 0.628319, 
-     &0.659734,  0.69115, 0.722566, 0.753982, 0.785398, 0.816814,  
-     &0.84823, 0.879646, 0.911062, 0.942478, 0.973894,  1.00531,  
-     &1.03673,  1.06814,  1.09956,  1.13097,  1.16239,  1.19381,  
-     &1.22522,  1.25664,  1.28805,  1.31947,  1.35088,   1.3823,  
-     &1.41372,  1.44513,  1.47655,  1.50796,  1.53938,   1.5708,  
-     &1.60221,  1.63363,  1.66504,  1.69646,  1.72788,  1.75929,  
-     &1.79071,  1.82212,  1.85354,  1.88496,  1.91637,  1.94779,   
-     &1.9792,  2.01062,  2.04204,  2.07345,  2.10487,  2.13628,   
-     &2.1677,  2.19911,  2.23053,  2.26195,  2.29336,  2.32478,  
-     &2.35619,  2.38761,  2.41903,  2.45044,  2.48186,  2.51327,  
-     &2.54469,  2.57611,  2.60752,  2.63894,  2.67035,  2.70177,  
-     &2.73319,   2.7646,  2.79602,  2.82743,  2.85885,  2.89027,  
-     &2.92168,   2.9531,  2.98451,  3.01593,  3.04734,  3.07876,  
-     &3.11018,  3.14159,  3.29867,  3.45575,  3.61283,  3.76991,  
-     &3.92699,  4.08407,  4.24115,  4.39823,  4.55531,  4.71239,  
-     &4.86947,  5.02655,  5.18363,  5.34071,  5.49779,  5.65487,  
-     &5.81195,  5.96903,  6.12611,  6.28319,  6.44026,  6.59734,  
-     &6.75442,   6.9115,  7.06858,  7.22566,  7.38274,  7.53982,   
-     &7.6969,  7.85398,  8.01106,  8.16814,  8.32522,   8.4823,  
-     &8.63938,  8.79646,  8.95354,  9.11062,   9.2677,  9.42478,  
-     &9.73894,  10.0531,  10.3673,  10.6814,  10.9956,  11.3097,  
-     &11.6239,  11.9381,  12.2522,  12.5664/
-      DATA (FLUX(I,6,1),I=1,151) /0.000809285, 0.0079693, 0.0156311, 
-     &0.022938, 0.0298497, 0.0363344, 0.0423699, 0.0479426, 0.0530494, 
-     &0.0576952, 0.0618929, 0.0656626, 0.0690295, 0.0720232, 0.0746762, 
-     &0.0770231, 0.0790985, 0.0809368, 0.0825719, 0.0840346, 0.0853549, 
-     &0.0865583, 0.0876687, 0.088706, 0.0896874, 0.0906267, 0.0915347, 
-     &0.0924189, 0.0932841, 0.0941337, 0.0949672, 0.0957836, 0.0965798, 
-     &0.0973506, 0.0980911, 0.0987955, 0.099457, 0.100069, 0.100626,  
-     &0.10112, 0.101549, 0.101906, 0.102188, 0.102393, 0.102519, 
-     &0.102566, 0.102533, 0.102423, 0.102238, 0.101979, 0.101652, 
-     &0.101261, 0.100809, 0.100302, 0.0997452, 0.0991436, 0.0985024, 
-     &0.0978265, 0.0971203, 0.0963888, 0.0956363, 0.094866, 0.0940814, 
-     &0.0932857, 0.092481, 0.0916692, 0.090853, 0.0900324, 0.0892086, 
-     &0.0883826, 0.087554, 0.0867231, 0.0858899, 0.0850532, 0.0842132, 
-     &0.0833692, 0.0825207, 0.0816667, 0.080807, 0.0799407, 0.079068, 
-     &0.0781883, 0.0773019, 0.0764082, 0.0755076, 0.0746006, 0.0736877, 
-     &0.0727694, 0.0718463, 0.0709193, 0.0699895, 0.0690574, 0.068124, 
-     &0.0671912, 0.0662592, 0.065329, 0.0644021, 0.0634791, 0.0625611, 
-     &0.061649, 0.060743, 0.0563301, 0.0521382, 0.0481676, 0.0443965, 
-     &0.0408061, 0.037396,  0.03418, 0.0311759, 0.0283927, 0.0258257, 
-     &0.0234595, 0.0212756, 0.0192593, 0.0174016, 0.0156973, 0.014142, 
-     &0.0127284, 0.0114458, 0.0102822, 0.00922554, 0.00826637, 
-     &0.00739746, 0.00661279, 0.00590658, 0.00527226, 0.00470284, 
-     &0.0041915, 0.00373215, 0.00331982, 0.00295038, 0.0026202, 
-     &0.00232572, 0.00206331, 0.00182949, 0.00162103, 0.0014352, 
-     &0.00126972, 0.00112262, 0.000992099, 0.000876413, 0.000683056, 
-     &0.000531116, 0.000412083, 0.000319294, 0.000247034, 0.000190749, 
-     &0.000147057, 0.00011326, 8.71096e-05, 6.6887e-05/
-      DATA (FLUX(I,6,2),I=1,151) /1.78396e-06, 0.000175716, 0.000692887,
-     &0.00153366, 0.0026707, 0.00406879, 0.00569523, 0.00752629, 
-     &0.00954095, 0.0117094, 0.0139905, 0.0163431, 0.0187403, 0.0211698,
-     &0.02362, 0.0260668, 0.0284768, 0.030823, 0.0330963, 0.035301, 
-     &0.0374375, 0.0394932, 0.0414492, 0.043295, 0.0450364, 0.0466863, 
-     &0.0482513, 0.0497262, 0.051103, 0.0523826, 0.053576, 0.0546968, 
-     &0.0557502, 0.0567343, 0.0576477, 0.0584957, 0.0592887, 0.0600346, 
-     &0.0607356, 0.0613902, 0.0620003, 0.0625719, 0.0631111, 0.0636198, 
-     &0.0640962, 0.0645394, 0.0649529, 0.0653413, 0.0657063, 0.0660451, 
-     &0.0663531, 0.0666306, 0.0668822, 0.0671113, 0.0673159, 0.0674904, 
-     &0.0676309, 0.0677389, 0.0678196, 0.0678756, 0.0679033, 0.0678972, 
-     &0.0678551, 0.0677799, 0.0676778, 0.0675501, 0.0673939, 0.0672048, 
-     &0.066983, 0.066733, 0.0664597, 0.0661647, 0.0658456,   0.0655, 
-     &0.0651299, 0.0647396, 0.064333, 0.0639106, 0.0634715, 0.0630148, 
-     &0.062543, 0.0620595, 0.0615657, 0.0610623, 0.0605486, 0.0600253, 
-     &0.0594937, 0.0589563, 0.0584128, 0.057863, 0.0573069, 0.0567457, 
-     &0.0561806, 0.0556118, 0.0550388, 0.0544604, 0.053878, 0.0532926, 
-     &0.0527051, 0.0521146, 0.0515202, 0.0485068, 0.0454498, 0.0423943, 
-     &0.0393923, 0.036488, 0.0337105, 0.0310715, 0.0285714, 0.0262057, 
-     &0.0239722, 0.0218738, 0.0199158, 0.018101, 0.0164264, 0.0148842, 
-     &0.0134648, 0.0121592, 0.0109605, 0.00986385, 0.00886488, 
-     &0.00795832, 0.00713765, 0.00639526, 0.0057237, 0.00511655, 
-     &0.00456864, 0.00407545, 0.00363267, 0.00323588, 0.0028806, 
-     &0.00256244, 0.00227744, 0.00202224, 0.00179408, 0.00159053, 
-     &0.00140929, 0.00124804, 0.00110459, 0.000976957, 0.000863437, 
-     &0.000673092, 0.000523742, 0.000406926, 0.000315524, 0.000244201, 
-     &0.000188768, 0.000145714, 0.000112263, 8.63566e-05, 6.6358e-05/
-      DATA (FLUX(I,6,3),I=1,151) /8.97104e-09, 8.83026e-06, 6.95537e-05,
-     &0.000231151, 0.000539569, 0.00103781, 0.00176596, 0.00276113, 
-     &0.00405724, 0.0056848, 0.00767043, 0.0100363, 0.0127997, 0.015972,
-     &0.019558, 0.0235552, 0.0279528, 0.0327314, 0.0378621, 0.0433069, 
-     &0.049018, 0.0549392, 0.0610064, 0.0671499, 0.0732951, 0.0793657, 
-     &0.0852866, 0.0909847, 0.0963937, 0.101454, 0.106117, 0.110344, 
-     &0.114107, 0.117392, 0.120194, 0.122518, 0.124381, 0.125804, 
-     &0.126815, 0.127449, 0.127742, 0.127729,  0.12745, 0.126942,  
-     &0.12624, 0.125378, 0.124389, 0.123299, 0.122136, 0.120921, 
-     &0.119676, 0.118415, 0.117153, 0.115902, 0.114669, 0.113462, 
-     &0.112286, 0.111142, 0.110031, 0.108953, 0.107906, 0.106888, 
-     &0.105894, 0.104921, 0.103964, 0.103018, 0.102079, 0.101142, 
-     &0.100203, 0.0992566, 0.0983002, 0.0973301, 0.0963441, 0.0953403, 
-     &0.094317, 0.0932737, 0.0922101, 0.0911269, 0.0900243, 0.0889043, 
-     &0.0877678, 0.0866176, 0.0854555, 0.0842843, 0.0831059, 0.0819233, 
-     &0.0807391, 0.0795555, 0.0783748, 0.0771996, 0.0760317, 0.0748732, 
-     &0.0737254, 0.0725897, 0.0714675, 0.0703598, 0.0692667, 0.0681891, 
-     &0.0671271, 0.0660808, 0.0650502, 0.0601166, 0.0554934, 0.0511039, 
-     &0.0469081, 0.0429128, 0.0391519, 0.0356579, 0.0324431, 0.0294951, 
-     &0.026786, 0.0242869, 0.0219771, 0.0198474, 0.0178946, 0.0161153, 
-     &0.0145015, 0.0130401, 0.0117155, 0.0105126, 0.00942002, 
-     &0.00842961, 0.00753512, 0.00673031, 0.00600798, 0.00536004, 
-     &0.00477832, 0.00425563, 0.00378616, 0.00336528, 0.00298896, 
-     &0.00265334, 0.00235437, 0.00208804, 0.00185062, 0.0016389, 
-     &0.00145026, 0.00128246, 0.00113351, 0.00100149, 0.000884528, 
-     &0.000688981, 0.000535337, 0.00041517, 0.000321595, 0.000248695, 
-     &0.000191937, 0.000147936, 0.000113911, 8.75761e-05, 6.72234e-05/
-      PIFAC = ACOS(-ONE)
-C     Spectrum
-      RADHOR = (RHFACT*BHMASS)**(ONE/(TOTDIM-THREE))
-      HWKTMP = (TOTDIM-THREE)/(4.0D0*PIFAC*RADHOR)
-      IF (HWKTMP.GT.THWMAX) HWKTMP=THWMAX
-      IF(GRYBDY) THEN 
-         SPCMAX=MXARRY(TOTDIM-5,SPIN+1)
-      ELSE
-         IF (STAT.EQ.-1) THEN
-            SPCMAX=HALF*HWKTMP**2
-         ELSE
-            SPCMAX=(TWO/THREE)*HWKTMP**2
-         ENDIF
-      ENDIF
-      POINTS=NARRAY(TOTDIM-5)
-C     MC for energy
- 10   ETRAT=CHRUNI(0,ZERO,ETVALS(POINTS,TOTDIM-5))
-      ENERGY=HWKTMP*ETRAT
-      IF (GRYBDY) THEN 
-          SPCVAL=CHUTAB(FLUX(1,TOTDIM-5,SPIN+1),ETVALS(1,TOTDIM-5),
-     &        POINTS,ETRAT,4)
-      ELSE
-         SPCVAL=(ENERGY**2)/(EXP(ETRAT)-STAT)
-      ENDIF
-      IF (SPCVAL.LT.SPCMAX*CHRGEN(1)) GOTO 10
-      END
-CDECK  ID>, CHULB4.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Adapted by Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHULB4(PS,PI,PF)
-C-----------------------------------------------------------------------
-C     TRANSFORMS PI (GIVEN IN REST FRAME OF PS) INTO PF (IN LAB)
-C     N.B. P(1,2,3,4) = (PX,PY,PZ,E); PS(5)=M
-C     (taken from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION PF4,FN,PS(5),PI(4),PF(4)
-      IF (PS(4).EQ.PS(5)) THEN
-        PF(1)= PI(1)
-        PF(2)= PI(2)
-        PF(3)= PI(3)
-        PF(4)= PI(4)
-      ELSE
-        PF4  = (PI(1)*PS(1)+PI(2)*PS(2)
-     &         +PI(3)*PS(3)+PI(4)*PS(4))/PS(5)
-        FN   = (PF4+PI(4)) / (PS(4)+PS(5))
-        PF(1)= PI(1) + FN*PS(1)
-        PF(2)= PI(2) + FN*PS(2)
-        PF(3)= PI(3) + FN*PS(3)
-        PF(4)= PF4
-      END IF
-      END
-CDECK  ID>, CHULOB.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Adapted by Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHULOB(PS,PI,PF)
-C-----------------------------------------------------------------------
-C     TRANSFORMS PI (GIVEN IN REST FRAME OF PS) INTO PF (IN LAB)
-C     N.B. P(1,2,3,4,5) = (PX,PY,PZ,E,M)
-C     (taken from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION PS(5),PI(5),PF(5)
-      CALL CHULB4(PS,PI,PF)
-      PF(5)= PI(5)
-      END
-CDECK  ID>, CHUMAS.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHUMAS(P)
-C-----------------------------------------------------------------------
-C     PUTS INVARIANT MASS IN 5TH COMPONENT OF VECTOR
-C     (NEGATIVE SIGN IF SPACELIKE) (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHUSQR,P(5)
-      EXTERNAL CHUSQR
-      P(5)=CHUSQR((P(4)+P(3))*(P(4)-P(3))-P(1)**2-P(2)**2)
-      END
-CDECK  ID>, CHUPCM.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      FUNCTION CHUPCM(EM0,EM1,EM2)
-C-----------------------------------------------------------------------
-C     C.M. MOMENTUM FOR DECAY MASSES EM0 -> EM1 + EM2
-C     SET TO -1 BELOW THRESHOLD (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHUPCM,EM0,EM1,EM2,EMS,EMD
-      EMS=ABS(EM1+EM2)
-      EMD=ABS(EM1-EM2)
-      IF (EM0.LT.EMS.OR.EM0.LT.EMD) THEN
-        CHUPCM=-1.0D0
-      ELSEIF (EM0.EQ.EMS.OR.EM0.EQ.EMD) THEN
-        CHUPCM=0.0D0
-      ELSE
-        CHUPCM=SQRT((EM0+EMD)*(EM0-EMD)*
-     &              (EM0+EMS)*(EM0-EMS))*0.5D0/EM0
-      ENDIF
-      END
-CDECK  ID>, CHUROB.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHUROB(R,P,Q)
-C-----------------------------------------------------------------------
-C     ROTATES VECTORS BY INVERSE OF ROTATION MATRIX R 
-C     (taken from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION S1,S2,S3,R(3,3),P(3),Q(3)
-      S1=P(1)*R(1,1)+P(2)*R(2,1)+P(3)*R(3,1)
-      S2=P(1)*R(1,2)+P(2)*R(2,2)+P(3)*R(3,2)
-      S3=P(1)*R(1,3)+P(2)*R(2,3)+P(3)*R(3,3)
-      Q(1)=S1
-      Q(2)=S2
-      Q(3)=S3
-      END
-CDECK  ID>, CHUROT.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHUROT(P,CP,SP,R)
-C-----------------------------------------------------------------------
-C     R IS ROTATION MATRIX TO GET FROM VECTOR P TO Z AXIS, FOLLOWED BY
-C     A ROTATION BY PSI ABOUT Z AXIS, WHERE CP = COS-PSI, SP = SIN-PSI
-C     (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION WN,CP,SP,PTCUT,PP,PT,CT,ST,CF,SF,P(3),R(3,3)
-      DATA WN,PTCUT/1.D0,1.D-20/
-      PT=P(1)**2+P(2)**2
-      PP=P(3)**2+PT
-      IF (PT.LE.PP*PTCUT) THEN
-         CT=SIGN(WN,P(3))
-         ST=0.0D0
-         CF=1.0D0
-         SF=0.0D0
-      ELSE
-         PP=SQRT(PP)
-         PT=SQRT(PT)
-         CT=P(3)/PP
-         ST=PT/PP
-         CF=P(1)/PT
-         SF=P(2)/PT
-      END IF
-      R(1,1)= CP*CF*CT+SP*SF
-      R(1,2)= CP*SF*CT-SP*CF
-      R(1,3)=-CP*ST
-      R(2,1)=-CP*SF+SP*CF*CT
-      R(2,2)= CP*CF+SP*SF*CT
-      R(2,3)=-SP*ST
-      R(3,1)= CF*ST
-      R(3,2)= SF*ST
-      R(3,3)= CT
-      END
-CDECK  ID>, CHUSQR.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      FUNCTION CHUSQR(X)
-C-----------------------------------------------------------------------
-C     SQUARE ROOT WITH SIGN RETENTION (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      DOUBLE PRECISION CHUSQR,X
-      CHUSQR=SIGN(SQRT(ABS(X)),X)
-      END
-CDECK  ID>, CHUTAB.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Adapted by Bryan Webber
-C-----------------------------------------------------------------------
-      FUNCTION CHUTAB(F,A,NN,X,MM)
-C-----------------------------------------------------------------------
-C     MODIFIED CERN INTERPOLATION ROUTINE DIVDIF
-C-----------------------------------------------------------------------
-      IMPLICIT NONE
-      INTEGER NN,MM,MMAX,N,M,MPLUS,IX,IY,MID,NPTS,IP,I,J,L,ISUB
-      DOUBLE PRECISION CHUTAB,SUM,X,F(NN),A(NN),T(20),D(20)
-      LOGICAL EXTRA
-      DATA MMAX/10/
-      N=NN
-      M=MIN(MM,MMAX,N-1)
-      MPLUS=M+1
-      IX=0
-      IY=N+1
-      IF (A(1).GT.A(N)) GOTO 4
-    1 MID=(IX+IY)/2
-      IF (X.GE.A(MID)) GOTO 2
-      IY=MID
-      GOTO 3
-    2 IX=MID
-    3 IF (IY-IX.GT.1) GOTO 1
-      GOTO 7
-    4 MID=(IX+IY)/2
-      IF (X.LE.A(MID)) GOTO 5
-      IY=MID
-      GOTO 6
-    5 IX=MID
-    6 IF (IY-IX.GT.1) GOTO 4
-    7 NPTS=M+2-MOD(M,2)
-      IP=0
-      L=0
-      GOTO 9
-    8 L=-L
-      IF (L.GE.0) L=L+1
-    9 ISUB=IX+L
-      IF ((1.LE.ISUB).AND.(ISUB.LE.N)) GOTO 10
-      NPTS=MPLUS
-      GOTO 11
-   10 IP=IP+1
-      T(IP)=A(ISUB)
-      D(IP)=F(ISUB)
-   11 IF (IP.LT.NPTS) GOTO 8
-      EXTRA=NPTS.NE.MPLUS
-      DO 14 L=1,M
-      IF (.NOT.EXTRA) GOTO 12
-      ISUB=MPLUS-L
-      D(M+2)=(D(M+2)-D(M))/(T(M+2)-T(ISUB))
-   12 I=MPLUS
-      DO 13 J=L,M
-      ISUB=I-L
-      D(I)=(D(I)-D(I-1))/(T(I)-T(ISUB))
-      I=I-1
-   13 CONTINUE
-   14 CONTINUE
-      SUM=D(MPLUS)
-      IF (EXTRA) SUM=0.5D0*(SUM+D(M+2))
-      J=M
-      DO 15 L=1,M
-      SUM=D(J)+(X-T(J))*SUM
-      J=J-1
-   15 CONTINUE
-      CHUTAB=SUM
-      END
-CDECK  ID>, CHVDIF.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHVDIF(N,P,Q,R)
-C-----------------------------------------------------------------------
-C     VECTOR DIFFERENCE (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      DOUBLE PRECISION P(N),Q(N),R(N)
-      INTEGER N,I
-      DO 10 I=1,N
-   10 R(I)=P(I)-Q(I)
-      END
-CDECK  ID>, CHVEQU.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHVEQU(N,P,Q)
-C-----------------------------------------------------------------------
-C     VECTOR EQUALITY (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      DOUBLE PRECISION P(N),Q(N)
-      INTEGER N,I
-      DO 10 I=1,N
-   10 Q(I)=P(I)
-      END
-CDECK  ID>, CHVSUM.
-*CMZ :-        -17/07/03  18.11.30  by  Peter Richardson
-*-- Author :    Bryan Webber
-C-----------------------------------------------------------------------
-      SUBROUTINE CHVSUM(N,P,Q,R)
-C-----------------------------------------------------------------------
-C    VECTOR SUM (extracted from HERWIG)
-C-----------------------------------------------------------------------
-      DOUBLE PRECISION P(N),Q(N),R(N)
-      DO 10 I=1,N
-   10 R(I)=P(I)+Q(I)
-      END
diff --git a/Projects/AthGeneration/package_filters.txt b/Projects/AthGeneration/package_filters.txt
index bf3abe287df1..aebd621cc191 100644
--- a/Projects/AthGeneration/package_filters.txt
+++ b/Projects/AthGeneration/package_filters.txt
@@ -152,7 +152,6 @@
 + Event/xAOD/xAODTruthCnv
 + External/AtlasDataArea
 + External/Pythia8
-+ Generators/Charybdis_i
 - Generators/TrackRecordGenerator
 + Generators/.*
 + InnerDetector/InDetExample/InDetRecExample
-- 
GitLab


From 4289993f1430459516a5f24e8152f08f0dfbc9e9 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Thu, 17 Dec 2020 09:25:24 +0000
Subject: [PATCH 068/308] PileUpEventLoopMgr: remove setProperties call

Calling `setProperties` is deprecated and properties are being set
already in the base class `sysInitialize` method. So there is no need
for this call.
---
 .../AthExHive/src/loopTest/HiveAlgL1.cxx      |  6 +-----
 .../AthenaServices/src/LoggedMessageSvc.cxx   |  7 +------
 .../PileUpComps/src/PileUpEventLoopMgr.cxx    | 16 +--------------
 .../src/McAsciiCnvSvc.cxx                     |  3 +--
 .../src/McAsciiEventSelector.cxx              |  5 +----
 .../McEventSelector/McEventSelector.h         | 12 ++---------
 .../McEventSelector/src/McEventSelector.cxx   | 20 ++-----------------
 .../src/PixelConditionsSummaryTool.cxx        |  2 --
 .../src/SCT_RadDamageSummaryTool.cxx          |  4 +---
 .../InDetOverlay/test/BCMOverlay_test.cxx     |  1 -
 .../InDetOverlay/test/PixelOverlay_test.cxx   |  1 -
 .../InDetOverlay/test/SCTOverlay_test.cxx     |  1 -
 .../InDetOverlay/test/TRTOverlay_test.cxx     |  3 ---
 .../MdtOverlay/test/MdtOverlay_test.cxx       |  3 +--
 .../RpcOverlay/test/RpcOverlay_test.cxx       |  3 +--
 .../TgcOverlay/test/TgcOverlay_test.cxx       |  3 +--
 .../AnalysisTools/src/AANTupleStream.cxx      | 16 ++++-----------
 .../BeamEffects/test/BeamEffectsAlg_test.cxx  |  1 -
 .../test/CollectionMerger_test.cxx            |  1 -
 .../ISF_Algorithms/test/SimKernelMT_test.cxx  |  2 --
 .../ISF_Services/test/InputConverter_test.cxx |  1 -
 .../ISF_Services/test/TruthSvc_test.cxx       |  1 -
 .../src/TrigMonitorToolBase.cxx               |  3 +--
 .../TrigSteer/TrigSteering/src/TrigSteer.cxx  |  2 --
 .../TrigTimeAlgs/src/TrigTimerSvc.cxx         |  5 +----
 25 files changed, 19 insertions(+), 103 deletions(-)

diff --git a/Control/AthenaExamples/AthExHive/src/loopTest/HiveAlgL1.cxx b/Control/AthenaExamples/AthExHive/src/loopTest/HiveAlgL1.cxx
index 922f6d8f5d32..0599d3965aca 100644
--- a/Control/AthenaExamples/AthExHive/src/loopTest/HiveAlgL1.cxx
+++ b/Control/AthenaExamples/AthExHive/src/loopTest/HiveAlgL1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "HiveAlgL1.h"
@@ -18,10 +18,6 @@ HiveAlgL1::~HiveAlgL1() {}
 StatusCode HiveAlgL1::initialize() {
   ATH_MSG_DEBUG("initialize " << name());
 
-  // setProperties();
-
-  // ATH_MSG_INFO("time: " << sleep() );
-
   ATH_CHECK( m_rdh1.initialize() );
   ATH_CHECK( m_wrh1.initialize() );
 
diff --git a/Control/AthenaServices/src/LoggedMessageSvc.cxx b/Control/AthenaServices/src/LoggedMessageSvc.cxx
index 3e2c884f5026..c594411e119b 100644
--- a/Control/AthenaServices/src/LoggedMessageSvc.cxx
+++ b/Control/AthenaServices/src/LoggedMessageSvc.cxx
@@ -1,8 +1,7 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: AthMessageSvc.cpp,v 1.27 2008/10/21 16:25:55 marcocle Exp $
 
 #include "GaudiKernel/Kernel.h"
 #include "GaudiKernel/StatusCode.h"
@@ -124,10 +123,6 @@ StatusCode LoggedMessageSvc::initialize() {
   SmartIF<IMessageSvc> &si = const_cast<SmartIF<IMessageSvc>&> (msgSvc());
   si.reset();
 
-  // Set my own properties
-  sc = setProperties();
-  if (sc.isFailure()) return sc;
-
 #ifdef _WIN32
   m_color = false;
 #endif
diff --git a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx
index 73c04aa2a0a5..d8104ae892a4 100644
--- a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx
+++ b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -122,20 +122,6 @@ PileUpEventLoopMgr::~PileUpEventLoopMgr() {}
 //=========================================================================
 StatusCode PileUpEventLoopMgr::initialize()
 {
-  //-------------------------------------------------------------------------
-  // Process Properties
-  //-------------------------------------------------------------------------
-  try
-    {
-      CHECK(setProperties());
-      // configure our MsgStream
-      m_msg.get().setLevel( m_outputLevel.value() );
-    }
-  catch (...)
-    {
-      ATH_MSG_WARNING ( "Caught exception thrown reading in properties" );
-    }
-
   ATH_MSG_INFO ( "Initializing " << this->name() << " - package version " << PACKAGE_VERSION ) ;
   if(!m_allowSerialAndMPToDiffer)
     {
diff --git a/Generators/McAsciiEventSelector/src/McAsciiCnvSvc.cxx b/Generators/McAsciiEventSelector/src/McAsciiCnvSvc.cxx
index 4d3245aedbb3..1f320b618620 100644
--- a/Generators/McAsciiEventSelector/src/McAsciiCnvSvc.cxx
+++ b/Generators/McAsciiEventSelector/src/McAsciiCnvSvc.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // McAsciiCnvSvc.cxx 
@@ -60,7 +60,6 @@ StatusCode McAsciiCnvSvc::initialize()
 	  << endmsg;
     return StatusCode::FAILURE;
   }
-  setProperties().ignore();
 
   // retrieve tool
   setupCnvTool();
diff --git a/Generators/McAsciiEventSelector/src/McAsciiEventSelector.cxx b/Generators/McAsciiEventSelector/src/McAsciiEventSelector.cxx
index 58c7a5f46c8b..40882516b535 100644
--- a/Generators/McAsciiEventSelector/src/McAsciiEventSelector.cxx
+++ b/Generators/McAsciiEventSelector/src/McAsciiEventSelector.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // McAsciiEventSelector.cxx 
@@ -84,9 +84,6 @@ StatusCode McAsciiEventSelector::initialize()
 {
   ATH_MSG_INFO( "Enter McAsciiEventSelector initialization..." );
 
-  ATH_CHECK( AthService::initialize() );
-  setProperties().ignore();
-
   const std::size_t nbrAsciiFiles = m_asciiFileNames.value().size();
   if ( nbrAsciiFiles <= 0 ) {
     ATH_MSG_ERROR( "You need to give at least 1 input file !!"
diff --git a/Generators/McEventSelector/McEventSelector/McEventSelector.h b/Generators/McEventSelector/McEventSelector/McEventSelector.h
index 3bd969807e33..542d4397aed9 100644
--- a/Generators/McEventSelector/McEventSelector/McEventSelector.h
+++ b/Generators/McEventSelector/McEventSelector/McEventSelector.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //====================================================================
@@ -26,7 +26,6 @@
 #include "GaudiKernel/IEvtSelector.h"
 #include "AthenaBaseComps/AthService.h"
 #include "Gaudi/Property.h"  /*no forward decl: typedef*/
-#include "GaudiKernel/MsgStream.h"
 
 #include "AthenaKernel/IEvtSelectorSeek.h"
 
@@ -35,12 +34,6 @@ class EventSource;
 class ISvcLocator;
 class McContext;
 
-#ifdef WIN32
-// Disable warning C4786: identifier was truncated to '255' characters in the debug information
-#pragma warning ( disable : 4786 )
-#endif
-
-
 //--------------------------------------------------------------------
 // Event Selector 
 //--------------------------------------------------------------------
@@ -52,8 +45,7 @@ public:
 
   virtual StatusCode initialize() override;
   virtual StatusCode stop() override;
-  virtual StatusCode finalize() override;
-  virtual StatusCode queryInterface(const InterfaceID& riid, 
+  virtual StatusCode queryInterface(const InterfaceID& riid,
 				    void** ppvInterface) override;
   virtual StatusCode createContext(Context*& refpCtxt) const override;
 
diff --git a/Generators/McEventSelector/src/McEventSelector.cxx b/Generators/McEventSelector/src/McEventSelector.cxx
index 7c27696c5140..d158fea79c20 100644
--- a/Generators/McEventSelector/src/McEventSelector.cxx
+++ b/Generators/McEventSelector/src/McEventSelector.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //====================================================================
@@ -272,18 +272,7 @@ McEventSelector::createContext(Context*& refpCtxt) const
 
 StatusCode McEventSelector::initialize()     {
   ATH_MSG_INFO (" Enter McEventSelector Initialization ");
-  StatusCode sc = AthService::initialize();
-  msg().setLevel( m_outputLevel.value() );
-  if( sc.isSuccess() ) {
-    setProperties().ignore();
-  } else {
-    ATH_MSG_ERROR ("Unable to initialize service ");
-    return sc;
-  }
-
-  ATH_MSG_DEBUG (" McEventSelector Initialized Properly ... ");
-
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 StatusCode McEventSelector::stop()     {
@@ -301,11 +290,6 @@ StatusCode McEventSelector::stop()     {
   return StatusCode::SUCCESS;
 }
 
-StatusCode McEventSelector::finalize()     {
-  ATH_MSG_INFO ("finalize");
-
-  return StatusCode::SUCCESS;
-}
 
 // IEvtSelector::next
 StatusCode
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx
index 5a31f5d9d9b4..d11364eb6e9e 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelConditionsSummaryTool.cxx
@@ -22,8 +22,6 @@ PixelConditionsSummaryTool::~PixelConditionsSummaryTool(){}
 StatusCode PixelConditionsSummaryTool::initialize(){
   ATH_MSG_DEBUG("PixelConditionsSummaryTool::initialize()");
 
-  ATH_CHECK(setProperties());
-
   ATH_CHECK(m_condDCSStateKey.initialize());
   ATH_CHECK(m_condDCSStatusKey.initialize());
   ATH_CHECK(m_BSErrContReadKey.initialize(SG::AllowEmpty));
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_RadDamageSummaryTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_RadDamageSummaryTool.cxx
index 146f84f61b6d..d83aff93106f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_RadDamageSummaryTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_RadDamageSummaryTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_RadDamageSummaryTool.h"
@@ -16,8 +16,6 @@ SCT_RadDamageSummaryTool::SCT_RadDamageSummaryTool(const std::string& type, cons
 StatusCode SCT_RadDamageSummaryTool::initialize() {
   ATH_MSG_INFO("Initializing SCT_RadDamageSummaryTool");
 
-  ATH_CHECK(setProperties());
-  
   ATH_CHECK(m_chargeTrappingTool.retrieve());
   ATH_MSG_INFO("SCT_ChargeTrappingTool retrieved");
   
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx
index f511586c108e..220fcd0ddced 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/BCMOverlay_test.cxx
@@ -41,7 +41,6 @@ namespace OverlayTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new BCMOverlay{"BCMOverlay", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx
index c21fc8ccf6d2..bd3798b27b2e 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx
@@ -39,7 +39,6 @@ namespace OverlayTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new PixelOverlay{"PixelOverlay", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx
index 94afde167989..e29cc852e1bc 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx
@@ -44,7 +44,6 @@ namespace OverlayTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new SCTOverlay{"SCTOverlay", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
 
       StoreGateSvc *detStore(nullptr);
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
index f7cce7f0dd11..a21c8c8b41db 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
@@ -204,7 +204,6 @@ namespace OverlayTesting {
       // the tested Algorithm
       m_alg = new TRTOverlay{"TRTOverlay", m_svcLoc};
       m_alg->addRef();
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       // ordering B, A, C, D is on purpose to test for unintended alphabetic ordering
       std::string        inputSigPropertyValue = "'StoreGateSvc+TRT_RDOs_SIG'";
       std::string        inputBkgPropertyValue = "'StoreGateSvc+TRT_RDOs_BKG'";
@@ -234,7 +233,6 @@ namespace OverlayTesting {
       if(!service) {
         return nullptr;
       }
-      EXPECT_TRUE( service->setProperties().isSuccess() );
       EXPECT_TRUE( service->configure().isSuccess() );
       EXPECT_TRUE( m_svcMgr->addService(service).isSuccess() );
       // assert that finalize() gets called once per test case
@@ -257,7 +255,6 @@ namespace OverlayTesting {
         return nullptr;
       }
 
-      EXPECT_TRUE( tool->setProperties().isSuccess() );
       EXPECT_TRUE( tool->configure().isSuccess() );
 
       // assert that finalize() gets called once per test case
diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx b/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx
index fac3c4f6df54..86fa1eea11a5 100644
--- a/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx
+++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -36,7 +36,6 @@ namespace OverlayTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new MdtOverlay{"MdtOverlay", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx b/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx
index cb19ccfa6a24..0f465f840240 100644
--- a/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx
+++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -36,7 +36,6 @@ namespace OverlayTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new RpcOverlay{"RpcOverlay", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx b/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx
index e168fe74fa14..592d7ee07676 100644
--- a/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx
+++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -36,7 +36,6 @@ namespace OverlayTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new TgcOverlay{"TgcOverlay", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx
index 585b8271c772..bfef73785373 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/src/AANTupleStream.cxx
@@ -590,18 +590,10 @@ StatusCode AANTupleStream::initialize_subAlgos()
       ATH_MSG_INFO (" -> creating sub-algorithm " << (*it));
       sc =  createSubAlgorithm( theType,theName, algo );
       if (sc.isFailure())
-	{
-	  ATH_MSG_FATAL (" ERROR creating sub-alg." << (*it));
-	  return StatusCode::FAILURE;
-	}
-
-      // force subAlgorithm to set his properties now (reading the jobOptions
-      sc = algo->setProperties();
-      if (sc.isFailure())
-	{
-	  ATH_MSG_FATAL (" ERROR setting properties for this sub-algorithm.");
-	  return StatusCode::FAILURE;
-	}
+        {
+          ATH_MSG_FATAL (" ERROR creating sub-alg." << (*it));
+          return StatusCode::FAILURE;
+        }
     }
 
   return sc;
diff --git a/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx b/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx
index 4a7ac7cb8306..bdb8d282cd04 100644
--- a/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx
+++ b/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx
@@ -51,7 +51,6 @@ namespace SimTesting {
   protected:
     virtual void SetUp() override {
       m_alg = new Simulation::BeamEffectsAlg{"BeamEffectsAlg", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
index 7fac942845dd..fd4559f57b4c 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
@@ -56,7 +56,6 @@ class CollectionMerger_test : public ::testing::Test {
   protected:
     virtual void SetUp() override {
       m_alg = new ISF::CollectionMerger{"CollectionMerger", g_svcLoc};
-      ASSERT_TRUE( m_alg->setProperties().isSuccess() );
       ASSERT_TRUE( g_svcLoc->service("StoreGateSvc", m_sg) );
     }
 
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx
index bb5bf49a7643..32cf0185a8ca 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx
@@ -310,7 +310,6 @@ protected:
       if(!service) {
         return nullptr;
       }
-      EXPECT_TRUE( service->setProperties().isSuccess() );
       EXPECT_TRUE( service->configure().isSuccess() );
       EXPECT_TRUE( m_svcMgr->addService(service).isSuccess() );
       // assert that finalize() gets called once per test case
@@ -333,7 +332,6 @@ protected:
         return nullptr;
       }
 
-      EXPECT_TRUE( tool->setProperties().isSuccess() );
       EXPECT_TRUE( tool->configure().isSuccess() );
 
       // assert that finalize() gets called once per test case
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx
index a5323da69977..b108828792f9 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx
@@ -102,7 +102,6 @@ class InputConverter_test: public ::testing::Test {
     SmartIF<IService>& serviceSmartPointer = m_svcLoc->service("ISF::InputConverter/InputConverter");
     m_svc = dynamic_cast<ISF::InputConverter*>(serviceSmartPointer.get());
     EXPECT_NE(nullptr, m_svc);
-    ASSERT_TRUE( m_svc->setProperties().isSuccess() );
     ASSERT_TRUE( m_svc->configure().isSuccess() );
   }
 
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx b/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx
index f3d593c8f8df..dad163f26f65 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx
@@ -189,7 +189,6 @@ namespace ISFTesting {
       m_svc = dynamic_cast<ISF::TruthSvc*>(svc.get());
       ASSERT_NE(nullptr, m_svc);
 
-      ASSERT_TRUE( m_svc->setProperties().isSuccess() );
       ASSERT_TRUE( m_svc->configure().isSuccess() );
     }
 
diff --git a/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigMonitorToolBase.cxx b/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigMonitorToolBase.cxx
index 3f754311f874..3dc11664e00a 100755
--- a/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigMonitorToolBase.cxx
+++ b/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigMonitorToolBase.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // ********************************************************************
@@ -37,7 +37,6 @@ TrigMonitorToolBase::~TrigMonitorToolBase()
 
 
 StatusCode TrigMonitorToolBase::initialize() {
-  ATH_CHECK( setProperties() );
   ATH_CHECK( m_histSvc.retrieve() );
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigSteer/TrigSteering/src/TrigSteer.cxx b/Trigger/TrigSteer/TrigSteering/src/TrigSteer.cxx
index c4712cfe0bc6..3d71d1503098 100644
--- a/Trigger/TrigSteer/TrigSteering/src/TrigSteer.cxx
+++ b/Trigger/TrigSteer/TrigSteering/src/TrigSteer.cxx
@@ -995,13 +995,11 @@ HLT::Algo* TrigSteer::getAlgo(const std::string& name)
   if ( dynamic_cast<HLT::HypoAlgo*>(algo) ) {
     BooleanProperty enabled("Enable", m_doHypo);
     algo->setProperty(enabled).ignore();
-    algo->setProperties().ignore();
     ATH_MSG_DEBUG(( m_doHypo ? "enabling " : "disabling ") << subAlg_name << " because it is Hypo");
   }
   if ( dynamic_cast<HLT::TECreateAlgo*>(algo) ) {
     BooleanProperty enabled("Enable", m_doFex);
     algo->setProperty(enabled).ignore();
-    algo->setProperties().ignore();
     ATH_MSG_DEBUG((m_doFex ? "enabling " : "disabling ") << subAlg_name << " because it is Fex");
   }
 
diff --git a/Trigger/TrigTools/TrigTimeAlgs/src/TrigTimerSvc.cxx b/Trigger/TrigTools/TrigTimeAlgs/src/TrigTimerSvc.cxx
index 7dde3d2c52ce..8c637d224744 100755
--- a/Trigger/TrigTools/TrigTimeAlgs/src/TrigTimerSvc.cxx
+++ b/Trigger/TrigTools/TrigTimeAlgs/src/TrigTimerSvc.cxx
@@ -1,10 +1,9 @@
 // this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: TrigTimerSvc.cxx,v 1.12 2009-04-15 14:00:22 tbold Exp $
 #include "TrigTimeAlgs/TrigTimerSvc.h"
 
 #include "GaudiKernel/ServiceHandle.h"
@@ -48,8 +47,6 @@ StatusCode TrigTimerSvc::queryInterface (const InterfaceID& riid, void** ppvInte
 
 StatusCode TrigTimerSvc::initialize ( ) {
   
-  ATH_CHECK( setProperties() );
-  
   // compile regexes
   m_includeRegex = boost::regex(m_includeName);
   m_excludeRegex = boost::regex(m_excludeName);
-- 
GitLab


From 591d8f237f8a58e3a6684899887eb2dea40ba434 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 11:29:29 +0100
Subject: [PATCH 069/308] AthenaCommon: Throw exception on Property parsing
 errors

Set `GAUDI_PROPERTY_PARSING_ERROR_DEFAULT_POLICY=Exception` environment
variable to always throw an exception on property parsing errors.

Relates to https://gitlab.cern.ch/gaudi/Gaudi/-/issues/163.
---
 .../AthenaCommon/AthenaCommonEnvironmentConfig.cmake  | 11 +++++++++++
 Control/AthenaCommon/CMakeLists.txt                   | 10 +++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 Control/AthenaCommon/AthenaCommonEnvironmentConfig.cmake

diff --git a/Control/AthenaCommon/AthenaCommonEnvironmentConfig.cmake b/Control/AthenaCommon/AthenaCommonEnvironmentConfig.cmake
new file mode 100644
index 000000000000..2609c001f685
--- /dev/null
+++ b/Control/AthenaCommon/AthenaCommonEnvironmentConfig.cmake
@@ -0,0 +1,11 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+# This module is used to set up the environment for AthenaCommon.
+#
+
+# Set the environment variable(s):
+set( ATHENACOMMONENVIRONMENT_ENVIRONMENT
+   SET GAUDI_PROPERTY_PARSING_ERROR_DEFAULT_POLICY "Exception" )
+
+# Silently declare the module found:
+set( ATHENACOMMONENVIRONMENT_FOUND TRUE )
diff --git a/Control/AthenaCommon/CMakeLists.txt b/Control/AthenaCommon/CMakeLists.txt
index b85eb17e3ec4..f087ae817778 100644
--- a/Control/AthenaCommon/CMakeLists.txt
+++ b/Control/AthenaCommon/CMakeLists.txt
@@ -1,10 +1,13 @@
-################################################################################
-# Package: AthenaCommon
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthenaCommon )
 
+# Set up specific Athena runtime environment:
+set( AthenaCommonEnvironment_DIR ${CMAKE_CURRENT_SOURCE_DIR}
+   CACHE PATH "Location of AthenaCommonEnvironmentConfig.cmake" )
+find_package( AthenaCommonEnvironment )
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/Utils
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
@@ -16,6 +19,7 @@ atlas_install_runtime(share/*.pkl)
 # Aliases:
 atlas_add_alias( athena "athena.py" )
 
+# Tests:
 atlas_add_test( AthAppMgrUnitTests SCRIPT test/test_AthAppMgrUnitTests.sh
                 PROPERTIES TIMEOUT 300
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in|built on" )
-- 
GitLab


From f7633b1ee9994ffd8e1b16fe4c2f8da937959be4 Mon Sep 17 00:00:00 2001
From: Tim Martin <Tim.Martin@cern.ch>
Date: Thu, 17 Dec 2020 12:51:28 +0100
Subject: [PATCH 070/308] Add deduplication checking to typelessFindLinks

---
 .../Root/TrigCompositeUtilsRoot.cxx           | 50 +++++++++++++++----
 1 file changed, 40 insertions(+), 10 deletions(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx b/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx
index c22b1dc36611..51a8be09f3b3 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx
+++ b/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtilsRoot.cxx
@@ -351,24 +351,54 @@ namespace TrigCompositeUtils {
   {
     using namespace msgFindLink;
     if (visitedCache != nullptr) {
-      // We only need to recursivly explore back from each node in the graph once.
+      // We only need to recursively explore back from each node in the graph once.
       // We can keep a record of nodes which we have already explored, these we can safely skip over.
       if (visitedCache->count(start) == 1) {
         return false; // Early exit
       }
     }
-
+    // As the append vectors are user-supplied, perform some input validation. 
+    if (keyVec.size() != clidVec.size() or clidVec.size() != indexVec.size()) {
+      ANA_MSG_WARNING("In typelessFindLinks, keyVec, clidVec, indexVec must all be the same size. Instead have:"
+        << keyVec.size() << ", " << clidVec.size()  << ", " << indexVec.size());
+      return false;
+    }
+    // Locate named links. Both collections of links and individual links are supported.
     bool found = false;
+    std::vector<uint32_t> tmpKeyVec;
+    std::vector<uint32_t> tmpClidVec;
+    std::vector<uint16_t> tmpIndexVec;
     if (start->hasObjectCollectionLinks(linkName)) {
-      found = start->typelessGetObjectCollectionLinks(linkName, keyVec, clidVec, indexVec);
+      found = start->typelessGetObjectCollectionLinks(linkName, tmpKeyVec, tmpClidVec, tmpIndexVec);
     }
     if (start->hasObjectLink(linkName)) {
-      uint32_t key, clid;
-      uint16_t index;
-      found |= start->typelessGetObjectLink(linkName, key, clid, index);
-      keyVec.push_back(key);
-      clidVec.push_back(clid);
-      indexVec.push_back(index);
+      uint32_t tmpKey, tmpClid;
+      uint16_t tmpIndex;
+      found |= start->typelessGetObjectLink(linkName, tmpKey, tmpClid, tmpIndex);
+      tmpKeyVec.push_back(tmpKey);
+      tmpClidVec.push_back(tmpClid);
+      tmpIndexVec.push_back(tmpIndex);
+    }
+    // De-duplicate
+    for (size_t tmpi = 0; tmpi < tmpKeyVec.size(); ++tmpi) {
+      bool alreadyAdded = false;
+      const uint32_t tmpKey = tmpKeyVec.at(tmpi);
+      const uint32_t tmpClid = tmpClidVec.at(tmpi);
+      const uint16_t tmpIndex = tmpIndexVec.at(tmpi);
+      for (size_t veci = 0; veci < keyVec.size(); ++veci) {
+        if (keyVec.at(veci) == tmpKey 
+          and clidVec.at(veci) == tmpClid
+          and indexVec.at(veci) == tmpIndex)
+        {
+          alreadyAdded = true;
+          break;
+        }
+      }
+      if (!alreadyAdded) {
+        keyVec.push_back( tmpKey );
+        clidVec.push_back( tmpClid );
+        indexVec.push_back( tmpIndex );
+      }
     }
     // Early exit
     if (found && behaviour == TrigDefs::lastFeatureOfType) {
@@ -395,7 +425,7 @@ namespace TrigCompositeUtils {
     // only want the most recent.
     // Hence we can supply TrigDefs::lastFeatureOfType.                                                         /--> parent3(link)
     // We can still have more then one link found if there is a branch in the navigation. E.g. start --> parent1 --> parent2(link)
-    // If both parent2 and parent3 posessed an admisable ElementLink, then the warning below will trigger, and only one of the
+    // If both parent2 and parent3 possessed an admissible ElementLink, then the warning below will trigger, and only one of the
     // links will be returned (whichever of parent2 or parent3 happened to be the first seed of parent1).
     std::vector<uint32_t> keyVec;
     std::vector<uint32_t> clidVec;
-- 
GitLab


From cff3e068cd42a1250b1ebabcf112551d9fd2a52e Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Thu, 17 Dec 2020 12:23:49 +0000
Subject: [PATCH 071/308] Hepmc3 nightly fixes 15122020 part 2

---
 .../TruthD3PDAnalysis/IGenObjectsFilterTool.h                 | 4 ++--
 .../TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.cxx   | 2 +-
 .../TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.h     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/TruthD3PDAnalysis/IGenObjectsFilterTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/TruthD3PDAnalysis/IGenObjectsFilterTool.h
index ba5cfa518deb..9223bbfebb4c 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/TruthD3PDAnalysis/IGenObjectsFilterTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/TruthD3PDAnalysis/IGenObjectsFilterTool.h
@@ -72,7 +72,7 @@ public:
     * @returns <code>true</code> if the object should be selected,
     *          <code>false</code> otherwise
     */
-   virtual bool pass( const HepMC::GenParticle* part,
+   virtual bool pass( HepMC::ConstGenParticlePtr part,
                       const McEventCollection* coll = 0 ) const = 0;
 
    /// Function selecting GenVertex objects
@@ -85,7 +85,7 @@ public:
     * @returns <code>true</code> if the object should be selected,
     *          <code>false</code> otherwise
     */
-   virtual bool pass( const HepMC::GenVertex* vtx,
+   virtual bool pass( HepMC::ConstGenVertexPtr vtx,
                       const McEventCollection* coll = 0 ) const = 0;
 
 }; // class IGenObjectsFilterTool
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.cxx
index 997025e37b1f..45098962fbd6 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.cxx
@@ -35,7 +35,7 @@ SimpleTruthParticleFilterTool::SimpleTruthParticleFilterTool
  * @brief Test to see if we want to keep a particle.
  */
 bool
-SimpleTruthParticleFilterTool::isAccepted (const HepMC::GenParticle* p)
+SimpleTruthParticleFilterTool::isAccepted (HepMC::ConstGenParticlePtr p)
 {
   bool ok = false;
 
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.h
index 9b3c1d414118..546c44d0d2d5 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDAnalysis/src/SimpleTruthParticleFilterTool.h
@@ -36,7 +36,7 @@ public:
                            const IInterface* parent);
 
   /// Test to see if we want to keep a particle.
-  virtual bool isAccepted (const HepMC::GenParticle* p);
+  virtual bool isAccepted (HepMC::ConstGenParticlePtr p);
 
 private:
   /// Parameter: PDG ID to filter on
-- 
GitLab


From 192402e176dc025ea659f64f1ea856e69553d5bf Mon Sep 17 00:00:00 2001
From: Junpei Maeda <junpei.maeda@cern.ch>
Date: Thu, 17 Dec 2020 12:28:05 +0000
Subject: [PATCH 072/308] Optimization of Run-2 TGC-BW Coincidence Window

---
 .../MuonCondSvc/MuonCondSvc/TGCTriggerData.h  |  85 +++++--
 .../MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h |   5 -
 .../MuonCondSvc/src/TGCTriggerData.cxx        |  21 +-
 .../MuonCondSvc/src/TGCTriggerDbAlg.cxx       |  77 +++---
 .../TrigT1TGC/TGCRPhiCoincidenceMap.h         |  57 +++--
 .../TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx   | 222 ++++++++----------
 .../src/TGCRPhiCoincidenceMatrix.cxx          |  31 ++-
 7 files changed, 258 insertions(+), 240 deletions(-)

diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h
index 2f926924555d..e423319aacce 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h
@@ -11,11 +11,72 @@
 #include <map>
 #include <vector>
 
+
+/** Contents of Run-2 BW-CW LUT
+ *  ===========================
+ *   std::unordered_map<GLOBALADDR, PTVALUE>
+ *  where
+ *   GLOBALADDR | 27 bits | unsigned int  | side, octant, type, phimod2, module, roi,
+ *                                        | DR(0...0x1f for -15...15)<<4 & DPhi(0...0xf for -7...7)
+ *   PTVALUE    |  3 bits | unsigned char | pT value (0x0 and 0x7 is no cand.)
+ *
+ *  for GLOBALADDR
+ *  | 29 |28|27|26|25|24|23|   22  |21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+ *  |side| octant | 0|type |phimod2|  module   |          RoI          | 0|   delta R    | delta Phi |
+ *  where side   = 0x0 (A-side), 0x1 (C-side).
+ *        octant = 0x(0...7)
+ *        type   = 0x0 (HH), 0x1 (HL), 0x2 (LH), 0x3 (LL): HL means 3-station-wire and 2-station-strip.
+ */
+
 class TGCTriggerData
 {
  friend class TGCTriggerDbAlg;
 
  public:
+  /// Mask for extracting the side from the GLOBALADDR
+  static constexpr uint8_t SIDE_MASK = 0x1;
+  /// Bit position of the side bit in the GLOBALADDR
+  static constexpr uint8_t SIDE_SHIFT = 29;
+  /// Mask for extracting the octant from the GLOBALADDR
+  static constexpr uint8_t OCTANT_MASK = 0x7;
+  /// Bit position of the octant bits in the GLOBALADDR
+  static constexpr uint8_t OCTANT_SHIFT = 26;
+  /// Mask for extracting the octant from the GLOBALADDR
+  static constexpr uint8_t TYPE_MASK = 0x7;
+  /// Bit position of the octant bits in the GLOBALADDR
+  static constexpr uint8_t TYPE_SHIFT = 26;
+  /// Mask for extracting the phi(F or B) from the GLOBALADDR
+  static constexpr uint8_t PHIMOD2_MASK = 0x1;
+  /// Bit position of the module number bits in the GLOBALADDR
+  static constexpr uint8_t PHIMOD2_SHIFT = 22;
+  /// Mask for extracting the module number from the GLOBALADDR
+  static constexpr uint8_t MODULE_MASK = 0xf;
+  /// Bit position of the module number bits in the GLOBALADDR
+  static constexpr uint8_t MODULE_SHIFT = 18;
+  /// Mask for extracting the module number from the GLOBALADDR
+  static constexpr uint8_t ROI_MASK = 0xff;
+  /// Bit position of the module number bits in the GLOBALADDR
+  static constexpr uint8_t ROI_SHIFT = 10;
+  /// Mask for extracting the deltaR from the GLOBALADDR
+  static constexpr uint8_t DR_MASK = 0x1f;
+  /// Bit position of the deltaR bits in the GLOBALADDR
+  static constexpr uint8_t DR_SHIFT = 4;
+  /// Mask for extracting the deltaPhi from the GLOBALADDR
+  static constexpr uint8_t DPHI_MASK = 0xf;
+  /// Bit position of the deltaPhi bits in the GLOBALADDR
+  static constexpr uint8_t DPHI_SHIFT = 0;
+  /// Mask for pT value for Run-2
+  static constexpr uint8_t PT_MASK = 0x7;
+
+  /// Range of DR in the BW coincidence window for 3-station
+  static constexpr uint8_t DR_HIGH_RANGE = 15;
+  /// Range of DR in the BW coincidence window for 2-station
+  static constexpr uint8_t DR_LOW_RANGE = 7;
+  /// Range of DPhi in the BW coincidence window for 3-station
+  static constexpr uint8_t DPHI_HIGH_RANGE = 7;
+  /// Range of DPhi in the BW coincidence window for 2-station
+  static constexpr uint8_t DPHI_LOW_RANGE = 3;
+
   enum {CW_BW=0, CW_EIFI=1, CW_TILE=2, CW_NUM=3};
   enum {N_PT_THRESH=6,
         N_SIDE=2,
@@ -40,7 +101,9 @@ class TGCTriggerData
   std::string getType(int cwtype, int channel = 0) const;
   bool isActive(int cwtype, int channel = 0) const;
 
-  const std::map<unsigned short, std::map<unsigned short, unsigned char>>& getPtMapBw(const unsigned char side, const unsigned char octant) const;
+  int8_t getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const;
+
+  uint8_t getBigWheelPt(const uint32_t addr) const;
 
   unsigned short getTrigBitEifi(int side, int slot, int ssc, int sectorId) const;
   unsigned char getFlagPtEifi(int side, int ssc, int sectorId) const;
@@ -58,24 +121,8 @@ class TGCTriggerData
   std::vector<std::string> m_type[CW_NUM];
   std::vector<bool>        m_active[CW_NUM];
 
-  /** Contents of Run-2 BW-CW LUT
-   *  ===========================
-   *     map<OCTANT, map<SUBSECADDR, map<DELTAADDR, PTVALUE> > >
-   *  where
-   *   OCTANT     |  4 bits | unsigned char  | side(A=0, C=1)<<3 & octant(0...7)
-   *   SUBSECADDR | 16 bits | unsigned short | consists of type, phimod2, module, and roi
-   *   DELTAADDR  |  9 bits | unsigned short | DR(0...0x1f for -15...15)<<4 & DPhi(0...0xf for -7...7)
-   *   PTVALUE    |  3 bits | unsigned char  | pT value (0x0 and 0x7 is no cand.)
-   *
-   *  for SUBSECADDR
-   *  | 15 | 14 | 13 |    12   | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-   *  |  0 |  type   | phimod2 |      module     |              RoI              |
-   *  where type = 0x0 (HH), 0x1 (HL), 0x2 (LH), 0x3 (LL): HL means 3-station-wire and 2-station-strip.
-   *  This may reduce the malloc size when the fullCW option is not used.
-   */
-  std::map<unsigned char, std::map<unsigned short, std::map<unsigned short, unsigned char>>> m_ptmap_bw;
-
-//  std::map<int, std::map<int,int> > m_readmap_bw[N_SIDE][N_OCTANT][N_PT_THRESH];
+  /// Run-2 BW-CW LUT map
+  std::unordered_map<uint32_t, uint8_t> m_ptmap_bw;
 
   /** Bit information of Run-2 EIFI-LUT
    *  =================================
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h
index 9b0625987b5a..dc273c4a0255 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h
@@ -21,11 +21,6 @@ class TGCTriggerDbAlg: public AthAlgorithm
     virtual StatusCode execute() override;
     virtual StatusCode finalize() override;
  
-  protected:
-    char getTYPE(const short lDR, const short hDR, const short lDPhi, const short hDPhi) const;
-    unsigned short getRoIAddr(const char type, const unsigned char phimod2, 
-                              const unsigned short module, const unsigned short roi) const;
- 
   private:
     void loadParameters(TGCTriggerData* writeCdo,
                         const CondAttrListCollection* readKey,
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx
index 6a015fcbe01b..a2780baf183c 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx
@@ -43,12 +43,23 @@ bool TGCTriggerData::isActive(int cwtype, int channel) const {
   return m_active[cwtype][channel];
 }
 
-const std::map<unsigned short, std::map<unsigned short, unsigned char>>& TGCTriggerData::getPtMapBw(const unsigned char side, const unsigned char octant) const
+int8_t TGCTriggerData::getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const
 {
-  unsigned char octantbit = (side<<3) + octant;
-  std::map<unsigned char, std::map<unsigned short, std::map<unsigned short, unsigned char>>>::const_iterator it = m_ptmap_bw.find(octantbit);
-  if(it == m_ptmap_bw.end()) return m_ptmap_bw.find(0)->second;  // also for non-full-CW
-  return it->second;
+  if((lDR == -DR_HIGH_RANGE) && (hDR == DR_HIGH_RANGE)) {
+    if     ((lDPhi == -DPHI_HIGH_RANGE) && (hDPhi == DPHI_HIGH_RANGE)) return COIN_HH;
+    else if((lDPhi == -DPHI_LOW_RANGE) && (hDPhi == DPHI_LOW_RANGE))   return COIN_HL;
+  } else if((lDR == -DR_LOW_RANGE) && (hDR == DR_LOW_RANGE)) {
+    if     ((lDPhi == -DPHI_HIGH_RANGE) && (hDPhi == DPHI_HIGH_RANGE)) return COIN_LH;
+    else if((lDPhi == -DPHI_LOW_RANGE) && (hDPhi == DPHI_LOW_RANGE))   return COIN_LL;
+  }
+  return -1;
+}
+
+uint8_t TGCTriggerData::getBigWheelPt(const uint32_t addr) const
+{
+  std::unordered_map<uint32_t, uint8_t>::const_iterator it = m_ptmap_bw.find(addr);
+  if(it == m_ptmap_bw.end()) return 0x0;        // outside from defined window, i.e. pT=0
+  else                       return it->second;
 }
 
 unsigned short TGCTriggerData::getTrigBitEifi(int side, int slot, int ssc, int sectorId) const
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx
index 90ce64629775..a40a3adb2c7e 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx
@@ -182,10 +182,6 @@ void TGCTriggerDbAlg::loadParameters(TGCTriggerData* writeCdo,
 
 void TGCTriggerDbAlg::fillReadMapBw(TGCTriggerData* writeCdo)
 {
-  for(auto peroctant : writeCdo->m_ptmap_bw) {
-    for(auto persubsec : peroctant.second) persubsec.second.clear();
-  }
-
   if (!writeCdo->isActive(TGCTriggerData::CW_BW)) {
     return;
   }
@@ -193,18 +189,18 @@ void TGCTriggerDbAlg::fillReadMapBw(TGCTriggerData* writeCdo)
   bool fullCW = (writeCdo->getType(TGCTriggerData::CW_BW) == "full");
   std::string vername = writeCdo->getVersion(TGCTriggerData::CW_BW);
 
-  const int kNMODULETYPE = 12;
-  const unsigned short modulenumber[kNMODULETYPE]    = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
+  const uint8_t kNMODULETYPE = 12;
+  const uint8_t modulenumber[kNMODULETYPE]    = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
   const std::string modulename[kNMODULETYPE]         = {"0","1","2a","2b","3","4","5a","5b","6","7","8a","8b"};
   const std::string sidename[TGCTriggerData::N_SIDE] = {"A","C"};
 
   for(size_t iSide = 0; iSide < TGCTriggerData::N_SIDE; iSide++) {
     for(size_t iOctant = 0; iOctant < TGCTriggerData::N_OCTANT; iOctant++) {
 
-      std::map<unsigned short, std::map<unsigned short, unsigned char>> per_octant;
-      //   SUBSECADDR | 16 bits | unsigned int  |
+      uint32_t octaddr = (iSide<<TGCTriggerData::SIDE_SHIFT) +
+                         ((iOctant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
 
-      for(int iModule = 0; iModule < kNMODULETYPE; iModule++) {
+      for(size_t iModule = 0; iModule < kNMODULETYPE; iModule++) {
 
         std::ostringstream dbname;
         dbname << "RPhiCoincidenceMap.";
@@ -216,79 +212,62 @@ void TGCTriggerDbAlg::fillReadMapBw(TGCTriggerData* writeCdo)
 
         char delimiter = '\n';
         std::string field, tag;
-        unsigned char phimod2 = modulename[iModule].find("b") != std::string::npos ? 1 : 0;
+        uint32_t phimod2 = modulename[iModule].find("b") != std::string::npos ? 1 : 0;
 
-        std::map<unsigned short, unsigned char> pt_by_delta;
+        uint32_t modaddr = ((modulenumber[iModule] & TGCTriggerData::MODULE_MASK)<<TGCTriggerData::MODULE_SHIFT) +
+                           ((phimod2 & TGCTriggerData::PHIMOD2_MASK)<<TGCTriggerData::PHIMOD2_SHIFT);
 
         while (std::getline(stream, field, delimiter)) {
 
           std::istringstream header(field);
-          header>>tag;
+          header >> tag;
 
           if (tag == "#") { // read header part.
-            unsigned short ssId, mod;
-            short lDR, hDR, lDPhi, hDPhi;
-            unsigned short ptLevel;
-            header>>ptLevel>>ssId>>mod>>lDR>>hDR>>lDPhi>>hDPhi;
+            uint16_t ptLevel, roi, mod;
+            int16_t lDR, hDR, lDPhi, hDPhi;
+            header >> ptLevel >> roi >> mod >> lDR >> hDR >> lDPhi >> hDPhi;
 
-            char type = getTYPE( lDR, hDR, lDPhi, hDPhi );
+            int16_t type = writeCdo->getTYPE( lDR, hDR, lDPhi, hDPhi );
 
             // check moduleNumber and ptLevel
-            if (mod != modulenumber[iModule] || ptLevel > TGCTriggerData::N_PT_THRESH || type < 0 ) {
-              ATH_MSG_WARNING("Invalid configuration of DB file.");
+            if( mod != modulenumber[iModule] ||
+                ptLevel > TGCTriggerData::N_PT_THRESH || type < 0 ) {
+              ATH_MSG_WARNING("Invalid configuration of DB file! - Nothing to load this DB file");
               break;
             }
 
-            unsigned short roiaddr = getRoIAddr(type, phimod2, mod, ssId);
+            uint32_t cwaddr = ((uint8_t(type) & TGCTriggerData::TYPE_MASK)<<TGCTriggerData::TYPE_SHIFT) + 
+                              ((roi & TGCTriggerData::ROI_MASK)<<TGCTriggerData::ROI_SHIFT);
 
             // get window data
             std::getline(stream, field, delimiter);
             std::istringstream cont(field);
 
-            for (unsigned short ir = 0; ir < 31; ir++) {
-              unsigned int bit;
-              cont>>bit;
+            for (uint8_t ir = 0; ir < 31; ir++) {  // ir=0, 15 and 30 point to -15, 0 and +15 of dR, respectively.
+              uint32_t draddr = (ir & TGCTriggerData::DR_MASK)<<TGCTriggerData::DR_SHIFT;
+
+              uint32_t bit;
+              cont >> bit;
               if (bit == 0) continue; // none of window is opened in this dR
 
-              for(unsigned short iphi=0; iphi<15; iphi++) {
-                unsigned short delta = (ir<<4) + iphi;
-                if(bit>>iphi & 0x1) pt_by_delta[delta] = (unsigned char)(ptLevel & 0x7);
+              for(uint8_t iphi=0; iphi<15; iphi++) {  // iphi=0, 7 and 14 point to -7, 0 and +7 of dPhi, respectively.
+                if(bit>>iphi & 0x1) {
+                  uint32_t theaddr = octaddr + modaddr + cwaddr + draddr + iphi;
+                  writeCdo->m_ptmap_bw[theaddr] = (uint8_t)(ptLevel & TGCTriggerData::PT_MASK);
+                }
               }
             }
-            if((ptLevel&0x7) == 0x6) {
-              per_octant[roiaddr] = pt_by_delta;
-              pt_by_delta.clear();
-            }
 
           }   // end of if(tag)...
         }   // end of while(getline...)
       }   // end of for(iModule)
 
-      unsigned char octantbit = iSide<<3 & iOctant;
-      writeCdo->m_ptmap_bw[octantbit] = per_octant;
-
       if(!fullCW) break;
     }   // end of for(iOctant)
     if(!fullCW) break;
   }   // end of for(iSide)
 }
 
-char TGCTriggerDbAlg::getTYPE(const short lDR, const short hDR, const short lDPhi, const short hDPhi) const
-{
-  char type = -1;
-  if ( (lDR==-15) && (hDR==15) && (lDPhi==-7) && (hDPhi==7))      type = TGCTriggerData::COIN_HH;
-  else if ( (lDR==-15) && (hDR==15) && (lDPhi==-3) && (hDPhi==3)) type = TGCTriggerData::COIN_HL;
-  else if ( (lDR==-7) && (hDR==7) && (lDPhi==-7) && (hDPhi==7))   type = TGCTriggerData::COIN_LH;
-  else if ( (lDR==-7) && (hDR==7) && (lDPhi==-3) && (hDPhi==3))   type = TGCTriggerData::COIN_LL;
-  return type;
-}
-
-unsigned short TGCTriggerDbAlg::getRoIAddr(const char type, const unsigned char phimod2,
-                                           const unsigned short module, const unsigned short roi) const
-{
-  return (type<<13) + ((phimod2&0x1)<<12) + ((module&0xf)<<8) + roi;
-}
-
 void TGCTriggerDbAlg::fillTrigBitEifi(TGCTriggerData* writeCdo)
 {
   // remove all entries
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
index e36fc2f90f06..ac26c9bc229a 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
@@ -17,11 +17,27 @@
 
 namespace LVL1TGCTrigger {
 
-class TGCRPhiCoincidenceMap {
-public:
-  bool test(int octantId, int moduleId, int subsector, 
-            int type, int pt, 
-            int dr, int dphi) const;// for Run2
+/** Contents of Run-2 BW-CW LUT
+ *  ===========================
+ *   std::unordered_map<GLOBALADDR, PTVALUE>
+ *  where
+ *   GLOBALADDR | 27 bits | unsigned int  | side, octant, type, phimod2, module, roi,
+ *                                        | DR(0...0x1f for -15...15)<<4 & DPhi(0...0xf for -7...7)
+ *   PTVALUE    |  3 bits | unsigned char | pT value (0x0 and 0x7 is no cand.)
+ *
+ *  for GLOBALADDR
+ *  | 29 |28|27|26|25|24|23|   22  |21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+ *  |side| octant | 0|type |phimod2|  module   |          RoI          | 0|   delta R    | delta Phi |
+ *  where side   = 0x0 (A-side), 0x1 (C-side).
+ *        octant = 0x(0...7)
+ *        type   = 0x0 (HH), 0x1 (HL), 0x2 (LH), 0x3 (LL): HL means 3-station-wire and 2-station-strip.
+ */
+
+class TGCRPhiCoincidenceMap
+{
+ public:
+  uint8_t test(int octantId, int moduleId, int subsector, 
+               int type, int dr, int dphi) const;// for Run2
 
   int test_Run3(int octantId, int moduleId, int subsector, 
                 int type, int dr, int dphi) const; //for Run3
@@ -58,8 +74,6 @@ public:
   bool checkVersion();
   int PHIPOS(int iphi, int type) const;
   int SUBSECTORADD(int ssid, int modid, int phimod2, int type) const;
-  unsigned short getRoIAddr(const char type, const unsigned char phimod2,
-                            const unsigned short module, const unsigned short roi) const;
 
   int getMODID(int addr) const;
   int getSSID(int addr) const;
@@ -78,8 +92,8 @@ public:
               {'a',-1},{'b',-2},{'c',-3},{'d',-4},{'e',-5},{'f',-6},{'g',-7},{'h',-8},{'i',-9},{'j',-10},{'k',-11},{'l',-12},{'m',-13},{'n',-14},{'o',-15} };
 
 
-private:
-  std::map<int, std::map<int,int> > m_mapDB[N_PT_THRESH];//for Run2 [ptLevel]< RoI(&type),<RNumber,RWindow> >
+ private:
+  std::unordered_map<uint32_t, uint8_t> m_ptmap;
   std::map<int, std::map<int, std::map<int, char> > > m_mapDB_Run3;//for Run3 <RoI(&type),<R,<Phi,pT(char)> > >
 
 
@@ -133,15 +147,16 @@ inline
   m_fullCW = val;
 }
 
-inline
- int TGCRPhiCoincidenceMap::getTYPE(int lDR, int hDR, int lDPhi, int hDPhi ) const
- {
-   int type = -1;
-   if ( (lDR==-15) && (hDR==15) && (lDPhi==-7) && (hDPhi==7))      type = TMap_HH;
-   else if ( (lDR==-15) && (hDR==15) && (lDPhi==-3) && (hDPhi==3)) type = TMap_HL;
-   else if ( (lDR==-7) && (hDR==7) && (lDPhi==-7) && (hDPhi==7))   type = TMap_LH;
-   else if ( (lDR==-7) && (hDR==7) && (lDPhi==-3) && (hDPhi==3))   type = TMap_LL; 
-   return type; 
+inline int TGCRPhiCoincidenceMap::getTYPE(int lDR, int hDR, int lDPhi, int hDPhi) const
+{
+  if((lDR == -TGCTriggerData::DR_HIGH_RANGE) && (hDR == TGCTriggerData::DR_HIGH_RANGE)) {
+    if     ((lDPhi == -TGCTriggerData::DPHI_HIGH_RANGE) && (hDPhi == TGCTriggerData::DPHI_HIGH_RANGE)) return TGCTriggerData::COIN_HH;
+    else if((lDPhi == -TGCTriggerData::DPHI_LOW_RANGE) && (hDPhi == TGCTriggerData::DPHI_LOW_RANGE))   return TGCTriggerData::COIN_HL;
+  } else if((lDR == -TGCTriggerData::DR_LOW_RANGE) && (hDR == TGCTriggerData::DR_LOW_RANGE)) {
+    if     ((lDPhi == -TGCTriggerData::DPHI_HIGH_RANGE) && (hDPhi == TGCTriggerData::DPHI_HIGH_RANGE)) return TGCTriggerData::COIN_LH;
+    else if((lDPhi == -TGCTriggerData::DPHI_LOW_RANGE) && (hDPhi == TGCTriggerData::DPHI_LOW_RANGE))   return TGCTriggerData::COIN_LL;
+  }
+  return -1;
 }
 
 inline
@@ -171,12 +186,6 @@ inline
  int TGCRPhiCoincidenceMap::getTYPE(int addr) const
  { return ((addr>>16)&0x0003); }
 
-inline
- unsigned short TGCRPhiCoincidenceMap::getRoIAddr(const char type, const unsigned char phimod2,
-                                                  const unsigned short module, const unsigned short roi) const
-{
-  return ((type & 0x3)<<13) + ((phimod2&0x1)<<12) + (module<<8) + roi;
-}
 
 } //end of namespace bracket
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
index 628fda4087eb..71a19563d221 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
@@ -24,54 +24,44 @@
 
 namespace LVL1TGCTrigger {
 
-bool TGCRPhiCoincidenceMap::test(int octantId, int moduleId, int subsector, 
-				 int type, int pt, 
-				 int dr, int dphi) const
-{  
-  // check pt range
-  if (pt<0 || pt>=N_PT_THRESH) return false;
-  if (type<0 || type>=N_TMap ) return false; 
+uint8_t TGCRPhiCoincidenceMap::test(int octantId, int moduleId, int subsector, 
+                                    int type, int dr, int dphi) const
+{
+  if (type<0 || type>=N_TMap) return 0;  // check the range of coincidence type
 
-  int sector=(moduleId-2)/3+octantId*3;
-  int phimod2 = (moduleId==2||moduleId==5||moduleId==8)&&(sector%2==1) ? 1 : 0;
+  uint16_t sector = (moduleId-2)/3 + octantId*3;  // sector number in the forward region (0...23)
+  // calculate whether the front or back side of the forward chamber
+  uint8_t phimod2 = (moduleId==2||moduleId==5||moduleId==8)&&(sector%2==1) ? 1 : 0;
+
+  uint32_t addr = ((type & TGCTriggerData::TYPE_MASK)<<TGCTriggerData::TYPE_SHIFT) +
+                  ((phimod2 & TGCTriggerData::PHIMOD2_MASK)<<TGCTriggerData::PHIMOD2_SHIFT) +
+                  ((moduleId & TGCTriggerData::MODULE_MASK)<<TGCTriggerData::MODULE_SHIFT) +
+                  ((subsector & TGCTriggerData::ROI_MASK)<<TGCTriggerData::ROI_SHIFT) +
+                  (((dr-DR_offset) & TGCTriggerData::DR_MASK)<<TGCTriggerData::DR_SHIFT) +
+                  (((dphi-DPhi_offset) & TGCTriggerData::DPHI_MASK)<<TGCTriggerData::DPHI_SHIFT);
+
+  uint8_t content = 0x0;   // outside from defined window, i.e. pT=0
 
   if(tgcArgs()->USE_CONDDB()) {
     SG::ReadCondHandle<TGCTriggerData> readHandle{m_readCondKey};
     const TGCTriggerData* readCdo{*readHandle};
 
-    std::map<unsigned short, std::map<unsigned short, unsigned char>> roiMap = readCdo->getPtMapBw(m_side, m_octant);
-
-    unsigned short addr = getRoIAddr((char)type, (unsigned char)phimod2, (unsigned short)moduleId, (unsigned short)subsector);
-    std::map<unsigned short, std::map<unsigned short, unsigned char> >::const_iterator it = roiMap.find(addr);
-    if(it == roiMap.end()) return false;
-
-    std::map<unsigned short, unsigned char> ptMap = it->second;
-    std::map<unsigned short, unsigned char>::const_iterator itWindow = ptMap.find( (((dr+15)&0x1f)<<4) + ((dphi+7)&0xf) );
-
-    if (itWindow == ptMap.end()) return false;
-
-    if ( (itWindow->second) == (pt+1) ) return true;
-    else return false;
-
+    bool fullCW = (readCdo->getType(TGCTriggerData::CW_BW) == "full");
+    if(fullCW) addr += (m_side<<TGCTriggerData::SIDE_SHIFT) +
+                       ((m_octant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
+    content = readCdo->getBigWheelPt(addr);
   } else {
-    int addr=SUBSECTORADD(subsector, moduleId, phimod2,type);
-    std::map<int, std::map<int, int> > readMap = m_mapDB[pt];
-
-    std::map<int, std::map<int, int> >::const_iterator it = readMap.find(addr);
-    if (it==(readMap.end())) return false;
+    if(m_fullCW) addr += (m_side<<TGCTriggerData::SIDE_SHIFT) +
+                         ((m_octant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
 
-    std::map<int, int> aMap = it->second;
-    std::map<int, int>::const_iterator itWindow= aMap.find( dr );
-    if (itWindow==aMap.end()) return false;
-
-    if ( (itWindow->second) & ( 1<<(PHIPOS(dphi,type)) ) ) return true;
-    else return false;
+    std::unordered_map<uint32_t, uint8_t>::const_iterator it = m_ptmap.find(addr);
+    if(it != m_ptmap.end()) content = it->second;
   }
 
+  return content;
 }
 
 
-
 int TGCRPhiCoincidenceMap::test_Run3(int octantId, int moduleId, int subsector, 
                                      int type, int dr, int dphi) const
 {  
@@ -112,15 +102,12 @@ int TGCRPhiCoincidenceMap::test_Run3(int octantId, int moduleId, int subsector,
 
 
 
-
-
 TGCRPhiCoincidenceMap::TGCRPhiCoincidenceMap(TGCArguments* tgcargs,
 					     const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
 					     const SG::ReadCondHandleKey<TGCTriggerLUTs>& readLUTsCondKey,
-
                                              const std::string& version,
 					     int   sideId, int octantId)
-  :m_numberOfDR(0), m_numberOfDPhi(0),
+ : m_numberOfDR(0), m_numberOfDPhi(0),
    m_verName(version),
    m_side(sideId),
    m_octant(octantId),
@@ -132,13 +119,12 @@ TGCRPhiCoincidenceMap::TGCRPhiCoincidenceMap(TGCArguments* tgcargs,
   if (!tgcArgs()->USE_CONDDB()) {
     if(!tgcArgs()->useRun3Config()){
       if (!checkVersion()){
-      m_verName = "NA";
-      return;
+        m_verName = "NA";
+        return;
       }
       this->readMap();  // read Coincidence Map for Run2 (6 thresholds)
-    }
-    else{
-      this -> readMap_Run3();// read Coincidence Map for Run3 (15 thresholds)
+    } else {
+      this->readMap_Run3();// read Coincidence Map for Run3 (15 thresholds)
     }
   } 
 }
@@ -248,16 +234,11 @@ TGCRPhiCoincidenceMap& TGCRPhiCoincidenceMap::operator=(const TGCRPhiCoincidence
 
 bool TGCRPhiCoincidenceMap::readMap() 
 {
-  const int NumberOfModuleType=12;
-  const int ModuleNumber[NumberOfModuleType]  =
-    {  0,  1,   2,   2,  3,  4,   5,   5,  6,  7,   8,  8 };
-  const std::string ModuleName[NumberOfModuleType]=
-    {"0","1","2a","2b","3","4","5a","5b","6","7","8a","8b"};
-  const std::string SideName[NumberOfSide] = {"A","C"};
-  const std::string OctantName[NumberOfOctant] = 
-    {  "0", "1", "2", "3", "4", "5", "6", "7"};
+  const uint8_t kNMODULETYPE = 12;
+  const uint8_t modulenumber[kNMODULETYPE] = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
+  const std::string modulename[kNMODULETYPE] = {"0","1","2a","2b","3","4","5a","5b","6","7","8a","8b"};
+  const std::string sidename[NumberOfSide] = {"A","C"};
 
-  
   IMessageSvc* msgSvc = 0;
   ISvcLocator* svcLocator = Gaudi::svcLocator();
   if (svcLocator->service("MessageSvc", msgSvc) == StatusCode::FAILURE) {
@@ -265,83 +246,82 @@ bool TGCRPhiCoincidenceMap::readMap()
   }
   MsgStream log(msgSvc, "TGCRPhiCoincidenceMap::TGCRPhiCoincidenceMap");
 
-  // initialize
-  enum{BufferSize=1024};
-  char buf[BufferSize];
-  std::string fn, fullName, tag;
-  int ssId,ptLevel,bit,mod;
+  uint32_t octaddr = (m_side<<TGCTriggerData::SIDE_SHIFT) +
+                     ((m_octant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
 
   // loop over all files...
-  for(int iModule=0; iModule<NumberOfModuleType; iModule+=1) {
-    int phimod2=ModuleName[iModule].find("b")!=std::string::npos ? 1 : 0;
-    std::ostringstream modName;
-    std::string fn = "RPhiCoincidenceMap.mod" 
-                      + ModuleName[iModule] + "." + m_verName +"._12.db";
-    if (m_fullCW) {
-      if ( (m_side>=0) && (m_side<NumberOfSide) && 
-	   (m_octant>=0) && (m_octant<NumberOfOctant)) {
-	fn = "RPhiCoincidenceMap." 
-	              + SideName[m_side] + OctantName[m_octant]  
-                      + ".mod" + ModuleName[iModule] 
-                      + "." + m_verName +"._12.db";
-      } 
+  for(int iModule=0; iModule<kNMODULETYPE; iModule+=1) {
+
+    std::ostringstream fn;
+    fn << "RPhiCoincidenceMap.";
+    if(m_fullCW) {
+      if( (m_side>=0) && (m_side<NumberOfSide) &&
+          (m_octant>=0) && (m_octant<NumberOfOctant)) {
+        fn << sidename[m_side] << m_octant << ".";
+      }
+    }
+    fn << "mod" << modulename[iModule] << "." << m_verName  << "._12.db";
+
+    std::string fullname = PathResolver::find_file(fn.str().c_str(), "DATAPATH");
+    if( fullname.length() == 0 ) {
+      log << MSG::ERROR
+          << " Could not found "
+          << fn.str().c_str() << endmsg;
+      return false ;
     }
 
-    int type = -1;
-    int lDR, hDR, lDPhi, hDPhi;
+    uint32_t phimod2 = (modulename[iModule].find("b") != std::string::npos) ? 1 : 0;
+    uint32_t modaddr = ((modulenumber[iModule] & TGCTriggerData::MODULE_MASK)<<TGCTriggerData::MODULE_SHIFT) +
+                       ((phimod2 & TGCTriggerData::PHIMOD2_MASK)<<TGCTriggerData::PHIMOD2_SHIFT);
 
-    fullName = PathResolver::find_file( fn.c_str(), "DATAPATH" );
-    if( fullName.length() == 0 ) { 
-      log << MSG::ERROR 
-	  << " Could not found " 
-	  << fn.c_str() << endmsg;
-      return false ;  
-    } 
+    std::ifstream file(fullname.c_str(),std::ios::in);
+    enum{BufferSize=1024};
+    char buf[BufferSize];
+
+    while(file.getline(buf,BufferSize)) {
 
-    std::ifstream file(fullName.c_str(),std::ios::in);    
-    while(file.getline(buf,BufferSize)){
       std::istringstream header(buf);
+      std::string tag;
+
       header>>tag;
-      if(tag=="#"){ // read header part.     
-	header>>ptLevel>>ssId>>mod>>lDR>>hDR>>lDPhi>>hDPhi;
-	type = getTYPE( lDR, hDR, lDPhi, hDPhi );
-	// check moduleNumber and ptLevel
-	if(mod!=ModuleNumber[iModule] || ptLevel>N_PT_THRESH || type<0 ) {
-	  log << MSG::WARNING 
-	      << " illegal parameter in database header : "
-	      << header.str()
-	      << " in file " << fn 
-	      << endmsg;
-	  break;
-	}
+      if(tag=="#") { // read header part.
+
+        uint16_t ptLevel, roi, mod;
+        int16_t lDR, hDR, lDPhi, hDPhi;
+        header >> ptLevel >> roi >> mod >> lDR >> hDR >> lDPhi >> hDPhi;
+
+        int16_t type = getTYPE( lDR, hDR, lDPhi, hDPhi );
+
+        // check moduleNumber and ptLevel
+        if(mod != modulenumber[iModule] || ptLevel > N_PT_THRESH || type<0 ) {
+          log << MSG::WARNING
+              << " illegal parameter in database header : "
+              << header.str()
+              << " in file " << fn.str()
+              << endmsg;
+          break;
+        }
 
-	// get window data
-	file.getline(buf,BufferSize);
-	std::istringstream cont(buf);
-	std::map<int, int> aWindow;
-	for(int ir=0; ir<=hDR-DR_offset; ir++) {
-	  cont>>bit;
-	  if (bit==0) continue; // none of window is opened in this dR
-	  aWindow[ir+DR_offset] = bit;
-	}
-	// Warning : no window 
-	if (aWindow.size()==0) {
-	  if (tgcArgs()->MSGLEVEL() <= MSG::DEBUG) {
-	    log << MSG::DEBUG
-		<< " No window is opened for (ptLevel,ssId,mod) = (" 
-		<< ptLevel << ", " << ssId << ", " << mod << ")" 
-		<<endmsg;
-	  }
-	}
-	int addr = SUBSECTORADD(ssId,mod,phimod2,type);
-	if (m_mapDB[ptLevel-1].find(addr)!=m_mapDB[ptLevel-1].end()) {
-	  if (tgcArgs()->MSGLEVEL() <= MSG::DEBUG) {
-	    log << MSG::DEBUG
-		<< "This subsector was already reserved." 
-		<< endmsg;
-	  }
-	} else {
-	  m_mapDB[ptLevel-1][addr]=aWindow;
+        uint32_t cwaddr = ((uint8_t(type) & TGCTriggerData::TYPE_MASK)<<TGCTriggerData::TYPE_SHIFT) + 
+                          ((roi & TGCTriggerData::ROI_MASK)<<TGCTriggerData::ROI_SHIFT);
+
+        // get window data
+        file.getline(buf,BufferSize);
+        std::istringstream cont(buf);
+
+        for(uint8_t ir=0; ir<=hDR-DR_offset; ir++) {
+          uint32_t draddr = (ir & TGCTriggerData::DR_MASK)<<TGCTriggerData::DR_SHIFT;
+
+          uint32_t bit;
+	  cont >> bit;
+	  if (bit == 0) continue;   // none of window is opened in this dR
+
+          for(uint8_t iphi=0; iphi<hDPhi-DPhi_offset; iphi++) {
+            if(bit>>iphi & 0x1) {
+              uint32_t theaddr = octaddr + modaddr + cwaddr + draddr + iphi;
+              m_ptmap[theaddr] = (uint8_t)(ptLevel & TGCTriggerData::PT_MASK);
+            }
+          }
 	}
       }
     }
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
index b52714bd86b9..419b91ffbf60 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
@@ -67,10 +67,9 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
   out->setIdSSC(m_SSCId);
 
   int j0 = -1;
-  int ptMax=-1;
+  int ptMax = 1;
   for( int j=m_nPhiHit-1; j>=0; j-=1){     // left half-SSC has priority when both output same pT
     int subsector;
-    int ptOut = -99;
     int chargeOut = 2;
     int CoincidenceTypeOut=-1;
 
@@ -80,9 +79,10 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
       subsector = 4*(2*m_SSCId+m_r)+m_phi[j];
     }
     
-
     int type = m_map->getMapType(m_ptR, m_ptPhi[j]);
+
     // calculate pT of muon candidate
+    uint8_t ptOut = 0;   // 0 is no candidate.
     if(tgcArgs()->useRun3Config()){
       //Algorithm for Run3
       int pt=m_map->test_Run3(m_sectorLogic->getOctantID(),m_sectorLogic->getModuleID(),
@@ -91,25 +91,22 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
       chargeOut = pt<0 ? 0:1;
       
       CoincidenceTypeOut=(type==0);
-    }
-    else{
-      for( int pt=NumberOfPtLevel-1; pt>=0; pt-=1){
-	if(m_map->test(m_sectorLogic->getOctantID(),m_sectorLogic->getModuleID(),subsector,
-		       type, pt,
-		       m_dR,m_dPhi[j])) {
-	  ptOut = pt;
-	  break;
-	}
-      } // loop pt
+
+    } else {    // for Run-2
+      ptOut = m_map->test(m_sectorLogic->getOctantID(),
+                          m_sectorLogic->getModuleID(), subsector,
+                          type, m_dR, m_dPhi[j]);
     }
 
-    // Trigger Out
-    if( ptOut >= ptMax ){
+    // Trigger Out (only pT>0 candidate
+    if(ptOut >= ptMax) {
       ptMax = ptOut;
       out->clear();    
       out->setIdSSC(m_SSCId);
-      if(!tgcArgs()->useRun3Config()){out->setHit(ptMax+1);}// for Run2 Algo
-      else{out->setpT(ptMax);}// for Run3 Algo
+
+      if(!tgcArgs()->useRun3Config()) out->setHit(ptMax);  // for Run2 Algo
+      else                            out->setpT(ptMax);   // for Run3 Algo
+
       out->setR(m_r);
       out->setPhi(m_phi[j]);
       out->setDR(m_dR);
-- 
GitLab


From f5b7a8fdd011ebc3fab54864dc76f9cc3fc1c1e8 Mon Sep 17 00:00:00 2001
From: Jonathan Bossio <jonathan.bossio@cern.ch>
Date: Thu, 17 Dec 2020 12:29:53 +0000
Subject: [PATCH 073/308] Create truth jets (if requested) in offline jetmon

Added only to main function but could be added to TrigJetMonConfig if
needed
---
 .../python/TrigJetMonitorAlgorithm.py         | 54 ++++++++++++++-----
 1 file changed, 42 insertions(+), 12 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
index f118878e94cc..c23d9c7b92e9 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
@@ -132,6 +132,7 @@ def getEtaRange(chain):
 # Schedule more histograms for dedicated jet collections
 #########################################################
 from JetMonitoring.JetMonitoringConfig import JetMonAlgSpec, HistoSpec, EventHistoSpec, SelectSpec, ToolSpec #VarSpec can be added to define specific/custom variables
+from AthenaConfiguration.ComponentFactory import CompFactory
 
 # All offline jet collections
 ExtraOfflineHists = [
@@ -187,7 +188,6 @@ def TrigJetMonConfig(inputFlags):
 
   # Match HLT to offline jets
   for j1,j2 in JetColls2Match[InputType].items():
-    from AthenaConfiguration.ComponentFactory import CompFactory
     name = 'Matching_{}_{}'.format(j1,j2)
     alg = CompFactory.JetMatcherAlg(name, JetContainerName1=j1,JetContainerName2=j2)
     cfg.addEventAlgo(alg)
@@ -471,7 +471,7 @@ def jetEfficiencyMonitoringConfig(inputFlags,onlinejetcoll,offlinejetcoll,chain,
        # create a monitoring group with the histo path starting from the parentAlg
        group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+jetcollFolder+'/')
        # define the histogram
-       group.defineHistogram('trigPassed,jetVar',title='titletrig', type="TEfficiency", path=chainFolder, xbins=100 , xmin=0, xmax=500000. ,)
+       group.defineHistogram('trigPassed,jetVar',title='titletrig', type="TEfficiency", path=chainFolder, xbins=1000 , xmin=0, xmax=1000000. ,)
 
    # Get jet index and eta selection for offline jets
    parts        = chain.split('j')
@@ -527,12 +527,16 @@ if __name__=='__main__':
 
   # Read arguments
   parser = argparse.ArgumentParser()
-  parser.add_argument('--athenaMT', action='store_true', dest='athenaMT', default=False)
-  parser.add_argument('--legacy',   action='store_true', dest='legacy',   default=False)
-  parser.add_argument('--input',    action='store',      dest='inputFile')
-  args     = parser.parse_args()
-  AthenaMT = args.athenaMT
-  Legacy   = args.legacy
+  parser.add_argument('--athenaMT',            action='store_true', dest='athenaMT',            default=False)
+  parser.add_argument('--legacy',              action='store_true', dest='legacy',              default=False)
+  parser.add_argument('--runTruthReco',        action='store_true', dest='runTruthReco',        default=False)
+  parser.add_argument('--printDetailedConfig', action='store_true', dest='printDetailedConfig', default=False)
+  parser.add_argument('--input',               action='store',      dest='inputFile')
+  args                = parser.parse_args()
+  AthenaMT            = args.athenaMT
+  Legacy              = args.legacy
+  RunTruth            = args.runTruthReco
+  PrintDetailedConfig = args.printDetailedConfig
   # Protections
   if AthenaMT and Legacy:
     print('ERROR: Choose AthenaMT or Legacy, exiting')
@@ -566,15 +570,38 @@ if __name__=='__main__':
   from AthenaConfiguration.MainServicesConfig import MainServicesCfg 
   from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
   cfg = MainServicesCfg(ConfigFlags)
+
+  # AthenaMT or Legacy
+  InputType = 'MT' if AthenaMT else 'Legacy'
+
+  # Reconstruct small-R truth jets
+  if RunTruth:
+    from JetRecConfig.StandardSmallRJets import AntiKt4Truth # import the standard definitions
+    # Add the components from our jet reconstruction job
+    from JetRecConfig.JetRecConfig import JetRecCfg
+    comp = JetRecCfg(AntiKt4Truth,ConfigFlags)
+    cfg.merge(comp)
+    # Write jet collection to AOD
+    # First define the output list
+    key = "{0}Jets".format(AntiKt4Truth.basename)
+    outputlist = ["xAOD::JetContainer#"+key,"xAOD::JetAuxContainer#"+key+"Aux.-PseudoJet"]
+    # Now get the output stream components
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    cfg.merge(OutputStreamCfg(ConfigFlags,"xAOD",ItemList=outputlist))
+
   cfg.merge(PoolReadCfg(ConfigFlags))
 
   # The following class will make a sequence, configure algorithms, and link
   # them to GenericMonitoringTools
   from AthenaMonitoring import AthMonitorCfgHelper
   helper = AthMonitorCfgHelper(ConfigFlags,'TrigJetMonitorAlgorithm')
+  cfg.merge(helper.result()) # merge it to add the sequence needed to add matchers
 
-  # AthenaMT or Legacy
-  InputType = 'MT' if AthenaMT else 'Legacy'
+  # Match HLT to offline jets
+  for j1,j2 in JetColls2Match[InputType].items():
+    name = 'Matching_{}_{}'.format(j1,j2)
+    alg = CompFactory.JetMatcherAlg(name, JetContainerName1=j1,JetContainerName2=j2)
+    cfg.addEventAlgo(alg,sequenceName='AthMonSeq_TrigJetMonitorAlgorithm') # Add matchers to monitoring alg sequence
 
   # Loop over L1 jet collectoins
   for jetcoll in L1JetCollections:
@@ -600,13 +627,13 @@ if __name__=='__main__':
 
   # Loop over HLT jet chains
   for chain,jetcoll in Chain2JetCollDict[InputType].items():
+    # kinematic plots
     if AthenaMT:
       chainMonitorConfT = jetChainMonitoringConfig(ConfigFlags,jetcoll,chain,AthenaMT,True)
       chainMonitorConfT.toAlg(helper)
     chainMonitorConfF = jetChainMonitoringConfig(ConfigFlags,jetcoll,chain,AthenaMT,False)
     chainMonitorConfF.toAlg(helper)
-
-    # Produce efficiency plots
+    # efficiency plots
     refChain       = 'NONE'
     offlineJetColl = 'NONE'
     if chain in TurnOnCurves[InputType]:
@@ -618,4 +645,7 @@ if __name__=='__main__':
 
   cfg.merge(helper.result())
   
+  # Print config
+  cfg.printConfig(withDetails=PrintDetailedConfig)
+
   cfg.run()
-- 
GitLab


From d84bb23032a01177d6810a9f3160c35d839b2d4a Mon Sep 17 00:00:00 2001
From: Ludovica Aperio Bella <ludovica.aperio.bella@cern.ch>
Date: Thu, 17 Dec 2020 12:30:10 +0000
Subject: [PATCH 074/308] ATLASRECTS-5709 : Forward electron cluster cells

---
 .../share/RecExCommon_topOptions.py           |   2 +
 .../python/egammaLargeFWDClusterMakerAlg.py   |  27 ++
 .../egammaLargeFWDClusterMakerAlgConfig.py    |  31 +++
 .../egammaConfig/python/egammaConfigFlags.py  |   7 +-
 .../egammaRec/python/egammaForwardGetter.py   |  20 +-
 .../egamma/egammaRec/python/egammaKeys.py     |   8 +-
 .../share/egammaOutputItemList_jobOptions.py  |   7 +-
 .../egammaLargeFWDClusterMakerConfig.py       |  21 ++
 .../python/egammaToolsFactories.py            |   8 +
 .../src/egammaLargeClusterMaker.cxx           | 254 ++++++++++++------
 .../egammaTools/src/egammaLargeClusterMaker.h |  15 ++
 11 files changed, 316 insertions(+), 84 deletions(-)
 create mode 100644 Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlg.py
 create mode 100644 Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
 create mode 100644 Reconstruction/egamma/egammaTools/python/egammaLargeFWDClusterMakerConfig.py

diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 9988b612aecf..4e676def9872 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -1285,6 +1285,8 @@ if ( rec.doAOD() or rec.doWriteAOD()) and not rec.readAOD() :
             if ( rec.readESD() or jobproperties.egammaRecFlags.Enabled ) and not rec.ScopingLevel()==4 and rec.doEgamma :
                 from egammaRec import egammaKeys
                 addClusterToCaloCellAOD(egammaKeys.outputClusterKey())
+                addClusterToCaloCellAOD(egammaKeys.outputFwdClusterKey())
+                addClusterToCaloCellAOD(egammaKeys.outputEgammaLargeFWDClustersKey())
                 if "itemList" in metadata:
                     if ('xAOD::CaloClusterContainer', egammaKeys.EgammaLargeClustersKey()) in metadata["itemList"]:
                         # check first for priority if both keys are in metadata
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlg.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlg.py
new file mode 100644
index 000000000000..55d7995fc77c
--- /dev/null
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlg.py
@@ -0,0 +1,27 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+__doc__ = """ToolFactory to instantiate egammaLargeClusterMaker
+with FWD configuration"""
+__author__ = "Jovan Mitrevski"
+
+from egammaTools.egammaToolsFactories import egammaLargeFWDClusterMakerTool
+from CaloRec import CaloRecConf
+from egammaRec.Factories import AlgFactory, FcnWrapper
+from egammaRec import egammaKeys
+from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
+
+
+def clusMakerTools():
+    return [egammaLargeFWDClusterMakerTool()]
+
+egammaLargeFWDClusterMakerAlg = AlgFactory(
+    CaloRecConf.CaloClusterMaker,
+    name="egammaLargeFWDClusterMaker",
+    SaveUncalibratedSignalState=False,
+    ClustersOutputName=egammaKeys.EgammaLargeFWDClustersKey(),
+    ClusterMakerTools=FcnWrapper(clusMakerTools),
+    ClusterCorrectionTools=make_CaloSwCorrections("FWDele6_6",
+                                                  suffix="Nocorr",
+                                                  version="none",
+                                                  corrlist=[],
+                                                  cells_name=egammaKeys.caloCellKey()))
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
new file mode 100644
index 000000000000..5bfcfc53493f
--- /dev/null
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
@@ -0,0 +1,31 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" 
+__author__ = "Jovan Mitrevski"
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+from egammaTools.egammaLargeFWDClusterMakerConfig import egammaLargeFWDClusterMakerCfg
+from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
+CaloClusterMaker=CompFactory.CaloClusterMaker
+
+def egammaLargeFWDClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs):
+
+    acc = ComponentAccumulator
+    
+    kwargs.setdefault("SaveUncalibratedSignalState", False)
+    kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeFWDClusters)
+
+    if "ClusterMakerTools" not in kwargs:
+        toolAcc = egammaLargeFWDClusterMakerCfg(flags)
+        kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ]
+        acc.merge(toolAcc)
+
+    kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("FWDele6_6",
+                                                                       suffix="Nocorr",
+                                                                       version="none",
+                                                                       cells_name=flags.Egamma.Keys.Input.CaloCells))
+
+    acc.addEventAlgo(CaloClusterMaker(name, **kwargs))
+    return acc
+
diff --git a/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py b/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py
index 16e35e252163..1da6c4c5edfe 100644
--- a/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py
+++ b/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py
@@ -92,7 +92,12 @@ def createEgammaConfigFlags():
     egcf.addFlag("Egamma.Keys.Output.ForwardClusters", 'ForwardElectronClusters')
     egcf.addFlag("Egamma.Keys.Output.ForwardClustersSuppESD", '-SisterCluster')
     egcf.addFlag("Egamma.Keys.Output.ForwardClustersSuppAOD",
-                 '-SisterCluster.-CellLink')
+                 '-SisterCluster')
+
+    # These are the clusters that are used to determine which cells to write out to AOD
+    egcf.addFlag("Egamma.Keys.Output.EgammaLargeFWDClusters", 'egamma66FWDClusters')
+    egcf.addFlag("Egamma.Keys.Output.EgammaLargeFWDClustersSuppESD", '')
+    # don't define SuppAOD because the whole container is suppressed
 
     egcf.addFlag("Egamma.Keys.Output.Photons", 'Photons')
     egcf.addFlag("Egamma.Keys.Output.PhotonsSuppESD", '')
diff --git a/Reconstruction/egamma/egammaRec/python/egammaForwardGetter.py b/Reconstruction/egamma/egammaRec/python/egammaForwardGetter.py
index 13901af9f779..dca122f156c0 100755
--- a/Reconstruction/egamma/egammaRec/python/egammaForwardGetter.py
+++ b/Reconstruction/egamma/egammaRec/python/egammaForwardGetter.py
@@ -47,11 +47,11 @@ egammaForwardBuilder = AlgFactory(
 
 
 class egammaForwardGetter (Configured):
-
+    
     def configure(self):
         mlog = logging.getLogger('egammaForwardGetter.py::configure:')
         mlog.info('entering')
-
+        
         # configure egammaForward here:
         try:
             self._egammaFwdBuilderHandle = egammaForwardBuilder()
@@ -59,7 +59,21 @@ class egammaForwardGetter (Configured):
             mlog.error("could not get handle to egammaForward")
             traceback.print_exc()
             return False
+            
+            # the egammaLargeFWDClusterMaker
+            # (Which chooses the cells to store in the AOD)
+        from egammaAlgs.egammaLargeFWDClusterMakerAlg import (
+            egammaLargeFWDClusterMakerAlg)
+        try:
+            self._egammaLargeClusterMaker = egammaLargeFWDClusterMakerAlg()
+        except Exception:
+            mlog.error("could not get handle to egammaLargeClusterMaker")
+            import traceback
+            traceback.print_exc()
+            return False
+                
         return True
-
+                
     def egammaFwdBuilderHandle(self):
         return self._egammaFwdBuilderHandle
+                    
diff --git a/Reconstruction/egamma/egammaRec/python/egammaKeys.py b/Reconstruction/egamma/egammaRec/python/egammaKeys.py
index b6a4785be13a..51f654eb9a9e 100644
--- a/Reconstruction/egamma/egammaRec/python/egammaKeys.py
+++ b/Reconstruction/egamma/egammaRec/python/egammaKeys.py
@@ -23,6 +23,8 @@ class egammaKeysDict:
         Cluster=['xAOD::CaloClusterContainer', 'egammaClusters', '', ''],
         EgammaLargeClusters=['xAOD::CaloClusterContainer',
                              'egamma711Clusters', '', ''],  # not output to AOD
+        EgammaLargeFWDClusters=['xAOD::CaloClusterContainer',
+                                'egamma66FWDClusters', '', ''],  # not output to AOD
         TopoSeededCluster=['xAOD::CaloClusterContainer',
                            'egammaTopoSeededClusters', '', '-CellLink'],
         Electron=['xAOD::ElectronContainer', 'Electrons',
@@ -35,7 +37,7 @@ class egammaKeysDict:
         FwdElectron=['xAOD::ElectronContainer',
                      'ForwardElectrons', '', FwdElectronisemSupress],
         FwdCluster=['xAOD::CaloClusterContainer',
-                    'ForwardElectronClusters', '-SisterCluster', '.-CellLink'],
+                    'ForwardElectronClusters', '-SisterCluster', ''],
         Photon=['xAOD::PhotonContainer', 'Photons', '',
                 ShowerShapesSuppress+PhotonisemSupress],
         TrackParticle=['xAOD::TrackParticleContainer', 'GSFTrackParticles',
@@ -58,6 +60,10 @@ class egammaKeysDict:
                                               outputs['EgammaLargeClusters'][1] +
                                               '_links',
                                               '', '']
+    outputs['EgammaLargeFWDClustersCellLink'] = ['CaloClusterCellLinkContainer',
+                                              outputs['EgammaLargeFWDClusters'][1] +
+                                              '_links',
+                                              '', '']
     #
 
 
diff --git a/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py
index 04f7cb9a01ca..7b3d2acebc67 100755
--- a/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py
+++ b/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py
@@ -44,14 +44,13 @@ def addAuxContainer(outputList, cType, cKey, auxOptionAll='', auxOptionAOD=''):
 AOD_outputs = [i for i, j in egammaKeysDict.outputs.items()
                if i not in ('EgammaRec', 'PhotonSuperRec',
                             'ElectronSuperRec', 'TopoSeededCellLink',
-                            'FwdClusterCellLink', 'EgammaLargeClusters',
-                            'EgammaLargeClustersCellLink')]
+                            'EgammaLargeClusters',
+                            'EgammaLargeClustersCellLink','EgammaLargeFWDClusters', 'EgammaLargeFWDClustersCellLink')]
 
 
 ESD_outputs = [i for i, j in egammaKeysDict.outputs.items()
                if i not in ('EgammaRec', 'PhotonSuperRec',
-                            'ElectronSuperRec', 'TopoSeededCellLink',
-                            'FwdClusterCellLink')]
+                            'ElectronSuperRec', 'TopoSeededCellLink')]
 
 # Define egammaAODList in the proper format (<type>#<key><option>),
 # including aux containers
diff --git a/Reconstruction/egamma/egammaTools/python/egammaLargeFWDClusterMakerConfig.py b/Reconstruction/egamma/egammaTools/python/egammaLargeFWDClusterMakerConfig.py
new file mode 100644
index 000000000000..2d2938619f85
--- /dev/null
+++ b/Reconstruction/egamma/egammaTools/python/egammaLargeFWDClusterMakerConfig.py
@@ -0,0 +1,21 @@
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+
+__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" 
+__author__ = "Jovan Mitrevski"
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+egammaLargeFWDClusterMaker=CompFactory.egammaLargeFWDClusterMaker
+
+def egammaLargeFWDClusterMakerCfg(flags, **kwargs):
+
+    acc = ComponentAccumulator
+    
+    kwargs.setdefault("CellsName", flags.Egamma.Keys.Input.CaloCells)
+    kwargs.setdefault("InputClusterCollection", flags.Egamma.Keys.Output.FwdCluster)
+    kwargs.setdefault("doFWDelesurraundingWindows", True)
+
+    acc.setPrivateTools(egammaLargeFWDClusterMaker(**kwargs))
+
+    return acc
+
diff --git a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py
index 17caae683d5b..9871d1e65260 100644
--- a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py
+++ b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py
@@ -124,6 +124,14 @@ egammaLargeClusterMakerTool = ToolFactory(
     CellsName=egammaKeys.caloCellKey()
 )
 
+egammaLargeFWDClusterMakerTool = ToolFactory(
+    egammaToolsConf.egammaLargeClusterMaker,
+    name="egammaLCFWDMakerTool",
+    InputClusterCollection=egammaKeys.FwdClusterKey(),
+    CellsName=egammaKeys.caloCellKey(),
+    doFWDelesurraundingWindows = True
+)
+
 # Electron Selectors
 ElectronPIDBuilder = ToolFactory(
     EMPIDBuilderElectronBase,
diff --git a/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.cxx b/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.cxx
index f14bc25c976c..5b4679b947d7 100644
--- a/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.cxx
+++ b/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.cxx
@@ -5,6 +5,7 @@
 #include "egammaLargeClusterMaker.h"
 #include "CaloEvent/CaloCellContainer.h"
 #include "CaloEvent/CaloClusterCellLink.h"
+#include "CaloUtils/CaloCellList.h"
 #include "CaloUtils/CaloClusterStoreHelper.h"
 #include "egammaUtils/egammaEnergyPositionAllSamples.h"
 #include "xAODCaloEvent/CaloCluster.h"
@@ -52,83 +53,186 @@ egammaLargeClusterMaker::execute(const EventContext& ctx,
 
   const CaloDetDescrManager* dd_man = nullptr;
   ATH_CHECK(detStore()->retrieve(dd_man, "CaloMgr"));
-
+  
   // The main loop over clusters
   for (const auto *cluster : *inputClusters) {
-
-    // find the center of the cluster, copying the logic of
-    // egammaMiddleShape.cxx
-
-    // check if cluster is in barrel or in the end-cap
-    if (!cluster->inBarrel() && !cluster->inEndcap()) {
-      ATH_MSG_DEBUG(" Cluster is neither in Barrel nor in Endcap; skipping ");
-      continue;
-    }
-
-    // check if cluster is in barrel or end-cap
-    bool in_barrel = egammaEnergyPositionAllSamples::inBarrel(*cluster, 2);
-    CaloSampling::CaloSample sam = CaloSampling::EMB2;
-    if (in_barrel) {
-      sam = CaloSampling::EMB2;
-    } else {
-      sam = CaloSampling::EME2;
-    }
-    // granularity in (eta,phi) in the pre sampler
-    // CaloCellList needs both enums: subCalo and CaloSample
-    auto eta = cluster->etaSample(sam);
-    auto phi = cluster->phiSample(sam);
-
-    if ((eta == 0. && phi == 0.) || fabs(eta) > 100) {
-      return StatusCode::SUCCESS;
-    }
-
-    // Should get overritten
-    bool barrel = false;
-    CaloCell_ID::SUBCALO subcalo = CaloCell_ID::LAREM;
-    int sampling_or_module = 0;
-
-    CaloDetDescrManager::decode_sample(
+    
+    if (!m_isFWD) {
+      // find the center of the cluster, copying the logic of
+      // egammaMiddleShape.cxx
+      
+      // check if cluster is in barrel or in the end-cap
+      if (!cluster->inBarrel() && !cluster->inEndcap()) {
+	ATH_MSG_DEBUG(" Cluster is neither in Barrel nor in Endcap; skipping ");
+	continue;
+      }
+      
+      // check if cluster is in barrel or end-cap
+      bool in_barrel = egammaEnergyPositionAllSamples::inBarrel(*cluster, 2);
+      CaloSampling::CaloSample sam = CaloSampling::EMB2;
+      if (in_barrel) {
+	sam = CaloSampling::EMB2;
+      } else {
+	sam = CaloSampling::EME2;
+      }
+      
+      // granularity in (eta,phi) in the pre sampler
+      // CaloCellList needs both enums: subCalo and CaloSample
+      auto eta = cluster->etaSample(sam);
+      auto phi = cluster->phiSample(sam);
+      
+      if ((eta == 0. && phi == 0.) || fabs(eta) > 100) {
+	return StatusCode::SUCCESS;
+      }
+      
+      // Should get overritten
+      bool barrel = false;
+      CaloCell_ID::SUBCALO subcalo = CaloCell_ID::LAREM;
+      int sampling_or_module = 0;
+      
+      CaloDetDescrManager::decode_sample(
       subcalo, barrel, sampling_or_module, (CaloCell_ID::CaloSample)sam);
-
-    // Get the corresponding grannularities : needs to know where you are
-    //                  the easiest is to look for the CaloDetDescrElement
-
-    const CaloDetDescrElement* dde =
-      dd_man->get_element(CaloCell_ID::LAREM, 0, barrel, eta, phi);
-
-    // if object does not exist then return
-    if (!dde) {
-      return StatusCode::SUCCESS;
-    }
-
-    // local granularity
-    auto deta = dde->deta();
-    auto dphi = dde->dphi();
-
-    // search the hottest cell around the (eta,phi)
-    // (eta,phi) are defined as etaSample() and phiSample
-    // around this position a hot cell is searched for in a window
-    // (m_neta*m_deta,m_nphi*m_dphi), by default (m_neta,m_nphi)=(7,7)
-    CaloLayerCalculator calc;
-    StatusCode sc = calc.fill(*dd_man,
-                              cellcoll.ptr(),
-                              cluster->etaSample(sam),
-                              cluster->phiSample(sam),
-                              m_neta * deta,
-                              m_nphi * dphi,
-                              (CaloSampling::CaloSample)sam);
-    if (sc.isFailure()) {
-      ATH_MSG_WARNING("CaloLayerCalculator failed  fill ");
-    }
-    double etamax = calc.etarmax();
-    double phimax = calc.phirmax();
-
-    // create the new cluster
-    xAOD::CaloCluster* newCluster =
-      CaloClusterStoreHelper::makeCluster(collection, cellcoll.ptr());
-    newCluster->setEta0(etamax);
-    newCluster->setPhi0(phimax);
-    newCluster->setClusterSize(xAOD::CaloCluster::SW_7_11);
-  }
+      
+      // Get the corresponding grannularities : needs to know where you are
+      //                  the easiest is to look for the CaloDetDescrElement
+      
+      const CaloDetDescrElement* dde =
+	dd_man->get_element(CaloCell_ID::LAREM, 0, barrel, eta, phi);
+      
+      // if object does not exist then return
+      if (!dde) {
+	return StatusCode::SUCCESS;
+      }
+      
+      // local granularity
+      auto deta = dde->deta();
+      auto dphi = dde->dphi();
+      
+      // search the hottest cell around the (eta,phi)
+      // (eta,phi) are defined as etaSample() and phiSample
+      // around this position a hot cell is searched for in a window
+      // (m_neta*m_deta,m_nphi*m_dphi), by default (m_neta,m_nphi)=(7,7)
+      CaloLayerCalculator calc;
+      StatusCode sc = calc.fill(*dd_man,
+				cellcoll.ptr(),
+				cluster->etaSample(sam),
+				cluster->phiSample(sam),
+				m_neta * deta,
+				m_nphi * dphi,
+				(CaloSampling::CaloSample)sam);
+      if (sc.isFailure()) {
+	ATH_MSG_WARNING("CaloLayerCalculator failed  fill ");
+      }
+      double etamax = calc.etarmax();
+      double phimax = calc.phirmax();
+      
+      // create the new cluster
+      xAOD::CaloCluster* newCluster =
+	CaloClusterStoreHelper::makeCluster(collection, cellcoll.ptr());
+      newCluster->setEta0(etamax);
+      newCluster->setPhi0(phimax);
+      newCluster->setClusterSize(xAOD::CaloCluster::SW_7_11);
+      
+    } else { 
+      // FWD cluster collection
+      
+      // check if cluster is in EMEC or FCAL 
+      if (cluster->inBarrel()) {
+	ATH_MSG_DEBUG(" Cluster is not in FWD; skip ");
+	continue;
+      } else {
+	ATH_MSG_DEBUG (" CLuster is FWD Cluster ");
+      }
+      
+      // check if cluster is in FCAL or EMEC
+      bool in_EMEC = false;
+      if (cluster->eSample(CaloSampling::EME2) > cluster->eSample(CaloSampling::FCAL0) )
+	in_EMEC = true;
+      
+      CaloSampling::CaloSample sam = CaloSampling::FCAL0;
+      if (in_EMEC) {
+	sam = CaloSampling::EME2;
+      } else {
+	sam = CaloSampling::FCAL0;
+      }
+      
+      // granularity in (eta,phi) in the pre sampler
+      // CaloCellList needs both enums: subCalo and CaloSample
+      auto eta = cluster->etaSample(sam);
+      auto phi = cluster->phiSample(sam);
+       
+      if ((eta == 0. && phi == 0.) || fabs(eta) > 100) {
+	return StatusCode::SUCCESS;
+      }
+      
+      // Should get overritten
+      bool emec = false;
+      CaloCell_ID::SUBCALO subcalo = CaloCell_ID::LARFCAL;
+      int sampling_or_module = 0;
+      
+      CaloDetDescrManager::decode_sample(subcalo, emec, sampling_or_module, (CaloCell_ID::CaloSample)sam);
+      
+      // Get the corresponding grannularities : needs to know where you are
+      //                  the easiest is to look for the CaloDetDescrElement
+      //    const CaloDetDescrElement* get_element_FCAL (const CaloDetDescriptor* reg, double eta, double phi) const;
+      const CaloDetDescrElement* dde =
+	dd_man->get_element(subcalo, sampling_or_module, emec, eta, phi);
+      
+      // if object does not exist then return
+      if (!dde) {
+	return StatusCode::SUCCESS;
+      }
+      
+      // local granularity
+      auto deta = dde->deta();
+      auto dphi = dde->dphi();
+      
+      // search the hottest cell around the (eta,phi)
+      // (eta,phi) are defined as etaSample() and phiSample
+      // around this position a hot cell is searched for in a window
+      // (m_neta*m_deta,m_nphi*m_dphi), by default (m_neta,m_nphi)=(6,6) 
+      // for EMEC-OUTER FWD much bigger cell size 
+      
+      // create the new cluster
+      xAOD::CaloCluster* newCluster =
+	CaloClusterStoreHelper::makeCluster(collection, cellcoll.ptr());
+      
+      // if In EMEC
+      CaloLayerCalculator calc;
+      StatusCode sc = calc.fill(*dd_man,
+				cellcoll.ptr(),
+				cluster->etaSample(sam),
+				cluster->phiSample(sam),
+				m_netaFWD * deta,
+				m_nphiFWD * dphi,
+				(CaloSampling::CaloSample)sam, in_EMEC ? newCluster : nullptr);
+      
+      if (sc.isFailure()) {
+	ATH_MSG_WARNING("CaloLayerCalculator failed  fill for FWD cluster");
+      }
+      double etamax = calc.etarmax();
+      double phimax = calc.phirmax();
+      
+      newCluster->setEta0(etamax);
+      newCluster->setPhi0(phimax);
+      
+      if (!in_EMEC) {
+	// If FCAL need to add cell to cluster in a cone
+	std::vector<const CaloCell*> cells;
+	cells.reserve(300);
+	CaloCellList myList(cellcoll.ptr());
+	myList.select(cluster->etaSample(sam), cluster->phiSample(sam), m_drFWD,(CaloSampling::CaloSample)sam);
+	//  myList.select(dde,newCluster->eta0(), newCluster->phi0(),m_drFWD,(CaloSampling::CaloSample)sam); 
+	cells.insert(cells.end(), myList.begin(), myList.end());
+	
+	for ( const auto *cell : cells ) {
+	  if( !cell || !cell->caloDDE() ) continue;
+	  int index = cellcoll.ptr()->findIndex(cell->caloDDE()->calo_hash());
+	  if( index == -1 ) continue;
+	  newCluster->addCell(index,1.);
+	}
+      }
+    }// end isFWD
+  }// main loop over clusters
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.h b/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.h
index 6dc09bf413b7..27c6d547a67f 100644
--- a/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.h
+++ b/Reconstruction/egamma/egammaTools/src/egammaLargeClusterMaker.h
@@ -51,6 +51,12 @@ private:
   /** @brief Cell container*/
   SG::ReadHandleKey<CaloCellContainer> m_cellsKey {this,
       "CellsName", "AllCalo", "Names of containers which contain cells"};
+
+  /** @brief do FWD cell **/
+  Gaudi::Property<bool> m_isFWD{ this,
+      "doFWDelesurraundingWindows",
+      false,
+      "Save FWD electron surraunding windows" };
   
   Gaudi::Property<double> m_neta {this, "Neta", 7.0,
       "Number of eta cells in each sampling in which to look for hottest cell"};
@@ -58,6 +64,15 @@ private:
   Gaudi::Property<double> m_nphi {this, "Nphi", 7.0,
       "Number of phi cell in each sampling in which to look for hottest cell"};
 
+  Gaudi::Property<double> m_netaFWD {this, "NetaFWD", 6.0,
+      "Number of eta cells in each sampling in which to look for hottest cell"};
+
+  Gaudi::Property<double> m_nphiFWD {this, "NphiFWD", 6.0,
+      "Number of phi cell in each sampling in which to look for hottest cell"};
+
+  Gaudi::Property<double> m_drFWD {this, "deltaR_FCAL", 0.4,
+      "Cone size to collec cell around hottest-cell FCAL"};
+
 
 };
 
-- 
GitLab


From 1404dd88f624304292405a3f31ed8fcc5552eacf Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Thu, 17 Dec 2020 14:41:11 +0100
Subject: [PATCH 075/308] Made AthenaConfiguration compatible with AthAnalysis.

---
 Control/AthenaConfiguration/CMakeLists.txt    | 24 +++++++++----------
 .../python/AutoConfigFlags.py                 |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt
index fd94dd784b9c..dc6084e7b04f 100644
--- a/Control/AthenaConfiguration/CMakeLists.txt
+++ b/Control/AthenaConfiguration/CMakeLists.txt
@@ -4,30 +4,31 @@
 atlas_subdir( AthenaConfiguration )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py python/iconfTool 
+atlas_install_python_modules( python/*.py python/iconfTool
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( share/confTool.py python/iconfTool/iconfTool python/CARunner.py)
 
-atlas_add_test( ComponentAccumulatorTest
-   SCRIPT python -m unittest -v AthenaConfiguration.ComponentAccumulatorTest
-   POST_EXEC_SCRIPT nopost.sh )
-
-
 atlas_add_test( AthConfigFlagsTest
    SCRIPT python -m unittest AthenaConfiguration.AthConfigFlags
    POST_EXEC_SCRIPT nopost.sh )
 
-atlas_add_test( AllConfigFlagsTest_EVNT_test
-                SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_EVNT.py
-                PROPERTIES TIMEOUT 300  )
+if( NOT XAOD_ANALYSIS )
+   atlas_add_test( ComponentAccumulatorTest
+      SCRIPT python -m unittest -v AthenaConfiguration.ComponentAccumulatorTest
+      POST_EXEC_SCRIPT nopost.sh )
 
-if( NOT GENERATIONBASE )
+   atlas_add_test( AllConfigFlagsTest_EVNT_test
+      SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_EVNT.py
+      PROPERTIES TIMEOUT 300  )
+endif()
+
+if( NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
     atlas_add_test( AllConfigFlagsTest_HITS_test
                     SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_HITS.py
                     PROPERTIES TIMEOUT 300  )
 endif()
 
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
     atlas_add_test( AllConfigFlagsTest_RDO_test
                     SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_RDO.py
                     PROPERTIES TIMEOUT 300  )
@@ -36,4 +37,3 @@ if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
                     SCRIPT python -m AthenaConfiguration.AllConfigFlags
                     POST_EXEC_SCRIPT nopost.sh )
 endif()
-
diff --git a/Control/AthenaConfiguration/python/AutoConfigFlags.py b/Control/AthenaConfiguration/python/AutoConfigFlags.py
index cc58a4fb4b8a..5ac59444e947 100644
--- a/Control/AthenaConfiguration/python/AutoConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AutoConfigFlags.py
@@ -1,7 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from PyUtils.MetaReader import read_metadata
-from AtlasGeoModel.AtlasGeoDBInterface import AtlasGeoDBInterface
 from AthenaCommon.Logging import logging
 from functools import lru_cache
 
@@ -33,6 +32,7 @@ def _initializeGeometryParameters(geoTag):
     from PixelGeoModel import PixelGeoDB
     from LArGeoAlgsNV import LArGeoDB
     from MuonGeoModel import MuonGeoDB
+    from AtlasGeoModel.AtlasGeoDBInterface import AtlasGeoDBInterface
 
     dbGeomCursor = AtlasGeoDBInterface(geoTag)
     dbGeomCursor.ConnectAndBrowseGeoDB()
-- 
GitLab


From 8f8fdfac10329546cd208476a850bd55533a29ef Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 14:58:17 +0100
Subject: [PATCH 076/308] egammaD3PDMaker: cmake cleanup, enable flake8

Update link dependencies and enable flake8. Delete two unused modules.
---
 .../D3PDMaker/egammaD3PDMaker/CMakeLists.txt  |  9 +++----
 .../python/CorrectionClusterD3PDObject.py     |  8 +-----
 .../python/CorrectionClusterGetter.py         |  6 ++---
 .../python/ElectronD3PDObject.py              |  9 +++----
 .../python/GSFElectronD3PDObject.py           | 25 ------------------
 .../python/PhotonD3PDObject.py                | 12 ++-------
 .../python/egammaTriggerBitsD3PDObject.py     | 26 -------------------
 .../python/egammaTruthD3PDObject.py           |  4 +--
 8 files changed, 13 insertions(+), 86 deletions(-)
 delete mode 100644 PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/GSFElectronD3PDObject.py
 delete mode 100644 PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTriggerBitsD3PDObject.py

diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/CMakeLists.txt
index eda4cfa902c5..8b4a3693da9a 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: egammaD3PDMaker
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaD3PDMaker )
@@ -13,9 +11,8 @@ atlas_add_component( egammaD3PDMaker
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib CaloIdentifier AthenaKernel Navigation StoreGateLib SGtests EventKernel FourMomUtils xAODBase xAODCaloEvent xAODEgamma xAODJet xAODTracking xAODTruth GaudiKernel AnalysisTriggerEvent D3PDMakerUtils TriggerD3PDMakerLib MCTruthClassifierLib egammaEvent TrkParameters TrkExInterfaces TrkVertexFitterInterfaces TrigObjectMatchingLib TrigCaloEvent TrigInDetEvent TrigParticle CaloTrackingGeometryLib )
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib CaloIdentifier AthenaKernel Navigation StoreGateLib EventKernel FourMomUtils xAODBase xAODCaloEvent xAODEgamma xAODJet xAODTracking xAODTruth GaudiKernel AnalysisTriggerEvent D3PDMakerInterfaces D3PDMakerUtils TriggerD3PDMakerLib MCTruthClassifierLib egammaEvent TrkParameters TrkExInterfaces TrkVertexFitterInterfaces CaloTrackingGeometryLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
-
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
index cce388f2d6b8..2528bbe8c2e4 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
 # @author scott snyder <snyder@bnl.gov>
@@ -11,15 +10,10 @@
 
 
 from D3PDMakerCoreComps.D3PDObject    import make_SGDataVector_D3PDObject
-from D3PDMakerCoreComps               import SGObjGetterTool
-from D3PDMakerConfig.D3PDMakerFlags   import D3PDMakerFlags
 from egammaD3PDAnalysis.TileGapConfig import TileGapConfig
 from D3PDMakerCoreComps.D3PDObject    import DeferArg
-from D3PDMakerCoreComps.resolveSGKey  import resolveSGKey
-from AthenaCommon.AlgSequence         import AlgSequence
 import EventCommonD3PDMaker
 import D3PDMakerCoreComps
-import egammaD3PDMaker
 import CaloD3PDMaker
 
 
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterGetter.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterGetter.py
index 7b5f30e44bf5..31fd018d9f3c 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterGetter.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterGetter.py
@@ -99,13 +99,13 @@ def make_CorrectionClusterGetter (typ, eta_size, phi_size,
     else:
         sizekey = "%d%d" % (eta_size, phi_size)
 
-    if output_key == None:
+    if output_key is None:
         output_key = name_base + typ + sizekey + suffix
 
-    if algname == None:
+    if algname is None:
         algname = output_key
 
-    if copier_name == None:
+    if copier_name is None:
         copier_name = algname + '_copier'
 
     key = typ
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
index a7327726cea8..b0df9756add6 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
@@ -7,18 +7,15 @@
 # @brief Configure electron D3PD object.
 #
 
-from egammaD3PDMaker.defineBlockAndAlg   \
-     import defineAlgLODFunc, defineBlockAndAlg
+from egammaD3PDMaker.defineBlockAndAlg      import defineBlockAndAlg
 from EventCommonD3PDMaker.DRAssociation     import DRAssociation
 from TrackD3PDMaker.xAODTrackSummaryFiller  import xAODTrackSummaryFiller
 from D3PDMakerCoreComps.D3PDObject          import make_SGDataVector_D3PDObject
 from D3PDMakerCoreComps.D3PDObject          import DeferArg
-from D3PDMakerCoreComps.SimpleAssociation   import SimpleAssociation, IdentityAssociation
-from D3PDMakerCoreComps.IndexAssociation    import IndexAssociation
+from D3PDMakerCoreComps.SimpleAssociation   import SimpleAssociation
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
-from D3PDMakerCoreComps.resolveSGKey        import resolveSGKey, testSGKey
+from D3PDMakerCoreComps.resolveSGKey        import testSGKey
 from D3PDMakerConfig.D3PDMakerFlags         import D3PDMakerFlags
-# from TriggerD3PDMaker.defineTriggerBits     import defineTriggerBits
 from RecExConfig.RecFlags                   import rec
 import egammaD3PDMaker
 import EventCommonD3PDMaker
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/GSFElectronD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/GSFElectronD3PDObject.py
deleted file mode 100644
index 740cf17002f4..000000000000
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/GSFElectronD3PDObject.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id: GSFElectronD3PDObject.py 523036 2012-10-24 15:50:12Z ssnyder $
-#
-# @file egammaD3PDMaker/python/GSFElectronD3PDObject.py
-# @author scott snyder <snyder@bnl.gov>
-# @date 2009
-# @brief Configure GSF electron D3PD object.
-#
-
-from egammaD3PDMaker.defineBlockAndAlg      import defineBlockAndAlg
-from D3PDMakerCoreComps.D3PDObject          import DeferArg
-from D3PDMakerCoreComps.resolveSGKey        import resolveSGKey
-from D3PDMakerConfig.D3PDMakerFlags         import D3PDMakerFlags
-from AthenaCommon.AlgSequence               import AlgSequence
-from RecExConfig.RecFlags                   import rec
-import egammaD3PDMaker
-import egammaD3PDAnalysis
-import EventCommonD3PDMaker
-import D3PDMakerCoreComps
-
-
-from egammaD3PDMaker.ElectronD3PDObject import ElectronD3PDObject
-
-GSFElectronD3PDObject = ElectronD3PDObject.copy()
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
index 8362699959af..fbf504ce8a1c 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
@@ -7,26 +7,18 @@
 # @brief Configure photon D3PD object.
 #
 
-
-# from egammaD3PDMaker.isem_version            import isem_version
-from egammaD3PDMaker.defineBlockAndAlg   \
-     import defineAlgLODFunc, defineBlockAndAlg
+from egammaD3PDMaker.defineBlockAndAlg       import defineBlockAndAlg
 from EventCommonD3PDMaker.DRAssociation      import DRAssociation
 from D3PDMakerCoreComps.D3PDObject           import make_SGDataVector_D3PDObject
 from D3PDMakerCoreComps.D3PDObject           import DeferArg
 from D3PDMakerCoreComps.SimpleAssociation    import SimpleAssociation
-# from D3PDMakerCoreComps.IndexAssociation     import IndexAssociation
 from D3PDMakerConfig.D3PDMakerFlags          import D3PDMakerFlags
-from D3PDMakerCoreComps.resolveSGKey         import resolveSGKey, testSGKey
+from D3PDMakerCoreComps.resolveSGKey         import testSGKey
 from TrackD3PDMaker.xAODTrackSummaryFiller   import xAODTrackSummaryFiller
 from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
-# from TriggerD3PDMaker.defineTriggerBits      import defineTriggerBits
-# from AthenaCommon.AlgSequence                import AlgSequence
 from RecExConfig.RecFlags                    import rec
 import egammaD3PDMaker
-# import egammaD3PDAnalysis
 import EventCommonD3PDMaker
-# import CaloD3PDMaker
 import D3PDMakerCoreComps
 import TruthD3PDMaker
 import TrackD3PDMaker
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTriggerBitsD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTriggerBitsD3PDObject.py
deleted file mode 100644
index b3b24424b854..000000000000
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTriggerBitsD3PDObject.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# $Id$
-#
-# @file  egammaD3PDMaker/python/egammaTriggerBitsD3PDObject.py
-# @author  Haifeng Li <Haifeng.Li@cern.ch>, sss
-# @date    Sep, 2009
-# @brief   Define trigger bit blocks for egamma.
-#
-
-
-import D3PDMakerCoreComps
-import TriggerD3PDMaker
-from D3PDMakerCoreComps.D3PDObject  import make_Void_D3PDObject
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-
-
-# Create the object type.
-egammaTriggerBitsD3PDObject = \
-  make_Void_D3PDObject (default_name = 'egammaTriggerBitsFiller')
-
-
-#
-# The egamma trigger bits are now added in ElectronD3PDObject and
-# PhotonD3PDObject; this file is kept just for backwards compatibility.
-#
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTruthD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTruthD3PDObject.py
index f1e7f3ebcfb7..4dd8811b9da9 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTruthD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/egammaTruthD3PDObject.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file egammaD3PDMaker/python/egammaTruthD3PDObject.py
 # @author scott snyder <snyder@bnl.gov>
@@ -20,7 +19,6 @@ from D3PDMakerCoreComps.SimpleAssociation   import SimpleAssociation
 import D3PDMakerCoreComps
 import EventCommonD3PDMaker
 import TruthD3PDMaker
-import egammaD3PDAnalysis
 
 
 #FIXME:
-- 
GitLab


From ccf085bfa21e32d7dd819b41e0cdcf81f8f80f83 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Thu, 17 Dec 2020 15:07:58 +0100
Subject: [PATCH 077/308] Made xAODEventInfoCnv compatible with AthAnalysis.

---
 Event/xAOD/xAODEventInfoCnv/CMakeLists.txt           |  4 ++--
 .../python/xAODEventInfoCnvConfig.py                 | 12 +++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt b/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
index c799b37dbb38..5a2c859b9011 100644
--- a/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
@@ -5,7 +5,7 @@ atlas_subdir( xAODEventInfoCnv )
 
 # Optional dependencies:
 set( extra_libs )
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
    set( extra_libs BeamSpotConditionsData LumiBlockData )
 endif()
 
@@ -30,7 +30,7 @@ atlas_add_test( EvenInfoCnvConfigTestMT
                 SCRIPT test/EventInfoCnv_test.py -n 25 -t 3
                 PROPERTIES TIMEOUT 300 )
 
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
    atlas_add_test( EventInfoOverlayConfigTest
                    SCRIPT test/EventInfoOverlay_test.py
                    PROPERTIES TIMEOUT 300 )
diff --git a/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py b/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
index 65ab4f5ac488..ff1996d04d63 100644
--- a/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
+++ b/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
@@ -3,6 +3,7 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
@@ -21,9 +22,14 @@ def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg",
 
     # TODO: luminosity
 
-    if not disableBeamSpot and flags.Common.Project not in ["AthSimulation", "AthGeneration"]:
-        from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
-        acc.merge(BeamSpotCondAlgCfg(flags))
+    if not disableBeamSpot:
+        try:
+            from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
+            acc.merge(BeamSpotCondAlgCfg(flags))
+        except ImportError:
+            log = logging.getLogger( 'EventInfoCnvAlgCfg' )
+            log.info( 'BeamSpotConditions not available, not using it' )
+            pass
 
     xAODMaker__EventInfoCnvAlg = CompFactory.xAODMaker.EventInfoCnvAlg
     alg = xAODMaker__EventInfoCnvAlg(name, **kwargs)
-- 
GitLab


From db8b00d584ffb17966d098a1ca4f8b4b7823791c Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 15:21:24 +0100
Subject: [PATCH 078/308] JetMomentTools: cleanup and enable flake8

Enable flake8 and delete two unused modules (`JetCopyMomentsAlg`,
`JetMomentsConfigHelpers`). Only install ROOT files into data area.
---
 .../share/TruthD3PDfromEVGEN_preInclude.py    |   8 -
 .../Jet/JetMomentTools/CMakeLists.txt         |   6 +-
 .../JetMomentTools/python/GhostAssociation.py |   4 +-
 .../python/JetCopyMomentsAlg.py               |  72 ----
 .../python/JetMomentsConfigHelpers.py         | 365 ------------------
 5 files changed, 2 insertions(+), 453 deletions(-)
 delete mode 100644 Reconstruction/Jet/JetMomentTools/python/JetCopyMomentsAlg.py
 delete mode 100644 Reconstruction/Jet/JetMomentTools/python/JetMomentsConfigHelpers.py

diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/share/TruthD3PDfromEVGEN_preInclude.py b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/share/TruthD3PDfromEVGEN_preInclude.py
index 937b69d20376..d394adc7703b 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/share/TruthD3PDfromEVGEN_preInclude.py
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/share/TruthD3PDfromEVGEN_preInclude.py
@@ -34,14 +34,6 @@ from JetRec.JetRecFlags import jetFlags
 jetFlags.noStandardConfig.set_Value_and_Lock(True)
 jetFlags.evgenJets.set_Value_and_Lock(True)
 
-# This is necessary to properly disable JVF tools...
-#  Unfortunately, the functions only exist in newer releases...
-try:
-    from JetMomentTools import JetMomentsConfigHelpers
-    JetMomentsConfigHelpers.recommendedAreaAndJVFMoments = lambda *l,**a:None
-except:
-    pass
-
 #--------------------------------------------------------------------------
 # Configuration
 #--------------------------------------------------------------------------
diff --git a/Reconstruction/Jet/JetMomentTools/CMakeLists.txt b/Reconstruction/Jet/JetMomentTools/CMakeLists.txt
index 832412f36321..199ae2a0aabb 100644
--- a/Reconstruction/Jet/JetMomentTools/CMakeLists.txt
+++ b/Reconstruction/Jet/JetMomentTools/CMakeLists.txt
@@ -27,15 +27,11 @@ if( NOT XAOD_STANDALONE )
       LINK_LIBRARIES ${Boost_LIBRARIES} ${FASTJET_LIBRARIES} ${ROOT_LIBRARIES} AsgTools CaloIdentifier xAODCaloEvent xAODJet GaudiKernel JetCalibToolsLib JetEDM JetInterface JetRecLib JetUtils PFlowUtilsLib PathResolver JetMomentToolsLib ${extra_libs} )
 endif()
 
-#if( XAOD_STANDALONE )
 atlas_add_dictionary( JetMomentToolsDict
 	Root/JetMomentToolsDict.h
 	Root/selection.xml
 	LINK_LIBRARIES JetMomentToolsLib PFlowUtilsLib )
-#endif()
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
-atlas_install_runtime( share/*.root )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_data( share/*.root )
-
diff --git a/Reconstruction/Jet/JetMomentTools/python/GhostAssociation.py b/Reconstruction/Jet/JetMomentTools/python/GhostAssociation.py
index 69cf912d32e5..09d8d3b0c328 100644
--- a/Reconstruction/Jet/JetMomentTools/python/GhostAssociation.py
+++ b/Reconstruction/Jet/JetMomentTools/python/GhostAssociation.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-from AthenaCommon.AlgSequence import AlgSequence    
+from AthenaCommon.AlgSequence import AlgSequence
 def interpretJetName(jetcollName,  finder = None,input=None, mainParam=None):
     # first step : guess the finder, input , mainParam, if needed
     if finder is None:
diff --git a/Reconstruction/Jet/JetMomentTools/python/JetCopyMomentsAlg.py b/Reconstruction/Jet/JetMomentTools/python/JetCopyMomentsAlg.py
deleted file mode 100644
index 34de18617863..000000000000
--- a/Reconstruction/Jet/JetMomentTools/python/JetCopyMomentsAlg.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file:    JetMomentTools/python/JetCopyMomentsAlg.py.py
-# @purpose: <Copy some moments from a collection to another >
-# @author:  P-A Delsart <delsart in2p3 fr>
-
-__doc__     = 'some documentation here'
-__version__ = '$Revision: 1.5 $'
-__author__  = 'Sebastien Binet <binet@cern.ch>'
-
-import AthenaCommon.SystemOfUnits as Units
-import AthenaPython.PyAthena as PyAthena
-from AthenaPython.PyAthena import StatusCode
-import ROOT
-
-class JetCopyMomentsAlg (PyAthena.Alg):
-    'put some documentation here'
-    def __init__(self, name='JetCopyMomentsAlg', **kw):
-        ## init base class
-        kw['name'] = name
-        super(JetCopyMomentsAlg, self).__init__(**kw)
-
-        ## properties and data members
-        self.Moments = kw.get('Moments', []) # default value
-        self.JetCollectionSrc = kw.get('JetCollectionSrc', "") # default value
-        self.JetCollectionDest = kw.get('JetCollectionDest', "") # default value
-        return
-
-    def initialize(self):
-        self.msg.info('==> initialize...')
-        self.sg = PyAthena.py_svc ('StoreGateSvc')
-        return StatusCode.Success
-
-    def execute(self):
-        jcoll_src = list(self.sg.retrieve('JetCollection', self.JetCollectionSrc))
-        jcoll_dest = list(self.sg.retrieve('JetCollection', self.JetCollectionDest))
-
-        # sort on constit scale to help with ordering.
-        jcoll_dest.sort(key= lambda x: x.pt(2) )
-        jcoll_src.sort(key= lambda x: x.pt(2) ) 
-        getMoment = ROOT.Jet.getMoment
-        moments = self.Moments
-        
-        dr = ROOT.JetDistances.deltaR
-        needUnorderedMatch = False
-        for i, (jS, jD) in enumerate(zip(jcoll_src, jcoll_dest)):
-            if dr(jS,jD)>0.05:
-                needUnorderedMatch = True
-                break 
-            for m in moments:
-                jD.setMoment(m,jS.getMoment(m))
-
-        if needUnorderedMatch :
-            # this may happen because of final Pt cut and a calibration changing order w.r.t lcscale.
-            # fall back to a double loop with deltaR check on remaining jets
-            jcoll_src = jcoll_src[i:]
-            jcoll_dest = jcoll_dest[i:]
-            for jS in jcoll_src:
-                for jD in jcoll_dest:
-                    if dr(jS,jD)<0.05:
-                        for m in moments:
-                            jD.setMoment(m,jS.getMoment(m))
-            
-
-        
-        return StatusCode.Success
-
-    def finalize(self):
-        self.msg.info('==> finalize...')
-        return StatusCode.Success
-
-    # class JetCopyMomentsAlg
diff --git a/Reconstruction/Jet/JetMomentTools/python/JetMomentsConfigHelpers.py b/Reconstruction/Jet/JetMomentTools/python/JetMomentsConfigHelpers.py
deleted file mode 100644
index 17936d2531bc..000000000000
--- a/Reconstruction/Jet/JetMomentTools/python/JetMomentsConfigHelpers.py
+++ /dev/null
@@ -1,365 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-"""
-A set of helper function to configure calculations of additionnal jet moments.
-
-"""
-from JetRec.JetAlgConfiguration import checkAndUpdateOptions, standardJetOption
-from RecExConfig.RecFlags import rec
-from AthenaCommon.SystemOfUnits import GeV
-from AthenaCommon.AlgSequence import AlgSequence    
-from AthenaCommon.Logging import logging
-from AthenaCommon.JobProperties import jobproperties
-
-from JetRec.JetRecFlags import jetFlags 
-from JetRec.JetFinderConfig import setupAreaCalculation    
-
-from JetMomentTools.SetupJetMomentTools import *
-
-
-## A dedicated logger
-_momlog = logging.getLogger( 'JetMomentConfig' )
-
-
-# We try to schedule cpu intensive moment calculation only once. This requires to keep track of
-# moments already scheduled for a given collection. Use this dictionnary.
-_specialMomentAlgDict = {}
-
-# Some moments request can translate in modification of option to already scheduled moment tool.
-# so we keep only one main algorithm (JetAlgorithm or JetMomentCalculator) per jet collection, in order to be able to
-# retrieve & modify the relevant moment tool. 
-# However this can cause dependency issue :
-# for example, truth ghostAssoc requires JetTruthParticleFilter to run before. If a 1st call doesn't require truth ghost assoc, then later a 2nd call does, then JetTruthParticleFilter will be scheduled *after* the moment calculator alg...
-# workaround : move by jand JetTruthParticleFilter at a proper place in the topSequence or the PreD3PDSequence.
-def moveAlgInSequence(alg, seq, newpos):
-    l = seq.getChildren()
-    delattr(seq, alg.getName())
-    seq.insert(newpos, alg)
-
-
-def checkRequiredAlgPosition(seq, momAlg, requiredAlg):
-    topSeq = AlgSequence()
-    
-    if requiredAlg in topSeq:
-        truthInd = topSeq.getChildren().index(requiredAlg)
-        if momAlg in topSeq:
-            index = topSeq.getChildren().index(momAlg)
-        else:
-            # then it is in seq, and seq must be in topSeq
-            index = topSeq.getChildren().index(seq)
-        # make sure requiredAlg is before index
-        if truthInd > index:
-            moveAlgInSequence(requiredAlg, topSeq, index)
-    else:
-        # will move requiredAlg in topSeq before seq and momAlg
-        # where is momAlg ?
-        seqInd = topSeq.getChildren().index(seq)
-        if momAlg in topSeq:
-            index = topSeq.getChildren().index(momAlg)
-        else:
-            index = seqInd
-        delattr(seq, requiredAlg.getName())
-        topSeq.insert(index, requiredAlg)
-    
-
-
-def checkTruthParticleFilterPosition(seq, momAlg):
-    from JetSimTools.JetTruthParticleFilterGetter import JetTruthParticleFilterGetter
-    truthAlg = JetTruthParticleFilterGetter().alg
-    checkRequiredAlgPosition(seq, momAlg, truthAlg)
-    
-    
-
-def retrieveFinderTool(toolSeq):
-    from JetRec.JetRecConf import JetConeFinderTool, JetFastJetFinderTool
-    for t in toolSeq:
-        if isinstance(t, JetFastJetFinderTool) or isinstance(t, JetConeFinderTool):
-            return t
-
-
-import inspect
-def whosdaddy():
-    l = [ ll[3] for ll in  inspect.stack()[2:] ]
-    return l
-
-
-
-
-
-# Helper functions to schedule jet moments.
-# They are typically wrappers around functions in SetupJetMomentTools which are as generic as possible
-#  The wrappers below also perform tasks related to the particular jet collection or configuration sequence. 
-def scheduleMFTool(toolType,jetcollname, jf, alg, seq ,*l):
-    from JetMomentTools.SetupJetMomentTools import getMatchingFractionTool
-    tool, requiredAlg = getMatchingFractionTool(jetcollname, toolType, seq)
-    checkRequiredAlgPosition(seq, alg, requiredAlg)
-    return tool
-
-from JetMomentTools.JetMomentToolsConf import JetWidthTool, NumTowerInJetTool, JetEinSamplingTool
-
-
-# The dictionnary below lists the known standard moments and how to compute them.
-# keys in the dict  are shorcuts, they might represent several moments
-# values are function used to actually schedule the moment calculations 
-defaultMoments = {
-    'ghostAssoc'   : lambda *l : None,
-    'area'         : lambda jcoll,jetfinder,*l : setupAreaCalculation(jetfinder, "ActiveArea", addArea4Vec=True, addSecondArea=jetFlags.jetPerformanceJob() ) ,
-    'quality'      : lambda jetcollname,*l : getCaloQualityTool(doCellBasedVars = (jetcollname=="AntiKt4TopoEMJets" or "Tower" in jetcollname ), computeFromCluster = "Tower" not in jetcollname ),
-    'ktDeltaR'     : lambda *l : getsubJetsMomentTool(),
-    'isolation'    : lambda *l : getJetIsolationTool("JetIsolation"),
-    'jvf'          : lambda jetcollname,*l : getJetVertexAssociationTool(toolName=jetcollname+'JVAtool')    ,
-    'jvt'          : lambda jetcollname,*l : getJetVertexAssociationTool(toolName=jetcollname+'JVAtool')    ,
-    'trackMoments' : lambda *l : getJetTracksMomentTool(),
-    'clusMoments'  : lambda *l : getJetClusterMomentTool(),
-    'truthMF'      : lambda *l : scheduleMFTool("Truth",*l) ,
-    'trackMF'      : lambda *l : scheduleMFTool("Track",*l) ,
-    'larHV'        : lambda *l : getJetLArHVMomentTool(),
-    'width'        : lambda *l : JetWidthTool(),
-    'eInSampling'  : lambda *l : JetEinSamplingTool(),
-    'numTowerJet'  : lambda *l : NumTowerInJetTool(),
-    'badChanCorr'  : lambda jc,jf,alg,seq,jetAlgConfigDict : getJetBadChanCorrTool(**jetAlgConfigDict),
-    'origin'       : lambda jetcollname,*l : getORIGINMoments(jetcollname),
-    }
-
-
-## The list of standard moments keys used in reconstruction.
-standardMoments = standardJetOption("jetMoments")
-
-class TestWithMsg(object):
-    """Simply a boolean and a str message explaining why the boolean is False
-    Also supports & and | operation (logical and or) with concatenation of message"""
-    jetcollname=""
-    def __init__(self, test, failmsg):
-        self.test, self.failmsg= test, failmsg
-    def check(self, mName):
-        if self.test:
-            return True
-        _momlog.info( "No "+mName+" moments for "+self.jetcollname+". Reason : "+self.failmsg)
-        return False
-    def __and__(self, o ):
-        test = self.test and o.test
-        failmsg = [ t.failmsg for t in (self,o) if not t.test ]
-        return TestWithMsg( test, ' AND '.join(failmsg) )
-    def __or__(self, o ):
-        test = self.test or o.test
-        failmsg = '' if test else self.failmsg+' AND '+o.failmsg
-        return TestWithMsg( test, failmsg )
-
-
-def checkMomentAvailability(jetcollname, momentList, jetAlgConfigDict={}):
-    """ Input :  a jet collection name (jetcollname), list of moment keys (momentList), a jet alg configuration dict (as in JetRec.JetAlgConfiguration)
-    returns a filtered list of moment keys where moments incompatible with the jet collection or the job conditions are removed.
-    """
-    # we'll need to know what the input file is
-    from JetRec.JetGetters import guessInputFileType
-    inputFileType = guessInputFileType()
-
-
-
-    from AthenaCommon.DetFlags import DetFlags
-    from AthenaCommon.AppMgr import ToolSvc
-    from AthenaCommon.GlobalFlags  import globalflags
-    from JetRec.TrackSelectionForJets import tracksAvailableForJets
-
-    TestWithMsg.jetcollname = jetcollname
-    # short cut flags
-    # use TestWithMsg rather than simply bool only to be able to display a reason for the rejection of the moment.
-    accessCells = TestWithMsg( (inputFileType=="RDO") or (inputFileType=="ESD") , "No CaloCell available") 
-    caloJet     = TestWithMsg( ("Topo" in jetcollname) or ("Tower" in jetcollname), "Not calo jets")
-    topoJet     = TestWithMsg( "Topo" in jetcollname, "Not TopoCluster jets")
-    lctopoJet   = TestWithMsg( "LCTopo" in jetcollname, "Not LC TopoCluster jets")
-    notTruthJet = TestWithMsg( 'Truth' not in jetcollname, "Is Truth jets")
-    tracksAvailable = TestWithMsg( tracksAvailableForJets(), "Tracks selection for jets impossible")
-
-    trueTest = TestWithMsg(True,"")
-
-    # build the conditions at which moments can be built
-    compatibilityDict = {
-        'area'        : TestWithMsg('Cone' not in jetcollname, "no area for cone jets"),
-        'ghostAssoc'  : notTruthJet,
-        'width' : trueTest,
-        'numTowerJet' : topoJet & accessCells,
-        'quality'     : caloJet,
-        'badChanCorr' : caloJet & accessCells,
-        'constitCalib': lctopoJet &  TestWithMsg( not jetAlgConfigDict.get('calibName','').startswith("LC:CONST") , "Calibration differ from LC:CONST") ,
-        'jvf'         : caloJet & tracksAvailable,
-        'larHV'       : caloJet & TestWithMsg( (inputFileType=='RDO') and DetFlags.dcs.LAr_on() and globalflags.DataSource()=='data', "No proper LAr info available"),
-        'eInSampling' : (caloJet & accessCells) | (topoJet), 
-        'truthMF'     : TestWithMsg( rec.doTruth() , "Truth not available") & notTruthJet,
-        'trackMF'     : notTruthJet & tracksAvailable,
-        'trackMoments': notTruthJet & tracksAvailable,
-        
-        }
-
-    # filter moments :
-    availableMoments = set([ m for m in momentList if compatibilityDict.get(m, trueTest).check(m) ])
-    return availableMoments
-    
-
-    
-
-def findMainAlgForJetCollection(jetcollname, seq = AlgSequence()):
-    """Given a JetCollection name (jetcollname) in input, returns an algorithm computing moments for this collection.
-    The functions explore all know possibilities for finding such algs.
-
-    The return value is (alg, set) where
-     - alg is a JetAlgorithm or a JetMomentCalculator. alg can be None if nothing found or unusable in the case a JetGetter was called with the disable option.
-     - set : is the set of known moments associated to the alg
-    """
-    # try to find a moment calculator for this collection :
-    alg , existing_moments = _specialMomentAlgDict.get( jetcollname, (None,set()) )
-    unknownAlg = alg is None
-
-    if alg is None:
-        # try to find a getter :
-        from JetRec.JetGetters import retrieveConfiguredJetAlg
-        alg  = retrieveConfiguredJetAlg(jetcollname, retrieveGetter=True)
-        if alg is not None: 
-            # check if usable :
-            if not alg.usable():
-                return ('unusable', set())
-            
-            # get the real JetAlgorithm
-            alg = alg.jetAlgorithmHandle()
-            # in this case, no moment have been associated yet
-            existing_moments = set()
-    if alg is None:
-        # check if a collection exists in input file
-        from RecExConfig.ObjKeyStore import objKeyStore
-        if 'JetCollection#'+jetcollname in objKeyStore['inputFile'].list("JetCollection"):
-            # then create a new moment alg for this collection
-            from JetRec.JetMomentGetter import getJetMomentAlgorithm
-            alg = getJetMomentAlgorithm(jetcollname, seq = seq)
-        else:
-            # likely to fail...
-            # try to invoke a standard JetAlgorithm
-            from JetRec.JetRec_defaults import standardJetAlgorithm
-            try :
-                alg = standardJetAlgorithm(jetcollname, seq = seq)
-            except:
-                alg = None #
-    if unknownAlg and alg is not None:
-        # we created a new alg, remember it
-        _specialMomentAlgDict[jetcollname] = (alg, set() )
-    return alg, existing_moments
-
-from JetRec.JetRecConf import JetAlgorithm
-from JetMomentTools.JetMomentToolsConf import JetMomentCalculator
-def addStandardMoments(jetcollname, moments=standardMoments, seq = AlgSequence(), jetAlgConfigDict={}):
-    """Add a list of jet moment calculation for a given jet collection
-      - jetcollname : string, the name of the jetcollection
-      - moments     : list of string or function. string are expected to be some of the defaultMoment shortcuts. functions must return a configured moment tool
-      - seq         : the AlgSequence to which the calculation is attached
-      (- jetAlgConfigDict : dictionnary, used to pass JetAlgorithm configuration options when this addStandardMoments is called while configuring the JetAlgorithm.)
-      Returns nothing.
-      Effect : retrieve (or invoke if needed) the moment calculation algorithm dedicated to jetcollname (this can be a JetAlgorithm or a JetMomentCalculator),
-               then add to this algorithm the moments requested in defaultMoment (only if they are not already scheduled).
-    """
-
-    if moments == []:
-        # nothing to do. Return now to avoid any inconvenience
-        return 
-    
-    # retrieve the main algorithm for this jet collection
-    alg, existing_moments = findMainAlgForJetCollection(jetcollname, seq)
-
-
-    # check if the alg is usable ---------
-    if alg == 'unusable':
-        _momlog.info("No usable algorithm for "+jetcollname+". No jet moments added")
-        return
-    if alg is None :
-        # didn't find any alg. We can't add moments
-        _momlog.error("Can't create momens for "+jetcollname+" : no such collection in input or no algorithms scheduled for it")
-        _momlog.error("  ---> possible solution, invoke make_StandardJetGetter() before to schedule a JetAlgorithm for "+jetcollname)
-        return
-
-    isJetMomentCalc = isinstance(alg, JetMomentCalculator)
-    
-    # filter moment list according to jet collection and other conditions
-    missing_moments =  checkMomentAvailability( jetcollname, set(moments) - existing_moments , jetAlgConfigDict )
-
-    # enforce ghostAssoc, thus jet refinding, if area requested (could separate the 2 options with more config) when using a JetMomentCalculator
-    if 'area' in missing_moments and ('ghostAssoc' not in existing_moments) and isJetMomentCalc:
-        missing_moments.add('ghostAssoc')
-
-
-    jetfinder = None
-    # ghost association is very particular since it needs jet finding.  
-    if 'ghostAssoc' in missing_moments:
-        gAssoc = []
-        from JetRec.TrackSelectionForJets import tracksAvailableForJets
-        if tracksAvailableForJets() :
-            gAssoc += ["TrackAssoc"]
-        if rec.doTruth():
-            gAssoc+=[ "TruthAssoc"]
-        if isJetMomentCalc:
-            from JetMomentTools.GhostAssociation import setupGhostAssociationTool
-            gtool = setupGhostAssociationTool(jetcollname, gAssoc, seq=seq)
-            tmpL = alg.CalculatorTools
-            alg.CalculatorTools = [gtool] + tmpL
-        else: # it's a JetAlgorithm
-            tmpL = list(alg.AlgTools)
-            from JetRec.JetGetters import adaptToolListToGhostAssociation
-            alg.AlgTools = adaptToolListToGhostAssociation(tmpL, gAssoc, seq)
-        if rec.doTruth():
-            checkTruthParticleFilterPosition( seq, alg)
-
-        jetfinder = alg.CalculatorTools['JetGhostAsso'].JetFindingSequence["JetFastJetFinder"] if isJetMomentCalc \
-                    else alg.AlgTools[0].JetFindingSequence["JetFastJetFinder"]
-
-        # we are done with ghostAssoc
-        missing_moments.remove('ghostAssoc')
-        existing_moments.add('ghostAssoc')
-    else: # still need to retrieve the jetfinder
-        if 'ghostAssoc' in existing_moments:
-            jetfinder = alg.CalculatorTools['JetGhostAsso'].JetFindingSequence["JetFastJetFinder"] if isJetMomentCalc \
-                        else alg.AlgTools[0].JetFindingSequence["JetFastJetFinder"]
-        else:
-            jetfinder = retrieveFinderTool( alg.CalculatorTools if isJetMomentCalc else alg.AlgTools)
-        
-    momentTools = []
-    # Loop over requested moment types and set-up the related tools
-    for momentType in missing_moments:
-        if callable(momentType):
-            # then assume a function returning a tool has been supplied
-            func = momentType
-        else:
-            func = defaultMoments[momentType]
-        # call the setup function, add the returned tool to the sequence 
-        tool =  func( jetcollname, jetfinder, alg, seq, jetAlgConfigDict)
-        if tool is not None: # some function just adapts existing tools
-            momentTools.append(tool)
-
-    # add the moment tools list to the relevant alg :
-    if isJetMomentCalc:
-        alg.CalculatorTools += momentTools
-    else:
-        alg.AlgTools += momentTools
-    
-    _specialMomentAlgDict[jetcollname] = (alg, missing_moments.union(existing_moments) )
-    return alg
-
-    
-        
-
-def recommendedAreaAndJVFMoments(jetcollname, oldMomentNames=False,seq=AlgSequence()):
-    """Recompute the area, JVF and track related jet moment on jetcollname.
-
-    jetcollname : string a JetCollection StoreGate key
-    oldMomentNames : bool, if True the moment naming will be the same as in 17.2.5 and previous releases.
-    """
-
-    alg = addStandardMoments(jetcollname,moments = ['ghostAssoc','area','jvf', 'trackMoments'],  seq=seq)
-
-    return alg
-
-def recommendedAreaAndJVF_StandardJetGetter( finder, mainParam, input, oldMomentNames=False,  **options):
-    """Run a jet algorithm, adding the recomended  area, JVF and track related jet moments calculation.
-    
-    all argument similar as in make_StandardJetGetter except :
-    
-    oldMomentNames : bool, if True the moment naming will be the same as in 17.2.5 and previous releases.
-    """
-    return make_StandardJetAlg(finder, mainParam, input, jetMoments = ['ghostAssoc','area','jvf', 'trackMoments'], **options)
-    #alg = specialJet( finder, mainParam, input, oldMomentNames = oldMomentNames, moments=['ghostAssoc','area','jvf', 'trackMoments'], **options)
-- 
GitLab


From d9ba5c75b1a04ce94a72d593de0482c5ead21c18 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Thu, 17 Dec 2020 15:44:32 +0100
Subject: [PATCH 079/308] Made it possible to use TPCnvTestConfig.py in
 lightweight releases.

Specifically in AthAnalysis, where many of the packages that this file
can potentially use, are not available.
---
 .../python/TPCnvTestConfig.py                 | 35 +++++++++++++++----
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py b/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py
index e17f2dfe3bb3..8b2556970110 100644
--- a/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py
@@ -8,13 +8,34 @@ from AthenaConfiguration.MainServicesConfig import MainServicesCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg
 from AthenaPoolUtilities.DumperConfig import Dumper, find_file
-from AtlasGeoModel.GeoModelConfig import GeoModelCfg
-from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
-from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
-from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
-from LArGeoAlgsNV.LArGMConfig import LArGMCfg
-from TileGeoModel.TileGMConfig import TileGMCfg
-from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
+try:
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+except ImportError:
+    pass
+try:
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+except ImportError:
+    pass
+try:
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+except ImportError:
+    pass
+try:
+    from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
+except ImportError:
+    pass
+try:
+    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
+except ImportError:
+    pass
+try:
+    from TileGeoModel.TileGMConfig import TileGMCfg
+except ImportError:
+    pass
+try:
+    from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
+except ImportError:
+    pass
 #from AtlasGeoModel.ForDetGeoModelConfig import ForDetGeometryCfg
 Configurable.configurableRun3Behavior = True
 
-- 
GitLab


From e044aa249b98f5bb2978a2e33a337aa3a5557b40 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Thu, 17 Dec 2020 15:46:57 +0100
Subject: [PATCH 080/308] Added 3 additional packages to AthAnalysis.

These are necessary for the basic operation of the project.
---
 Projects/AthAnalysis/package_filters.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Projects/AthAnalysis/package_filters.txt b/Projects/AthAnalysis/package_filters.txt
index dee4753b679e..c7eedec977ae 100644
--- a/Projects/AthAnalysis/package_filters.txt
+++ b/Projects/AthAnalysis/package_filters.txt
@@ -19,13 +19,14 @@
 # EDM:
 + Event/EventPrimitives
 + Event/FourMomUtils
++ Event/PyDumper
 + Event/xAOD/xAODMetaDataCnv
 + Event/xAOD/xAODTriggerCnv
 + Event/xAOD/xAODTrackingCnv
 + Event/xAOD/xAODEventFormatCnv
 + Event/xAOD/xAODCoreCnv
 + Event/xAOD/xAODTruthCnv
-#+ Event/xAOD/xAODEventInfoCnv
++ Event/xAOD/xAODEventInfoCnv
 - Event/xAOD/.*Cnv
 + Event/xAOD/.*
 
@@ -137,6 +138,7 @@
 
 # Core Athena (would like to reduce) :
 + Control/AthAllocators
++ Control/AthenaConfiguration
 + Control/AthenaServices
 + Control/StoreGate
 + Control/SGComps
-- 
GitLab


From 0bd3b48d8ac5de6cab6d00aace1832d40d54183b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 15:51:18 +0100
Subject: [PATCH 081/308] TrigConfigSvc: remove usage of TrigConfDBConnection

The alternative Frontier client from TrigConfDBConnection was never used
and is obsolete now.
---
 .../TrigConfigSvc/python/TrigConfFrontier.py  | 123 +-----------------
 1 file changed, 5 insertions(+), 118 deletions(-)

diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
index 0af22a9bbeb2..bf9554b7d67c 100755
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
@@ -1,28 +1,11 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from __future__ import print_function
-
-from future import standard_library
-standard_library.install_aliases()
-from builtins import map
-from builtins import str
-from builtins import zip
-from builtins import object
 from AthenaCommon.Logging import logging
 import time
 import sys
 
 
-# useFrontierClient 
-# True: one uses the python bindings of frontier_client from the TrigConfDBConnection package
-# False: one uses a purely python-based implementation
-useFrontierClient = False
-
-
 def getServerUrls(frontier_servers):
     """
     turns
@@ -66,29 +49,9 @@ def getFrontierCursor(url, schema, loglevel = logging.INFO):
         return None
     else:
         log.info(f"Will use Frontier server at {url}")
-    if useFrontierClient:
-        log.info("Using frontier_client from TrigConfDBConnection")
-        return FrontierCursor2( url = url, schema = schema)
-    else:
-        log.info("Using a pure python implementation of frontier")
-        return FrontierCursor( url = url, schema = schema)
+
+    return FrontierCursor( url = url, schema = schema)
         
-# used by FrontierCursor2
-def resolvebindvars(query, bindvars):
-    """Replaces the bound variables :xyz with a ? in the query and
-    adding the value behind a : at the end"""
-    log = logging.getLogger( "TrigConfFrontier.py" )
-    log.info("Query: %s", query)
-    log.info("bound variables: %r", bindvars)
-    import re
-    varsextract = re.findall(':([A-z0-9]*)',query)
-    values = list(map(bindvars.get, varsextract))
-    log.debug("Resolving bound variable %r with %r", varsextract,values)
-    appendix = ":".join([str(v) for v in values])
-    queryWithQuestionMarks = re.sub(':[A-z0-9]*','?', query)
-    query = queryWithQuestionMarks + ':' + appendix
-    log.info("Resolved query new style: %s", query)
-    return query
 
 # used by FrontierCursor
 def replacebindvars(query, bindvars):
@@ -109,76 +72,6 @@ def replacebindvars(query, bindvars):
     return query
 
 
-            
-
-
-class FrontierCursor2(object):
-    def __init__(self, url, schema, refreshFlag=False):
-        log = logging.getLogger( "TrigConfFrontier.py" )
-        self.url = url
-        self.schema = schema
-        self.refreshFlag = refreshFlag
-        from TrigConfDBConnection import frontier_client as fc
-        fc.init("PyFrontier","debug")
-        log.debug("Frontier URL      : %s", self.url)
-        log.debug("Schema            : %s", self.schema)
-        log.debug("Refresh cache     : %s", self.refreshFlag)
-
-
-    def execute(self, query, bindvars={}):
-        if len(bindvars)>0:
-            query = resolvebindvars(query,bindvars)
-            
-        from TrigConfDBConnection import frontier_client as fc
-        log = logging.getLogger( "TrigConfFrontier.py" )
-        log.debug("Executing query : %s", query)
-
-        conn = fc.Connection(self.url)
-        session = fc.Session(conn)
-
-        doReload = self.refreshFlag
-        conn.setReload(doReload)
-        
-        queryStart = time.localtime()
-        log.debug("Query started: %s", time.strftime("%m/%d/%y %H:%M:%S %Z", queryStart))
-
-        t1 = time.time()
-        req = fc.Request("frontier_request:1:DEFAULT", fc.encoding_t.BLOB)
-        param = fc.Request.encodeParam(query)
-        req.addKey("p1",param)
-        
-        session.getData([req])
-        t2 = time.time()
-
-        #session.printHeader()
-        
-        #nfield = session.getNumberOfFields()
-        #print ("\nNumber of fields:", nfield, "\n")
-    
-        #nrec = session.getNumberOfRecords()
-        #print ("\nResult contains", nrec, "objects.\n")
-        
-        #session.printRecords2()
-        queryEnd = time.localtime()
-        
-        self.result = [r for r in session.getRecords2()]
-        log.debug("Query ended: %s", time.strftime("%m/%d/%y %H:%M:%S %Z", queryEnd))
-        log.debug("Query time: %s seconds", (t2-t1))
-        log.debug("Result size: %i entries", len(self.result))
-            
-    def fetchall(self):
-        return self.result
-
-    def __str__(self):
-        s =  "FrontierCursor2:\n"
-        s += "Using Frontier URL: %s\n" % self.url
-        s += "Schema: %s\n" % self.schema
-        s += "Refresh cache:  %s" % self.refreshFlag
-        return s
-
-
-
-    
 class FrontierCursor(object):
     def __init__(self, url, schema, refreshFlag=False, doDecode=True, retrieveZiplevel="zip"):
         self.url = url + "/Frontier"
@@ -202,7 +95,7 @@ class FrontierCursor(object):
         log.debug("Refresh cache : %s", self.refreshFlag)
         log.debug("Query         : %s", query)
         
-        import base64, zlib, urllib.request, urllib.error, urllib.parse, time
+        import base64, zlib, urllib.request, urllib.error, urllib.parse
 
         self.result = None
 
@@ -338,11 +231,6 @@ def testQuery(query, bindvars):
         return 1
     return 0
 
-
-def testBindVarResolution(query, bindvars):
-    resolvebindvars(query, bindvars)
-    return 0
-
     
 if __name__=="__main__":
     log = logging.getLogger( "TrigConfFrontier.py" )
@@ -352,6 +240,5 @@ if __name__=="__main__":
     query = "select distinct HPS.HPS_NAME from ATLAS_CONF_TRIGGER_RUN2_MC.HLT_PRESCALE_SET HPS where HPS.HPS_ID = :psk"
     bindvars = { "psk": 260 }
 
-    res = testBindVarResolution(query, bindvars) # query resolution for c++ frontier client
-    res = max(res, testQuery(query, bindvars)) # pure python frontier query
+    res = testQuery(query, bindvars)  # pure python frontier query
     sys.exit(res)
-- 
GitLab


From 7e7f8e39cbbc467a07da0d0fe532f11d6d17d223 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 14:32:05 +0100
Subject: [PATCH 082/308] TrigConfDBConnection: delete package

This Python Frontier client was never finished/used and is obsolete.
---
 .../TrigConfDBConnection/CMakeLists.txt       |  33 --
 .../TrigConfDBConnection/HelloWorld.h         |  26 --
 .../TrigConfDBConnection/python/__init__.py   |   3 -
 .../python/frontier_client.py                 | 124 --------
 .../TrigConfDBConnection/src/Bindings.cxx     | 244 ---------------
 .../TrigConfDBConnection/src/HelloWorld.cxx   |  41 ---
 .../src/HelloWorldBindings.cxx                |  18 --
 .../src/exe/TriggerFrontierClientTest.cxx     | 284 ------------------
 .../test/testFrontierClient.py                |  60 ----
 .../test/testHelloWorld.py                    |  25 --
 .../TrigConfDBConnection/test/testquery.txt   |   1 -
 11 files changed, 859 deletions(-)
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/CMakeLists.txt
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/TrigConfDBConnection/HelloWorld.h
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/python/__init__.py
 delete mode 100755 Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/src/Bindings.cxx
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorld.cxx
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorldBindings.cxx
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/src/exe/TriggerFrontierClientTest.cxx
 delete mode 100755 Trigger/TrigConfiguration/TrigConfDBConnection/test/testFrontierClient.py
 delete mode 100755 Trigger/TrigConfiguration/TrigConfDBConnection/test/testHelloWorld.py
 delete mode 100644 Trigger/TrigConfiguration/TrigConfDBConnection/test/testquery.txt

diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfDBConnection/CMakeLists.txt
deleted file mode 100644
index bbecfb58a95c..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-# Declare the package name:
-atlas_subdir( TrigConfDBConnection )
-
-# External dependencies:
-find_package( Frontier_Client )
-find_package( Python COMPONENTS Development )
-find_package( Boost COMPONENTS filesystem thread system
-              OPTIONAL_COMPONENTS python${Python_VERSION_MAJOR}${Python_VERSION_MINOR} )
-
-# Component(s) in the package:
-atlas_add_library( TrigConfDBConnection
-                   src/*.cxx
-                   PUBLIC_HEADERS TrigConfDBConnection
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${FRONTIER_CLIENT_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${FRONTIER_CLIENT_LIBRARIES} ${Python_LIBRARIES} )
-
-atlas_add_library( TrigConfDBFrontier
-                   src/*.cxx
-                   PUBLIC_HEADERS TrigConfDBConnection
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${FRONTIER_CLIENT_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${FRONTIER_CLIENT_LIBRARIES} ${Python_LIBRARIES} )
-
-
-atlas_add_executable( TriggerFrontierClientTest
-                      src/exe/TriggerFrontierClientTest.cxx
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${FRONTIER_CLIENT_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${FRONTIER_CLIENT_LIBRARIES} ${Python_LIBRARIES} TrigConfDBConnection )
-
-# Install files from the package:
-atlas_install_python_modules( python/*.py
-                              POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/TrigConfDBConnection/HelloWorld.h b/Trigger/TrigConfiguration/TrigConfDBConnection/TrigConfDBConnection/HelloWorld.h
deleted file mode 100644
index 4e035cbc1b8a..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/TrigConfDBConnection/HelloWorld.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef HelloWorld_h
-#define HelloWorld_h
-
-#include <string>
-
-class HelloWorld {
-public:
-   HelloWorld();
-   HelloWorld(const std::string& s);
-   virtual ~HelloWorld();
-
-   void greetings();
-   void setGreetings(const std::string& s);
-   void setStrPtr(const std::string* p);
-
-private:
-
-   std::string m_message;
-
-};
-
-#endif
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/python/__init__.py b/Trigger/TrigConfiguration/TrigConfDBConnection/python/__init__.py
deleted file mode 100644
index fb371954d109..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/python/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py b/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py
deleted file mode 100755
index deab009a8184..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from libTrigConfDBFrontier import Session as _Session
-from libTrigConfDBFrontier import AnyData as __AnyData
-
-import libTrigConfDBFrontier as libF
-import sys
-
-class AnyData(__AnyData):
-    def __str__(self):
-        return "%s %s" % (self.type(), self.getString() )
-
-
-class Session:
-
-    def __getattr__(self,name):
-        # forward all calls to self.__session
-        if name in dir(self.__session):
-            return getattr(self.__session,name)
-        raise AttributeError("Session instance does not attribute %s" % name)
-
-    def __init__(self, conn):
-        self.__fieldNames = []
-        self.__fieldTypeStr = []
-        self.__fieldType = []
-        self.__numberOfFields = 0
-        self.__records = []
-        self.__session = _Session(conn)
-
-    def getData(self, requests):
-        self.__session.getData(requests)
-        self.__getHeader()
-        self.__getAllFields()
-        
-
-    def getHeader(self):
-        return (self.__fieldNames,self.__fieldTypeStr)
-
-
-    def getRecords(self):
-        return self.__records
-
-
-    def getRecords2(self):
-        return ( self.__mapRecord(record) for record in self.__records )
-
-
-    def __mapRecord(self,record):
-        return tuple( [ t(r) for (r,t) in zip(record,self.__fieldType) ] )
-        
-
-
-    def printHeader(self):
-        for i, (fname, ftype) in enumerate(zip(self.__fieldNames,self.__fieldTypeStr)):
-            print("%2i :  %-20s %-10s" % (i+1, fname, ftype))
-
-
-    def printRecords(self):
-        for i,record in enumerate(self.getRecords()):
-            print("record %4i :  %r" % (i+1, record))
-
-
-    def printRecords2(self):
-        for i,record in enumerate(self.getRecords2()):
-            print("record %4i :  %r" % (i+1, record))
-
-
-    def getNumberOfFields(self):
-        return self.__numberOfFields
-
-
-    def __getHeader(self):
-        self.__fieldNames = []
-        self.__fieldTypeStr = []
-        self.__fieldType = []
-        self.__numberOfFields = 0
-        # jump to start
-        self.__session.setCurrentLoad(1)
-        # read first field and move 
-        self.__session.next()
-        # and then the rest
-        while not self.isEOR():
-            self.__fieldNames     += [self.__session.assignString()]
-            self.__fieldTypeStr     += [self.__session.assignString()]
-            if self.__fieldTypeStr[-1].startswith("NUMBER"):
-                if ",0" in self.__fieldTypeStr[-1]:
-                    self.__fieldType += [int]
-                else:
-                    self.__fieldType += [float]
-            elif self.__fieldTypeStr[-1].startswith("VARCHAR"):
-                self.__fieldType += [str]
-            else:
-                self.__fieldType += [str]
-            self.__numberOfFields += 1
-
-
-    def __getAllFields(self):
-        self.__records = []
-
-        ad = AnyData()
-        while self.next():
-            record = tuple()
-            for k in range(self.__numberOfFields):
-                self.getAnyData(ad)
-                if   ad.type()==libF.BLOB_TYPE_INT4:        record += (ad.getInt(),)
-                elif ad.type()==libF.BLOB_TYPE_INT8:        record += (ad.getLongLong(),)
-                elif ad.type()==libF.BLOB_TYPE_FLOAT:       record += (ad.getFloat(),)
-                elif ad.type()==libF.BLOB_TYPE_DOUBLE:      record += (ad.getDouble(),)
-                elif ad.type()==libF.BLOB_TYPE_TIME:        record += (ad.getLongLong(),)
-                elif ad.type()==libF.BLOB_TYPE_ARRAY_BYTE:
-                    if not ad.getRawStrP():        record += ('NULL',)
-                    elif (ad.getRawStrS() == 0):   record += ('',)
-                    else:                          record += ('%s' % libF.str_escape_quota(ad.getString()),)
-                else: 
-                    print("Error: unknown typeId %d" % ad.type())
-                    sys.exit(1)
-                ad.clean()
-
-            self.__records += [record]
-            ad.clean()
-
-        if not self.isEOF():
-            print("Error: must be EOF here")
-            sys.exit(1)
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/src/Bindings.cxx b/Trigger/TrigConfiguration/TrigConfDBConnection/src/Bindings.cxx
deleted file mode 100644
index 8be99d2cec61..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/src/Bindings.cxx
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include <boost/python.hpp>
-
-#include "frontier_client/frontier-cpp.h"
-#include <iostream>
-
-namespace {
-   std::string escape_list="\\\'";
-   std::string
-   str_escape_quota(const std::string& str_orig) {
-      std::string str(str_orig);
-      std::string::size_type pos = 0;
-      for(;;) {
-         pos=str.find_first_of(escape_list,pos);
-         if(pos==str.npos) break;
-         str.insert(pos,1,'\\');    
-         pos+=2;
-      }
-      return str;
-   }
-}
-
-
-void getData(frontier::Session& s, const boost::python::list& l) {
-   typedef std::vector<const frontier::Request*> RequestList;
-   typedef std::vector<const frontier::Request*> RequestValueTypoe;
-
-   RequestList cl;
-
-   PyObject *obj_ptr = l.ptr();
-   boost::python::handle<> obj_iter(PyObject_GetIter(obj_ptr));
-   for(std::size_t i=0;;i++) {
-      boost::python::handle<> 
-         py_elem_hdl(boost::python::allow_null(PyIter_Next(obj_iter.get())));
-      
-      if (PyErr_Occurred()) boost::python::throw_error_already_set();
-      if (!py_elem_hdl.get()) break; // end of iteration
-
-      boost::python::object py_elem_obj(py_elem_hdl);
-      boost::python::extract<const frontier::Request*> elem_proxy(py_elem_obj);
-
-      bool success = elem_proxy.check();
-      if (success) {
-         cl.push_back(elem_proxy());
-      } else if (i == 0) {
-         break;
-      } else {
-         PyErr_SetString(PyExc_TypeError, "All items must be of same type.");
-         boost::python::throw_error_already_set();
-      }
-   }
-   s.getData(cl);
-}
-
-// // Determine if obj_ptr can be converted in a QString
-//   static void* convertible(PyObject* obj_ptr)
-//     {
-//       if (!PyString_Check(obj_ptr)) return 0;
-//       return obj_ptr;
-//     }
-
-
-PyObject*
-assignString(frontier::Session& s) {
-   std::string fieldvalue;
-   s.assignString(&fieldvalue);
-   return PyUnicode_FromString(fieldvalue.c_str());
-}
-
-
-frontier::AnyData anydata;
-
-boost::python::object class_anydata;
-
-// frontier::AnyData
-// getAnyData1(frontier::Session& s, int not_eor) {
-//    s.getAnyData(&anydata, not_eor);
-//    return anydata; 
-// }
-
-// frontier::AnyData
-// getAnyData11(frontier::Session& s) { return getAnyData1(s,1); }
-
-int
-getAnyData2(frontier::Session & s, frontier::AnyData & anydata, int not_eor) {
-   return s.getAnyData(&anydata, not_eor);
-}
-
-int
-getAnyData21(frontier::Session & s, frontier::AnyData & anydata) { return getAnyData2(s, anydata, 1); }
-
-
-PyObject*
-getString(frontier::AnyData& data) {
-   std::string* str = data.getString();
-   if(str==0) return 0;
-   return PyUnicode_FromString(data.getString()->c_str());
-}
-
-
-enum BLOB_TYPE {
-   BLOB_TYPE_BYTE       = 0,
-   BLOB_TYPE_INT4       = 1,
-   BLOB_TYPE_INT8       = 2,
-   BLOB_TYPE_FLOAT      = 3,
-   BLOB_TYPE_DOUBLE     = 4,
-   BLOB_TYPE_TIME       = 5,
-   BLOB_TYPE_ARRAY_BYTE = 6,
-   BLOB_TYPE_EOR        = 7,
-   BLOB_TYPE_NONE       = (1<<7),
-   BLOB_BIT_NULL        = (1<<7)
-};
-
-
-BOOST_PYTHON_MODULE(libTrigConfDBFrontier)
-{
-   using namespace boost::python;
-
-   /***
-    * function frontier::init
-    ***/
-   int (*init1)() = &frontier::init;
-   int (*init2)(const std::string&, const std::string&) = &frontier::init;
-
-   def("init", init1, "Initializes frontier client.");
-   def("init", init2, 
-       "Initializes frontier client. \nloglevel can can be 'nolog', 'error', 'info' or 'warning' (which are equivalent), or anything else (treated as 'debug')",
-       args("logfilename", "loglevel"));
-   def("str_escape_quota", str_escape_quota, "add \\ before any \\\'", args("string"));
-   def("getFieldTypeName", frontier::getFieldTypeName, "returns string representation of field type", args("BLOB_TYPE"));
-
-
-   /***
-    * class frontier::Connection
-    ***/
-   class_<frontier::Connection>("Connection", init<const std::string&, const std::string*>("Connection with server url and proxy url", args("self","serverurl","proxyurl")) )
-      .def(init<const std::string&>("Connection with server url.", args("self","serverurl")))
-      .def(init<const std::list<std::string>&, const std::list<std::string>&>("Connection with list of server urls and list of proxy urls",args("self","serverurl","proxyurl")))
-      .def("setReload", &frontier::Connection::setReload)
-      .def("setDefaultParams", &frontier::Connection::setDefaultParams)
-      ;
-
-
-   /***
-    * To do the list wrapping we have two choices:
-    *   * wrap them with class_<> ourself or
-    *   * write to_python_converter() and some wrappers to extract<data> from python. 
-    * Our goal is to get to the working prototype as soon as we can. So in simplistic (a) approach 
-    * A full flexed wrapper is long and expensive, e.g. http://cci.lbl.gov/cctbx_sources/scitbx/array_family/boost_python/flex_wrapper.h
-    ***/
-
-
-   /***
-    * class frontier::Session
-    ***/
-
-   //BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getAnyData_overloads, frontier::Session::getAnyData, 1, 2)
-   //BOOST_PYTHON_FUNCTION_OVERLOADS(getAnyData2_overloads, getAnyData2, 2, 3)
-      //    int (*init1)() = &frontier::init;
-      //    int (*init2)(const std::string&, const std::string&) = &frontier::init;
-
-
-   class_<frontier::Session>("Session", init<frontier::Connection*>() )
-      .def("getData", &getData)
-      .def("next", &frontier::Session::next)
-      .def("isEOR", &frontier::Session::isEOR)
-      .def("isEOF", &frontier::Session::isEOF)
-      .def("assignString", &assignString)
-      .def("getNumberOfRecords", &frontier::Session::getNumberOfRecords)
-      .def("getRecNum", &frontier::Session::getRecNum)
-      .def("setCurrentLoad", &frontier::Session::setCurrentLoad,
-           "Each Request generates a payload. Payload numbers started with 1.\nSo, to get data for the first Request call setCurrentLoad(1)",
-           args("self","n"))
-      .def("getAnyData", &frontier::Session::getAnyData)
-//       .def("getAnyData", &getAnyData1)
-//       .def("getAnyData", &getAnyData11)
-      .def("getAnyData", &getAnyData2)
-      .def("getAnyData", &getAnyData21)
-      ;
-
-   /***
-    * enum frontier::BLOB_TYPE
-    ***/
-   enum_<BLOB_TYPE>("BLOB_TYPE")
-      .value("BLOB_TYPE_BYTE",       BLOB_TYPE_BYTE      )
-      .value("BLOB_TYPE_INT4",       BLOB_TYPE_INT4      )
-      .value("BLOB_TYPE_INT8",       BLOB_TYPE_INT8      )
-      .value("BLOB_TYPE_FLOAT",      BLOB_TYPE_FLOAT     )
-      .value("BLOB_TYPE_DOUBLE",     BLOB_TYPE_DOUBLE    )
-      .value("BLOB_TYPE_TIME",       BLOB_TYPE_TIME      )
-      .value("BLOB_TYPE_ARRAY_BYTE", BLOB_TYPE_ARRAY_BYTE)
-      .value("BLOB_TYPE_EOR",        BLOB_TYPE_EOR       )
-      .value("BLOB_TYPE_NONE",       BLOB_TYPE_NONE      )
-      .value("BLOB_BIT_NULL",        BLOB_BIT_NULL       )
-      .export_values()
-      ;
-
-   /***
-    * enum frontier::encoding_t
-    ***/
-   enum_<frontier::encoding_t>("encoding_t")
-      .value("BLOB", frontier::BLOB)
-      .export_values()
-      ;
-
-   /***
-    * class frontier::AnyData
-    ***/
-   class_anydata = class_<frontier::AnyData>("AnyData")
-      .def("type",       &frontier::AnyData::type,        "type of data field")
-      .def("getRawI8",   &frontier::AnyData::getRawI8,    "type long long")
-      .def("getRawD",    &frontier::AnyData::getRawD,     "type double")
-      .def("getRawStrP", &frontier::AnyData::getRawStrP,  "type string")
-      .def("getRawStrS", &frontier::AnyData::getRawStrS,  "type unsigned int")
-      .def("getRawI4",   &frontier::AnyData::getRawI4,    "type int")
-      .def("getRawF",    &frontier::AnyData::getRawF,     "type float")
-      .def("getRawB",    &frontier::AnyData::getRawB,     "type char")
-      .def("getInt",     &frontier::AnyData::getInt,      "cast to type int")
-      .def("getLongLong",&frontier::AnyData::getLongLong, "cast to type long long")
-      .def("getFloat",   &frontier::AnyData::getFloat,    "cast to type float")
-      .def("getDouble",  &frontier::AnyData::getDouble,   "cast to type double")
-      .def("getString",  &getString,                      "cast to type string")
-      .def("clean",      &frontier::AnyData::clean,       "clean data")
-      ;
-
-   /***
-    * class frontier::Request
-    ***/
-   object class_req = class_<frontier::Request>("Request", init<const std::string&, frontier::encoding_t>() )
-      .def("addKey", &frontier::Request::addKey, "", args("self", "key", "value"))
-      .def("encodeParam", &frontier::Request::encodeParam, "", args("value"))
-      .def("setRetrieveZipLevel", &frontier::Request::setRetrieveZipLevel,
-           "Set the zip level of retrieved data\nlevel 0 is off, level 1 is fast, level 5 is normal, level 9 is best\ndefault is 5",
-           args("level"))
-      .staticmethod("encodeParam")
-      .staticmethod("setRetrieveZipLevel")
-      ;
-
-
-
-}
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorld.cxx b/Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorld.cxx
deleted file mode 100644
index 95fa07a932bb..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorld.cxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "TrigConfDBConnection/HelloWorld.h"
-
-#include <iostream>
-
-HelloWorld::HelloWorld() :
-   m_message("")
-{}
-
-
-HelloWorld::HelloWorld(const std::string& s) :
-   m_message(s)
-{}
-
-
-HelloWorld::~HelloWorld()
-{}
-
-
-void
-HelloWorld::greetings()
-{
-   std::cout << m_message << std::endl;
-}
-
-
-void
-HelloWorld::setGreetings(const std::string& s) {
-   m_message = s;
-}
-
-
-void
-HelloWorld::setStrPtr(const std::string* p) {
-   m_message = *p;
-}
-
-
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorldBindings.cxx b/Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorldBindings.cxx
deleted file mode 100644
index 3afedf181c38..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/src/HelloWorldBindings.cxx
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include <boost/python.hpp>
-
-#include "TrigConfDBConnection/HelloWorld.h"
-
-
-BOOST_PYTHON_MODULE(hello_world)
-{
-   using namespace boost::python;
-   class_<HelloWorld>("HelloWorld", init<std::string>() )
-      .def("greetings", &HelloWorld::greetings)
-      .def("setGreetings", &HelloWorld::setGreetings)
-      .def("setStrPtr", &HelloWorld::setStrPtr)
-      ;
-}
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/src/exe/TriggerFrontierClientTest.cxx b/Trigger/TrigConfiguration/TrigConfDBConnection/src/exe/TriggerFrontierClientTest.cxx
deleted file mode 100644
index 12cb6ad5174d..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/src/exe/TriggerFrontierClientTest.cxx
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * frontier client test C++ main program that can load any query
- * 
- * Author: Sergey Kosyakov
- *
- * $Id: TriggerFrontierClientTest.cxx 696788 2015-09-25 09:17:58Z czodrows $
- *
- * Copyright (c) 2009, FERMI NATIONAL ACCELERATOR LABORATORY
- * All rights reserved. 
- *
- * For details of the Fermitools (BSD) license see Fermilab-2009.txt or
- *  http://fermitools.fnal.gov/about/terms.html
- *
- */
-#include "frontier_client/frontier-cpp.h"
-#include "frontier_client/FrontierException.hpp"
-
-#include <iostream>
-#include <fstream>
-#include <stdexcept>
-#include <cstdlib>
-#include <cstring>
-
-#include <unistd.h>
-
-static std::string escape_list="\\\'";
-static std::string req_data="frontier_request:1:DEFAULT";
-
-static void str_escape_quota(std::string *str) {
-   std::string::size_type pos = 0;
-   while(1) {
-      pos=str->find_first_of(escape_list,pos);
-      if(pos==str->npos) return;
-      //std::cout<<"pos="<<pos<<'\n';
-      str->insert(pos,1,'\\');    
-      pos+=2;
-   }
-}
-
- 
-static void print_usage(char **argv) {
-   std::cout<<"Usage: \n"<<argv[0]<<" -h\n\tPrint this info\n";
-   std::cout<<"\n"<<argv[0]<<" [-r] [-n] [-c N] [-F N] [-f file_name]\n";
-   std::cout<<"  if -f file_name is missing, reads query from stdin\n";
-   std::cout<<"  [-r] means to force a reload\n";
-   std::cout<<"  [-n] means do not print data\n";
-   std::cout<<"  [-c N] repeat the query N count times\n";
-   std::cout<<"  [-F N] fork after Nth repitition\n";
-}
- 
-
-
-int main(int argc, char **argv) {
-   //char vc;
-   int vi;
-   long long vl;
-   float vf;
-   double vd;
-   std::string stringBuf;
-   std::string *vs=&stringBuf;
-   frontier::AnyData ad;
-   char *file_name=0;
-   int do_reload=0;
-   int do_print=1;
-   int repeat_count=1;
-   int fork_count=0;
-   int idx;
-   std::string sql("");
-  
-   try {
-      frontier::init();
-
-      // check for -h
-      for(int arg_ind=1; arg_ind<argc; arg_ind++)
-         if(strcmp(argv[arg_ind],"-h")==0) {
-            print_usage(argv);
-            return 0;
-         }
-      
-
-      for(int arg_ind=1; arg_ind<argc; arg_ind++) {
-
-         const char* arg = argv[arg_ind];
-
-         if(strcmp(arg,"-r")==0) {
-            do_reload=1;
-            continue;
-         }
-         
-         if(strcmp(arg,"-n")==0) {
-            do_print=0;
-            continue;
-         }
-
-         if(strcmp(arg,"-c")==0) {
-            if(argc==++arg_ind) {
-               std::cerr << "No number specified after -c option\n";
-               return 2;
-            }
-            sscanf(argv[arg_ind],"%d",&repeat_count);
-            continue;
-         }
-
-         if(strcmp(arg,"-F")==0) {
-            if(argc==++arg_ind) {
-               std::cerr << "No number specified after -F option\n";
-               return 2;
-            }
-            sscanf(argv[arg_ind],"%d",&fork_count);
-            continue;
-         }
-
-         if(strcmp(arg,"-f")==0) {
-            if(argc==++arg_ind) {
-               std::cerr << "No file name specified after -f option\n";
-               return 2;
-            }
-            file_name=argv[arg_ind];
-            continue;
-         }
-      }
-     
-      std::ifstream in_file;
-      if(file_name) {
-         in_file.open(file_name);
-         if(!in_file.is_open()) {
-            std::cerr << "Can not open file " << file_name << '\n';
-            return 2;
-         }
-      }
-
-      while(1) {
-         std::string tmp;      
-         if(file_name) {
-            if(!in_file.good()) break;
-            std::getline(in_file,tmp,'\n');
-         } else {
-            if(!std::cin.good()) break;
-            std::getline(std::cin,tmp,'\n');       
-         }
-         sql += tmp;
-      }
-      if(file_name) {in_file.close();}
-
-      std::cout<<"Entered:\n"<<sql<<'\n';
-    
-      std::string param=frontier::Request::encodeParam(sql);
-      std::cout<<"Param ["<<param<<"]\n";
-          
-      std::list<std::string> serverList;
-      //serverList.push_back("http://lxfs6043.cern.ch:8080/Frontier3D");
-      std::list<std::string> proxyList;
-      //frontier::DataSource ds(serverList, proxyList);
-      frontier::Connection con(serverList, proxyList);
-
-      for(idx=0;idx<repeat_count;idx++) {
-         if((fork_count>0)&&(idx==fork_count))
-            fork();
-
-         frontier::Session ses(&con);
-         con.setReload(do_reload);
-
-         frontier::Request req(req_data,frontier::BLOB);
-         req.addKey("p1",param);
-
-         std::vector<const frontier::Request*> vrq;
-         vrq.push_back(&req);
-         ses.getData(vrq);
-
-         ses.setCurrentLoad(1);
-      
-         int field_num=0;
-         
-         std::cout<<"\nObject fields:\n";
-         
-         ses.next();
-         // MetaData consists of one record with filed names.
-         // Let's go over all fields:
-         std::string name,type;
-      
-         while(!ses.isEOR()) {
-            ses.assignString(&name);
-            ses.assignString(&type);
-            ++field_num;
-            std::cout<<field_num<<" "<<(name)<<" "<<(type)<<std::endl;
-         }
-
-
-         // SECOND TIME
-//          ses.setCurrentLoad(1);
-//          field_num=0;
-//          std::cout<<"\nObject fields:\n";
-//          ses.next();
-//          while(!ses.isEOR()) {
-//             ses.assignString(&name);
-//             ses.assignString(&type);
-//             ++field_num;
-//             std::cout<<field_num<<" "<<(name)<<" "<<(type)<<std::endl;
-//          }
-         // END SECOND TIME
-
-
-
-	   
-         int nrec=ses.getNumberOfRecords();
-         std::cout<<"\nResult contains "<< nrec<<" objects.\n";
-	  
-         while(ses.next()) {
-            if(!do_print)continue;
-            for(int k=0;k<field_num;k++) {
-               ses.getAnyData(&ad);
-               switch(ad.type()) {
-                  //case frontier::BLOB_TYPE_BYTE:       vc=ses.getByte(); break;
-               case frontier::BLOB_TYPE_INT4:       
-                  vi=ad.getInt(); 
-                  std::cout<<vi; 
-                  break;
-               case frontier::BLOB_TYPE_INT8:       
-                  vl=ad.getLongLong(); 
-                  std::cout<<vl; 
-                  break;
-               case frontier::BLOB_TYPE_FLOAT:      
-                  vf=ad.getFloat(); 
-                  std::cout<<vf; 
-                  break;
-               case frontier::BLOB_TYPE_DOUBLE:     
-                  vd=ad.getDouble(); 
-                  std::cout<<vd; 
-                  break;
-               case frontier::BLOB_TYPE_TIME:       
-                  vl=ad.getLongLong(); 
-                  std::cout<<vl; 
-                  break;
-               case frontier::BLOB_TYPE_ARRAY_BYTE: 
-                  if(!ad.getRawStrP()) {
-                     std::cout<<"NULL";
-                  }
-                  else if (ad.getRawStrS() == 0)
-                     std::cout<<"''"; 
-                  else if (ad.getRawStrS() > 1000)
-                     std::cout<<'('<<ad.getRawStrS()<<" byte blob)"; 
-                  else {
-                     vs=ad.getString(); 
-                     str_escape_quota(vs);
-                     std::cout<<'\''<<(*vs)<<'\''<<'('<<ad.getRawStrS()<<')'; 
-                  }
-                  break;	  
-               default: 
-                  std::cout<<"Error: unknown typeId "<<((int)(ad.type()))<<"\n"; 
-                  exit(1);
-               }
-               if(k+1<field_num) {
-                  std::cout<<" ";
-               }
-               ad.clean();
-            }
-            ad.clean();
-            std::cout<<std::endl;
-         }
-         if(!ses.isEOF()) {
-            std::cout<<"Error: must be EOF here\n";
-            exit(1);
-         }
-      }
-   }
-   catch(const frontier::ConfigurationError& e) {
-      std::cout << "Frontier configuration error caught: " << e.what() << std::endl;
-      exit(1);
-   }
-   catch(const frontier::FrontierException& e) {
-      std::cout << "Frontier exception caught: " << e.what() << std::endl;
-      exit(1);
-   }
-   catch(std::exception& e) {
-      std::cout << "Error: " << e.what() << "\n";
-      exit(1);
-   }
-   catch(...) {
-      std::cout << "Unknown exception\n";
-      exit(1);
-   }
-
-   return 0;
-}
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/test/testFrontierClient.py b/Trigger/TrigConfiguration/TrigConfDBConnection/test/testFrontierClient.py
deleted file mode 100755
index f8cdd8aa3d1e..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/test/testFrontierClient.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-def main(sql, doReload):
-
-    (ALL, VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL) = range(7)
-    from AthenaCommon.Logging import logging
-    log = logging.getLogger( "TrigConfigSvcUtils.py" )
-    log.setLevel(VERBOSE)
-
-    connection = "TRIGGERDBREPR"
-
-    from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
-    tf.triggerUseFrontier = True
-
-    from TrigConfigSvc.TrigConfigSvcUtils import interpretConnection
-    connectionParameters = interpretConnection(connection)
-
-    print "Connection: ", connectionParameters
-
-    from TrigConfDBConnection import frontier_client as fc
-
-    fc.init("testFrontier.log","debug")
-
-    conn = fc.Connection(connectionParameters['url'])
-
-    session = fc.Session(conn)
-
-    conn.setReload(doReload)
-
-    req = fc.Request("frontier_request:1:DEFAULT", fc.encoding_t.BLOB)
-    param = fc.Request.encodeParam(sql)
-    req.addKey("p1",param)
-
-    session.getData([req])
-
-    session.printHeader()
-
-    nfield = session.getNumberOfFields()
-    print "\nNumber of fields:", nfield, "\n"
-
-    
-    nrec = session.getNumberOfRecords()
-    print "\nResult contains", nrec, "objects.\n"
-
-    session.printRecords2()
-
-    return 0
-
-
-
-if __name__=="__main__":
-    from sys import exit
-
-    doReload = True
-    sql = "select distinct SM.SMT_ID, SM.SMT_NAME, SM.SMT_VERSION, SM.SMT_COMMENT, SM.SMT_ORIGIN, SM.SMT_USERNAME, SM.SMT_STATUS from ATLAS_CONF_TRIGGER_REPR.SUPER_MASTER_TABLE SM"
-    
-    exit(main(sql=sql, doReload=doReload))
-    
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/test/testHelloWorld.py b/Trigger/TrigConfiguration/TrigConfDBConnection/test/testHelloWorld.py
deleted file mode 100755
index 6b3f554ff81c..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/test/testHelloWorld.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-def main():
-    from TrigConfDBConnection import frontier_client as fc
-
-    hw = fc.HelloWorld("Hello world!")
-
-    hw.greetings()
-    
-    hw.setGreetings("Hello universe!")
-    
-    hw.greetings()
-
-    hw.setStrPtr("Hello All!")
-    
-    hw.greetings()
-
-    return 0
-
-if __name__=="__main__":
-    from sys import exit
-    exit(main())
-    
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/test/testquery.txt b/Trigger/TrigConfiguration/TrigConfDBConnection/test/testquery.txt
deleted file mode 100644
index b23d24255d68..000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/test/testquery.txt
+++ /dev/null
@@ -1 +0,0 @@
-select distinct SM.SMT_ID, SM.SMT_NAME, SM.SMT_VERSION, SM.SMT_COMMENT, SM.SMT_ORIGIN, SM.SMT_USERNAME, SM.SMT_STATUS from ATLAS_CONF_TRIGGER_REPR.SUPER_MASTER_TABLE SM
-- 
GitLab


From aca928f36a8ac95a88d6afb6c7770370685af363 Mon Sep 17 00:00:00 2001
From: tstreble <thomas.strebler@cern.ch>
Date: Thu, 17 Dec 2020 16:31:42 +0100
Subject: [PATCH 083/308] Updated negeative determinant error handling in
 KalmanVertexOnJetAxisUpdator

---
 .../TrkJetVxFitter/src/KalmanVertexOnJetAxisUpdator.cxx      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Tracking/TrkVertexFitter/TrkJetVxFitter/src/KalmanVertexOnJetAxisUpdator.cxx b/Tracking/TrkVertexFitter/TrkJetVxFitter/src/KalmanVertexOnJetAxisUpdator.cxx
index 9174452f37c6..4ca06b1cd109 100755
--- a/Tracking/TrkVertexFitter/TrkJetVxFitter/src/KalmanVertexOnJetAxisUpdator.cxx
+++ b/Tracking/TrkVertexFitter/TrkJetVxFitter/src/KalmanVertexOnJetAxisUpdator.cxx
@@ -257,7 +257,10 @@ namespace Trk{
     
       if (trackParametersWeight.determinant()<=0)  
       {
-        ATH_MSG_ERROR(" The determinant of the track covariance matrix is negative: " << trackParametersWeight.determinant());
+        ATH_MSG_WARNING(" The determinant of the inverse of the track covariance matrix is negative: " << trackParametersWeight.determinant());
+        if(trk->expectedCovarianceAtPCA().determinant()<=0){
+          ATH_MSG_ERROR(" As well as the determinant of the track covariance matrix: " << trk->expectedCovarianceAtPCA().determinant());
+	}
       }
       
 
-- 
GitLab


From 9702edf7dec0304aa213d987313ce57a6442e136 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 16:43:01 +0100
Subject: [PATCH 084/308] release -> reset

---
 Control/IOVSvc/src/IOVSvc.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/IOVSvc/src/IOVSvc.cxx b/Control/IOVSvc/src/IOVSvc.cxx
index 131db47d71cb..e968fe7af849 100755
--- a/Control/IOVSvc/src/IOVSvc.cxx
+++ b/Control/IOVSvc/src/IOVSvc.cxx
@@ -855,7 +855,7 @@ IOVSvc::createCondObj(CondContBase* ccb, const DataObjID& id,
   // In that case, when we delete the address, it will
   // follow an invalid pointer.  So be sure to delete
   // the address before the object is added to CondCont.
-  ioa.release();
+  ioa.reset();
 
   // DataObject *d2 = static_cast<DataObject*>(v);
   
-- 
GitLab


From 3519ebd228408b154ab223125300c0043db4bfa2 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 16:49:53 +0100
Subject: [PATCH 085/308] Fix conflict with gtest macro

---
 .../CxxUtils/CxxUtils/ConcurrentHashmapImpl.h | 55 ++++++++++---------
 .../CxxUtils/ConcurrentHashmapImpl.icc        | 20 +++----
 2 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h
index 8f6daf8beb11..04aeda1488cf 100644
--- a/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h
+++ b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.h
@@ -35,7 +35,7 @@ namespace detail {
 
 /// Type used for keys and values --- an unsigned big enough to hold a pointer.
 /// Need to have this defined outside of ConcurrentHashmapImpl itself
-/// in order to avoid instantiation circularities, as the HASHER and MATCHER
+/// in order to avoid instantiation circularities, as the HASHER_ and MATCHER_
 /// classes will probably want to use it.
 using ConcurrentHashmapVal_t = uintptr_t;
 
@@ -130,15 +130,15 @@ private:
  * are much more frequent than writes.
  *
  * Template arguments:
- *  UPDATER - Object used for memory management; see below.
- *            This has the same requirements as for ConcurrentRangeMap;
- *            see there for further details.
- *  HASHER  - Functional to compute a hash value from a key.
- *            Defaults to std::hash.
- *  MATCHER - Functional to compare two keys for equality.
- *            Defaults to std::equal_to.
- *  NULLVAL - Value of the key to be considered null.
- *            A key with this value may not be inserted.
+ *  UPDATER_ - Object used for memory management; see below.
+ *             This has the same requirements as for ConcurrentRangeMap;
+ *             see there for further details.
+ *  HASHER_  - Functional to compute a hash value from a key.
+ *             Defaults to std::hash.
+ *  MATCHER_ - Functional to compare two keys for equality.
+ *             Defaults to std::equal_to.
+ *  NULLVAL_ -  Value of the key to be considered null.
+ *              A key with this value may not be inserted.
  *
  * Implementation notes:
  *  We use open addressing (see, eg, knuth AOCP 6.4), in which the payloads
@@ -150,22 +150,25 @@ private:
  *
  *  The implementation here is inspired by the hash maps from ConcurrencyKit
  *  (http://concurrencykit.org), though the code is all new.
+ *
+ * nb. Can't use plain `MATCHER' as a template argument because it collides
+ * with gtest.
  */
-template <template <class> class UPDATER,
-          typename HASHER = std::hash<uintptr_t>,
-          typename MATCHER = std::equal_to<uintptr_t>,
-          uintptr_t NULLVAL = 0>
+template <template <class> class UPDATER_,
+          typename HASHER_ = std::hash<uintptr_t>,
+          typename MATCHER_ = std::equal_to<uintptr_t>,
+          uintptr_t NULLVAL_ = 0>
 class ConcurrentHashmapImpl
 {
 public:
   /// Type used for keys and values --- an unsigned big enough to hold a pointer.
   using val_t = ConcurrentHashmapVal_t;
   /// Hash object.
-  using Hasher_t = HASHER;
+  using Hasher_t = HASHER_;
   /// Key match object.
-  using Matcher_t = MATCHER;
+  using Matcher_t = MATCHER_;
   /// Null key value.
-  static constexpr uintptr_t nullval = NULLVAL;
+  static constexpr uintptr_t nullval = NULLVAL_;
   /// Used to represent an invalid table index.
   static constexpr size_t INVALID = static_cast<size_t>(-1);
 
@@ -217,8 +220,8 @@ private:
      * @param matcher Key match object to use.
      */
     Table (size_t capacity,
-           const HASHER& hasher = HASHER(),
-           const MATCHER& matcher = MATCHER());
+           const Hasher_t& hasher = Hasher_t(),
+           const Matcher_t& matcher = Matcher_t());
 
 
     /**
@@ -291,9 +294,9 @@ private:
     /// Number of bits in the mask.
     const size_t m_maskBits;
     /// The hash object.
-    const HASHER& m_hasher;
+    const Hasher_t& m_hasher;
     /// The key match object.
-    const MATCHER& m_matcher;
+    const Matcher_t& m_matcher;
     /// Longest probe needed so far.
     std::atomic<size_t> m_longestProbe;
     /// The actual table entries.
@@ -303,7 +306,7 @@ private:
 
 public:
   /// Updater object.
-  using Updater_t = UPDATER<Table>;
+  using Updater_t = UPDATER_<Table>;
   /// Context type for the updater.
   using Context_t = typename Updater_t::Context_t;
 
@@ -320,8 +323,8 @@ public:
    */
   ConcurrentHashmapImpl (Updater_t&& updater,
                          size_t capacity_in,
-                         const HASHER& hasher,
-                         const MATCHER& matcher,
+                         const Hasher_t& hasher,
+                         const Matcher_t& matcher,
                          const typename Updater_t::Context_t& ctx);
 
 
@@ -549,9 +552,9 @@ private:
   /// Updater object managing memory.  See above.
   Updater_t m_updater;
   /// The hash object.
-  const HASHER m_hasher;
+  const Hasher_t m_hasher;
   /// The key match object.
-  const MATCHER m_matcher;
+  const Matcher_t m_matcher;
   /// The current table instance.  Must be holding the mutex to access this.
   Table* m_table;
   /// Number of entries in the map.
diff --git a/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc
index 63830114c683..0b07bef12532 100644
--- a/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc
+++ b/Control/CxxUtils/CxxUtils/ConcurrentHashmapImpl.icc
@@ -97,12 +97,12 @@ bool CHMTableIterator<ENTRIES_PER_CACHELINE>::next()
 
 
 #define T_CHMIMPL \
-  template <template <class> class UPDATER,     \
-            typename HASHER,                    \
-            typename MATCHER,                   \
-            uintptr_t NULLVAL>
+  template <template <class> class UPDATER_,     \
+            typename HASHER_,                    \
+            typename MATCHER_,                   \
+            uintptr_t NULLVAL_>
 
-#define CHMIMPL ConcurrentHashmapImpl<UPDATER, HASHER, MATCHER, NULLVAL>
+#define CHMIMPL ConcurrentHashmapImpl<UPDATER_, HASHER_, MATCHER_, NULLVAL_>
 
 
 /**
@@ -113,8 +113,8 @@ bool CHMTableIterator<ENTRIES_PER_CACHELINE>::next()
  */
 T_CHMIMPL
 CHMIMPL::Table::Table (size_t capacity,
-                       const HASHER& hasher /*= HASHER()*/,
-                       const MATCHER& matcher /*= MATCHER()*/)
+                       const Hasher_t& hasher /*= Hasher_t()*/,
+                       const Matcher_t& matcher /*= Matcher_t()*/)
   : m_capacity (capacity),
     m_maxProbe (capacity / 4),
     m_mask (capacity-1),
@@ -125,7 +125,7 @@ CHMIMPL::Table::Table (size_t capacity,
 {
   // Clear all the keys.
   for (size_t i = 0; i < capacity; i++) {
-    m_entries[i].m_key = NULLVAL;
+    m_entries[i].m_key = nullval;
   }
 }
 
@@ -278,8 +278,8 @@ typename CHMIMPL::entry_t& CHMIMPL::Table::entry (size_t offset)
 T_CHMIMPL
 CHMIMPL::ConcurrentHashmapImpl (Updater_t&& updater,
                                 size_t capacity_in,
-                                const HASHER& hasher,
-                                const MATCHER& matcher,
+                                const Hasher_t& hasher,
+                                const Matcher_t& matcher,
                                 const typename Updater_t::Context_t& ctx)
   : m_updater (std::move (updater)),
     m_hasher (hasher),
-- 
GitLab


From 5b45ee35c379ae31dfc5a967fbfe944060b01b96 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 03:26:25 +0100
Subject: [PATCH 086/308] TrkGeometry: BinnedMaterial should take the Material
 pointer by value.

No point in passing the pointer by (non-const!) ref --- it is never
modified --- and this prevents calling with an rvalue.
---
 Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/BinnedMaterial.h | 4 ++--
 Tracking/TrkDetDescr/TrkGeometry/src/BinnedMaterial.cxx       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/BinnedMaterial.h b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/BinnedMaterial.h
index d7bcd1bc2cda..b3f05a29713e 100644
--- a/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/BinnedMaterial.h
+++ b/Tracking/TrkDetDescr/TrkGeometry/TrkGeometry/BinnedMaterial.h
@@ -53,11 +53,11 @@ namespace Trk {
       {}    
 
       /** Constructor with averaged material and binning in 1D*/
-      BinnedMaterial(const Material*& mat, BinUtility*& bu, const std::vector<size_t>& index,
+      BinnedMaterial(const Material* mat, BinUtility*& bu, const std::vector<size_t>& index,
 		     const std::vector<IdentifiedMaterial>& detailedMat); 
 
       /** Constructor with averaged material and binning in 2D*/
-      BinnedMaterial(const Material*& mat, BinUtility*& bu, std::vector< Trk::BinUtility*>& bVec,
+      BinnedMaterial(const Material* mat, BinUtility*& bu, std::vector< Trk::BinUtility*>& bVec,
 		     const std::vector<std::vector<size_t> >& index,
 		     const std::vector<IdentifiedMaterial>& detailedMat);
       
diff --git a/Tracking/TrkDetDescr/TrkGeometry/src/BinnedMaterial.cxx b/Tracking/TrkDetDescr/TrkGeometry/src/BinnedMaterial.cxx
index 351094fa2cfa..dea51ba1813e 100755
--- a/Tracking/TrkDetDescr/TrkGeometry/src/BinnedMaterial.cxx
+++ b/Tracking/TrkDetDescr/TrkGeometry/src/BinnedMaterial.cxx
@@ -5,7 +5,7 @@
 #include "TrkGeometry/BinnedMaterial.h"
 
 /** Constructor with averaged material and binning in 1D*/
-Trk::BinnedMaterial::BinnedMaterial(const Trk::Material*& mat, Trk::BinUtility*& bu, const std::vector<size_t>& index, 
+Trk::BinnedMaterial::BinnedMaterial(const Trk::Material* mat, Trk::BinUtility*& bu, const std::vector<size_t>& index, 
 				    const std::vector<Trk::IdentifiedMaterial>& detailedMat ) : 
   Trk::Material(*mat),
   m_matVec (detailedMat),
@@ -14,7 +14,7 @@ Trk::BinnedMaterial::BinnedMaterial(const Trk::Material*& mat, Trk::BinUtility*&
 }    
 
 /** Constructor with averaged material and binning in 2D*/
-Trk::BinnedMaterial::BinnedMaterial(const Trk::Material*& mat, Trk::BinUtility*& bu, std::vector< Trk::BinUtility*>& bVec,
+Trk::BinnedMaterial::BinnedMaterial(const Trk::Material* mat, Trk::BinUtility*& bu, std::vector< Trk::BinUtility*>& bVec,
 				    const std::vector<std::vector<size_t> >& index, 
 				    const std::vector<Trk::IdentifiedMaterial>& detailedMat ) :
   Trk::Material(*mat),
-- 
GitLab


From 44accd20fb37a254a06d92dfeba823b70c90c084 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Thu, 17 Dec 2020 17:54:21 +0100
Subject: [PATCH 087/308] fix errant linear (not needed when applied on points)

---
 .../ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx b/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx
index 144bf769ab86..c82b8bad0f77 100644
--- a/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx
+++ b/DetectorDescription/ReadoutGeometryBase/src/SolidStateDetectorElementBase.cxx
@@ -388,13 +388,13 @@ using Trk::distDepth;
     bool firstTimeBaseTmp = m_firstTimeBase;
     m_firstTimeBase = false;
     
-    m_center = geoTransform.linear() * m_design->sensorCenter();
+    m_center = geoTransform * m_design->sensorCenter();
     
     //Is this needed outside e.g. ReadSiDetElements? Maybe candidate for future removal?
     m_centerCLHEP = HepGeom::Point3D<double>(m_center[0],m_center[1],m_center[2]);
 
     Amg::Vector3D centerGeoModel(0., 0., 0.);
-    m_origin = geoTransform.linear() * centerGeoModel;
+    m_origin = geoTransform * centerGeoModel;
    
     //
     // Determine directions depth, eta and phi axis in reconstruction local frame
-- 
GitLab


From 6f2161b584a51fb3ab31c4882cdbd1179edd3e59 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 18:05:22 +0100
Subject: [PATCH 088/308] egammaD3PDAnalysis: cmake fixes, enable flake8

---
 .../D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt          | 9 +++------
 .../egammaD3PDAnalysis/python/TileGapSelectionGetter.py  | 5 ++---
 .../python/egammaTruthParticleConfig.py                  | 8 ++------
 3 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt
index dc849b86d410..f7de71e2dbd4 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/CMakeLists.txt
@@ -1,6 +1,4 @@
-################################################################################
-# Package: egammaD3PDAnalysis
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaD3PDAnalysis )
@@ -9,8 +7,7 @@ atlas_subdir( egammaD3PDAnalysis )
 atlas_add_component( egammaD3PDAnalysis
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloClusterCorrectionLib CaloEvent CaloGeoHelpers CaloRecLib AthContainers AthenaBaseComps AthenaKernel EventKernel xAODCaloEvent xAODEgamma xAODTruth GaudiKernel LArCablingLib D3PDMakerUtils MCTruthClassifierLib RecoToolInterfaces egammaEvent TrkCaloExtension VxVertex egammaInterfacesLib )
+                     LINK_LIBRARIES AthContainers AthenaBaseComps AthenaKernel CaloEvent CaloGeoHelpers D3PDMakerInterfaces EventKernel GaudiKernel LArCablingLib MCTruthClassifierLib RecoToolInterfaces StoreGateLib TrkCaloExtension egammaInterfacesLib xAODCaloEvent xAODEgamma xAODTruth )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/TileGapSelectionGetter.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/TileGapSelectionGetter.py
index b0820af63f4f..89f3ad6f8c51 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/TileGapSelectionGetter.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/TileGapSelectionGetter.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file egammaD3PDAnalysis/python/TileGapSelectionGetter.py
 # @author scott snyder <snyder@bnl.gov>
@@ -53,7 +52,7 @@ class TileGapSelectionGetter ( Configured )  :
 
             self._handle = alg
 
-        except:
+        except Exception:
             mlog.error ("Error configuring TileGapSelectionAlg.")
             traceback.print_exc()
 
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaTruthParticleConfig.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaTruthParticleConfig.py
index eb659e62ebbb..6fd9a3d84675 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaTruthParticleConfig.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/python/egammaTruthParticleConfig.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file egammaD3PDAnalysis/python/egammaTruthParticleConfig.py
 # @author scott snyder <snyder@bnl.gov>
@@ -11,12 +10,10 @@
 
 
 import egammaD3PDAnalysis
-import D3PDMakerCoreComps
 from D3PDMakerConfig.D3PDMakerFlags           import D3PDMakerFlags
-from McParticleAlgs.JobOptCfg                 import createMcAodBuilder
-from RecExConfig.RecFlags                     import rec
 from AthenaCommon.AlgSequence                 import AlgSequence
 from RecExConfig.ObjKeyStore                  import cfgKeyStore
+from RecExConfig.RecFlags                     import rec
 from AthenaCommon                             import CfgMgr
 
 
@@ -36,7 +33,6 @@ def egammaTruthParticleConfig \
 
     algname = prefix + sgkey + 'Builder'
     if not hasattr (seq, algname):
-        import AthenaCommon.CfgMgr as CfgMgr
         from egammaRec.Factories import ToolFactory
         exten = ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool,
                              name="GSFParticleCaloExtensionTool",
-- 
GitLab


From 9e71e417f3527f17ba17c6469918a8454bd8efd8 Mon Sep 17 00:00:00 2001
From: Andrew Mehta <andrew.mehta@cern.ch>
Date: Thu, 17 Dec 2020 17:06:51 +0000
Subject: [PATCH 089/308] Update version.txt

---
 Projects/AnalysisBase/version.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Projects/AnalysisBase/version.txt b/Projects/AnalysisBase/version.txt
index 469a03d2db00..16085fbb4e04 100644
--- a/Projects/AnalysisBase/version.txt
+++ b/Projects/AnalysisBase/version.txt
@@ -1 +1 @@
-22.2.5
+22.2.6
-- 
GitLab


From 6e64f2ae18706211c3b16813943a47150e548cd7 Mon Sep 17 00:00:00 2001
From: Zachary Louis Marshall <zach.marshall@cern.ch>
Date: Thu, 17 Dec 2020 17:31:49 +0000
Subject: [PATCH 090/308] Adding NTUP_PILEUP back into master

It looks like this (DF_DataPrep) was missed in the migration, so
NTUP_PILEUP wasn't working. This adds it back in.
---
 .../CMakeLists.txt                            | 11 ++++
 .../python/DAPR2EventList.py                  |  3 +
 .../python/DataPrepJobProperties.py           | 27 +++++++++
 .../python/__init__.py                        |  2 +
 .../share/DAPR0.py                            | 24 ++++++++
 .../share/DAPR1.py                            | 55 +++++++++++++++++++
 .../share/DAPR2.py                            | 35 ++++++++++++
 .../share/skeleton.AODtoDAOD_tf.py            | 18 ++++--
 8 files changed, 170 insertions(+), 5 deletions(-)
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/CMakeLists.txt
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DAPR2EventList.py
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DataPrepJobProperties.py
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/__init__.py
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR0.py
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR1.py
 create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR2.py

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/CMakeLists.txt
new file mode 100644
index 000000000000..80ef5a4f884f
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/CMakeLists.txt
@@ -0,0 +1,11 @@
+################################################################################
+# Package: DerivationFrameworkDataPrep
+################################################################################
+
+# Declare the package name:
+atlas_subdir( DerivationFrameworkDataPrep )
+
+# Install files from the package:
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_joboptions( share/*.py )
+
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DAPR2EventList.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DAPR2EventList.py
new file mode 100644
index 000000000000..c488e7d5cd6a
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DAPR2EventList.py
@@ -0,0 +1,3 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+EventList = [(276262, 366216946), (276262, 12241502), (276262, 13647343), (276262, 198181590), (276262, 255004128), (276262, 191476906), (276262, 157951929), (276262, 219513416), (276262, 78609439), (276262, 7160282), (276262, 126115945), (276262, 108109797), (276262, 404124285), (276329, 67649584), (276329, 372178767), (276329, 246999417), (276329, 250386040), (276329, 133096046), (276329, 102349619), (276329, 260927287), (276329, 112387366), (276329, 115922962), (276329, 142650297), (276329, 71039435), (276329, 76160804), (276329, 277617312), (276329, 282573830), (276329, 19659640), (276329, 19075347), (276329, 138616006), (276329, 313784553), (276329, 98972081), (276329, 181000569), (276329, 186351646), (276329, 187254326), (276329, 207602715), (276329, 242427871), (276329, 287238498), (276329, 411900298), (276329, 167534390), (276329, 304550306), (276329, 201405515), (276329, 342398721), (276329, 310320039), (276336, 21273207), (276336, 6843552), (276336, 18040781), (276336, 18758716), (276336, 19385659), (276416, 143538017), (276416, 148159084), (276416, 134005896), (276416, 124106650), (276416, 125792472), (276416, 113629388), (276416, 65624569), (276416, 28043912), (276416, 35408791), (276416, 7612513), (276416, 92938525), (276511, 159344994), (276511, 227121168), (276511, 233743915), (276511, 248005016), (276511, 249844151), (276511, 266426359), (276511, 79967862), (276511, 84849641), (276511, 219365115), (276511, 147446961), (276511, 174338302), (276511, 24260973), (276511, 32926183), (276511, 181357786), (276511, 182858171), (276511, 183801762), (276511, 1183208), (276511, 4154561), (276511, 4735843), (276511, 95688892), (276511, 103283877), (276511, 132322634), (276511, 6477457), (276511, 5920544), (276511, 107156789), (276511, 110970816), (276511, 112398479), (276511, 125207371), (276511, 129332450), (276511, 74064515), (276511, 73769311), (276511, 198957977), (276511, 199282143), (276511, 257523172), (276689, 137109697), (276689, 143074596), (276689, 148879715), (276689, 77815761), (276689, 23929472), (276689, 27292496), (276689, 42023947), (276689, 198530398), (276689, 201728804), (276689, 202903111), (276689, 206101041), (276689, 85069330), (276689, 89384650), (276689, 115425020), (276689, 117237937), (276689, 172727967), (276689, 215560663), (276689, 8167397), (276689, 9680864), (276689, 261453453), (276689, 263199154), (276689, 1156290), (276689, 2640029), (276689, 98684383), (276689, 103129126), (276689, 108532720), (276689, 57290075), (276689, 59748649), (276689, 20420693), (276689, 49207872), (276689, 164401024), (276689, 170474206), (276689, 171359319), (276689, 186780139), (276689, 192011862), (276689, 193051077), (276778, 16041787), (276790, 11276967), (276790, 12110486), (276790, 52748416), (276790, 23078325), (276790, 22495017), (276790, 34538441), (276790, 37589269), (276952, 124070203), (276952, 205579598), (276952, 11888053), (276952, 41857703), (276952, 44242529), (276952, 147258878), (276952, 152814611), (276952, 69524185), (276952, 70773235), (276952, 83921840), (276952, 218433117), (276952, 221081946), (276952, 225867095), (276952, 225466398), (276952, 181078925), (276952, 20310337), (276952, 23744446), (276954, 14574690), (278880, 558085589), (278880, 210318172), (278880, 602265022), (278880, 676792095), (278880, 689755707), (278880, 146778511), (278880, 148342250), (278880, 255538473), (278880, 256393458), (278880, 286576235), (278880, 70264671), (278880, 74174619), (278880, 81445605), (278880, 94801954), (278880, 164505578), (278880, 202139538), (278880, 291210636), (278880, 170499965), (278880, 174445448), (278880, 187835224), (278880, 187910379), (278880, 188228430), (278880, 118180964), (278880, 322668008), (278880, 326402710), (278880, 374369278), (278880, 376121296), (278880, 380385214), (278880, 129786175), (278880, 133038506), (278880, 585833415), (278880, 587265014), (278880, 593009820), (278880, 470197912), (278880, 438328550), (278880, 439565190), (278880, 230061545), (278880, 235385490), (278880, 235517755), (278880, 248583650), (278880, 262270235), (278880, 265998789), (278880, 268630374), (278880, 269180081), (278880, 343397990), (278880, 351883614), (278880, 33685726), (278880, 36588872), (278880, 53513443), (278880, 702200008), (278880, 542587395), (278880, 708878720), (278880, 713175974), (278880, 17985738), (278880, 23266001), (278880, 67423146), (278880, 68561247), (278880, 416560385), (278880, 418053900), (278880, 460066094), (278880, 526379537), (278880, 529065042), (278880, 481414837), (278880, 482487092), (278880, 664807109), (278880, 613104986), (278880, 720200839), (278880, 433085407), (278912, 9325788), (278912, 24180006), (278912, 391830323), (278912, 393428345), (278912, 395672838), (278912, 398174556), (278912, 402368383), (278912, 402248151), (278912, 446740704), (278912, 247226791), (278912, 210164111), (278912, 174301934), (278912, 330690799), (278912, 344532504), (278912, 351056473), (278912, 356562325), (278912, 425889292), (278912, 440821328), (278912, 444778724), (278912, 452320099), (278912, 523727655), (278912, 127070976), (278912, 129230005), (278912, 130967009), (278912, 64417832), (278912, 154518859), (278912, 162475008), (278912, 165148177), (278912, 247472369), (278912, 254465819), (278912, 258958314), (278912, 266113254), (278912, 268525890), (278912, 268869947), (278912, 270704153), (278912, 87571939), (278912, 509095340), (278912, 554264734), (278912, 370087212), (278912, 373296021), (278912, 377909850), (278912, 275131369), (278912, 110561647), (278912, 115742166), (278912, 218423882), (278912, 46664935), (278912, 477148808), (278912, 487054716), (278968, 165182532), (278968, 143260590), (278968, 90174946), (278968, 89956812), (278968, 101489709), (278968, 102767612), (278968, 115572316), (278968, 73571144), (278968, 76769497), (278968, 155339552), (278968, 44114170), (278968, 250824132), (278968, 218357057), (278968, 219828633), (278968, 70324804), (278968, 71490596), (278968, 11649887), (278968, 173738447), (278968, 198894682), (278968, 3659739), (278968, 2329077), (278968, 120012398), (278968, 122865406), (278968, 127440137), (278970, 15845225), (278970, 15760301), (278970, 18356759), (278970, 22424983), (278970, 6132230), (279169, 943996713), (279169, 945083670), (279169, 633433430), (279169, 643462941), (279169, 520296143), (279169, 575857015), (279169, 595636736), (279169, 1469883743), (279169, 1495023079), (279169, 438293368), (279169, 439642378), (279169, 442226342), (279169, 194302338), (279169, 201262625), (279169, 214362147), (279169, 219305303), (279169, 219891400), (279169, 919112711), (279169, 275333897), (279169, 273252362), (279169, 279551154), (279169, 1402864338), (279169, 1401821825), (279169, 1103410929), (279169, 1109269936), (279169, 1118067608), (279169, 1530082412), (279169, 1541038448), (279169, 377875241), (279169, 384300248), (279169, 792841748), (279169, 1447900865), (279169, 1454385855), (279169, 1457631427), (279169, 1461591590), (279169, 612607030), (279169, 1031987980), (279169, 1563254647), (279169, 171512400), (279169, 178315806), (279169, 987341454), (279169, 987577577), (279169, 988458822), (279169, 1502738552), (279169, 1506590293), (279169, 1510296981), (279169, 1211088344), (279169, 1211046418), (279169, 1227526456), (279169, 1231226864), (279169, 1240810263), (279169, 1626433282), (279169, 1644149115), (279169, 1651353222), (279169, 1652072980), (279169, 74878768), (279169, 74272943), (279169, 79981385), (279169, 98877310), (279169, 99460073), (279169, 887998446), (279169, 1312869297), (279169, 1314976476), (279169, 1362180102), (279169, 301744794), (279169, 307888886), (279169, 323690739), (279169, 1246287325), (279169, 1261465613), (279169, 1266924280), (279169, 679173076), (279169, 680351387), (279169, 691777525), (279169, 691072555), (279169, 701892284), (279169, 707648124), (279169, 707568505), (279169, 717681383), (279169, 723981578), (279169, 481962563), (279169, 487473644), (279169, 488883027), (279169, 492009472), (279169, 493588232), (279169, 495697730), (279169, 1600602838), (279169, 1601131811), (279169, 1620265042), (279169, 1052348336), (279169, 1055573472), (279169, 1063099189), (279169, 843802936), (279169, 845268121), (279169, 852984357), (279169, 861205000), (279169, 868808229), (279169, 898947734), (279169, 915126543), (279169, 393777873), (279169, 412778817), (279169, 834609284), (279169, 836143404), (279169, 840498834), (279169, 843015382), (279169, 337210178), (279169, 340406409), (279169, 343555274), (279169, 550545934), (279169, 555766315), (279169, 738857915), (279169, 746714708), (279169, 292554193), (279169, 1408623093), (279169, 1425453083), (279169, 1434103497), (279169, 223326543), (279169, 1276286341), (279169, 1386275048), (279169, 764020905), (279169, 773224456), (279169, 775604446), (279169, 656640231), (279169, 670951445), (279169, 1585273614), (279169, 1593711986), (279169, 10495054), (279169, 14241626), (279169, 38752459), (279169, 42158648), (279169, 56057584), (279169, 62105065), (279169, 75106139), (279169, 104712796), (279169, 110649292), (279169, 1157924659), (279169, 1157392517), (279169, 1163371091), (279169, 1175355814), (279169, 1173940835), (279169, 1325159713), (279169, 964857934), (279169, 974587831), (279169, 981256056), (279169, 255320225), (279169, 1142754619), (279169, 20613346), (279169, 22695063), (279169, 22325424), (279169, 27853806), (279169, 27346911), (279169, 117668500), (279169, 129461531), (279169, 153607428), (279169, 157204853), (279169, 446801433), (279169, 455096017), (279169, 456322832), (279259, 7382766), (279259, 189538654), (279259, 102973716), (279259, 101874907), (279259, 132973056), (279259, 138363059), (279259, 80747505), (279259, 84429720), (279259, 85725926), (279259, 87470015), (279259, 109137471), (279259, 121163788), (279259, 127555797), (279259, 127082625), (279259, 127666691), (279259, 131478932), (279259, 10070234), (279259, 13036249), (279259, 164655706), (279259, 30998749), (279259, 50182595), (279279, 157765700), (279279, 168431568), (279279, 169652815), (279279, 67409918), (279279, 85068026), (279279, 85127053), (279279, 290268491), (279279, 299528243), (279279, 299566094), (279279, 302116573), (279279, 307050736), (279279, 309944889), (279279, 447787237), (279279, 453259422), (279279, 483013239), (279279, 485476237), (279279, 486723062), (279279, 126953859), (279279, 126802184), (279279, 254565509), (279279, 410226903), (279279, 412237714), (279279, 415017426), (279279, 419043534), (279279, 433225859), (279279, 221870318), (279279, 223467366), (279279, 224901359), (279279, 227022877), (279279, 228353326), (279279, 237957054), (279279, 37607554), (279279, 40198656), (279279, 41247657), (279279, 41110764), (279279, 43339592), (279279, 177409592), (279279, 2092291), (279279, 2820861), (279279, 398014464), (279279, 109275223), (279279, 364090925), (279279, 363952307), (279279, 10109417), (279279, 13987633), (279279, 96812330), (279279, 270819332), (279279, 274604367), (279279, 282865118), (279279, 285082097), (279279, 285292483), (279279, 368048886), (279279, 373448746), (279279, 384438338), (279279, 145606367), (279279, 154558799), (279284, 28905365), (279284, 711776478), (279284, 130411483), (279284, 136143656), (279284, 829015000), (279284, 835342939), (279284, 837716724), (279284, 837366208), (279284, 394256920), (279284, 415461541), (279284, 2233942), (279284, 5383290), (279284, 4962413), (279284, 460276836), (279284, 607205529), (279284, 612988048), (279284, 501138096), (279284, 502913949), (279284, 761425665), (279284, 801288658), (279284, 654380441), (279284, 687703411), (279284, 484577148), (279284, 514082039), (279284, 514885483), (279284, 280743447), (279284, 282317355), (279284, 283789373), (279284, 294779317), (279284, 296376533), (279284, 154051371), (279284, 155181782), (279284, 743942311), (279284, 59447991), (279284, 68941988), (279284, 73656051), (279284, 77895813), (279284, 83709286), (279284, 344485613), (279284, 352887723), (279284, 433393828), (279284, 574089358), (279284, 577247890), (279284, 587648267), (279284, 589509722), (279284, 537429716), (279284, 48378100), (279284, 52885094), (279284, 854511572), (279284, 862036119), (279284, 238168122), (279284, 635300126), (279284, 639849600), (279284, 669783559), (279284, 671430320), (279284, 679269563), (279284, 248397464), (279284, 248662417), (279284, 251367153), (279284, 269248448), (279284, 272268398), (279284, 85331968), (279284, 89642837), (279284, 177128897), (279284, 185555331), (279284, 191882785), (279284, 447640716), (279284, 472040355), (279284, 473125716), (279284, 476588693), (279284, 311601042), (279284, 331197293), (279284, 372210446), (279284, 544739342), (279284, 547223675), (279284, 562957561), (279284, 213125379), (279284, 219938554), (279284, 232966410), (279345, 1035190249), (279345, 520602143), (279345, 288259752), (279345, 287864601), (279345, 299122084), (279345, 172001233), (279345, 174561880), (279345, 868237357), (279345, 871382796), (279345, 409098444), (279345, 415021297), (279345, 425620990), (279345, 986389970), (279345, 988615034), (279345, 436533637), (279345, 438627316), (279345, 495882386), (279345, 501744769), (279345, 163235851), (279345, 211866800), (279345, 353160612), (279345, 352651640), (279345, 355025669), (279345, 362343899), (279345, 387977378), (279345, 391534047), (279345, 140224469), (279345, 142067599), (279345, 240762906), (279345, 239642198), (279345, 598401438), (279345, 833596648), (279345, 836382436), (279345, 839222405), (279345, 855322438), (279345, 855083629), (279345, 854708266), (279345, 854585572), (279345, 1212650394), (279345, 538114794), (279345, 540618998), (279345, 738298753), (279345, 745585855), (279345, 771636157), (279345, 959810044), (279345, 230122533), (279345, 232017519), (279345, 235776182), (279345, 243152325), (279345, 721857512), (279345, 785702676), (279345, 1070785781), (279345, 1072388432), (279345, 1074858200), (279345, 1074108987), (279345, 1076452646), (279345, 1076024173), (279345, 1080436445), (279345, 1080239910), (279345, 559910786), (279345, 822683782), (279345, 1288844147), (279345, 1287915007), (279345, 217003404), (279345, 226238055), (279345, 304060822), (279345, 286949721), (279345, 5123407), (279345, 1014928454), (279345, 88352598), (279345, 1270445702), (279345, 271977692), (279345, 885256205), (279345, 891679622), (279345, 943499700), (279345, 946809273), (279345, 664254380), (279345, 670608593), (279345, 110996821), (279345, 112071858), (279345, 115874894), (279345, 128839186), (279345, 95625492), (279345, 96220242), (279345, 362828182), (279345, 708545744), (279345, 726001340), (279345, 902047367), (279345, 908118968), (279345, 911886178), (279345, 922167447), (279345, 785822161), (279345, 935610164), (279345, 1224224035), (279345, 345742201), (279345, 1105239291), (279345, 1162661409), (279345, 1170563502), (279345, 618487713), (279345, 994488043), (279345, 996787419), (279345, 1009472954), (279345, 1067422589), (279345, 1318184448), (279345, 1321398967), (279345, 1325145992), (279345, 1326432358), (279345, 1327204644), (279345, 1344880322), (279345, 815036794), (279345, 1210248345), (279345, 1327837723), (279345, 1335034130), (279345, 1334771383), (279345, 632480228), (279345, 635028969), (279345, 636606307), (279345, 638759437), (279345, 447501400), (279345, 449630229), (279345, 467888331), (279345, 468707961), (279345, 471549014), (279345, 929791657), (279345, 318807004), (279345, 317523398), (279345, 319990672), (279345, 323366206), (279345, 8164514), (279345, 11556745), (279345, 16486019), (279345, 18358344), (279345, 45118043), (279345, 46521827), (279345, 30445828), (279515, 3962434), (279515, 6025764), (279598, 1388891327), (279598, 1394176644), (279598, 1402783909), (279598, 1414448132), (279598, 973620427), (279598, 979595015), (279598, 1357688820), (279598, 1367718704), (279598, 1295010706), (279598, 1325608057), (279598, 1325292726), (279598, 1331886192), (279598, 1333373735), (279598, 968291813), (279598, 778914918), (279598, 791411562), (279598, 792167092), (279598, 793569288), (279598, 802113884), (279598, 374698810), (279598, 1087649368), (279598, 1086700195), (279598, 1099884791), (279598, 1100165415), (279598, 166600860), (279598, 183119109), (279598, 189322469), (279598, 636050899), (279598, 640113663), (279598, 645427167), (279598, 654528034), (279598, 574322297), (279598, 1476144889), (279598, 1480949682), (279598, 1495046331), (279598, 318291690), (279598, 325819776), (279598, 325662467), (279598, 330550056), (279598, 330805523), (279598, 337870049), (279598, 1168991694), (279598, 1462950863), (279598, 1472530964), (279598, 46900118), (279598, 50172613), (279598, 134367249), (279598, 135152816), (279598, 138378804), (279598, 139400399), (279598, 143550149), (279598, 65573096), (279598, 77298165), (279598, 144551097), (279598, 154392977), (279598, 188545455), (279598, 195185261), (279598, 226348599), (279598, 228384923), (279598, 690706845), (279598, 694306428), (279598, 706586806), (279598, 274219499), (279598, 280547611), (279598, 385199347), (279598, 393248273), (279598, 462195139), (279598, 447756374), (279598, 452728423), (279598, 884694866), (279598, 1137834059), (279598, 751497185), (279598, 766523514), (279598, 766040455), (279598, 459560248), (279598, 1037949989), (279598, 1045713975), (279598, 230240202), (279598, 232625906), (279598, 243269391), (279598, 242906848), (279598, 983813384), (279598, 57268567), (279598, 75977588), (279598, 85810638), (279598, 946421835), (279598, 948621510), (279598, 735859214), (279598, 736132092), (279598, 103977647), (279598, 114269921), (279598, 112714572), (279598, 621897976), (279598, 624834907), (279598, 624080216), (279598, 626422330), (279598, 627832560), (279598, 630342724), (279598, 1235398562), (279598, 1237488346), (279598, 1239492690), (279598, 1283427434), (279598, 1384764421), (279598, 515633192), (279598, 529583548), (279598, 1207920667), (279598, 1209120259), (279598, 1216893537), (279598, 1228972019), (279598, 1227261582), (279598, 666698134), (279598, 671396538), (279598, 677029107), (279598, 1112966914), (279598, 1114815598), (279598, 1175389910), (279598, 1177181779), (279598, 1178599861), (279598, 1183212184), (279598, 1185121044), (279598, 1187097618), (279598, 1253293190), (279598, 1254691608), (279598, 1258902383), (279598, 1342732987), (279598, 1348632307), (279598, 202102884), (279598, 206321910), (279598, 551627349), (279598, 601203267), (279598, 602094181), (279598, 917868637), (279598, 920180716), (279598, 985622816), (279598, 994793323), (279598, 997881402), (279598, 999419684), (279598, 857365954), (279598, 856326326), (279598, 1145231627), (279598, 1149974331), (279598, 1154115475), (279598, 1189717883), (279598, 1197191331), (279598, 1198249657), (279598, 850139548), (279598, 853681341), (279598, 866434381), (279598, 876900879), (279598, 892730309), (279598, 898433744), (279598, 902822367), (279598, 905176377), (279598, 1418666154), (279598, 1417706379), (279598, 1446180251), (279598, 1447516086), (279598, 1452474604), (279598, 720949184), (279598, 1502027023), (279598, 1503190290), (279598, 1502430080), (279598, 1510860539), (279598, 1555272155), (279598, 314197678), (279598, 925078528), (279598, 929238548), (279598, 935507622), (279598, 9198293), (279598, 11441207), (279598, 13672638), (279598, 1561732067), (279598, 1561952673), (279598, 1565191883), (279598, 432956996), (279598, 433448327), (279598, 437574148), (279598, 288344344), (279598, 350407838), (279598, 352028446), (279598, 358330446), (279598, 527123760), (279598, 527808485), (279598, 589276780), (279598, 1616503410), (279598, 1616885503), (279598, 1543088721), (279598, 1590951544), (279598, 1593452632), (279598, 1600151675), (279598, 1004261079), (279598, 1002572312), (279598, 1006881782), (279598, 1010589620), (279598, 1014570747), (279598, 1015903907), (279598, 1624740973), (279598, 1643829316), (279685, 569724665), (279685, 994915396), (279685, 1058293500), (279685, 1059691471), (279685, 1060524274), (279685, 902029287), (279685, 906221432), (279685, 905353716), (279685, 908822177), (279685, 1587215741), (279685, 102225689), (279685, 111265479), (279685, 112437604), (279685, 117232487), (279685, 170008812), (279685, 173618549), (279685, 172685200), (279685, 548219355), (279685, 548775161), (279685, 551082383), (279685, 572228553), (279685, 584895490), (279685, 859593162), (279685, 1019141524), (279685, 1041391686), (279685, 1043945604), (279685, 75254343), (279685, 82429255), (279685, 90451060), (279685, 98910890), (279685, 308173810), (279685, 307481942), (279685, 1077573297), (279685, 1079943156), (279685, 601199047), (279685, 610366173), (279685, 632813454), (279685, 1084232152), (279685, 1085663679), (279685, 757468064), (279685, 758660432), (279685, 1449718623), (279685, 1449419797), (279685, 1448800734), (279685, 1458862243), (279685, 931230941), (279685, 1787373449), (279685, 1273019788), (279685, 1623723627), (279685, 1627345414), (279685, 1665215377), (279685, 941561732), (279685, 945808152), (279685, 952069422), (279685, 959386543), (279685, 957489617), (279685, 960091593), (279685, 1498853), (279685, 3354467), (279685, 1825441210), (279685, 1826135061), (279685, 447177602), (279685, 450784276), (279685, 1114561661), (279685, 1145965756), (279685, 1301362874), (279685, 1305530278), (279685, 744120151), (279685, 1479609626), (279685, 1481369452), (279685, 1487977743), (279685, 1486709793), (279685, 1493011696), (279685, 222575576), (279685, 225567252), (279685, 230102870), (279685, 178592801), (279685, 179247331), (279685, 1101776168), (279685, 46448084), (279685, 54285602), (279685, 58410530), (279685, 1182376397), (279685, 1240387257), (279685, 1496184362), (279685, 1817476143), (279685, 648076843), (279685, 651304603), (279685, 660023662), (279685, 659626008), (279685, 66462959), (279685, 68135525), (279685, 26480868), (279685, 497932998), (279685, 1692021026), (279685, 1698150911), (279685, 1717769174), (279685, 1795794646), (279685, 1810537926), (279685, 463073158), (279685, 467817677), (279685, 470133770), (279685, 476165445), (279685, 478420692), (279685, 484119678), (279685, 1474311126), (279685, 252408862), (279685, 616175955), (279685, 615044725), (279685, 617188215), (279685, 710888398), (279685, 717128856), (279685, 1824722195), (279685, 1828119641), (279685, 255853864), (279685, 157159798), (279685, 185747999), (279685, 185578178), (279685, 187779327), (279685, 1216555452), (279685, 1744754317), (279685, 1747211832), (279685, 1748341060), (279685, 1753005273), (279685, 402618250), (279685, 404631466), (279685, 119795507), (279685, 120091061), (279685, 211043904), (279685, 1171421202), (279685, 134159756), (279685, 141460532), (279685, 147255417), (279685, 155870083), (279685, 378532264), (279685, 665461073), (279685, 667677456), (279685, 671112770), (279685, 672741895), (279685, 696755721), (279685, 695307543), (279685, 697244349), (279685, 701432480), (279685, 706392932), (279685, 350271855), (279685, 353883987), (279685, 796806157), (279685, 806779151), (279685, 1546891437), (279685, 1549430039), (279685, 1550267182), (279685, 1552145210), (279685, 1553505171), (279685, 1559780666), (279685, 1562932412), (279685, 1573740582), (279685, 1575135572), (279685, 1576802830), (279685, 967514807), (279685, 967681480), (279685, 973546702), (279685, 973249481), (279685, 528038554), (279685, 1222927166), (279685, 1225955645), (279685, 1154233143), (279685, 841042729), (279685, 845988910), (279685, 847464153), (279685, 847679312), (279685, 897288539), (279685, 1259574788), (279685, 327324918), (279685, 771342809), (279685, 770222271), (279685, 769856136), (279685, 1682320978), (279685, 1727605776), (279685, 1732050788), (279685, 1734545390), (279685, 777495529), (279685, 785254618), (279685, 916319792), (279685, 926937122), (279685, 598508746), (279685, 679806409), (279685, 687090831), (279685, 1372152899), (279685, 1377678026), (279685, 1386934868), (279685, 1389046709), (279685, 1397343325), (279685, 1338092042), (279685, 1339637549), (279685, 1600116897), (279685, 1607910084), (279685, 1610191079), (279685, 1611562685), (279685, 1617446423), (279685, 1364914813), (279685, 1759463409), (279685, 1758881557), (279685, 1770512895), (279685, 1770039305), (279764, 5819788), (279764, 147785766), (279764, 40232410), (279813, 616466172), (279813, 619809037), (279813, 635457094), (279813, 642836718), (279813, 440447256), (279813, 444048352), (279813, 447706527), (279813, 451702099), (279813, 460232356), (279813, 461352233), (279813, 464634867), (279813, 97955957), (279813, 102338113), (279813, 107652008), (279813, 106361232), (279813, 120228827), (279813, 299404856), (279813, 303064762), (279813, 128018090), (279813, 130202428), (279813, 130015733), (279813, 139140794), (279813, 140139893), (279813, 146724224), (279813, 43947930), (279813, 45549576), (279813, 52577520), (279813, 3658787), (279813, 5210712), (279813, 1154321916), (279813, 1158790717), (279813, 1159090290), (279813, 1165572770), (279813, 754406947), (279813, 756800398), (279813, 761144976), (279813, 768822871), (279813, 853840890), (279813, 211655354), (279813, 221445554), (279813, 222492549), (279813, 789441169), (279813, 791778110), (279813, 797592164), (279813, 1178568495), (279813, 1215922757), (279813, 646372100), (279813, 647978944), (279813, 654188675), (279813, 405800339), (279813, 409339907), (279813, 410688911), (279813, 1068596105), (279813, 1102506220), (279813, 1115180157), (279813, 333100810), (279813, 332941516), (279813, 682743143), (279813, 681445084), (279813, 701309533), (279813, 702546536), (279813, 707476487), (279813, 484253053), (279813, 559204132), (279813, 559137019), (279813, 563071462), (279813, 576910951), (279813, 971824075), (279813, 160199615), (279813, 163499359), (279813, 168546333), (279813, 985775743), (279813, 1030903032), (279813, 1226590420), (279813, 1235865797), (279813, 1197688367), (279813, 1205015713), (279813, 1242594781), (279813, 1245317384), (279813, 998085516), (279813, 369482646), (279813, 498844966), (279813, 388459936), (279813, 391427043), (279813, 870999559), (279813, 880378200), (279813, 249523725), (279813, 260842731), (279813, 15368714), (279813, 24934870), (279813, 26265330), (279813, 1033632667), (279813, 1037311167), (279813, 1050859949), (279813, 1054815393), (279813, 1055943910), (279813, 1100057814), (279813, 720370499), (279813, 1125950845), (279813, 1135480408), (279813, 1148403014), (279813, 174172890), (279813, 188787273), (279813, 198702267), (279813, 261175451), (279813, 265130671), (279813, 281487612), (279813, 279948829), (279813, 280070287), (279813, 287516402), (279813, 887283232), (279813, 886117066), (279813, 895690048), (279813, 904706566), (279813, 907326665), (279813, 803716262), (279813, 816588518), (279813, 64799420), (279813, 68953861), (279813, 69378380), (279813, 85998116), (279813, 930068729), (279813, 931303409), (279867, 276462710), (279867, 283478093), (279867, 40374415), (279867, 48205478), (279867, 57832404), (279867, 220727668), (279867, 225201413), (279867, 230083828), (279867, 234090186), (279867, 238214821), (279867, 152315704), (279867, 173150219), (279867, 552916125), (279867, 553492391), (279867, 578475797), (279867, 576636245), (279867, 584246967), (279867, 587806044), (279867, 593262754), (279867, 251156171), (279867, 254720060), (279867, 256562575), (279867, 260388389), (279867, 656092326), (279867, 662938194), (279867, 375865760), (279867, 382566734), (279867, 523629106), (279867, 527358731), (279867, 384262353), (279867, 391137986), (279867, 397526232), (279867, 397540041), (279867, 400144067), (279867, 404250675), (279867, 404098489), (279867, 71976189), (279867, 79482015), (279867, 79330119), (279867, 119159109), (279867, 131839848), (279867, 132829782), (279867, 420847658), (279867, 435767466), (279867, 437218546), (279867, 439333394), (279867, 445515368), (279867, 448633490), (279867, 298901939), (279867, 298322683), (279867, 301192556), (279867, 305637241), (279867, 321738423), (279867, 565324594), (279867, 198556976), (279867, 200365902), (279867, 507533248), (279867, 506970520), (279867, 539183937), (279867, 102905619), (279867, 110790455), (279867, 607416904), (279867, 636596608), (279867, 637566889), (279867, 650399144), (279867, 481990882), (279867, 406846348), (279867, 413020649), (279867, 414061437), (279867, 464538507), (279867, 470960911), (279867, 377607978), (279867, 330766943), (279867, 336013625), (279867, 347635818), (279867, 15012112), (279867, 30367924), (279928, 7904736), (279928, 9543411), (279928, 12132872), (279928, 10267765), (279928, 13923914), (279932, 537387934), (279932, 539808166), (279932, 789532614), (279932, 789657845), (279932, 808591363), (279932, 998123955), (279932, 364772005), (279932, 994715156), (279932, 1005236149), (279932, 1025399141), (279932, 468459692), (279932, 475890612), (279932, 480958467), (279932, 482504840), (279932, 756247031), (279932, 781018138), (279932, 779002166), (279932, 8599822), (279932, 11297069), (279932, 13758917), (279932, 18341275), (279932, 23782059), (279932, 32004457), (279932, 42835472), (279932, 57139278), (279932, 61398373), (279932, 655807898), (279932, 656157158), (279932, 669401622), (279932, 670162684), (279932, 683482319), (279932, 483179039), (279932, 487609186), (279932, 529394225), (279932, 533504637), (279932, 534178827), (279932, 817866564), (279932, 816951913), (279932, 818753917), (279932, 819868781), (279932, 837041074), (279932, 942574028), (279932, 955031554), (279932, 967752540), (279932, 975385966), (279932, 984086477), (279932, 713773421), (279932, 717300387), (279932, 324553947), (279932, 334270094), (279932, 335402320), (279932, 335293482), (279932, 342731578), (279932, 343360308), (279932, 346826503), (279932, 108413293), (279932, 111805388), (279932, 113513911), (279932, 587004807), (279932, 589257352), (279932, 589655067), (279932, 598241304), (279932, 645215674), (279932, 648275647), (279932, 650544540), (279932, 650704969), (279932, 612999477), (279932, 624961067), (279932, 624870367), (279932, 289855172), (279932, 298845396), (279932, 164032909), (279932, 382890312), (279932, 384772370), (279932, 394903722), (279932, 403247539), (279932, 407152872), (279932, 504185577), (279932, 509093509), (279932, 508082245), (279932, 511656679), (279932, 521597703), (279932, 522413971), (279932, 914749114), (279932, 932025556), (279932, 198622212), (279932, 204366335), (279932, 244685199), (279932, 244026524), (279932, 244238860), (279932, 266770046), (279932, 282178729), (279932, 215396000), (279932, 231451835), (279932, 237463069), (279932, 244724002), (279932, 428678783), (279932, 355284109), (279932, 357576354), (279932, 377540805), (279932, 170531949), (279932, 174834997), (279932, 172400430), (279932, 181016157), (279932, 184914053), (279932, 694033901), (279932, 717728719), (279932, 719205259), (279932, 721348777), (279932, 723676165), (279932, 725029952), (279932, 728355726), (279932, 126115705), (279932, 137736437), (279932, 146822795), (279932, 149518335), (279932, 897126465), (279932, 944327392), (279932, 944128650), (279932, 968702873), (279932, 735075940), (279932, 863481189), (279932, 870290007), (279932, 880476512), (279932, 882826003), (279932, 430969735), (279932, 436899787), (279932, 438809167), (279932, 441542389), (279932, 448622663), (279932, 449855856), (279932, 315692580), (279932, 319865821), (279932, 324410202), (279984, 203574371), (279984, 209494295), (279984, 226576929), (279984, 704677185), (279984, 725065273), (279984, 1439950282), (279984, 1467346953), (279984, 132238512), (279984, 431702444), (279984, 438988933), (279984, 441301622), (279984, 286135090), (279984, 296404412), (279984, 660624978), (279984, 662480441), (279984, 668485621), (279984, 696383882), (279984, 871248035), (279984, 1374875253), (279984, 612588484), (279984, 621139315), (279984, 638134633), (279984, 649232536), (279984, 651233229), (279984, 566194111), (279984, 567007312), (279984, 574983306), (279984, 576866499), (279984, 1021322692), (279984, 177530616), (279984, 183527026), (279984, 184583254), (279984, 1111779127), (279984, 1121587255), (279984, 1127647502), (279984, 1133875712), (279984, 1342363616), (279984, 1346473479), (279984, 1348345553), (279984, 1351367224), (279984, 1356393695), (279984, 1357845360), (279984, 1360145796), (279984, 1478546588), (279984, 1479723233), (279984, 1479556604), (279984, 1231063345), (279984, 632328323), (279984, 635344308), (279984, 377026438), (279984, 1294597823), (279984, 1295812372), (279984, 1300422864), (279984, 1318499940), (279984, 1391311353), (279984, 1395298056), (279984, 1403930012), (279984, 910584338), (279984, 915779140), (279984, 918777379), (279984, 1053399407), (279984, 1055807660), (279984, 89828430), (279984, 91910483), (279984, 104113253), (279984, 115354325), (279984, 1171798273), (279984, 1175375807), (279984, 1176891721), (279984, 1179008859), (279984, 1183606039), (279984, 1143860751), (279984, 1148604631), (279984, 1149254523), (279984, 1159875136), (279984, 1259816663), (279984, 1272290835), (279984, 1277090444), (279984, 1277682507), (279984, 820536378), (279984, 820836378), (279984, 824599473), (279984, 826173615), (279984, 830614230), (279984, 837218918), (279984, 12778623), (279984, 466189416), (279984, 471202313), (279984, 586104960), (279984, 598971757), (279984, 980040724), (279984, 1075070408), (279984, 1076778676), (279984, 1096572243), (279984, 1097230136), (279984, 796893590), (279984, 803375607), (279984, 807804261), (279984, 818481701), (279984, 238278996), (279984, 244367499), (279984, 242452118), (279984, 1411309100), (279984, 1419513519), (279984, 1433269542), (279984, 1441285496), (279984, 163377331), (279984, 194595648), (279984, 194918883), (279984, 539118309), (279984, 548242271), (279984, 128843345), (279984, 502122075), (279984, 511562984), (279984, 512742536), (279984, 512165378), (279984, 523680108), (279984, 525423661), (279984, 1199110775), (279984, 1219873554), (279984, 328987017), (279984, 341031913), (279984, 356654933), (279984, 743171650), (279984, 743165336), (279984, 749235945), (279984, 25077169), (279984, 27537063), (279984, 32563160), (279984, 39885749), (279984, 305895209), (279984, 309206165), (279984, 308155401), (279984, 322667967), (279984, 1002613611), (279984, 1012315666), (279984, 1015736657), (279984, 395391978), (279984, 399735682), (279984, 1067305476), (279984, 1072074541), (279984, 61881584), (279984, 66529886), (279984, 774111109), (279984, 776114527), (279984, 784425595), (279984, 677779731), (279984, 682195540), (279984, 415868084), (279984, 415447915), (279984, 56984747), (279984, 58416632), (279984, 60491232), (279984, 123743894), (279984, 127103528), (279984, 473768215), (279984, 488222088), (279984, 500081545), (279984, 274552281), (279984, 341306171), (279984, 345399690), (279984, 346526187), (279984, 154874931), (279984, 152774031), (279984, 927028121), (279984, 941866077), (279984, 942073042), (279984, 940069951), (280231, 1697220415), (280231, 2044826238), (280231, 2173299266), (280231, 2212872429), (280231, 2216552214), (280231, 1449968217), (280231, 1527271497), (280231, 1534504071), (280231, 1541691770), (280231, 1545610057), (280231, 1552437414), (280231, 2233292561), (280231, 2237120544), (280231, 2237811313), (280231, 2246005121), (280231, 369689579), (280231, 367543760), (280231, 1458179665), (280231, 1474698197), (280231, 1482665388), (280231, 1156069677), (280231, 1157252005), (280231, 1158855586), (280231, 1164197770), (280231, 1180553520), (280231, 1180765527), (280231, 793501146), (280231, 1667479009), (280231, 1676573399), (280231, 1687565918), (280231, 1692799960), (280231, 1698406588), (280231, 855957288), (280231, 854394699), (280231, 869243622), (280231, 873562692), (280231, 876920574), (280231, 875530537), (280231, 880532971), (280231, 881173153), (280231, 971849653), (280231, 1002395450), (280231, 1013068944), (280231, 945670592), (280231, 953019147), (280231, 1260055395), (280231, 1263800365), (280231, 1268507030), (280231, 1269911400), (280231, 1273571681), (280231, 1278011838), (280231, 38558870), (280231, 40878906), (280231, 61455973), (280231, 66713800), (280231, 1339192349), (280231, 1344392823), (280231, 217745065), (280231, 227728751), (280231, 231636765), (280231, 235466307), (280231, 2012570930), (280231, 2016636496), (280231, 671510359), (280231, 434101590), (280231, 443192737), (280231, 450134377), (280231, 459055082), (280231, 460538315), (280231, 1973708885), (280231, 1980187692), (280231, 471164304), (280231, 473567922), (280231, 473221885), (280231, 473991357), (280231, 479249399), (280231, 488312835), (280231, 490615902), (280231, 1315844372), (280231, 1313857790), (280231, 1321860185), (280231, 1326534006), (280231, 1356225718), (280231, 1375092666), (280231, 196298124), (280231, 1949842409), (280231, 1931123628), (280231, 1930664315), (280231, 89110006), (280231, 91182123), (280231, 95836512), (280231, 100768792), (280231, 108884461), (280231, 111613478), (280231, 2087566099), (280231, 2096000312), (280231, 2096781713), (280231, 2100684572), (280231, 2103911713), (280231, 2119938426), (280231, 1243456494), (280231, 1260778712), (280231, 1520861485), (280231, 1528260441), (280231, 1635043760), (280231, 1634847333), (280231, 1640387994), (280231, 1639530458), (280231, 1958665413), (280231, 1964739554), (280231, 1972308456), (280231, 2140453858), (280231, 2148717251), (280231, 2151283867), (280231, 2153712104), (280231, 2161705125), (280231, 2162933936), (280231, 2163098832), (280231, 1655056891), (280231, 1654594888), (280231, 1578063704), (280231, 1581115715), (280231, 1588933605), (280231, 1620659373), (280231, 1621635609), (280231, 561112136), (280231, 569793875), (280231, 1701958330), (280231, 1716112176), (280231, 1718629600), (280231, 12832494), (280231, 11445384), (280231, 13101419), (280231, 14209417), (280231, 19447751), (280231, 19967925), (280231, 27121746), (280231, 348600562), (280231, 349861950), (280231, 606171478), (280231, 615592694), (280231, 49282306), (280231, 48459971), (280231, 49570849), (280231, 50060693), (280231, 54294670), (280231, 73396555), (280231, 591443490), (280231, 622639558), (280231, 631088748), (280231, 631753816), (280231, 638446503), (280231, 647084730), (280231, 647441215), (280231, 1072450928), (280231, 1080299669), (280231, 1088259805), (280231, 1093289411), (280231, 400797053), (280231, 407606480), (280231, 417324542), (280231, 420912100), (280231, 1049057108), (280231, 1057775763), (280231, 495433553), (280231, 497678002), (280231, 496555495), (280231, 541558273), (280231, 2028905291), (280231, 2032968631), (280231, 837219032), (280231, 842594902), (280231, 852619081), (280231, 1386675206), (280231, 1387030296), (280231, 1395214136), (280231, 1395978315), (280231, 1413343276), (280231, 1415373351), (280231, 2225072885), (280231, 308583604), (280231, 650446390), (280231, 801609983), (280231, 812889623), (280231, 895818306), (280231, 897375449), (280231, 898263363), (280231, 902393965), (280231, 136391466), (280231, 144644538), (280231, 758891910), (280231, 758987458), (280231, 770711413), (280231, 1212711538), (280231, 1215676249), (280231, 2189604584), (280231, 1912203263), (280231, 1914766176), (280231, 707984122), (280231, 712923693), (280231, 1500562379), (280231, 1508198363), (280231, 1507843608), (280231, 1097216072), (280231, 1099777576), (280231, 1106135966), (280231, 1116050195), (280231, 1116882997), (280231, 341892480), (280231, 345016738), (280231, 2120184031), (280231, 691741058), (280231, 731223052), (280231, 741232200), (280231, 508826854), (280231, 521848336), (280231, 245281313), (280231, 302371622), (280231, 317351811), (280231, 327312659), (280231, 980624274), (280231, 1022196008), (280231, 1026226964), (280231, 1031787135), (280231, 996629778), (280231, 1000502763), (280231, 262686527), (280231, 272031523), (280231, 274498243), (280231, 286401785), (280231, 1575675636), (280231, 1607855932), (280231, 163417619), (280231, 165752059), (280231, 175324013), (280231, 179745591), (280231, 181073967), (280231, 536480514), (280231, 921620215), (280231, 1995330311), (280231, 2058751034), (280319, 562029959), (280319, 567143828), (280319, 573275578), (280319, 591403563), (280319, 1036903160), (280319, 1034517720), (280319, 733740633), (280319, 1523819931), (280319, 281959301), (280319, 290356572), (280319, 336382906), (280319, 367243891), (280319, 369071591), (280319, 367052586), (280319, 1080619643), (280319, 810881493), (280319, 212091003), (280319, 271544005), (280319, 1167221976), (280319, 1203245495), (280319, 1206062859), (280319, 1205889842), (280319, 179803922), (280319, 179756949), (280319, 184887165), (280319, 194079815), (280319, 563318190), (280319, 695883268), (280319, 695447406), (280319, 701649500), (280319, 509676059), (280319, 512035916), (280319, 513593907), (280319, 515140366), (280319, 518901728), (280319, 524487015), (280319, 1691227729), (280319, 785236144), (280319, 790450488), (280319, 24388459), (280319, 27495707), (280319, 30626154), (280319, 278408387), (280319, 774601762), (280319, 826676971), (280319, 832932290), (280319, 833909729), (280319, 1120682424), (280319, 528264020), (280319, 318047356), (280319, 319639794), (280319, 326288942), (280319, 1525417169), (280319, 1534808191), (280319, 1537085700), (280319, 1550724777), (280319, 1555280491), (280319, 633887102), (280319, 634398978), (280319, 640806170), (280319, 868271764), (280319, 227574195), (280319, 239073291), (280319, 1805498900), (280319, 1717915951), (280319, 1176247), (280319, 1883466548), (280319, 1888059765), (280319, 1994844252), (280319, 952055843), (280319, 950653148), (280319, 953307970), (280319, 974019669), (280319, 981646637), (280319, 1090291013), (280319, 1091898446), (280319, 1102018261), (280319, 1225829518), (280319, 1228858773), (280319, 1266571891), (280319, 1268793110), (280319, 1275046676), (280319, 1983955191), (280319, 1989324817), (280319, 1927883623), (280319, 1936849157), (280319, 1936707257), (280319, 1946712502), (280319, 1948913625), (280319, 75809074), (280319, 87910127), (280319, 1828850376), (280319, 1839057146), (280319, 1844923384), (280319, 1844702370), (280319, 745442820), (280319, 752623568), (280319, 798105003), (280319, 722094647), (280319, 760235715), (280319, 1648730072), (280319, 2008777571), (280319, 2013904070), (280319, 2016151584), (280319, 736964000), (280319, 1681460726), (280319, 1682247541), (280319, 1691355864), (280319, 1771934315), (280319, 1775183359), (280319, 1774691556), (280319, 1777191468), (280319, 1822163649), (280319, 1823376735), (280319, 1826273957), (280319, 1826940160), (280319, 1851634850), (280319, 1855972106), (280319, 1864367352), (280319, 1864414128), (280319, 1871948254), (280319, 1873304852), (280319, 1874785103), (280319, 1133321903), (280319, 1139047711), (280319, 1153638375), (280319, 1151415477), (280319, 1153720565), (280319, 1008081445), (280319, 913051817), (280319, 914450704), (280319, 921187787), (280319, 931194131), (280319, 2036770261), (280319, 2042319778), (280319, 2046979488), (280319, 2050121279), (280319, 2058398448), (280319, 726127616), (280319, 1894777433), (280319, 887921870), (280319, 889450748), (280319, 935184686), (280319, 935513275), (280319, 942862333), (280319, 1475173173), (280319, 1479514672), (280319, 1478120277), (280319, 1478257757), (280319, 1488525960), (280319, 1569643892), (280319, 963155881), (280319, 1173822256), (280319, 1178287036), (280319, 1951070306), (280319, 1963080845), (280319, 1965865848), (280319, 1965685628), (280319, 1589594523), (280319, 1596104201), (280319, 1596443921), (280319, 1599250983), (280319, 1621956298), (280319, 1628997553), (280319, 667498270), (280319, 688232169), (280319, 420925509), (280319, 425494828), (280319, 430397837), (280319, 1294198318), (280319, 101558805), (280319, 105389815), (280319, 108272689), (280319, 113253324), (280319, 116449667), (280319, 122212963), (280319, 121504127), (280319, 1049077141), (280319, 1051348408), (280319, 1072422024), (280319, 408586138), (280319, 417241152), (280319, 1355988103), (280319, 1398061854), (280319, 1400246374), (280319, 1401513478), (280319, 1408234862), (280319, 1330192822), (280319, 1337393000), (280319, 1348856615), (280319, 1354491936), (280319, 131565819), (280319, 131691545), (280319, 143449561), (280319, 170322087), (280319, 260408945), (280319, 47716555), (280319, 55118355), (280319, 60906203), (280319, 65631594), (280319, 70697683), (280319, 1331803255), (280319, 649497548), (280319, 476259839), (280319, 1378419054), (280319, 1379556550), (280319, 1418979438), (280319, 1425810973), (280319, 840781166), (280319, 844110200), (280319, 862377450), (280319, 1218209634), (280319, 1216278078), (280319, 1253627767), (280319, 295870607), (280319, 298961705), (280319, 1448768963), (280319, 1452532772), (280319, 1460778453), (280319, 1459335527), (280319, 1470974161), (280319, 1473438001), (280319, 356245342), (280319, 401966385), (280319, 443060472), (280319, 445957840), (280319, 453840378), (280319, 461955172), (280319, 468243075), (280319, 1607864717), (280319, 1613732251), (280319, 36789003), (280319, 40320283), (280319, 1790009047), (280319, 1373261437), (280319, 1427358349), (280319, 593790933), (280319, 610486929), (280319, 373797091), (280319, 384690953), (280319, 387231970), (280319, 404758158), (280368, 18630561), (280368, 51648904), (280368, 54941288), (280368, 3646070), (280368, 98914941), (280368, 102460266), (280368, 111188172), (280368, 110195295), (280368, 111231202), (280368, 35044919), (280368, 37803137), (280368, 46074631), (280368, 119864418), (280368, 120542057), (280368, 122424631), (280368, 126731420), (280368, 20144526), (280368, 28604229), (280368, 86306278), (280368, 157377745), (280368, 145775947), (280368, 76870390), (280368, 159538570), (280423, 361879287), (280423, 362830248), (280423, 364833223), (280423, 373737920), (280423, 376217318), (280423, 373150603), (280423, 381102402), (280423, 382471972), (280423, 385475890), (280423, 617874050), (280423, 1148716645), (280423, 1154025636), (280423, 1254129385), (280423, 394025670), (280423, 395246647), (280423, 395278324), (280423, 400221258), (280423, 1427172638), (280423, 1180567303), (280423, 1185909605), (280423, 1187368199), (280423, 165419390), (280423, 181035460), (280423, 188028507), (280423, 190016366), (280423, 1230869026), (280423, 876312069), (280423, 1101820335), (280423, 1104512803), (280423, 1118381906), (280423, 1129146016), (280423, 782844728), (280423, 787249204), (280423, 961887294), (280423, 972534323), (280423, 970727751), (280423, 1002887456), (280423, 1007692904), (280423, 1010794041), (280423, 1382253233), (280423, 1383416018), (280423, 538486944), (280423, 557206463), (280423, 561990306), (280423, 9878484), (280423, 14216983), (280423, 16326388), (280423, 18767832), (280423, 241148225), (280423, 244595846), (280423, 1070353107), (280423, 937828273), (280423, 947795856), (280423, 527038547), (280423, 1031743590), (280423, 1203185849), (280423, 1260779023), (280423, 1271032060), (280423, 1274946917), (280423, 86295392), (280423, 449834672), (280423, 454760804), (280423, 469015037), (280423, 1325322649), (280423, 1357782077), (280423, 1359154942), (280423, 1363741945), (280423, 1364463414), (280423, 28462304), (280423, 349285383), (280423, 349810042), (280423, 353367542), (280423, 1238212366), (280423, 1238753925), (280423, 1239476174), (280423, 880301270), (280423, 926231166), (280423, 1137299942), (280423, 1171790310), (280423, 1395159771), (280423, 1398240379), (280423, 1440351100), (280423, 1442033968), (280423, 1450644524), (280423, 286229470), (280423, 307998315), (280423, 313571606), (280423, 316574001), (280423, 575438226), (280423, 581449935), (280423, 584326224), (280423, 587953050), (280423, 409497173), (280423, 415687661), (280423, 975667197), (280423, 985158814), (280423, 984716930), (280423, 990209212), (280423, 1040033763), (280423, 628695807), (280423, 630821228), (280423, 630413949), (280423, 858619782), (280423, 861359093), (280423, 865932277), (280423, 116060826), (280423, 122388586), (280423, 206059696), (280423, 211654495), (280423, 224046559), (280423, 227375400), (280423, 632865993), (280423, 654235135), (280423, 657561622), (280423, 129766561), (280423, 138283972), (280423, 152330182), (280423, 194073332), (280423, 199973590), (280423, 200852470), (280423, 201522099), (280423, 203303471), (280423, 892527775), (280423, 893096566), (280423, 895141051), (280423, 914557524), (280423, 918190132), (280423, 671877647), (280423, 692407000), (280423, 697758178), (280423, 700384917), (280423, 699184191), (280423, 295070462), (280423, 298640650), (280423, 300261327), (280423, 398038121), (280423, 419468311), (280423, 429311954), (280423, 439364946), (280423, 440470825), (280423, 440692290), (280423, 259349181), (280423, 262207679), (280423, 262061175), (280423, 263154947), (280423, 263838645), (280423, 272479713), (280423, 1353299397), (280423, 1392249888), (280423, 1455292838), (280423, 1454925780), (280423, 1470162509), (280423, 1013683544), (280423, 1016912491), (280423, 1049866282), (280423, 1051711843), (280423, 725890228), (280423, 740450907), (280423, 744155732), (280423, 743752620), (280423, 1290387569), (280423, 65023309), (280423, 64989151), (280423, 66160176), (280423, 67561661), (280423, 68518681), (280423, 72267220), (280423, 490779190), (280423, 495189076), (280423, 1299561766), (280423, 247905881), (280423, 251975039), (280423, 1201706120), (280423, 1206298512), (280423, 1216431096), (280423, 756513490), (280423, 767520638), (280423, 770310698), (280423, 812035014), (280423, 823451393), (280423, 830257107), (280423, 829574918), (280464, 403679437), (280464, 947987832), (280464, 952240148), (280464, 503924435), (280464, 1083589410), (280464, 1163146080), (280464, 1162478083), (280464, 1164288631), (280464, 710930850), (280464, 703262462), (280464, 600587508), (280464, 607176800), (280464, 245203634), (280464, 249008186), (280464, 251459903), (280464, 254136179), (280464, 682723454), (280464, 686307471), (280464, 688567342), (280464, 689606912), (280464, 693794106), (280464, 725116424), (280464, 735303390), (280464, 738387074), (280464, 152556344), (280464, 458632505), (280464, 460104446), (280464, 463842979), (280464, 468517915), (280464, 232273755), (280464, 196920263), (280464, 200933676), (280464, 273749193), (280464, 272973462), (280464, 633972651), (280464, 633220390), (280464, 634574687), (280464, 637155335), (280464, 1031693888), (280464, 1114412068), (280464, 418652990), (280464, 126759885), (280464, 1160231009), (280464, 214628406), (280464, 217360033), (280464, 528663619), (280464, 220336136), (280464, 221661891), (280464, 226532362), (280464, 226632558), (280464, 553839938), (280464, 563302945), (280464, 565035967), (280464, 175172492), (280464, 176815328), (280464, 568239726), (280464, 572283010), (280464, 572552135), (280464, 581587223), (280464, 1065216667), (280464, 1069118617), (280464, 514796437), (280464, 271733586), (280464, 271647938), (280464, 86107134), (280464, 91133906), (280464, 92700049), (280464, 391974029), (280464, 388911563), (280464, 400621603), (280464, 287676836), (280464, 289009994), (280464, 308881491), (280464, 367648003), (280464, 370260559), (280464, 380561608), (280464, 382928385), (280464, 387213831), (280464, 386525088), (280464, 880447668), (280464, 888303196), (280464, 259950335), (280464, 259765338), (280464, 268881406), (280464, 1130301946), (280464, 1138638990), (280464, 1137776122), (280464, 737099342), (280464, 744662924), (280464, 748251064), (280464, 909578492), (280464, 911354300), (280464, 926316827), (280464, 1138881294), (280464, 1147367215), (280464, 1173373755), (280464, 1185306156), (280464, 1103977707), (280464, 1110296971), (280464, 279661057), (280464, 975352871), (280464, 979075921), (280464, 983442153), (280464, 987957933), (280464, 988819437), (280464, 989634663), (280464, 330503907), (280464, 332597272), (280464, 357975715), (280464, 9219814), (280464, 49735110), (280464, 54605145), (280464, 310541782), (280464, 312614388), (280464, 318887683), (280464, 319806632), (280464, 30366027), (280464, 836579683), (280464, 839912275), (280464, 842333950), (280464, 847153251), (280464, 852064668), (280464, 779913363), (280464, 793047081), (280464, 791995874), (280464, 65413515), (280464, 126125351), (280464, 110061655), (280464, 113411803), (280464, 20288421), (280464, 26048665), (280464, 68823987), (280464, 81902464), (280464, 343969365), (280464, 342160879), (280464, 815285637), (280464, 178978607), (280464, 187603384), (280464, 490965341), (280464, 492847873), (280464, 491456439), (280464, 493532551), (280464, 497126245), (280500, 134703333), (280500, 154142130), (280500, 157250753), (280500, 161506305), (280500, 110635174), (280500, 129681932), (280500, 127520832), (280500, 40285631), (280500, 66590758), (280500, 80784169), (280500, 23335506), (280500, 24345010), (280500, 26259749), (280500, 31766868), (280500, 88711753), (280500, 175173724), (280500, 142811965), (280500, 149327890), (280500, 150787598), (280520, 487785931), (280520, 492044036), (280520, 497803222), (280520, 517744529), (280520, 372978976), (280520, 418145603), (280520, 472984019), (280520, 436928009), (280520, 446183506), (280520, 125120877), (280520, 193329262), (280520, 352549231), (280520, 164065382), (280520, 197168109), (280520, 201281443), (280520, 147743883), (280520, 245928907), (280520, 249866083), (280520, 256947489), (280520, 257632916), (280520, 255478538), (280520, 263837247), (280520, 265476786), (280520, 350819590), (280520, 432126142), (280520, 213138882), (280520, 217266710), (280520, 224127542), (280520, 228135497), (280614, 161177673), (280614, 169745152), (280614, 170767640), (280614, 215146625), (280614, 219127570), (280614, 301178226), (280614, 303707437), (280614, 332449119), (280614, 335003120), (280614, 345722410), (280614, 353058908), (280614, 411236139), (280614, 414979598), (280614, 419235273), (280614, 426610368), (280614, 175746364), (280614, 2832819), (280614, 445394990), (280614, 23884140), (280614, 26304101), (280614, 36897069), (280614, 52567457), (280614, 263895374), (280614, 197529463), (280614, 195487015), (280614, 200548148), (280614, 381849649), (280614, 484299614), (280614, 251899309), (280614, 258595205), (280614, 262503389), (280614, 266054651), (280614, 508036054), (280614, 135108736), (280614, 469203363), (280614, 197406782), (280614, 280156426), (280614, 66251511), (280614, 68094944), (280614, 68851524), (280614, 402762268), (280614, 234643177), (280614, 241494472), (280614, 182710441), (280614, 124825582), (280614, 131963406), (280614, 129554236), (280614, 398377511), (280614, 15314641), (280614, 75177979), (280614, 81554504), (280614, 84242925), (280614, 249695289), (280614, 48491778), (280614, 425895393), (280614, 429688367), (280614, 430584664), (280614, 430786875), (280614, 470180942), (280614, 101543692), (280614, 118170578), (280614, 343741138), (280614, 377386110), (280614, 310506941), (280673, 1561502610), (280673, 52197766), (280673, 51903608), (280673, 277801020), (280673, 280047936), (280673, 286316962), (280673, 287350710), (280673, 287567264), (280673, 2717432142), (280673, 627110595), (280673, 635454801), (280673, 667428224), (280673, 668936168), (280673, 676414835), (280673, 1179958099), (280673, 1179577719), (280673, 753417563), (280673, 925801475), (280673, 929027626), (280673, 928808433), (280673, 932066869), (280673, 936543525), (280673, 2177212635), (280673, 2181799462), (280673, 2182347482), (280673, 2183016874), (280673, 2187212326), (280673, 2482538521), (280673, 2765600574), (280673, 2770492663), (280673, 2778816414), (280673, 1340984944), (280673, 1341338341), (280673, 1343587778), (280673, 1356827410), (280673, 2118192753), (280673, 2119242422), (280673, 2124148901), (280673, 2193498932), (280673, 210239745), (280673, 217201639), (280673, 1785965118), (280673, 2532511534), (280673, 2540140200), (280673, 2634973887), (280673, 2638154345), (280673, 2640706025), (280673, 2644529335), (280673, 2353158959), (280673, 2356623320), (280673, 2355325771), (280673, 2362575975), (280673, 2362574478), (280673, 2200915370), (280673, 2167541330), (280673, 2170303336), (280673, 151665751), (280673, 150994206), (280673, 159901037), (280673, 960791346), (280673, 966344732), (280673, 1001228209), (280673, 353035512), (280673, 388200329), (280673, 3028503266), (280673, 3033721245), (280673, 3041435788), (280673, 3045258635), (280673, 1541222359), (280673, 1903177089), (280673, 1903343123), (280673, 1913750957), (280673, 1927101566), (280673, 1926692554), (280673, 1926495149), (280673, 2489966503), (280673, 2494706635), (280673, 2497573278), (280673, 3077092792), (280673, 3084576045), (280673, 3097295300), (280673, 3108240355), (280673, 2448458780), (280673, 415504114), (280673, 433390588), (280673, 2330851434), (280673, 2335889912), (280673, 2348111074), (280673, 2350683365), (280673, 1366214126), (280673, 1368434425), (280673, 1368106313), (280673, 1370854154), (280673, 1371304327), (280673, 1388443622), (280673, 1598767572), (280673, 1598692856), (280673, 1605479287), (280673, 1607307218), (280673, 1608987310), (280673, 1612751849), (280673, 1615433136), (280673, 1628068009), (280673, 1627193982), (280673, 1632071699), (280673, 1639670651), (280673, 1664330995), (280673, 1674930087), (280673, 2993363444), (280673, 2997148328), (280673, 1952785961), (280673, 1960201606), (280673, 2026525657), (280673, 2028900521), (280673, 2034778729), (280673, 2892196239), (280673, 2893130910), (280673, 2499185660), (280673, 2505613462), (280673, 600059506), (280673, 599870982), (280673, 603985827), (280673, 764333824), (280673, 256951192), (280673, 262963837), (280673, 1823410733), (280673, 2197123741), (280673, 2305157070), (280673, 143442741), (280673, 145327957), (280673, 146058228), (280673, 974479952), (280673, 1115470566), (280673, 1122200277), (280673, 1125565319), (280673, 1446940697), (280673, 1456938274), (280673, 1432608078), (280673, 1439332158), (280673, 1442001118), (280673, 1506108555), (280673, 1507118668), (280673, 940729316), (280673, 948917043), (280673, 952956637), (280673, 1308336479), (280673, 1309842978), (280673, 1312823890), (280673, 1041312063), (280673, 105431623), (280673, 113254383), (280673, 113609086), (280673, 269472024), (280673, 301050464), (280673, 2084153001), (280673, 2096012343), (280673, 2094350623), (280673, 2099192829), (280673, 695743717), (280673, 740399793), (280673, 740833989), (280673, 2699043355), (280673, 2700838882), (280673, 2704280557), (280673, 2702117297), (280673, 2755267267), (280673, 2755748945), (280673, 1838517358), (280673, 1847546351), (280673, 1849982083), (280673, 183913264), (280673, 190962116), (280673, 254167831), (280673, 362515909), (280673, 368705629), (280673, 378884323), (280673, 438647052), (280673, 33080895), (280673, 37404310), (280673, 73257613), (280673, 74321810), (280673, 2058495473), (280673, 2610520806), (280673, 2615440234), (280673, 3061036739), (280673, 3063705592), (280673, 3063983815), (280673, 3069199853), (280673, 987541087), (280673, 993205767), (280673, 1248630674), (280673, 1256550197), (280673, 1282700034), (280673, 1282805298), (280673, 1285256834), (280673, 2967185399), (280673, 2968235722), (280673, 2984633757), (280673, 1693042776), (280673, 1693515134), (280673, 2559633088), (280673, 2564757270), (280673, 2570199648), (280673, 1754905208), (280673, 1765885177), (280673, 776706806), (280673, 779280908), (280673, 786048765), (280673, 826548990), (280673, 1989749719), (280673, 1993721146), (280673, 2003265224), (280673, 880005111), (280673, 881453173), (280673, 880853423), (280673, 879119855), (280673, 885268972), (280673, 893896382), (280673, 921251337), (280673, 920049075), (280673, 619607431), (280673, 620337836), (280673, 800148757), (280673, 805493593), (280673, 2216766663), (280673, 2215203701), (280673, 2224732686), (280673, 1548675198), (280673, 1409701972), (280673, 2132591573), (280673, 2135459734), (280673, 2140137426), (280673, 2141521944), (280673, 2139289914), (280673, 517281588), (280673, 518474148), (280673, 521836884), (280673, 524072652), (280673, 529364317), (280673, 527380335), (280673, 541839586), (280673, 545146215), (280673, 1737032501), (280673, 1803102265), (280673, 1805904365), (280673, 862793888), (280673, 1141134627), (280673, 1154242847), (280673, 1152145113), (280673, 1156283181), (280673, 1234105644), (280673, 1238746015), (280673, 1241679168), (280673, 1244259699), (280673, 1288357225), (280673, 1292190420), (280673, 1301023266), (280673, 3161467555), (280673, 3168914014), (280673, 3169608364), (280673, 3170980301), (280673, 2927975162), (280673, 2940655712), (280673, 2938539332), (280673, 2942247737), (280673, 2946249490), (280673, 2943982655), (280673, 2949947284), (280673, 2383804628), (280673, 2394990476), (280673, 2393558202), (280673, 1793918043), (280673, 1797617325), (280673, 1801893686), (280673, 1802994817), (280673, 1868958632), (280673, 1881612349), (280673, 1015828677), (280673, 1040684819), (280673, 1044120721), (280673, 1055563895), (280673, 1861044367), (280673, 1861840516), (280673, 1563278273), (280673, 1573321097), (280673, 636521337), (280673, 658334485), (280673, 657853395), (280673, 658923859), (280673, 661353763), (280673, 719032876), (280673, 730277027), (280673, 130772988), (280673, 128639410), (280673, 192722347), (280673, 2520714318), (280673, 2524900212), (280673, 540252534), (280673, 1129293375), (280673, 1127880961), (280673, 1127567985), (280673, 1129709373), (280673, 1130442500), (280673, 1204578001), (280673, 1210239213), (280673, 1209987687), (280673, 515678340), (280673, 638356141), (280673, 714091151), (280673, 573577074), (280673, 441791715), (280673, 450639263), (280673, 550449120), (280673, 1400216651), (280673, 1461712657), (280673, 1103085132), (280673, 2829060797), (280673, 2834122239), (280673, 507612086), (280673, 529883757), (280673, 301723541), (280673, 308973827), (280673, 337108746), (280673, 1963106847), (280673, 1970219336), (280673, 1973879931), (280673, 2041576452), (280673, 1189283571), (280673, 1193924154), (280673, 2900701815), (280673, 2911558212), (280673, 2910735588), (280673, 2915446398), (280673, 292745140), (280673, 294918744), (280673, 868664676), (280673, 1943757842), (280673, 2009219993), (280673, 2009186699), (280673, 2016738385), (280673, 2752894471), (280673, 2675317465), (280673, 2672561025), (280673, 905540049), (280673, 1059283304), (280673, 1062503441), (280673, 1065882767), (280673, 2596434341), (280673, 2080012190), (280673, 2148602850), (280673, 2152193836), (280673, 2156881522), (280673, 2849611504), (280673, 2848484692), (280673, 2854571066), (280673, 2857016500), (280673, 2857678756), (280673, 2856700246), (280673, 2861374546), (280673, 484140310), (280673, 2245104868), (280673, 2245529823), (280673, 2274565601), (280673, 2279370083), (280673, 2288397076), (280673, 61651056), (280673, 61793945), (280673, 3053976855), (280673, 588981061), (280673, 592194568), (280673, 679256630), (280673, 680769321), (280673, 679405752), (280673, 685018370), (280673, 690886151), (280673, 460404830), (280673, 2455078568), (280673, 2466014369), (280673, 2467491159), (280673, 243904759), (280673, 266544725), (280673, 270497155), (280673, 159954028), (280673, 1099507887), (280673, 3126832728), (280673, 3127107304), (280673, 3132352042), (280673, 3140983301), (280673, 848535089), (280673, 856939280), (280673, 854182688), (280673, 860166988), (280673, 859509052), (280673, 1416123410), (280673, 1420559613), (280673, 1426036490), (280673, 1683872098), (280673, 1589446887), (280673, 1741238339), (280673, 1746826593), (280673, 1776252952), (280673, 1853050261), (280673, 2806294018), (280673, 85913912), (280673, 117009110), (280753, 365456849), (280753, 376437185), (280753, 422998503), (280753, 441378620), (280753, 27753821), (280753, 30829464), (280753, 39366995), (280753, 43218719), (280753, 44351741), (280753, 74941574), (280753, 79893511), (280753, 89066701), (280753, 95489617), (280753, 96879307), (280753, 766664461), (280753, 768428703), (280753, 778821400), (280753, 813375609), (280753, 811693821), (280753, 134561155), (280753, 177384900), (280753, 864135449), (280753, 864682742), (280753, 240478542), (280753, 346171992), (280753, 351796583), (280753, 354102534), (280753, 358289357), (280753, 363569966), (280753, 333717286), (280753, 333390112), (280753, 61541558), (280753, 66437573), (280753, 69680529), (280753, 635429149), (280753, 732689189), (280753, 649050361), (280753, 210010568), (280753, 217994521), (280753, 221475865), (280753, 567552131), (280753, 568115382), (280753, 572486468), (280753, 574235324), (280753, 592483954), (280753, 797604745), (280753, 807802541), (280753, 828723584), (280753, 833447390), (280753, 266513600), (280753, 268646852), (280753, 297250576), (280753, 679828943), (280753, 698044006), (280753, 13265533), (280753, 17051870), (280753, 19064691), (280753, 54122633), (280753, 55443906), (280753, 59454949), (280753, 848380537), (280753, 847713278), (280753, 850429585), (280753, 867607441), (280753, 398836135), (280753, 403106756), (280753, 406391793), (280753, 412998749), (280753, 527747276), (280753, 528489947), (280753, 530333422), (280753, 272398089), (280753, 272996746), (280753, 274428674), (280753, 314356589), (280753, 317616096), (280753, 321620391), (280753, 321338962), (280753, 325417838), (280753, 326718901), (280753, 330419057), (280753, 735448189), (280753, 745653570), (280753, 746224121), (280753, 744096305), (280753, 745172692), (280753, 754549904), (280753, 758217185), (280753, 104405491), (280753, 102213244), (280753, 112652971), (280753, 709038478), (280753, 383705797), (280753, 388628709), (280753, 395875171), (280753, 139888392), (280753, 168114146), (280753, 491280594), (280753, 496091622), (280753, 503858086), (280753, 508881079), (280753, 508900345), (280753, 510314834), (280753, 446256192), (280753, 466184764), (280753, 471900183), (280753, 537464779), (280753, 537857180), (280753, 538573954), (280753, 548561281), (280753, 721826545), (280753, 721146202), (280753, 723937158), (280753, 129616839), (280753, 144474583), (280753, 151148259), (280753, 778906192), (280753, 779344349), (280753, 784367794), (280753, 793117292), (280753, 299895622), (280753, 300936115), (280753, 301573976), (280753, 304803216), (280753, 314520592), (280753, 622741527), (280753, 626422097), (280753, 474243198), (280753, 475736691), (280753, 485297093), (280753, 486264713), (280753, 486742407), (280753, 486776862), (280753, 173211963), (280753, 171428593), (280753, 180617209), (280753, 181021134), (280753, 179266464), (280753, 186307027), (280753, 191317520), (280753, 197266902), (280853, 12280853), (280853, 33570179), (280853, 34929280), (280853, 40356388), (280853, 116187520), (280853, 119434178), (280853, 20546136), (280853, 84246492), (280853, 85596120), (280853, 88044578), (280853, 90630872), (280853, 130933362), (280853, 29144998), (280853, 64187219), (280853, 137691992), (280853, 144074454), (280853, 149266631), (280853, 146187670), (280853, 88975116), (280853, 99122399), (280853, 106334941), (280853, 107318663), (280853, 104888757), (280853, 46534033), (280853, 58769889), (280853, 68391127), (280862, 1936729688), (280862, 1939640883), (280862, 1990292225), (280862, 867603545), (280862, 896122487), (280862, 896383546), (280862, 896945507), (280862, 2402827453), (280862, 2423759093), (280862, 821967323), (280862, 857152963), (280862, 713621141), (280862, 746087171), (280862, 203985064), (280862, 229448002), (280862, 612509241), (280862, 657018655), (280862, 663803029), (280862, 2553060717), (280862, 2554443443), (280862, 2814934281), (280862, 2821494034), (280862, 2710543225), (280862, 2724475109), (280862, 15860086), (280862, 22107217), (280862, 43776347), (280862, 42416817), (280862, 1640972519), (280862, 1642090940), (280862, 1651901077), (280862, 1649496131), (280862, 1652832256), (280862, 1327171764), (280862, 1329650273), (280862, 1342897375), (280862, 56730589), (280862, 62673646), (280862, 93077037), (280862, 99420604), (280862, 133954936), (280862, 140387903), (280862, 141121340), (280862, 1291240322), (280862, 1314102134), (280862, 290732474), (280862, 299935456), (280862, 311404245), (280862, 1690685297), (280862, 1700860944), (280862, 1715156393), (280862, 1244772049), (280862, 1255681830), (280862, 1256103772), (280862, 1256009495), (280862, 1258305841), (280862, 1265008715), (280862, 2738723628), (280862, 2428284929), (280862, 1210198658), (280862, 1211845504), (280862, 1215231325), (280862, 1226234981), (280862, 951121817), (280862, 956744691), (280862, 715462687), (280862, 724143788), (280862, 727069118), (280862, 807006290), (280862, 809621319), (280862, 812612068), (280862, 818301705), (280862, 1334790134), (280862, 1389016245), (280862, 1395169725), (280862, 1008250128), (280862, 1035630940), (280862, 545557701), (280862, 546949626), (280862, 567468081), (280862, 570314712), (280862, 629847337), (280862, 633573311), (280862, 2743119066), (280862, 2764711185), (280862, 2765637164), (280862, 2768183806), (280862, 2794984941), (280862, 2800983297), (280862, 2037607826), (280862, 2040024507), (280862, 2045468401), (280862, 2107725751), (280862, 2112942609), (280862, 2122516125), (280862, 2120629988), (280862, 2537670027), (280862, 2542190370), (280862, 2158080235), (280862, 2159024598), (280862, 2157786872), (280862, 2164196799), (280862, 2169573471), (280862, 2171297732), (280862, 2175720789), (280862, 2179742953), (280862, 976613967), (280862, 979898299), (280862, 986506321), (280862, 991177184), (280862, 2276671032), (280862, 2281197545), (280862, 2289575465), (280862, 2232202599), (280862, 2238228435), (280862, 2241430816), (280862, 2239384335), (280862, 2240949225), (280862, 1666130369), (280862, 1667750866), (280862, 1669406620), (280862, 1682719992), (280862, 1685189623), (280862, 1689879531), (280862, 2068254682), (280862, 2079299679), (280862, 2078538876), (280862, 1195152778), (280862, 272130933), (280862, 1161378968), (280862, 1162412120), (280862, 1177120505), (280862, 1176007128), (280862, 1178698178), (280862, 1187914969), (280862, 1186425075), (280862, 1189445789), (280862, 1190057139), (280862, 1108281142), (280862, 1113116381), (280862, 1117312152), (280862, 1144753088), (280862, 1913058206), (280862, 1920023133), (280862, 1922260023), (280862, 1942673546), (280862, 1946330493), (280862, 1948746787), (280862, 2091669582), (280862, 2093959715), (280862, 2144270206), (280862, 2146144224), (280862, 1099773133), (280862, 1104547958), (280862, 1998019138), (280862, 2005713864), (280862, 1569260676), (280862, 2694393663), (280862, 119799453), (280862, 128240362), (280862, 130519007), (280862, 130479131), (280862, 753245725), (280862, 756185863), (280862, 328205191), (280862, 331874629), (280862, 336203476), (280862, 338073877), (280862, 574551286), (280862, 518000123), (280862, 518670612), (280862, 529592999), (280862, 529969791), (280862, 2594025546), (280862, 2592807741), (280862, 1534382210), (280862, 1543216121), (280862, 1545545228), (280862, 2488691940), (280862, 1235245545), (280862, 1236983053), (280862, 1277626098), (280862, 1280829228), (280862, 1428881574), (280862, 1432775428), (280862, 1435958310), (280862, 1467938622), (280862, 1470418864), (280862, 1506396265), (280862, 1512029239), (280862, 1512574377), (280862, 482711349), (280862, 484242904), (280862, 486725465), (280862, 490217718), (280862, 496650932), (280862, 499969488), (280862, 502779400), (280862, 505942519), (280862, 349367078), (280862, 359120213), (280862, 359514221), (280862, 366644149), (280862, 371475378), (280862, 371854967), (280862, 1719322879), (280862, 1732456364), (280862, 1731646721), (280862, 1747017202), (280862, 1746814883), (280862, 1359484923), (280862, 1367486108), (280862, 1489789760), (280862, 1498098377), (280862, 911372192), (280862, 191495989), (280862, 400422481), (280862, 399408254), (280862, 405703078), (280862, 412703611), (280862, 414838548), (280862, 418647465), (280862, 419893532), (280862, 1881257041), (280862, 1890503462), (280862, 1896192790), (280862, 1902521620), (280862, 1905613362), (280862, 467673712), (280862, 475297805), (280862, 480572831), (280862, 1204314195), (280862, 1206865151), (280862, 1210795875), (280862, 2554738642), (280862, 2555403349), (280862, 1128855636), (280862, 1128654572), (280862, 1139937029), (280862, 429036746), (280862, 429576381), (280862, 443264366), (280862, 2358092347), (280862, 2357012942), (280862, 2373704825), (280862, 2201343365), (280862, 2209057199), (280862, 2215225892), (280862, 372987968), (280862, 385473040), (280862, 1603566196), (280862, 1613280670), (280862, 1614281766), (280862, 1623364984), (280862, 172377859), (280862, 185306777), (280862, 267942018), (280862, 2839580707), (280862, 2844485290), (280862, 2845391423), (280862, 36459351), (280862, 40180071), (280862, 214815856), (280862, 218381590), (280862, 779627720), (280862, 788837479), (280862, 796723737), (280862, 802425527), (280862, 2304775305), (280862, 2314457834), (280862, 2339563661), (280862, 2338300334), (280862, 2642124476), (280862, 2652318187), (280862, 2679892082), (280862, 2043607768), (280862, 2056918125), (280862, 838759902), (280862, 838396870), (280862, 837898324), (280862, 922951041), (280862, 927190041), (280862, 2259173821), (280862, 2264841189), (280862, 2460190921), (280862, 2463622000), (280862, 1381019832), (280862, 1765201656), (280862, 1768499397), (280862, 2327547421), (280862, 2391395233), (280862, 670901657), (280862, 672365919), (280862, 684807023), (280862, 730553949), (280862, 743375024), (280862, 1906755767), (280862, 650741360), (280862, 692690208), (280862, 698045808), (280862, 1852091942), (280862, 1859495024), (280862, 1861341486), (280862, 1867554834), (280862, 4557498), (280862, 1956304251), (280862, 1967369720), (280862, 1975214121), (280862, 1976918308), (280862, 1784778936), (280862, 1812882271), (280862, 2506404062), (280862, 2521556515), (280862, 2524252375), (280862, 2529070602), (280862, 2527789606), (280862, 2529176065), (280862, 2532785557), (280862, 2444434784), (280862, 2471758467), (280862, 1827824719), (280862, 1000389632), (280862, 1000345540), (280862, 999253428), (280862, 1002714896), (280950, 9187792), (280950, 10573357), (280950, 15426066), (280950, 46269099), (280950, 2091805267), (280950, 2099319268), (280950, 31622797), (280950, 35168551), (280950, 43030101), (280950, 1940683396), (280950, 1941715174), (280950, 1947825900), (280950, 1952905345), (280950, 1956837999), (280950, 1959532130), (280950, 1961848279), (280950, 1962030557), (280950, 785219841), (280950, 1401071968), (280950, 1403064168), (280950, 2196490951), (280950, 2206078699), (280950, 2262474812), (280950, 2120041978), (280950, 2169421001), (280950, 2170277470), (280950, 2178144511), (280950, 2176782694), (280950, 918318666), (280950, 927134967), (280950, 933235833), (280950, 2013504605), (280950, 2018155443), (280950, 2021915036), (280950, 1448702144), (280950, 1453108272), (280950, 1455215108), (280950, 1462402856), (280950, 547970785), (280950, 1442542891), (280950, 2530424009), (280950, 1800383430), (280950, 2515838222), (280950, 2630916879), (280950, 514241981), (280950, 2676172703), (280950, 1896655511), (280950, 1980256960), (280950, 1042194167), (280950, 460922609), (280950, 460060389), (280950, 2759986721), (280950, 1206536739), (280950, 1224356812), (280950, 1226964877), (280950, 1229969147), (280950, 1194698193), (280950, 1196987667), (280950, 1197424102), (280950, 1196471523), (280950, 1201551663), (280950, 2040164846), (280950, 2073381890), (280950, 217010196), (280950, 216241130), (280950, 218544658), (280950, 224155340), (280950, 222576270), (280950, 1615760514), (280950, 1622709325), (280950, 1632852912), (280950, 1641044367), (280950, 2432357397), (280950, 2432380255), (280950, 2433659234), (280950, 2433504468), (280950, 2435858510), (280950, 2472439228), (280950, 202310071), (280950, 211275664), (280950, 686771187), (280950, 690085116), (280950, 699797332), (280950, 618585677), (280950, 2644770071), (280950, 2654921358), (280950, 2672582001), (280950, 896106167), (280950, 898463347), (280950, 900390575), (280950, 903717758), (280950, 903685949), (280950, 902188528), (280950, 597354230), (280950, 616443696), (280950, 620428396), (280950, 686770893), (280950, 769238391), (280950, 782960901), (280950, 780584805), (280950, 2698933738), (280950, 2725480045), (280950, 2727186545), (280950, 2727922757), (280950, 2730100018), (280950, 1203696268), (280950, 2668705330), (280950, 568573960), (280950, 592317107), (280950, 640631308), (280950, 871595251), (280950, 1853411342), (280950, 1854943843), (280950, 2459054882), (280950, 172546934), (280950, 178447971), (280950, 180731110), (280950, 1381143962), (280950, 1382719827), (280950, 1382286130), (280950, 1396600388), (280950, 1421139067), (280950, 1643886106), (280950, 1649847875), (280950, 1678561481), (280950, 1681380804), (280950, 1685958364), (280950, 2506702592), (280950, 2531013364), (280950, 2538022589), (280950, 2232143594), (280950, 2235724297), (280950, 2397100911), (280950, 2400091803), (280950, 55938289), (280950, 164293201), (280950, 164758887), (280950, 740419859), (280950, 748953982), (280950, 798503363), (280950, 1550678128), (280950, 1551141875), (280950, 1565132053), (280950, 1577685175), (280950, 415960293), (280950, 429105295), (280950, 432442865), (280950, 1255920926), (280950, 1279027199), (280950, 1314769620), (280950, 1318313104), (280950, 2182468282), (280950, 2185594221), (280950, 2193074722), (280950, 2212404870), (280950, 2215674158), (280950, 2223413389), (280950, 2225108144), (280950, 1245124618), (280950, 1243668726), (280950, 1252038712), (280950, 100994888), (280950, 2565448924), (280950, 2366568844), (280950, 2370482874), (280950, 2381837292), (280950, 2390299835), (280950, 779094582), (280950, 2608806073), (280950, 2611412637), (280950, 2465702865), (280950, 2490088451), (280950, 2578986171), (280950, 2581625840), (280950, 2586125413), (280950, 2588526174), (280950, 2588738299), (280950, 2305064763), (280950, 2302717073), (280950, 2309448731), (280950, 2309348064), (280950, 821399184), (280950, 2281920330), (280950, 2298973606), (280950, 1885824052), (280950, 390884024), (280950, 391290294), (280950, 394699644), (280950, 486908069), (280950, 486132085), (280950, 490595926), (280950, 305591552), (280950, 359989187), (280950, 402676873), (280950, 409635007), (280950, 150050882), (280950, 188005538), (280950, 188546090), (280950, 191857467), (280950, 198806467), (280950, 666853790), (280950, 678649811), (280950, 1331151907), (280950, 1334888408), (280950, 1340224942), (280950, 1340246351), (280950, 1341251784), (280950, 1345336268), (280950, 1344999325), (280950, 1368686209), (280950, 1369587334), (280950, 1379598532), (280950, 1381155620), (280950, 1747349975), (280950, 2151714800), (280950, 2153242888), (280950, 2165461918), (280950, 1089394105), (280950, 1092184227), (280950, 1098848585), (280950, 291471134), (280950, 291165699), (280950, 292388086), (280950, 339673226), (280950, 338862055), (280950, 342882783), (280950, 343500323), (280950, 348591802), (280950, 348996382), (280950, 2084970545), (280950, 1488177585), (280950, 1509611449), (280950, 1515974652), (280950, 1523070263), (280950, 1530576371), (280950, 1530681802), (280950, 1533824804), (280950, 1533777383), (280950, 1542907252), (280950, 1546548452), (280950, 942098275), (280950, 952307608), (280950, 955382378), (280950, 958077598), (280950, 958478251), (280950, 1348297776), (280950, 1351511901), (280950, 1819528064), (280950, 1823941983), (280950, 1826396540), (280950, 1829445299), (280950, 1835138534), (280950, 1839793045), (280950, 2409375600), (280950, 121388814), (280950, 129781940), (280950, 141286649), (280950, 2334399095), (280950, 2339120571), (280950, 2338464004), (280950, 2345395320), (280950, 2357744286), (280950, 1252934566), (280950, 1254642535), (280950, 1301373943), (280950, 514391868), (280950, 2558688824), (280950, 2570736613), (280950, 2572515614), (280950, 2591739883), (280950, 2590356712), (280950, 1106733176), (280950, 1115347484), (280950, 1121101659), (280950, 1136380420), (280950, 278954200), (280950, 1170998405), (280950, 1178038074), (280950, 1182566484), (280950, 2048105149), (280950, 2057177350), (280950, 2069061825), (280950, 1741224312), (280950, 1758566231), (280950, 2250737075), (280950, 2254483171), (280950, 2255300639), (280950, 841986149), (280950, 1304276175), (280950, 1858428247), (280950, 2553499282), (280950, 1138365575), (280950, 1143441355), (280950, 1148253879), (280950, 624173882), (280950, 626677314), (280950, 625909626), (280950, 630053485), (280950, 633265575), (280950, 631597106), (280950, 633550198), (280950, 714767325), (280950, 1441891656), (280950, 2708801908), (280950, 1212121970), (280950, 1215532849), (280950, 253357251), (280950, 1659042563), (280950, 1662876409), (280950, 1596439210), (280950, 1599492079), (280950, 1600645713), (280950, 1608476523), (280950, 1912550607), (280950, 1913498795), (280950, 1923586719), (280950, 1926123390), (280950, 1004275197), (280950, 1003968518), (280950, 1703331530), (280950, 1714222073), (280950, 1718175549), (280950, 1723617236), (280950, 1730950376), (280950, 1732502258), (280950, 57659816), (280950, 57339283), (280950, 68258663), (280950, 74728508), (280950, 79158940), (280950, 969962423), (280950, 975470051), (280950, 987998671), (280950, 988405369), (280950, 441058642), (280950, 441841561), (280950, 447892321), (280950, 450418617), (280950, 458532184), (280950, 471529575), (280950, 477724912), (280950, 1584828435), (280950, 1585333327), (280950, 1687866358), (280950, 1692308383), (280950, 1759796335), (280950, 1780363835), (280950, 1782406431), (280950, 1847266266), (280977, 365476451), (280977, 364189059), (280977, 378598000), (280977, 379847289), (280977, 384502784), (280977, 168219347), (280977, 170150834), (280977, 175265938), (280977, 260779171), (280977, 263358794), (280977, 262998198), (280977, 270748746), (280977, 308420144), (280977, 314744346), (280977, 313117914), (280977, 318579550), (280977, 323924193), (280977, 328004323), (280977, 651919378), (280977, 657069957), (280977, 687757675), (280977, 689418308), (280977, 690568203), (280977, 6454166), (280977, 291533608), (280977, 297919938), (280977, 522768282), (280977, 526225015), (280977, 525533660), (280977, 527183092), (280977, 538785640), (280977, 539021081), (280977, 575593408), (280977, 608429027), (280977, 617104047), (280977, 621060722), (280977, 224326637), (280977, 233906123), (280977, 560430540), (280977, 564988210), (280977, 395393455), (280977, 401165409), (280977, 405380990), (280977, 405911735), (280977, 406614162), (280977, 678795478), (280977, 634166393), (280977, 639503585), (280977, 208210784), (280977, 210689436), (280977, 216258743), (280977, 332039712), (280977, 336935310), (280977, 352487256), (280977, 153230677), (280977, 166250829), (280977, 66074774), (280977, 67127586), (280977, 76055636), (280977, 83852289), (280977, 412254450), (280977, 410086940), (280977, 414781074), (280977, 413178405), (280977, 448899856), (280977, 33743971), (280977, 454519437), (280977, 454676225), (280977, 457989478), (280977, 458331691), (280977, 460722996), (280977, 463704913), (280977, 483725490), (280977, 486034888), (280977, 491265322), (280977, 492901163), (280977, 493856576), (280977, 492987217), (280977, 112230533), (280977, 117017185), (280977, 121554458), (280977, 125364129), (280977, 128580510), (280977, 127087245), (280977, 133646013), (280977, 92772944), (280977, 141971410), (280977, 179538658), (280977, 190066310), (280977, 472641774), (280977, 387762143), (280977, 392312600), (280977, 392269655), (280977, 391564990), (281070, 192337253), (281070, 192416400), (281070, 242797712), (281070, 245696669), (281070, 231555092), (281070, 162773670), (281070, 38006893), (281070, 111059704), (281070, 117559049), (281070, 205031551), (281070, 208844055), (281070, 211244538), (281070, 211220593), (281070, 218253382), (281070, 47932856), (281070, 51835840), (281070, 222924259), (281070, 221759413), (281070, 221189065), (281070, 228367360), (281070, 131313504), (281070, 135752567), (281070, 135030279), (281070, 72656009), (281070, 78383468), (281070, 96376699), (281070, 97931771), (281070, 86943653), (281070, 137681597), (281070, 140381102), (281070, 142449920), (281070, 144465752), (281070, 171575804), (281070, 7736444), (281070, 14510533), (281070, 18259543), (281070, 15430442), (281070, 19309202), (281070, 19513374), (281070, 23385511), (281070, 23541950), (281070, 25470016), (281070, 65188443), (281070, 65714474), (281070, 67028285), (281074, 888484336), (281074, 273537729), (281074, 276212772), (281074, 280942138), (281074, 619507362), (281074, 630092935), (281074, 640436165), (281074, 645548959), (281074, 34808881), (281074, 325482124), (281074, 330318367), (281074, 366247814), (281074, 369538972), (281074, 381602704), (281074, 397184907), (281074, 406959623), (281074, 285329216), (281074, 360913395), (281074, 453544923), (281074, 459621542), (281074, 460050685), (281074, 465477012), (281074, 335421019), (281074, 339822511), (281074, 344811336), (281074, 414147451), (281074, 439321357), (281074, 840278119), (281074, 708549150), (281074, 718698674), (281074, 524711937), (281074, 535678391), (281074, 537148497), (281074, 550235441), (281074, 760541692), (281074, 760209243), (281074, 767516472), (281074, 769024585), (281074, 770721279), (281074, 779275957), (281074, 244683125), (281074, 244814916), (281074, 250761141), (281074, 141696082), (281074, 149311146), (281074, 154146117), (281074, 160561783), (281074, 552578557), (281074, 559889754), (281074, 570633644), (281074, 572602585), (281074, 577173612), (281074, 584363979), (281074, 597333283), (281074, 893176571), (281074, 892244664), (281074, 895550244), (281074, 113603384), (281074, 193168847), (281074, 197278677), (281074, 200411496), (281074, 200984217), (281074, 205670863), (281074, 206410720), (281074, 472895841), (281074, 579330928), (281074, 647383111), (281074, 650371446), (281074, 658452666), (281074, 664281861), (281074, 669697895), (281074, 669033136), (281074, 669198066), (281074, 129967617), (281074, 133959788), (281074, 136321117), (281074, 137479241), (281074, 218345823), (281074, 228988690), (281074, 238126522), (281074, 238540891), (281074, 789247969), (281074, 792747399), (281074, 794519565), (281074, 794631689), (281074, 797536535), (281074, 800188797), (281074, 303344684), (281074, 722474558), (281074, 722497656), (281074, 725579326), (281074, 729485499), (281074, 739848233), (281074, 744960772), (281074, 495225638), (281074, 482688754), (281074, 483413322), (281074, 480396575), (281074, 489869351), (281074, 821563734), (281074, 823917117), (281074, 824327382), (281074, 851911621), (281074, 58980774), (281074, 62062566), (281074, 66468550), (281074, 68234192), (281074, 265893479), (281074, 268485881), (281074, 3994271), (281074, 31061967), (281075, 1901934), (281075, 10768291), (281075, 18968296), (281075, 16705086), (281130, 316962841), (281130, 314158900), (281130, 303467992), (281130, 306513303), (281130, 151852403), (281130, 118932816), (281130, 122882407), (281130, 123838423), (281130, 141225843), (281130, 145368974), (281130, 210656037), (281130, 191798820), (281130, 196179651), (281130, 216584551), (281130, 217499609), (281130, 222954151), (281130, 244504707), (281130, 246734873), (281130, 393187507), (281130, 359568397), (281130, 366141086), (281130, 371919789), (281130, 46220569), (281130, 131823719), (281130, 281194765), (281130, 122990048), (281130, 160070069), (281130, 165438380), (281130, 173108140), (281130, 183086891), (281130, 183946265), (281130, 5428775), (281130, 28119213), (281130, 58308319), (281130, 286532535), (281130, 286251240), (281130, 294442485), (281130, 39252595), (281130, 62533604), (281130, 71034790), (281130, 398165520), (281130, 92892529), (281130, 104827700), (281143, 157595537), (281143, 333156839), (281143, 333619871), (281143, 347320050), (281143, 2761202471), (281143, 256754619), (281143, 2032281195), (281143, 2037877561), (281143, 1234798740), (281143, 1239163686), (281143, 1243066433), (281143, 1247808657), (281143, 1251899109), (281143, 1255678609), (281143, 1979316791), (281143, 2008822283), (281143, 951503985), (281143, 956153284), (281143, 3061612232), (281143, 3063409045), (281143, 3062680360), (281143, 3071698440), (281143, 3072038605), (281143, 806559205), (281143, 813593589), (281143, 2319301390), (281143, 3461810341), (281143, 3470210182), (281143, 3473567503), (281143, 205434538), (281143, 216658970), (281143, 215583292), (281143, 425370058), (281143, 2289348760), (281143, 2299002002), (281143, 2310641698), (281143, 1202495606), (281143, 1221726046), (281143, 2646382125), (281143, 2644875629), (281143, 2644618760), (281143, 2644347068), (281143, 1116332496), (281143, 1127155737), (281143, 1125402431), (281143, 1134122026), (281143, 1136070997), (281143, 2730733203), (281143, 2742489017), (281143, 2745879884), (281143, 2747109642), (281143, 585174740), (281143, 627857416), (281143, 1583607000), (281143, 3352377218), (281143, 3363067074), (281143, 3412975265), (281143, 3412354320), (281143, 3423020787), (281143, 840870609), (281143, 843593950), (281143, 850167655), (281143, 3905430950), (281143, 996119847), (281143, 1003063210), (281143, 1000046734), (281143, 1003652866), (281143, 1013707046), (281143, 1010848037), (281143, 1010430921), (281143, 1016637269), (281143, 1019820624), (281143, 2837116235), (281143, 2835623662), (281143, 2850328518), (281143, 1747460907), (281143, 1747688852), (281143, 1767844683), (281143, 1455827208), (281143, 1461169862), (281143, 1463881902), (281143, 1473882717), (281143, 1477019555), (281143, 1725686810), (281143, 1725822113), (281143, 1401955295), (281143, 1412262046), (281143, 1415285278), (281143, 1420115705), (281143, 1419347139), (281143, 1421363192), (281143, 623654255), (281143, 3595181463), (281143, 3602409437), (281143, 3601870538), (281143, 3609556274), (281143, 676867234), (281143, 678554447), (281143, 1492687951), (281143, 1518002588), (281143, 2246989491), (281143, 2252447406), (281143, 2270923360), (281143, 2077545436), (281143, 2083628985), (281143, 2106914318), (281143, 38105202), (281143, 55081438), (281143, 60845464), (281143, 57726921), (281143, 65061871), (281143, 1257144239), (281143, 1264564611), (281143, 1263737532), (281143, 2783687433), (281143, 2785643143), (281143, 2788666669), (281143, 2791888303), (281143, 2795422122), (281143, 2799707900), (281143, 1534777181), (281143, 1538080978), (281143, 1537115408), (281143, 1548229928), (281143, 1550903174), (281143, 1622204649), (281143, 1625307021), (281143, 1647435924), (281143, 1649806534), (281143, 2863691662), (281143, 2869448870), (281143, 2879063404), (281143, 2879132229), (281143, 2881423057), (281143, 2882934281), (281143, 2885269854), (281143, 2889163508), (281143, 2554623654), (281143, 2565211002), (281143, 3284741171), (281143, 3334235996), (281143, 3339428466), (281143, 3348951685), (281143, 2687920571), (281143, 2184506418), (281143, 4223756601), (281143, 4229645827), (281143, 143059276), (281143, 142287587), (281143, 141306090), (281143, 4152602640), (281143, 1788217665), (281143, 1790921846), (281143, 1791744222), (281143, 1802805812), (281143, 1802356894), (281143, 2341726799), (281143, 712697671), (281143, 302269251), (281143, 303376108), (281143, 304409387), (281143, 315328905), (281143, 317401697), (281143, 2451692247), (281143, 2457472381), (281143, 2471725123), (281143, 2471637185), (281143, 2066381892), (281143, 2066358496), (281143, 2073387720), (281143, 3248338144), (281143, 3254266012), (281143, 3263486956), (281143, 3267096980), (281143, 3274987680), (281143, 469895296), (281143, 473053691), (281143, 481896991), (281143, 867227854), (281143, 3570845149), (281143, 3700234654), (281143, 3705064006), (281143, 35980951), (281143, 185368900), (281143, 185558909), (281143, 3972163292), (281143, 3558718112), (281143, 3564724489), (281143, 3568326480), (281143, 3571861904), (281143, 882854121), (281143, 888231558), (281143, 1937194549), (281143, 1941898983), (281143, 1953807538), (281143, 1967829737), (281143, 3626709104), (281143, 735126205), (281143, 737825896), (281143, 741721313), (281143, 687713916), (281143, 690622746), (281143, 1874777712), (281143, 1883147330), (281143, 1891159931), (281143, 1060702981), (281143, 1081424334), (281143, 587915869), (281143, 590877447), (281143, 592547173), (281143, 593015307), (281143, 594103820), (281143, 598254838), (281143, 610397433), (281143, 3089558356), (281143, 3141145145), (281143, 3142150545), (281143, 3140353149), (281143, 3143500116), (281143, 3144815266), (281143, 3149260607), (281143, 1365468325), (281143, 1367516994), (281143, 1382914120), (281143, 1383973147), (281143, 1387266804), (281143, 1385973507), (281143, 2402048662), (281143, 2402067900), (281143, 2413902475), (281143, 2413959429), (281143, 2419397288), (281143, 1838274807), (281143, 1846413688), (281143, 1853436960), (281143, 1851750722), (281143, 1024296031), (281143, 2204340582), (281143, 2206945713), (281143, 2208801285), (281143, 2214581867), (281143, 3204740050), (281143, 3209039866), (281143, 3211528833), (281143, 2442716992), (281143, 504259125), (281143, 526827836), (281143, 3533048294), (281143, 3547406065), (281143, 152915185), (281143, 154608774), (281143, 156381922), (281143, 4196794118), (281143, 4205595171), (281143, 4208442399), (281143, 4213738161), (281143, 2983956191), (281143, 2985557102), (281143, 759027281), (281143, 761304834), (281143, 769368571), (281143, 778111761), (281143, 783679510), (281143, 782022651), (281143, 2478223815), (281143, 2495347223), (281143, 1081092273), (281143, 1093583895), (281143, 1109700494), (281143, 1109322409), (281143, 3295261786), (281143, 3307978769), (281143, 2945783255), (281143, 2951857003), (281143, 2952973606), (281143, 2968703933), (281143, 2976641388), (281143, 2977578156), (281143, 3096808706), (281143, 3123104163), (281143, 3753336078), (281143, 3758069083), (281143, 3763472525), (281143, 3785778424), (281143, 3428628298), (281143, 3428729768), (281143, 3435313396), (281143, 3445141280), (281143, 3446160451), (281143, 3456425420), (281143, 3458166225), (281143, 3456266623), (281143, 98702485), (281143, 107009256), (281143, 116605576), (281143, 117840018), (281143, 119047242), (281143, 437738114), (281143, 445959894), (281143, 449043103), (281143, 452944263), (281143, 454736249), (281143, 2702060967), (281143, 2709145254), (281143, 2710239244), (281143, 2712247657), (281143, 2715576586), (281143, 3046811437), (281143, 3047583327), (281143, 972514684), (281143, 981032119), (281143, 3814779570), (281143, 638826157), (281143, 649742776), (281143, 656846303), (281143, 661819091), (281143, 1568666882), (281143, 1580094041), (281143, 1688012722), (281143, 1700089887), (281143, 1706750974), (281143, 3166661545), (281143, 3223632514), (281143, 3230944477), (281143, 4072332515), (281143, 4084860737), (281143, 4084145884), (281143, 4096486712), (281143, 4095856169), (281143, 4101946684), (281143, 2108694354), (281143, 2111790854), (281143, 2120584830), (281143, 2132546579), (281143, 3372010167), (281143, 3801303010), (281143, 3801153977), (281143, 3808070823), (281143, 3811917914), (281143, 176303631), (281143, 184989418), (281143, 183031458), (281143, 265196423), (281143, 541672995), (281143, 542382512), (281143, 546198417), (281143, 546878667), (281143, 550833127), (281143, 2654323785), (281143, 2659469406), (281143, 2659630671), (281143, 1172403041), (281143, 1183838491), (281143, 3881496657), (281143, 3887796806), (281143, 3897305500), (281143, 3901054726), (281143, 1138789946), (281143, 1142412487), (281143, 1145384194), (281143, 1152447689), (281143, 1150105806), (281143, 1156000849), (281143, 1157422020), (281143, 1163277282), (281143, 3689572719), (281143, 3691241074), (281143, 3702412630), (281143, 3705826100), (281143, 3712828940), (281143, 3723702909), (281143, 280514869), (281143, 3010000753), (281143, 3018777947), (281143, 3512212480), (281143, 3516170502), (281143, 3520289068), (281143, 3525794265), (281143, 3678497429), (281143, 3680449961), (281143, 3751149759), (281143, 820823967), (281143, 830729691), (281143, 68656648), (281143, 77148174), (281143, 95193594), (281143, 93074616), (281143, 1896997077), (281143, 1904800650), (281143, 1912257707), (281143, 1917430690), (281143, 2931804457), (281143, 2991935317), (281143, 2996718205), (281143, 4037788178), (281143, 4038457975), (281143, 4045366719), (281143, 4048314793), (281143, 4052795248), (281143, 4053510388), (281143, 4051936651), (281143, 2050455506), (281143, 2060434996), (281143, 2229992476), (281143, 2239539990), (281143, 2576651931), (281143, 2584641333), (281143, 2586417263), (281143, 2584370048), (281143, 2598772901), (281143, 930207541), (281143, 1430806120), (281143, 1435246489), (281143, 1445827843), (281143, 1443984051), (281143, 1448418108), (281143, 497238709), (281143, 361030086), (281143, 362222246), (281143, 375548425), (281143, 322076796), (281143, 327939823), (281143, 330209440), (281143, 3181489347), (281143, 3185362500), (281143, 3185657411), (281143, 3190497661), (281143, 3200995243), (281143, 1808896031), (281143, 1812577312), (281143, 1812157791), (281143, 1032330697), (281143, 1041326703), (281143, 1057417818), (281143, 381820393), (281143, 395348181), (281143, 394617983), (281143, 401329985), (281143, 399121161), (281143, 397846921), (281143, 2150353112), (281143, 2160156197), (281143, 2164461832), (281143, 2165720688), (281143, 3919429582), (281143, 3932479759), (281143, 2756431), (281143, 11106510), (281143, 11050325), (281143, 25756691), (281143, 28144957), (281143, 1333449112), (281143, 1339005972), (281143, 1338366733), (281143, 721203231), (281143, 2043826073), (281143, 1982282379), (281143, 4009947724), (281143, 4179450299), (281143, 4187220539), (281143, 3950299722), (281143, 4023612212), (281143, 4028049269), (281143, 4031368686), (281143, 4127241917), (281143, 4140411189), (281143, 908671097), (281143, 914008100), (281143, 913495166), (281143, 918852184), (281143, 919220828), (281143, 2368205853), (281143, 2377009233), (281143, 2389832336), (281143, 2400245319), (281143, 3834775499), (281143, 3848924798), (281143, 3855738234), (281143, 3319954939), (281143, 3323639709), (281143, 227084758), (281143, 237116621), (281143, 240841256), (281143, 250997266), (281143, 2514319250), (281143, 2515072889), (281143, 2526203403), (281143, 2526938628), (281143, 3654995106), (281143, 3656926151), (281143, 3663007478), (281143, 3669937719), (281143, 3670518898), (281143, 3677939818), (281143, 2610880409), (281143, 2627156766), (281143, 2627322721), (281143, 2630747559), (281143, 2633581850), (281143, 288986712), (281143, 289469861), (281143, 293902396), (281143, 298413220), (281143, 1602346659), (281143, 1613154549), (281143, 1661088138), (281143, 1667082188), (281143, 1668638047), (281143, 1674983167), (281143, 1676949270), (281143, 1676671010), (281143, 1676999016), (281143, 1679177550), (281143, 3240089300), (281143, 4106098845), (281143, 4113697974), (281143, 4117256686), (281143, 4119363295), (281143, 1282591969), (281143, 1285789506), (281143, 1287074927), (281143, 2899261219), (281143, 2907127329), (281143, 2910948284), (281143, 2919579992), (281143, 2921247872), (281143, 1777076882), (281317, 32518025), (281317, 35402318), (281317, 410841126), (281317, 414490582), (281317, 418398611), (281317, 431245411), (281317, 394529793), (281317, 395792496), (281317, 397491850), (281317, 259973640), (281317, 145824965), (281317, 155818668), (281317, 363862383), (281317, 39330713), (281317, 47208018), (281317, 56434457), (281317, 60177362), (281317, 69074711), (281317, 322578241), (281317, 383138111), (281317, 160741254), (281317, 173020785), (281317, 171616660), (281317, 177421660), (281317, 192765043), (281317, 189952644), (281317, 7026550), (281317, 8185433), (281317, 7591136), (281317, 8661374), (281317, 15249375), (281317, 27265533), (281317, 292294684), (281317, 298825016), (281317, 305890084), (281317, 229039232), (281317, 234566222), (281317, 241415349), (281317, 242796222), (281317, 248264282), (281317, 251714859), (281317, 96214206), (281317, 227422336), (281317, 229567177), (281317, 274763899), (281317, 275688193), (281317, 278980962), (281317, 282530232), (281317, 332027659), (281317, 336102716), (281317, 347939257), (281317, 111927337), (281317, 115742920), (281317, 116599249), (281317, 120482530), (281317, 123680104), (281317, 129416389), (281317, 130455328), (281317, 136601838), (281317, 135648929), (281317, 138895774), (281385, 1166803573), (281385, 1169829490), (281385, 1179336499), (281385, 1403781898), (281385, 1404677260), (281385, 1408089491), (281385, 1409869505), (281385, 1413063128), (281385, 1417497573), (281385, 1425157474), (281385, 1428853992), (281385, 1388079518), (281385, 1917657899), (281385, 1492378778), (281385, 1491609265), (281385, 1502393604), (281385, 495747737), (281385, 501189070), (281385, 517461069), (281385, 574881507), (281385, 590696146), (281385, 605326260), (281385, 1540080460), (281385, 1549918738), (281385, 1556317449), (281385, 1557381290), (281385, 2140165087), (281385, 2153043496), (281385, 539913767), (281385, 543335546), (281385, 544383660), (281385, 545794434), (281385, 547027374), (281385, 552732304), (281385, 553059816), (281385, 552172327), (281385, 556037306), (281385, 553782387), (281385, 557340600), (281385, 560856414), (281385, 1856011992), (281385, 2115963135), (281385, 2129611655), (281385, 2133905081), (281385, 2176100628), (281385, 2178917324), (281385, 2179172162), (281385, 2182077711), (281385, 2184415713), (281385, 2183737175), (281385, 1328411487), (281385, 1333819359), (281385, 439346906), (281385, 445429273), (281385, 447527528), (281385, 704644469), (281385, 715418167), (281385, 721177433), (281385, 729057069), (281385, 734643796), (281385, 734249191), (281385, 737079227), (281385, 1741254183), (281385, 1745166456), (281385, 1744571536), (281385, 1747777200), (281385, 1761628323), (281385, 1761552493), (281385, 2039310342), (281385, 2038413098), (281385, 2042942686), (281385, 1697695625), (281385, 1698690641), (281385, 1700193361), (281385, 483238850), (281385, 489870078), (281385, 623305995), (281385, 629655981), (281385, 640513875), (281385, 641197422), (281385, 642656796), (281385, 1034954318), (281385, 1042651235), (281385, 1048545116), (281385, 1050926491), (281385, 1065164967), (281385, 1067898580), (281385, 1071998037), (281385, 1974985259), (281385, 1982535752), (281385, 1983462364), (281385, 1985849127), (281385, 1998285428), (281385, 2001825787), (281385, 1828865231), (281385, 1839338993), (281385, 1850931701), (281385, 528278767), (281385, 1467852201), (281385, 1471344634), (281385, 1475932184), (281385, 1528364261), (281385, 1531745150), (281385, 910181586), (281385, 911566493), (281385, 916280650), (281385, 923227825), (281385, 1918033635), (281385, 1091486360), (281385, 1507819072), (281385, 1512171947), (281385, 1514749613), (281385, 1514537924), (281385, 1575803953), (281385, 1581687082), (281385, 1605804623), (281385, 1613039197), (281385, 1122597203), (281385, 1124670577), (281385, 1134765913), (281385, 1147186602), (281385, 2008745132), (281385, 2010751381), (281385, 2013244918), (281385, 2015071288), (281385, 2017007784), (281385, 2021432069), (281385, 2032998684), (281385, 2032211331), (281385, 2035326933), (281385, 1184958970), (281385, 1200292642), (281385, 1208550872), (281385, 1073528150), (281385, 1001824746), (281385, 999491313), (281385, 1003009744), (281385, 1007146005), (281385, 1010573099), (281385, 1011263926), (281385, 1018432099), (281385, 1019184930), (281385, 1022747304), (281385, 1662615434), (281385, 1667987118), (281385, 1673993137), (281385, 1671994282), (281385, 1677164357), (281385, 1679241983), (281385, 1680724294), (281385, 1694144618), (281385, 963069256), (281385, 962516681), (281385, 965793898), (281385, 968674189), (281385, 975113633), (281385, 890140254), (281385, 894981872), (281385, 1661921906), (281385, 1028563565), (281385, 977766425), (281385, 980730781), (281385, 987336483), (281385, 990291653), (281385, 991989937), (281385, 989640726), (281385, 419813596), (281385, 425599496), (281385, 653516481), (281385, 870081375), (281385, 872077132), (281385, 1968876126), (281385, 1970719918), (281385, 1969115879), (281385, 1082740267), (281385, 1097785216), (281385, 1098207242), (281385, 1097530077), (281385, 1102044123), (281385, 1739962232), (281385, 825847190), (281385, 1941358448), (281385, 1940731451), (281385, 1947418685), (281385, 1956759197), (281385, 1956357890), (281385, 1256517836), (281385, 1214161516), (281385, 1217645604), (281385, 1794197259), (281385, 1803728783), (281385, 1801133887), (281385, 1809691076), (281385, 1622566040), (281385, 1622313659), (281385, 1623541543), (281385, 1626020598), (281385, 1651702198), (281385, 1350709903), (281385, 1352776810), (281385, 1357638537), (281385, 1369136090), (281385, 1382834411), (281385, 1156946546), (281385, 1156563153), (281385, 1714194557), (281385, 1715451942), (281385, 1721212809), (281385, 2084309371), (281385, 2096916097), (281385, 2099466381), (281385, 1434239234), (281385, 1432486123), (281385, 1433928160), (281385, 1440594116), (281385, 1453117941), (281385, 747799865), (281385, 1885455563), (281385, 1269983750), (281385, 1277281219), (281385, 1284596682), (281385, 1283350391), (281385, 1244384867), (281385, 1602882145), (281385, 930534379), (281385, 947299446), (281385, 1285523334), (281385, 1611650175), (281385, 1617754646), (281385, 797345264), (281385, 2200163602), (281385, 2206392910), (281385, 2204124322), (281385, 2208015440), (281385, 858309749), (281385, 857280222), (281385, 1822084888), (281411, 137947779), (281411, 151338255), (281411, 159844857), (281411, 160858710), (281411, 1898226718), (281411, 1898973049), (281411, 1917609981), (281411, 1877331539), (281411, 1884696854), (281411, 1886962280), (281411, 915533943), (281411, 38319417), (281411, 40536636), (281411, 38845323), (281411, 54152727), (281411, 410543375), (281411, 412792380), (281411, 416946572), (281411, 420642269), (281411, 426686043), (281411, 424158800), (281411, 426725072), (281411, 433328640), (281411, 1120344246), (281411, 1125139041), (281411, 1131825431), (281411, 617441193), (281411, 829522133), (281411, 830202183), (281411, 534856399), (281411, 537636170), (281411, 547867890), (281411, 547686532), (281411, 550654951), (281411, 392351854), (281411, 397225157), (281411, 396450611), (281411, 398205093), (281411, 403021648), (281411, 408315181), (281411, 432455402), (281411, 437744959), (281411, 436096458), (281411, 439242043), (281411, 442107985), (281411, 445209396), (281411, 454457098), (281411, 90526410), (281411, 2329082087), (281411, 2339000952), (281411, 2341013887), (281411, 2347420152), (281411, 2356127194), (281411, 1274956815), (281411, 1275858850), (281411, 1296200774), (281411, 1299729555), (281411, 1301827098), (281411, 1302436693), (281411, 1682241379), (281411, 1690031203), (281411, 569993507), (281411, 572870027), (281411, 571659871), (281411, 576600323), (281411, 577227389), (281411, 586206683), (281411, 2076944854), (281411, 2073929920), (281411, 2082828478), (281411, 2175425186), (281411, 2182090915), (281411, 2201577115), (281411, 1737729881), (281411, 1737776182), (281411, 1741683287), (281411, 1742791232), (281411, 1751875086), (281411, 1751467021), (281411, 949421112), (281411, 2089932835), (281411, 2095570578), (281411, 654855803), (281411, 652908327), (281411, 662778023), (281411, 663035212), (281411, 671026946), (281411, 677835239), (281411, 678571454), (281411, 679951483), (281411, 1402120349), (281411, 1401588869), (281411, 1407271725), (281411, 1424547033), (281411, 1426939915), (281411, 512291583), (281411, 514471989), (281411, 522686254), (281411, 522315907), (281411, 524682367), (281411, 121873192), (281411, 131739317), (281411, 128639106), (281411, 699184528), (281411, 704143866), (281411, 721936958), (281411, 1762519428), (281411, 1777039309), (281411, 1782989700), (281411, 1786384106), (281411, 9085842), (281411, 20872509), (281411, 25971095), (281411, 28521815), (281411, 26923907), (281411, 172233365), (281411, 189768272), (281411, 189700911), (281411, 1060612921), (281411, 1064636512), (281411, 1061264910), (281411, 1066043374), (281411, 1076509976), (281411, 1073518979), (281411, 561500432), (281411, 2269423696), (281411, 2274894478), (281411, 2281750497), (281411, 2464515149), (281411, 2475503986), (281411, 2492127680), (281411, 2508628457), (281411, 2509744902), (281411, 206916373), (281411, 208354805), (281411, 208256375), (281411, 624819143), (281411, 639105340), (281411, 638917378), (281411, 639300418), (281411, 640659994), (281411, 643404469), (281411, 644870515), (281411, 1429542022), (281411, 1444179270), (281411, 2295873390), (281411, 228499834), (281411, 238523563), (281411, 2372962450), (281411, 2377414339), (281411, 2381168931), (281411, 2383752692), (281411, 2387785755), (281411, 1639815238), (281411, 1642185274), (281411, 1643536629), (281411, 1654807440), (281411, 1660478022), (281411, 1667766524), (281411, 1664940957), (281411, 504936849), (281411, 505222624), (281411, 1989273463), (281411, 1996284623), (281411, 1999728749), (281411, 2002791029), (281411, 2004911940), (281411, 2008535736), (281411, 2012947340), (281411, 298059912), (281411, 298725986), (281411, 301170660), (281411, 300890468), (281411, 304076788), (281411, 301686448), (281411, 307114673), (281411, 319951976), (281411, 920780273), (281411, 922917599), (281411, 924946371), (281411, 923092694), (281411, 927837765), (281411, 930378675), (281411, 930910410), (281411, 933994108), (281411, 936788463), (281411, 938507929), (281411, 944256998), (281411, 1161386513), (281411, 1802322833), (281411, 1804250261), (281411, 1804350243), (281411, 1811086894), (281411, 1813089653), (281411, 1821189740), (281411, 1623071773), (281411, 1623484350), (281411, 1625158423), (281411, 1631335719), (281411, 1918924707), (281411, 1923983984), (281411, 1930699915), (281411, 1936331234), (281411, 2015258715), (281411, 956291541), (281411, 959924897), (281411, 967047746), (281411, 980370277), (281411, 982981644), (281411, 460519601), (281411, 1023709332), (281411, 1024744798), (281411, 1043963279), (281411, 1046449998), (281411, 366889605), (281411, 369846251), (281411, 371306667), (281411, 382504714), (281411, 1336498299), (281411, 1350658011), (281411, 323089751), (281411, 327108674), (281411, 325868535), (281411, 327896142), (281411, 336871930), (281411, 337278310), (281411, 339637663), (281411, 2054325875), (281411, 2058285734), (281411, 2063682603), (281411, 2067356902), (281411, 2073235988), (281411, 2124774364), (281411, 2127732713), (281411, 2131611852), (281411, 2134569102), (281411, 735346718), (281411, 736125997), (281411, 743800219), (281411, 744889899), (281411, 256276592), (281411, 263416623), (281411, 263999789), (281411, 1553496398), (281411, 1570452113), (281411, 1569537841), (281411, 2244180012), (281411, 2265506376), (281411, 2421142016), (281411, 2433070377), (281411, 2442759932), (281411, 1370693637), (281411, 1377733038), (281411, 1379425170), (281411, 1380185764), (281411, 1381009217), (281411, 1386861205), (281411, 1389343074), (281411, 1393369239), (281411, 1826713256), (281411, 1826130829), (281411, 1837498611), (281411, 1840276080), (281411, 1843418919), (281411, 1203280503), (281411, 1213732411), (281411, 1218153332), (281411, 1230249461), (281411, 2517933330), (281411, 2523860792), (281411, 2527931236), (281411, 2536166240), (281411, 1962858529), (281411, 1962612569), (281411, 1973067398), (281411, 1983755088), (281411, 1470336291), (281411, 1481285252), (281411, 484332137), (281411, 486586484), (281411, 489403072), (281411, 489685439), (281411, 490490640), (281411, 493434821), (281411, 499851606), (281411, 502528289), (281411, 502195101), (281411, 1088393891), (281411, 1088736682), (281411, 1096407143), (281411, 1105359643), (281411, 1103884353), (281411, 1107878825), (281411, 1110838324), (281411, 2541722927), (281411, 2547903479), (281411, 2554760257), (281411, 1598185829), (281411, 1598703739), (281411, 66704854), (281411, 111828957), (281411, 267687679), (281411, 270520861), (281411, 271888559), (281411, 276782551), (281411, 278641857), (281411, 282497094), (281411, 288056813), (281411, 2210087467), (281411, 2230056977), (281411, 1502470070), (281411, 1506284529), (281411, 1507999446), (281411, 1511142338), (281411, 354859965), (281411, 362754527), (281411, 365434952), (281411, 363728210), (281411, 1523363845), (281411, 1528931922), (281411, 1540682207), (281411, 1707440174), (281411, 1707727906), (281411, 1713788480), (281411, 1716158228), (281411, 1715064431), (281411, 1717372051), (281411, 1718963830), (281411, 1719854126), (281411, 1727728457), (281411, 1301887021), (281411, 1303181507), (281411, 1308148385), (281411, 1322682565), (281411, 1326195379), (281411, 2388472707), (281411, 2398070546), (281411, 2410535535), (281411, 2415712821), (281411, 2413956907), (281411, 2141794107), (281411, 2171142496), (281411, 1238440672), (281411, 1248094002), (281411, 1246262900), (281411, 1257009156), (281411, 1255434196), (281411, 1265086457), (281411, 593147924), (281411, 612822411), (281411, 615088109), (281411, 994006798), (281411, 995922398), (281411, 1002678075), (281411, 1003043229), (281411, 1008954784), (281411, 1011309099), (281411, 692671354), (281411, 1175343312), (281411, 1179230017), (281411, 1178102591), (281411, 1181673278), (281411, 1181834093), (281411, 1183385738), (281411, 1195121856), (281411, 2014996510), (281411, 2014878068), (281411, 2024353197), (281411, 2027208695), (281411, 2029522374), (281411, 2030114830), (281411, 2035915455), (282631, 164145147), (282631, 172636144), (282631, 172152699), (282631, 174434844), (282631, 179928046), (282631, 183230456), (282631, 523659965), (282631, 524175880), (282631, 526307054), (282631, 528525381), (282631, 532426345), (282631, 534692956), (282631, 140457108), (282631, 72394287), (282631, 79322921), (282631, 87687843), (282631, 457133688), (282631, 464432582), (282631, 464840905), (282631, 48431519), (282631, 54105578), (282631, 57793888), (282631, 13691678), (282631, 23420702), (282631, 22244749), (282631, 25360542), (282631, 31817306), (282631, 66831383), (282631, 105030383), (282631, 107770511), (282631, 114199554), (282631, 113605190), (282631, 116129552), (282631, 199067188), (282631, 200972369), (282631, 204448318), (282631, 208368489), (282631, 287220382), (282631, 288771130), (282631, 300466818), (282631, 181190985), (282631, 189604314), (282631, 316847565), (282631, 329158325), (282631, 223143649), (282631, 226372046), (282631, 236561993), (282631, 241403014), (282631, 243709095), (282631, 247027686), (282631, 247686013), (282631, 103605080), (282631, 406209206), (282631, 414785039), (282631, 414343446), (282631, 419290818), (282631, 425722136), (282631, 429717615), (282631, 481796677), (282631, 344823384), (282631, 350091474), (282631, 349401847), (282631, 353204333), (282631, 435233292), (282631, 440803772), (282631, 443850796), (282631, 478142100), (282631, 338236152), (282631, 340084300), (282631, 360771635), (282631, 375906112), (282631, 498994058), (282631, 507875751), (282712, 281503239), (282712, 286434708), (282712, 88319302), (282712, 88866193), (282712, 92985689), (282712, 100280934), (282712, 102382789), (282712, 107153133), (282712, 109273376), (282712, 108657057), (282712, 116068553), (282712, 1013927163), (282712, 1019120311), (282712, 1026923892), (282712, 449799817), (282712, 455154639), (282712, 453301508), (282712, 479965646), (282712, 1591686909), (282712, 1616587791), (282712, 514291356), (282712, 239459900), (282712, 7885361), (282712, 14042241), (282712, 117297847), (282712, 119169907), (282712, 1250511769), (282712, 1255031765), (282712, 1258916908), (282712, 1265229947), (282712, 301751957), (282712, 303004392), (282712, 307309098), (282712, 345601072), (282712, 346112488), (282712, 812877298), (282712, 830369607), (282712, 837625008), (282712, 1140248495), (282712, 695773453), (282712, 709436355), (282712, 615082015), (282712, 794729112), (282712, 794950039), (282712, 1453337605), (282712, 1451969787), (282712, 1456770956), (282712, 1458706470), (282712, 1463869951), (282712, 1471463602), (282712, 1473372122), (282712, 1477668749), (282712, 38660565), (282712, 45320617), (282712, 45694035), (282712, 790734487), (282712, 798638754), (282712, 802746378), (282712, 806690932), (282712, 807698273), (282712, 769738952), (282712, 768263543), (282712, 466717584), (282712, 215316272), (282712, 1203789614), (282712, 1215039466), (282712, 1219471579), (282712, 1222956523), (282712, 128715187), (282712, 134141735), (282712, 135343271), (282712, 138539853), (282712, 139101984), (282712, 138973686), (282712, 63856919), (282712, 65533295), (282712, 70492518), (282712, 75489278), (282712, 74120086), (282712, 632336039), (282712, 638093613), (282712, 649946548), (282712, 914892035), (282712, 922692047), (282712, 927687869), (282712, 926015329), (282712, 1485446237), (282712, 1514444547), (282712, 1522069277), (282712, 359158896), (282712, 360337972), (282712, 372430062), (282712, 743204098), (282712, 747377098), (282712, 748038550), (282712, 269148113), (282712, 270681847), (282712, 271566281), (282712, 276161360), (282712, 278926535), (282712, 282058736), (282712, 287565611), (282712, 289265632), (282712, 289715928), (282712, 309362408), (282712, 325490901), (282712, 1083077939), (282712, 1091658790), (282712, 89225285), (282712, 418966250), (282712, 429731165), (282712, 437430600), (282712, 338036190), (282712, 1328858563), (282712, 1369307982), (282712, 1374704448), (282712, 1379018645), (282712, 1385936630), (282712, 402220110), (282712, 489228759), (282712, 495840062), (282712, 496800748), (282712, 1442423427), (282712, 1445872111), (282712, 1446643220), (282712, 1449701487), (282712, 1449065783), (282712, 555857703), (282712, 577598305), (282712, 845473343), (282712, 845627908), (282712, 851839315), (282712, 854964652), (282712, 937575447), (282712, 941456314), (282712, 956229444), (282712, 971260457), (282712, 1688405539), (282712, 1689695945), (282712, 1701662423), (282712, 1702472198), (282712, 1179943863), (282712, 1184281103), (282712, 1190782484), (282712, 1191798010), (282712, 528390450), (282712, 533218350), (282712, 538918442), (282712, 537386367), (282712, 673829644), (282712, 675404714), (282712, 675214565), (282712, 675327498), (282712, 676034846), (282712, 682515221), (282712, 685348605), (282712, 1120936199), (282712, 1657341999), (282712, 1662966956), (282712, 1662022616), (282712, 865247513), (282712, 867974903), (282712, 875838618), (282712, 878291731), (282712, 881617396), (282712, 25908370), (282712, 27319310), (282712, 29878572), (282712, 585480051), (282712, 582591255), (282712, 586909199), (282712, 601035211), (282712, 1363519019), (282712, 1363469522), (282712, 155594944), (282712, 164150731), (282712, 169949251), (282712, 179646546), (282712, 177952632), (282712, 180667539), (282712, 966481555), (282712, 987951300), (282712, 987892137), (282712, 992669933), (282712, 1036581793), (282712, 1035806227), (282712, 1037328879), (282712, 1048897072), (282712, 1045259557), (282712, 1055128234), (282712, 1056418297), (282712, 1059587994), (282712, 1062474835), (282712, 1066204788), (282712, 1154811079), (282712, 1162143477), (282712, 1169114059), (282712, 1167190380), (282712, 1174090853), (282712, 1178575044), (282712, 376269137), (282712, 380679836), (282712, 387667239), (282712, 395429988), (282712, 567388425), (282712, 645142748), (282712, 247223028), (282712, 257696585), (282712, 261095829), (282712, 266015717), (282712, 267801783), (282712, 1400405523), (282712, 1413840599), (282712, 1421477395), (282712, 1421547094), (282712, 684946496), (282712, 737373695), (282712, 744238898), (282712, 1345610885), (282712, 1357056666), (282712, 658152214), (282712, 151343646), (282712, 228154044), (282712, 229460118), (282712, 1280062625), (282712, 1280421338), (282712, 1617021782), (282712, 1634019125), (282712, 1639755171), (282712, 1645394184), (282712, 1647118432), (282712, 183071675), (282712, 183824040), (282712, 1232413675), (282712, 1234507659), (282712, 1238950355), (282712, 1242440883), (282712, 202492892), (282712, 212041168), (282712, 213280350), (282712, 1566723774), (282712, 1576865231), (282712, 1301866112), (282712, 1303987841), (282712, 1309702397), (282712, 1322701344), (282712, 1522431536), (282712, 1529576228), (282712, 1538987376), (282712, 1554186064), (282784, 214990654), (282784, 186669593), (282784, 190115226), (282784, 192328893), (282784, 198450167), (282784, 201009003), (282784, 199693025), (282784, 205139952), (282784, 210950615), (282784, 212502657), (282992, 1369468980), (282992, 1384541083), (282992, 1490332461), (282992, 1488281007), (282992, 1503888366), (282992, 1512288755), (282992, 1519961330), (282992, 1487289827), (282992, 1688369842), (282992, 1694560400), (282992, 1697233400), (282992, 1699794724), (282992, 1703028820), (282992, 1703479842), (282992, 1710868796), (282992, 1815708714), (282992, 1821291048), (282992, 1825141642), (282992, 1824915980), (282992, 1677932827), (282992, 1676444247), (282992, 1684323682), (282992, 1833331320), (282992, 1837202715), (282992, 1839748999), (282992, 86800076), (282992, 94469874), (282992, 99310122), (282992, 105401527), (282992, 118338605), (282992, 834609128), (282992, 842107496), (282992, 859364748), (282992, 156139420), (282992, 154177383), (282992, 162471403), (282992, 167632681), (282992, 172265484), (282992, 351580395), (282992, 371192926), (282992, 379626357), (282992, 378563244), (282992, 1108365502), (282992, 1028923119), (282992, 1033296444), (282992, 1037058205), (282992, 1042589043), (282992, 620757647), (282992, 627993366), (282992, 636346167), (282992, 637542203), (282992, 303902811), (282992, 528200428), (282992, 553940478), (282992, 703509169), (282992, 703648166), (282992, 708366977), (282992, 710507315), (282992, 709048911), (282992, 710471116), (282992, 713984794), (282992, 712131398), (282992, 721765977), (282992, 723044147), (282992, 724740770), (282992, 731376548), (282992, 733153192), (282992, 74028032), (282992, 948226460), (282992, 956957137), (282992, 956337043), (282992, 966193126), (282992, 969659490), (282992, 969956701), (282992, 1580650260), (282992, 1588974554), (282992, 2057118256), (282992, 941783114), (282992, 1887494624), (282992, 1893242089), (282992, 1898092758), (282992, 1899072635), (282992, 1914503524), (282992, 1266369114), (282992, 1270173928), (282992, 1289991550), (282992, 1295117616), (282992, 696421227), (282992, 602780333), (282992, 610181314), (282992, 612578585), (282992, 614861689), (282992, 189048096), (282992, 788265646), (282992, 1856028682), (282992, 1859992654), (282992, 1859348300), (282992, 1863556838), (282992, 1863087351), (282992, 1872531805), (282992, 1873480399), (282992, 1878042450), (282992, 245666044), (282992, 250165465), (282992, 262077444), (282992, 1636579531), (282992, 1640383529), (282992, 1641252236), (282992, 1652213186), (282992, 1658189811), (282992, 1659187722), (282992, 1662461275), (282992, 1666559306), (282992, 866104136), (282992, 876204178), (282992, 878535487), (282992, 887625285), (282992, 343422334), (282992, 344362973), (282992, 346932440), (282992, 619486735), (282992, 1230041483), (282992, 1240462701), (282992, 1250741850), (282992, 1187597163), (282992, 1152515775), (282992, 1158826398), (282992, 1161161836), (282992, 559048523), (282992, 1095486584), (282992, 1101508812), (282992, 437236161), (282992, 445313545), (282992, 1193506553), (282992, 1204082141), (282992, 1225028371), (282992, 1786706653), (282992, 1796268256), (282992, 1798188652), (282992, 907134588), (282992, 909855422), (282992, 917937031), (282992, 1441602093), (282992, 1542328364), (282992, 1778608809), (282992, 860715296), (282992, 864346080), (282992, 867287651), (282992, 120877521), (282992, 227843463), (282992, 232389139), (282992, 316346808), (282992, 318543518), (282992, 322487299), (282992, 340103616), (282992, 1987380229), (282992, 1993811040), (282992, 1998841988), (282992, 2003118036), (282992, 2009327605), (282992, 2009882343), (282992, 2014033155), (282992, 675779717), (282992, 680401496), (282992, 680401677), (282992, 681640257), (282992, 684177504), (282992, 686320809), (282992, 690149979), (282992, 33082249), (282992, 130497780), (282992, 149646511), (282992, 499645985), (282992, 506220530), (282992, 503698882), (282992, 508751263), (282992, 983189140), (282992, 983212343), (282992, 985489420), (282992, 991760279), (282992, 991920605), (282992, 997407124), (282992, 1004735019), (282992, 1556496187), (282992, 1558852819), (282992, 1566512813), (282992, 1567867313), (282992, 1575275403), (282992, 1576403301), (282992, 560710255), (282992, 564635153), (282992, 576169719), (282992, 576038965), (282992, 1744423827), (282992, 1750290008), (282992, 1764221550), (282992, 1767287806), (282992, 1770620825), (282992, 1170319725), (282992, 1174962492), (282992, 902305658), (282992, 1121688638), (282992, 1125786066), (282992, 1130386322), (282992, 1137689537), (282992, 1147014465), (282992, 589569963), (282992, 595748111), (282992, 1590081674), (282992, 1593109055), (282992, 1600857751), (282992, 1603607155), (282992, 1609087998), (282992, 1614450082), (282992, 395679384), (282992, 399887047), (282992, 406047446), (282992, 402843592), (282992, 406100830), (282992, 415397114), (282992, 419057119), (282992, 418462677), (282992, 797628482), (282992, 808180777), (282992, 809857909), (282992, 2024251316), (282992, 2027115584), (282992, 2034516914), (282992, 2037315874), (282992, 2038612523), (282992, 2045674360), (282992, 2049630608), (282992, 462841266), (282992, 473764450), (282992, 482902372), (282992, 1344358957), (282992, 1345599765), (282992, 58084171), (282992, 61106243), (282992, 932190055), (282992, 929965989), (282992, 934679987), (282992, 277126723), (282992, 279720069), (282992, 277933972), (282992, 287893949), (282992, 295195884), (282992, 1059179264), (282992, 1059366283), (282992, 1064382267), (282992, 1716174230), (282992, 1522571756), (282992, 1525513618), (282992, 1525692773), (282992, 1529571099), (282992, 1450847850), (282992, 1456164393), (282992, 1754460), (282992, 3869674), (282992, 9614057), (282992, 13874393), (282992, 1393055058), (282992, 1397792638), (282992, 1397487166), (282992, 1402934344), (282992, 1411488371), (282992, 1415188041), (282992, 1420929731), (282992, 1227658113), (282992, 1307053624), (282992, 1939951520), (282992, 1950010036), (282992, 1961511934), (282992, 197789704), (282992, 198076477), (282992, 196052754), (282992, 200902747), (282992, 204329774), (282992, 220678674), (282992, 1614318414), (282992, 1624075976), (282992, 1626065956), (282992, 1627250791), (282992, 1633247809), (282992, 1631070459), (282992, 1632260828), (282992, 1785055939), (282992, 2069018885), (282992, 748987174), (282992, 746940214), (282992, 750601558), (282992, 753205069), (282992, 757041740), (282992, 773301112), (283074, 413962421), (283074, 646013336), (283074, 650629004), (283074, 654947848), (283074, 669849879), (283074, 668368900), (283074, 125393055), (283074, 35092814), (283074, 58796804), (283074, 60034698), (283074, 64083335), (283074, 852156132), (283074, 855503794), (283074, 857774819), (283074, 859603837), (283074, 869146271), (283074, 443223995), (283074, 457800440), (283074, 462039488), (283074, 467035898), (283074, 171948160), (283074, 171514785), (283074, 177208813), (283074, 180793725), (283074, 178404694), (283074, 181925388), (283074, 203366813), (283074, 982240747), (283074, 730567567), (283074, 737010345), (283074, 885060386), (283074, 892431376), (283074, 908334404), (283074, 914310650), (283074, 923121020), (283074, 922310719), (283074, 407586874), (283074, 431306664), (283074, 433649415), (283074, 242750003), (283074, 247079410), (283074, 519196350), (283074, 521143241), (283074, 528440854), (283074, 532569046), (283074, 340999735), (283074, 343509910), (283074, 482123898), (283074, 498062067), (283074, 349663342), (283074, 346793587), (283074, 824011492), (283074, 830863121), (283074, 844175588), (283074, 843152720), (283074, 149881125), (283074, 151747353), (283074, 236243179), (283074, 297881234), (283074, 302229066), (283074, 302410366), (283074, 301291543), (283074, 3232598), (283074, 19142224), (283074, 108608961), (283074, 118196938), (283074, 254543909), (283074, 394026334), (283074, 397204580), (283074, 416583891), (283074, 432311874), (283074, 431136905), (283074, 173465640), (283074, 622740088), (283074, 909917370), (283074, 87529457), (283074, 84989916), (283074, 752929218), (283074, 800821491), (283074, 808557274), (283074, 810573999), (283074, 77480842), (283074, 79556274), (283074, 83326275), (283074, 85629156), (283074, 92028977), (283074, 22186194), (283074, 27059898), (283074, 572851277), (283074, 593984818), (283074, 593259555), (283074, 603009893), (283074, 608371529), (283074, 615339862), (283074, 632894283), (283074, 170112725), (283074, 537612567), (283074, 539762853), (283074, 500072422), (283074, 512174529), (283074, 562409932), (283074, 310356627), (283074, 369753747), (283074, 377307282), (283074, 1012699693), (283074, 1015196526), (283074, 699588484), (283074, 705700940), (283074, 711679453), (283074, 959195913), (283074, 957045172), (283074, 965402006), (283074, 966620502), (283074, 261307649), (283074, 264687684), (283074, 262069609), (283074, 265477195), (283074, 265311981), (283074, 275360017), (283074, 277300892), (283074, 279910138), (283074, 785412612), (283074, 793663598), (283074, 792304498), (283074, 386056127), (283074, 390669110), (283074, 392802805), (283074, 188467611), (283074, 190702979), (283155, 255415335), (283155, 375332043), (283155, 372987828), (283155, 378054182), (283155, 390431257), (283155, 411870342), (283155, 31961439), (283155, 29825428), (283155, 66830298), (283155, 74220812), (283155, 78463673), (283155, 80000034), (283155, 81231352), (283155, 82108929), (283155, 455612776), (283155, 464364209), (283155, 466591493), (283155, 251325493), (283155, 265780702), (283155, 265392746), (283155, 60335975), (283155, 63431180), (283155, 65031520), (283155, 339776290), (283155, 351448942), (283155, 353690469), (283155, 404129905), (283155, 407734955), (283155, 2434826), (283155, 12593978), (283155, 13516481), (283155, 15581545), (283155, 19157358), (283155, 22059563), (283155, 25103385), (283155, 514586471), (283155, 210202168), (283155, 223342059), (283155, 226138675), (283155, 225543919), (283155, 326599941), (283155, 334276112), (283155, 353041192), (283155, 357697338), (283155, 127414098), (283155, 269547021), (283155, 278387638), (283155, 281383602), (283155, 482701672), (283155, 495422653), (283155, 497751094), (283155, 173310297), (283155, 179959945), (283155, 192055255), (283155, 235609940), (283155, 245767391), (283155, 411623221), (283155, 416341368), (283155, 424910220), (283155, 431784196), (283155, 441773001), (283155, 298057100), (283155, 302125674), (283155, 311379775), (283155, 35030390), (283155, 43072717), (283155, 51971999), (283155, 211406580), (283155, 92191386), (283155, 94001150), (283155, 93208800), (283155, 137685525), (283155, 141439776), (283155, 145900642), (283155, 145535911), (283155, 145537315), (283155, 150613654), (283155, 153803009), (283155, 157555819), (283155, 155743540), (283155, 159332962), (283155, 196063676), (283270, 33294235), (283270, 36192261), (283270, 59321623), (283270, 58058012), (283270, 1820228), (283270, 4498654), (283270, 3617124), (283270, 6598496), (283270, 9906075), (283270, 12351943), (283270, 137056290), (283270, 144679678), (283270, 143022586), (283270, 144968888), (283270, 100376419), (283270, 102016811), (283270, 102735375), (283270, 187178678), (283270, 194896126), (283270, 122793824), (283270, 127780643), (283270, 132087804), (283270, 198632194), (283270, 200259063), (283270, 151920098), (283270, 149356594), (283270, 164944045), (283270, 168684140), (283270, 169574492), (283270, 168198551), (283270, 90191285), (283270, 90877228), (283270, 92847189), (283270, 92446332), (283270, 60312914), (283270, 65323314), (283270, 66654094), (283270, 177425604), (283270, 186523400), (283270, 187582241), (283270, 196284164), (283270, 22527357), (283270, 24693622), (283270, 33253502), (283270, 77688725), (283270, 79011437), (283270, 83039711), (283429, 1568219006), (283429, 619115370), (283429, 625818835), (283429, 630689310), (283429, 632240653), (283429, 636723935), (283429, 641297584), (283429, 97700639), (283429, 110931576), (283429, 108211614), (283429, 109939007), (283429, 112927238), (283429, 115655026), (283429, 244485841), (283429, 247006731), (283429, 247340541), (283429, 250729503), (283429, 130985192), (283429, 136074718), (283429, 152898599), (283429, 1610875741), (283429, 1630687495), (283429, 493306414), (283429, 500716570), (283429, 1739935191), (283429, 1748348130), (283429, 1760812562), (283429, 3154832141), (283429, 3163370499), (283429, 3166626130), (283429, 432308390), (283429, 438987055), (283429, 453007110), (283429, 452746668), (283429, 4287180121), (283429, 4289714320), (283429, 4303772153), (283429, 4308246034), (283429, 3984249254), (283429, 3992442565), (283429, 4002305370), (283429, 3201252170), (283429, 3206252045), (283429, 3211497408), (283429, 3214499570), (283429, 779193563), (283429, 789613734), (283429, 791578685), (283429, 791560253), (283429, 793497821), (283429, 975012959), (283429, 985822987), (283429, 994827429), (283429, 889160859), (283429, 930426329), (283429, 931856983), (283429, 946405503), (283429, 959435798), (283429, 961840220), (283429, 962030017), (283429, 2565172596), (283429, 2566373514), (283429, 2570815020), (283429, 1092410746), (283429, 3832416470), (283429, 3832095668), (283429, 3834350993), (283429, 3835111780), (283429, 3834325054), (283429, 3843068920), (283429, 3846943720), (283429, 3844826725), (283429, 3850130737), (283429, 3854984852), (283429, 3899905144), (283429, 3902255541), (283429, 3902406164), (283429, 3903956539), (283429, 3910264546), (283429, 919575980), (283429, 927166860), (283429, 1138765052), (283429, 1142429272), (283429, 1146786562), (283429, 1148515735), (283429, 4319779759), (283429, 3250899224), (283429, 3262843742), (283429, 2965553285), (283429, 2977648409), (283429, 2980144403), (283429, 2983755714), (283429, 3045583763), (283429, 191432685), (283429, 203409887), (283429, 205793440), (283429, 203941339), (283429, 2041283869), (283429, 2050026896), (283429, 2054795990), (283429, 2063988991), (283429, 2067288657), (283429, 2071331679), (283429, 2077565655), (283429, 3658909047), (283429, 3658563341), (283429, 1854549429), (283429, 710988344), (283429, 715251126), (283429, 726764622), (283429, 759171954), (283429, 764356472), (283429, 765851778), (283429, 767728949), (283429, 771439619), (283429, 769829729), (283429, 4025323188), (283429, 4024244068), (283429, 4029368436), (283429, 4040229899), (283429, 4041097666), (283429, 4040389161), (283429, 3720369363), (283429, 3858160171), (283429, 3856484892), (283429, 3862943273), (283429, 3874003074), (283429, 3880790472), (283429, 4376574550), (283429, 4382553006), (283429, 3617300603), (283429, 4051947625), (283429, 4064107769), (283429, 4062204931), (283429, 4065520608), (283429, 4067188391), (283429, 4072878367), (283429, 4076825505), (283429, 4081293443), (283429, 3460567151), (283429, 3462075389), (283429, 3465467335), (283429, 3468422260), (283429, 3472653911), (283429, 3475164236), (283429, 29863443), (283429, 36912675), (283429, 558569517), (283429, 570456916), (283429, 567782100), (283429, 3775156959), (283429, 3777512506), (283429, 3789189626), (283429, 1691485510), (283429, 1701962439), (283429, 1705665608), (283429, 167359932), (283429, 165676008), (283429, 172673772), (283429, 1497078368), (283429, 1497461720), (283429, 1499296873), (283429, 3368399226), (283429, 3369511102), (283429, 3370455364), (283429, 3377644708), (283429, 3380450858), (283429, 3389047231), (283429, 3390071769), (283429, 3091100277), (283429, 3099868561), (283429, 3108629569), (283429, 3113014176), (283429, 3113073679), (283429, 2589713617), (283429, 2596702142), (283429, 2602444722), (283429, 2602098431), (283429, 2600529493), (283429, 2606581332), (283429, 2712151929), (283429, 2715080532), (283429, 2719123793), (283429, 2721256348), (283429, 2724216377), (283429, 2725514909), (283429, 2798374229), (283429, 2134419828), (283429, 2149066396), (283429, 2154109300), (283429, 2158705712), (283429, 2170931364), (283429, 1411251880), (283429, 1960933562), (283429, 1973709523), (283429, 1974079176), (283429, 296045908), (283429, 296357193), (283429, 297523875), (283429, 301525545), (283429, 302105104), (283429, 305746143), (283429, 305493606), (283429, 3275801214), (283429, 3278435582), (283429, 3299159541), (283429, 1001056843), (283429, 1018867418), (283429, 1024295603), (283429, 1032296511), (283429, 214343518), (283429, 226772014), (283429, 361253582), (283429, 363078983), (283429, 367517457), (283429, 370318809), (283429, 673886676), (283429, 679351213), (283429, 679978717), (283429, 679730532), (283429, 681304456), (283429, 685193626), (283429, 687066592), (283429, 688427583), (283429, 3505588038), (283429, 3510530848), (283429, 3512779320), (283429, 3514463952), (283429, 3517901017), (283429, 3532020390), (283429, 745052602), (283429, 754261689), (283429, 760669830), (283429, 43262327), (283429, 47486802), (283429, 56229484), (283429, 54836344), (283429, 60530253), (283429, 57905552), (283429, 1422277783), (283429, 1923742587), (283429, 1954595987), (283429, 190690269), (283429, 189780618), (283429, 230196771), (283429, 231338891), (283429, 2645719604), (283429, 2649828905), (283429, 2662413856), (283429, 2666023662), (283429, 2670419257), (283429, 2673593832), (283429, 2080849777), (283429, 2078573315), (283429, 1594744936), (283429, 3538737879), (283429, 3551290031), (283429, 3555061094), (283429, 3555837313), (283429, 3559905432), (283429, 3567206309), (283429, 1672817258), (283429, 3683952589), (283429, 3689518027), (283429, 3701752323), (283429, 3707488220), (283429, 3712909476), (283429, 2322124907), (283429, 2324677768), (283429, 2331267540), (283429, 2807247984), (283429, 2807823212), (283429, 2805910454), (283429, 2824178115), (283429, 321312843), (283429, 326932750), (283429, 328995004), (283429, 334318321), (283429, 1428487157), (283429, 1431543265), (283429, 1430371235), (283429, 1444619042), (283429, 1448204477), (283429, 1451549730), (283429, 1452257562), (283429, 1458434832), (283429, 2478349822), (283429, 3924890130), (283429, 3927361733), (283429, 3939657121), (283429, 273590802), (283429, 278833118), (283429, 279751057), (283429, 282731641), (283429, 283168232), (283429, 1893054343), (283429, 1907078338), (283429, 1905490517), (283429, 1906339863), (283429, 1289025873), (283429, 873832655), (283429, 880604991), (283429, 1785672245), (283429, 1793004654), (283429, 403679302), (283429, 1542179329), (283429, 1545147684), (283429, 3396333867), (283429, 3404253778), (283429, 2457503578), (283429, 2460940619), (283429, 2467411411), (283429, 2468851110), (283429, 2467614009), (283429, 3028259758), (283429, 3339249463), (283429, 1874233061), (283429, 4333055508), (283429, 4345902245), (283429, 4353011335), (283429, 4360234404), (283429, 4359784933), (283429, 2259226438), (283429, 2265174467), (283429, 2265505835), (283429, 2268586840), (283429, 2281706051), (283429, 2285086152), (283429, 2288554919), (283429, 1777389605), (283429, 1774499522), (283429, 1783805170), (283429, 1262083256), (283429, 1001418601), (283429, 2109819049), (283429, 2111498696), (283429, 2121797053), (283429, 1470407735), (283429, 1472927198), (283429, 1474612726), (283429, 1473282681), (283429, 2862578531), (283429, 2861251935), (283429, 2868557501), (283429, 2872669265), (283429, 2877049740), (283429, 2292211727), (283429, 2296247868), (283429, 2296837506), (283429, 2492528996), (283429, 2492997104), (283429, 2493706220), (283429, 2501355218), (283429, 2804685501), (283429, 2514477542), (283429, 1042922326), (283429, 519055607), (283429, 520801387), (283429, 521233569), (283429, 528342675), (283429, 533443923), (283429, 534892139), (283429, 1338715098), (283429, 1341227525), (283429, 1345933502), (283429, 1347572381), (283429, 1350628719), (283429, 1353750201), (283429, 1710451591), (283429, 1712457222), (283429, 1714267360), (283429, 1725472193), (283429, 1731691979), (283429, 1203632208), (283429, 1255479864), (283429, 2168165121), (283429, 387232267), (283429, 385696011), (283429, 469139851), (283429, 470252232), (283429, 476014765), (283429, 473119260), (283429, 478765328), (283429, 483913232), (283429, 2222485530), (283429, 2226167441), (283429, 2227436004), (283429, 2241407046), (283429, 660386328), (283429, 667238559), (283429, 670704258), (283429, 1641788340), (283429, 1648356349), (283429, 1652779083), (283429, 1650961418), (283429, 1653088121), (283429, 1654780636), (283429, 4119344671), (283429, 4122529634), (283429, 4120936515), (283429, 4126424447), (283429, 4139856975), (283429, 4145084929), (283429, 4149114126), (283429, 837859816), (283429, 847065940), (283429, 1301737586), (283429, 1302326650), (283429, 1302356172), (283429, 1303174246), (283429, 1309077525), (283429, 2177602759), (283429, 2185680487), (283429, 2204205931), (283429, 2206742965), (283429, 4094774025), (283429, 3061607704), (283429, 3069835072), (283429, 3073394332), (283429, 504770333), (283429, 508533816), (283429, 508791938), (283429, 509846159), (283429, 515007267), (283429, 514419073), (283429, 2377780619), (283429, 2380812873), (283429, 2383699803), (283429, 578385949), (283429, 587274544), (283429, 594567488), (283429, 599439862), (283429, 606280065), (283429, 3807815327), (283429, 3808711099), (283429, 3818027379), (283429, 3828974950), (283429, 3450044180), (283429, 571929234), (283429, 1085283746), (283429, 3888795367), (283429, 3952584570), (283429, 3959814402), (283429, 3969734607), (283429, 3973943845), (283429, 3973087613), (283429, 2247302053), (283429, 2248557476), (283429, 2300072786), (283429, 2300474375), (283429, 2306265719), (283429, 2309074071), (283429, 2616834008), (283429, 2626664227), (283429, 2635374872), (283429, 614899326), (283429, 1982551741), (283429, 1985809357), (283429, 1993294074), (283429, 2001454718), (283429, 1998281606), (283429, 2006147523), (283429, 1119270326), (283429, 1116497310), (283429, 1124415366), (283429, 1127072185), (283429, 1127605030), (283429, 1153630855), (283429, 4242479524), (283429, 4243012845), (283429, 4254037800), (283429, 4260292556), (283429, 2924571602), (283429, 2929287436), (283429, 2943703779), (283429, 2947551678), (283429, 2948633892), (283429, 2959332695), (283429, 2690802429), (283429, 2752070992), (283429, 3537345202), (283429, 3725899743), (283429, 3728313248), (283429, 3730635520), (283429, 3745033277), (283429, 3408085420), (283429, 3420104884), (283429, 3425693670), (283429, 3425930013), (283429, 3432953454), (283429, 3431631450), (283429, 3439455866), (283429, 1318435491), (283429, 1326788884), (283429, 1327516212), (283429, 3594906738), (283429, 3595153036), (283429, 1812929456), (283429, 1822408863), (283429, 1824967979), (283429, 1219879484), (283429, 1228982280), (283429, 1233393258), (283429, 1237024743), (283429, 1236247156), (283429, 1241669258), (283429, 64812095), (283429, 66543092), (283429, 67551797), (283429, 66413539), (283429, 461288363), (283429, 2009703357), (283429, 2013785421), (283429, 2014166506), (283429, 2013259179), (283429, 2033368422), (283429, 2406979974), (283429, 2426140270), (283429, 2423371590), (283429, 346552488), (283429, 350441743), (283429, 415905704), (283429, 423017570), (283429, 421244554), (283429, 425692996), (283429, 883661690), (283429, 1080451873), (283429, 1358857561), (283429, 2996639550), (283429, 3000465308), (283429, 3010114648), (283429, 3012836552), (283429, 3018374053), (283429, 3021384870), (283429, 5961771), (283429, 7253149), (283429, 15570795), (283429, 20154264), (283429, 19685710), (283429, 2842231648), (283429, 2841058576), (283429, 4267295154), (283429, 4279255345), (283429, 4279523644), (283429, 822228323), (283429, 835374236), (283429, 836791829), (283429, 2433749393), (283429, 2433775635), (283429, 2437613859), (283429, 2536502620), (283429, 2536232272), (283429, 2537859565), (283429, 2539502626), (283429, 2541082686), (283429, 2542905291), (283429, 2559536502), (283429, 314350829), (283429, 316107436), (283429, 316588549), (283429, 542406971), (283429, 549310005), (283429, 695567037), (283429, 695914374), (283429, 654093188), (283429, 652490083), (283429, 1157082497), (283429, 1399981608), (283429, 1402190633), (283429, 2886327653), (283429, 4190755807), (283429, 4194329473), (283429, 4200790959), (283429, 4204458339), (283429, 4206272332), (283429, 4206862755), (283429, 4215249761), (283429, 2889419075), (283429, 2896761969), (283429, 2911371579), (283429, 2914552420), (283429, 2916047563), (283429, 957062010), (283429, 734935200), (283429, 3173693858), (283429, 3175532695), (283429, 1522124357), (283429, 1523460241), (283429, 1528911699), (283429, 1529058807), (283429, 897799768), (283429, 898802791), (283429, 4155624346), (283429, 4155148108), (283429, 4159769626), (283429, 4162755704), (283429, 4176942076), (283429, 1371282786), (283429, 1418982615), (283429, 1421516753), (283429, 1943542253), (283429, 1948627460), (283429, 1954787433), (283429, 2761394969), (283429, 2762686314), (283429, 2769748038), (283429, 2777190725), (283429, 2782265861), (283429, 2785600722), (283429, 2784289792), (283429, 2789001055), (283429, 3121953603), (283429, 3132074200), (283429, 3193668384), (283429, 1166414802), (283429, 1169639766), (283429, 1188221585), (283608, 230783744), (283608, 239120681), (283608, 244556602), (283608, 245127400), (283608, 254812251), (283608, 260653310), (283608, 263593060), (283608, 509147330), (283608, 513195901), (283608, 512519793), (283608, 512920303), (283608, 440327782), (283608, 442097325), (283608, 503332057), (283608, 506002791), (283608, 519204763), (283608, 526172034), (283608, 526906545), (283608, 526309772), (283608, 531087861), (283608, 531327937), (283608, 86694374), (283608, 139624232), (283608, 142637908), (283608, 143402327), (283608, 156079832), (283608, 91017438), (283608, 97869609), (283608, 7998489), (283608, 12545393), (283608, 20408461), (283608, 353533622), (283608, 358208870), (283608, 330302665), (283608, 351007207), (283608, 294067137), (283608, 308433261), (283608, 313174940), (283608, 200218740), (283608, 179229333), (283608, 180751046), (283608, 197792416), (283608, 205988942), (283608, 445070852), (283608, 453810671), (283608, 459220233), (283608, 458220275), (283608, 464005501), (283608, 465958375), (283608, 39049180), (283608, 432052906), (283608, 437520149), (283608, 368252592), (283608, 369502190), (283608, 375358455), (283608, 375223072), (283608, 390435260), (283608, 393478393), (283608, 400421189), (283608, 267903407), (283608, 282507624), (283608, 279479526), (283608, 286907351), (283608, 287740302), (283608, 57071810), (283608, 64244341), (283780, 2389418545), (283780, 28009081), (283780, 191658792), (283780, 194849381), (283780, 196520440), (283780, 1732702970), (283780, 1735762915), (283780, 1738639519), (283780, 1738566216), (283780, 1741967934), (283780, 1750105019), (283780, 1754961006), (283780, 2473543519), (283780, 2473238267), (283780, 2475920584), (283780, 2480374821), (283780, 2488887403), (283780, 2492904095), (283780, 1980444067), (283780, 2001285396), (283780, 666381247), (283780, 681726046), (283780, 870341786), (283780, 888241480), (283780, 890397823), (283780, 893810944), (283780, 897326713), (283780, 2592392602), (283780, 2593442590), (283780, 1475295752), (283780, 1490157740), (283780, 1766657750), (283780, 1767902629), (283780, 756541389), (283780, 2429751212), (283780, 2439695784), (283780, 2449299932), (283780, 1540374071), (283780, 1544802210), (283780, 1549059206), (283780, 1555537208), (283780, 1557739082), (283780, 1576574168), (283780, 87380767), (283780, 94421099), (283780, 94267745), (283780, 94013898), (283780, 93712366), (283780, 203593948), (283780, 200794822), (283780, 202143006), (283780, 200617064), (283780, 518499697), (283780, 523768529), (283780, 527229904), (283780, 539121182), (283780, 550748883), (283780, 101195958), (283780, 101114770), (283780, 113006728), (283780, 118639609), (283780, 119785217), (283780, 66498980), (283780, 178345882), (283780, 183485709), (283780, 188512535), (283780, 188231490), (283780, 192173081), (283780, 267637627), (283780, 268589354), (283780, 274706595), (283780, 909703008), (283780, 915453821), (283780, 916106931), (283780, 925637478), (283780, 927148118), (283780, 2559556325), (283780, 2560941638), (283780, 2564836329), (283780, 2569654623), (283780, 2577886435), (283780, 2580783140), (283780, 2585614566), (283780, 683605023), (283780, 690324781), (283780, 693584166), (283780, 693798728), (283780, 704970432), (283780, 712078159), (283780, 462491199), (283780, 466406477), (283780, 2060908403), (283780, 2065311306), (283780, 2064701836), (283780, 2065116793), (283780, 2066788725), (283780, 2074812482), (283780, 2078130199), (283780, 1798676518), (283780, 1803046616), (283780, 1806081477), (283780, 1810961794), (283780, 2081946655), (283780, 2085798792), (283780, 2086252833), (283780, 2089007488), (283780, 2105972603), (283780, 335850785), (283780, 339057435), (283780, 362461147), (283780, 1159189132), (283780, 1174241368), (283780, 2640124660), (283780, 2656177358), (283780, 1307206757), (283780, 1319035095), (283780, 1324452253), (283780, 1328281889), (283780, 1813885580), (283780, 1813087153), (283780, 1816847846), (283780, 1817770651), (283780, 1827150122), (283780, 1832411756), (283780, 1833135460), (283780, 1838248947), (283780, 2227986045), (283780, 2325080513), (283780, 2332034094), (283780, 2342562554), (283780, 2345096226), (283780, 1261531439), (283780, 1262267161), (283780, 1273815327), (283780, 1278486261), (283780, 624842914), (283780, 625806004), (283780, 1210657936), (283780, 1215226405), (283780, 1682158759), (283780, 778636133), (283780, 787952516), (283780, 794582438), (283780, 797603977), (283780, 800125939), (283780, 801178696), (283780, 70339459), (283780, 72918714), (283780, 81177742), (283780, 947703349), (283780, 944533894), (283780, 947775060), (283780, 1949173296), (283780, 1970982743), (283780, 2016113982), (283780, 2020137235), (283780, 1443173386), (283780, 1441467169), (283780, 1446104021), (283780, 1465269725), (283780, 980624575), (283780, 167077117), (283780, 167942542), (283780, 170778703), (283780, 174821602), (283780, 175411168), (283780, 423543200), (283780, 125366642), (283780, 131626974), (283780, 130830560), (283780, 138180340), (283780, 137367979), (283780, 150694550), (283780, 153786298), (283780, 2512586540), (283780, 2524472090), (283780, 2527868926), (283780, 2535640341), (283780, 2540419530), (283780, 2541213497), (283780, 2011896347), (283780, 2167833401), (283780, 2177677325), (283780, 2177571279), (283780, 2177777889), (283780, 294112986), (283780, 296777171), (283780, 309087957), (283780, 321578367), (283780, 1551516628), (283780, 1184485916), (283780, 1187992259), (283780, 1196136542), (283780, 1201973266), (283780, 1201865724), (283780, 1201652453), (283780, 1204194690), (283780, 366288685), (283780, 371749209), (283780, 375025974), (283780, 1893398603), (283780, 1906300657), (283780, 2131634042), (283780, 2130601760), (283780, 1723482573), (283780, 278900477), (283780, 276772331), (283780, 278375880), (283780, 278598264), (283780, 277804952), (283780, 284895231), (283780, 1349601584), (283780, 1917417743), (283780, 1922090608), (283780, 1934009008), (283780, 1937945821), (283780, 713280368), (283780, 710652837), (283780, 712073305), (283780, 711925887), (283780, 716176501), (283780, 640444013), (283780, 641566258), (283780, 656692670), (283780, 657959463), (283780, 1096977121), (283780, 959120376), (283780, 963191151), (283780, 974035270), (283780, 2136852538), (283780, 2137232889), (283780, 2139344055), (283780, 2149883111), (283780, 2150701838), (283780, 2155749019), (283780, 2157986043), (283780, 2157803510), (283780, 2161916971), (283780, 2181816970), (283780, 1147340365), (283780, 2555328674), (283780, 214925692), (283780, 223394056), (283780, 228985953), (283780, 231734345), (283780, 433996420), (283780, 441772719), (283780, 2506326511), (283780, 2504372931), (283780, 2505965436), (283780, 2611794178), (283780, 2610209177), (283780, 2610224800), (283780, 2613386559), (283780, 2627639784), (283780, 2628918998), (283780, 242193950), (283780, 245617995), (283780, 1676712722), (283780, 1681959398), (283780, 2198292342), (283780, 2199122076), (283780, 2203598539), (283780, 2214621793), (283780, 2216512407), (283780, 2217276294), (283780, 1337563838), (283780, 1344795319), (283780, 1592639869), (283780, 1598505674), (283780, 1626606125), (283780, 1632334217), (283780, 1636690402), (283780, 1644280110), (283780, 840059628), (283780, 837957595), (283780, 847287470), (283780, 850167259), (283780, 862347651), (283780, 1124607559), (283780, 40703269), (283780, 42144692), (283780, 47064959), (283780, 58802565), (283780, 1000820332), (283780, 1005507327), (283780, 1022012948), (283780, 2030214240), (283780, 2032921083), (283780, 2031141562), (283780, 2034390837), (283780, 2043384183), (283780, 2260271400), (283780, 2263863548), (283780, 2265385358), (283780, 2267194299), (283780, 2275651235), (283780, 1511697999), (283780, 1516395116), (283780, 1514350463), (283780, 1516077804), (283780, 1516705249), (283780, 1525092040), (283780, 471603232), (283780, 476536608), (283780, 478746421), (283780, 480245180), (283780, 489490534), (283780, 1392487382), (283780, 1391001400), (283780, 1421206703), (283780, 1418910954), (283780, 816902186), (283780, 819762850), (283780, 929733252), (283780, 1032048497), (283780, 1030836837), (283780, 1033851455), (283780, 1039767810), (283780, 1428638986), (283780, 1430539731), (283780, 1433719557), (283780, 1867185570), (283780, 1881959481), (283780, 1885858424), (283780, 587840111), (283780, 594571853), (283780, 555628283), (283780, 557704755), (283780, 559757094), (283780, 559443685), (283780, 560485210), (283780, 565472909), (283780, 566390509), (283780, 570652920), (283780, 573791047), (283780, 575706251), (283780, 582163072), (283780, 2611963), (283780, 11621285), (283780, 19923734), (283780, 20256596), (283780, 1692454048), (283780, 1695134225), (283780, 1711084634), (283780, 2116353620), (283780, 2115408099), (283780, 2233994159), (283780, 1231802205), (283780, 1233779000), (283780, 1236898248), (283780, 1241120162), (283780, 1248855254), (283780, 1248866990), (283780, 1248967062), (283780, 1252879432), (283780, 1254543462), (283780, 1284687687), (283780, 1295453648), (283780, 1454180886), (283780, 1454542896), (283780, 393485075), (283780, 404971466), (283780, 412873908), (283780, 2279327546), (283780, 2283223237), (283780, 2291565405), (283780, 2296369487), (283780, 2304991561), (283780, 2689449856), (283780, 2705644699), (283780, 499926895), (283780, 496867991), (283780, 502360914), (283780, 500911892), (283780, 504619674), (283780, 509026410), (283780, 721694409), (283780, 722228482), (283780, 730763053), (283780, 730407119), (283780, 733067966), (283780, 735734366), (283780, 754309425), (283780, 2347958665), (283780, 2350581063), (283780, 2351638644), (283780, 2362030202), (283780, 2414096269), (283780, 1050821159), (283780, 1070263713), (283780, 1067610995), (283780, 1071037144), (284006, 547467726), (284006, 551678576), (284006, 562474153), (284006, 482550001), (284006, 490335078), (284006, 490380894), (284006, 388693677), (284006, 392481712), (284006, 221470687), (284006, 224004348), (284006, 223182147), (284006, 294049599), (284006, 297777910), (284006, 325269803), (284006, 333315135), (284006, 334464904), (284006, 336685123), (284006, 337517456), (284006, 350995421), (284006, 354386329), (284006, 367319026), (284006, 373431697), (284006, 439628616), (284006, 440826245), (284006, 287486456), (284006, 87053704), (284006, 89564068), (284006, 31423737), (284006, 82541878), (284006, 193712914), (284006, 206720357), (284006, 402174009), (284006, 405852427), (284006, 454568805), (284006, 459900774), (284006, 472992658), (284006, 227729968), (284006, 245664248), (284006, 246780181), (284006, 129348968), (284006, 262994884), (284006, 268278540), (284006, 272426846), (284006, 273884444), (284006, 275749711), (284006, 285142502), (284006, 101949741), (284006, 112817621), (284006, 113703124), (284006, 115957948), (284006, 123558845), (284006, 416212700), (284006, 419612781), (284006, 420537648), (284006, 429008488), (284006, 431237040), (284006, 438671941), (284006, 572128834), (284006, 138975822), (284006, 151464467), (284006, 153547703), (284006, 255011554), (284006, 301449277), (284006, 304466281), (284006, 309018135), (284006, 312361133), (284006, 323905136), (284006, 327109167), (284006, 2507151), (284006, 8951810), (284006, 19745678), (284006, 16718185), (284006, 404857501), (284006, 524854343), (284006, 524941222), (284006, 529811290), (284006, 530631320), (284006, 539109071), (284006, 509183751), (284006, 517428436), (284006, 517163850), (284006, 518717918), (284006, 519646797), (284006, 519921691), (284006, 69879289), (284006, 38259632), (284006, 44562677), (284006, 42498766), (284006, 47992703), (284006, 164165371), (284154, 118872765), (284154, 176033671), (284154, 184498941), (284154, 194771443), (284154, 89448633), (284154, 90793231), (284154, 93561245), (284154, 95065424), (284154, 102194480), (284154, 111600155), (284154, 112664111), (284154, 204961698), (284154, 122551501), (284154, 10738450), (284154, 13391783), (284154, 21136264), (284154, 22166811), (284154, 24148803), (284154, 33512236), (284154, 35596347), (284154, 55499495), (284154, 62796697), (284154, 70056781), (284154, 73333358), (284154, 157090375), (284154, 161570733), (284154, 80410022), (284213, 2606549963), (284213, 2276654185), (284213, 2277706332), (284213, 2286971971), (284213, 2295547574), (284213, 2302765330), (284213, 2306642894), (284213, 2308651219), (284213, 2306812235), (284213, 3485630881), (284213, 3488042797), (284213, 3488473902), (284213, 3496552410), (284213, 3497015333), (284213, 161366075), (284213, 169333189), (284213, 177711062), (284213, 176660591), (284213, 176462288), (284213, 183551120), (284213, 775356331), (284213, 1638401664), (284213, 1638239326), (284213, 1642948162), (284213, 1770110875), (284213, 756486209), (284213, 755944412), (284213, 197457357), (284213, 201242364), (284213, 209829421), (284213, 211954641), (284213, 217331043), (284213, 816562833), (284213, 817245216), (284213, 825591829), (284213, 829317684), (284213, 833765414), (284213, 2271290498), (284213, 2273679633), (284213, 2336497150), (284213, 2358777375), (284213, 431235053), (284213, 430445619), (284213, 435764435), (284213, 444119788), (284213, 3236401728), (284213, 3258893429), (284213, 2770340214), (284213, 2775857500), (284213, 1450535116), (284213, 1453273502), (284213, 1457713244), (284213, 1471968761), (284213, 456287316), (284213, 461086024), (284213, 2260188263), (284213, 1216797577), (284213, 1225019345), (284213, 2110975544), (284213, 224202608), (284213, 228528965), (284213, 234267578), (284213, 243892848), (284213, 1585778210), (284213, 1588032339), (284213, 1594221239), (284213, 1595725922), (284213, 1596725322), (284213, 1597926091), (284213, 1604140042), (284213, 1609071327), (284213, 1610967920), (284213, 3139326081), (284213, 3155376172), (284213, 1022918607), (284213, 1025812928), (284213, 1029213266), (284213, 1028629248), (284213, 1031297703), (284213, 1048455982), (284213, 1048308565), (284213, 1047110291), (284213, 1801074890), (284213, 1354669192), (284213, 739568956), (284213, 736444338), (284213, 740441336), (284213, 9950375), (284213, 686410117), (284213, 687929212), (284213, 685471606), (284213, 695479982), (284213, 695532799), (284213, 698080792), (284213, 698415354), (284213, 701584122), (284213, 1345672615), (284213, 1344029112), (284213, 1234617838), (284213, 1240343170), (284213, 1245626229), (284213, 1251812467), (284213, 1258927258), (284213, 1261343971), (284213, 1262138938), (284213, 554874455), (284213, 566210271), (284213, 565987259), (284213, 566592442), (284213, 775495685), (284213, 778732256), (284213, 641074443), (284213, 1853502392), (284213, 1879639644), (284213, 1894007530), (284213, 3271279683), (284213, 3269925104), (284213, 3273185788), (284213, 1121569975), (284213, 1128287072), (284213, 1132110496), (284213, 1313825574), (284213, 3501517600), (284213, 1910966591), (284213, 2123721424), (284213, 2135842288), (284213, 2137791888), (284213, 96085946), (284213, 93968203), (284213, 99021698), (284213, 103830977), (284213, 121958939), (284213, 2720583567), (284213, 2730905826), (284213, 2729906588), (284213, 2731258883), (284213, 25276021), (284213, 30417830), (284213, 1081666837), (284213, 1084979045), (284213, 1085685073), (284213, 1085096455), (284213, 1087157447), (284213, 1094923389), (284213, 1097144130), (284213, 1101010024), (284213, 1104889370), (284213, 1534056902), (284213, 1550024149), (284213, 1558894621), (284213, 1698641955), (284213, 1697681182), (284213, 1716250135), (284213, 1718925344), (284213, 3312227123), (284213, 1738931975), (284213, 1749326068), (284213, 1749676909), (284213, 1757705807), (284213, 67410408), (284213, 70630496), (284213, 79710282), (284213, 88454298), (284213, 91407137), (284213, 3432368048), (284213, 3433851309), (284213, 3444665554), (284213, 3463460830), (284213, 2065843643), (284213, 2069615288), (284213, 3186691218), (284213, 3188244614), (284213, 3190335306), (284213, 3200464265), (284213, 2175372848), (284213, 2175610165), (284213, 2181108142), (284213, 2183068865), (284213, 384981185), (284213, 387234161), (284213, 390564195), (284213, 2793097905), (284213, 2799730338), (284213, 2801711746), (284213, 2799754430), (284213, 786171537), (284213, 786772490), (284213, 793695698), (284213, 710863241), (284213, 718531316), (284213, 722559334), (284213, 726712477), (284213, 353496124), (284213, 359697195), (284213, 365980010), (284213, 364977299), (284213, 366390662), (284213, 369775249), (284213, 371705696), (284213, 371487930), (284213, 1300673862), (284213, 1302920029), (284213, 1305115410), (284213, 1308070884), (284213, 2612523651), (284213, 1672767284), (284213, 1674106771), (284213, 1678919907), (284213, 1735662568), (284213, 1736007654), (284213, 2039327191), (284213, 468287250), (284213, 476467816), (284213, 481115908), (284213, 481876228), (284213, 482867313), (284213, 996700729), (284213, 1001851002), (284213, 1983583940), (284213, 3357123421), (284213, 3362172364), (284213, 3370054303), (284213, 3373779500), (284213, 3391707702), (284213, 2999361153), (284213, 3005816400), (284213, 3010025478), (284213, 3017691907), (284213, 3024846380), (284213, 3025810159), (284213, 1207916736), (284213, 1210734874), (284213, 1211754435), (284213, 1224664176), (284213, 1226199720), (284213, 1504789272), (284213, 2877522955), (284213, 2878097645), (284213, 2892618455), (284213, 2898979796), (284213, 2899684644), (284213, 2902315954), (284213, 2903169247), (284213, 42622525), (284213, 56875864), (284213, 39584793), (284213, 1511479390), (284213, 1510741119), (284213, 1513295575), (284213, 1517043476), (284213, 1814691648), (284213, 1831719074), (284213, 1837360057), (284213, 1840844655), (284213, 1766707786), (284213, 902989701), (284213, 903139394), (284213, 912954696), (284213, 282412784), (284213, 293917263), (284213, 2586927043), (284213, 2594588885), (284213, 2598125179), (284213, 305547779), (284213, 307647315), (284213, 310341155), (284213, 308399028), (284213, 315763570), (284213, 2843480046), (284213, 2848725654), (284213, 1899466452), (284213, 1931630267), (284213, 1939721032), (284213, 2386668945), (284213, 2391680804), (284213, 2413422871), (284213, 2464548470), (284213, 2465838953), (284213, 2470837500), (284213, 3103992386), (284213, 3108707150), (284213, 3109338684), (284213, 3111344203), (284213, 3113559447), (284213, 3113585460), (284213, 3115969872), (284213, 1730411716), (284213, 934560603), (284213, 934839849), (284213, 2905006637), (284213, 798220406), (284213, 800561272), (284213, 803956925), (284213, 806281954), (284213, 2191434612), (284213, 2203582262), (284213, 2206933352), (284213, 2215721478), (284213, 2696622867), (284213, 2711396820), (284213, 647077947), (284213, 653774603), (284213, 655316990), (284213, 656210261), (284213, 666696055), (284213, 665528855), (284213, 1425091763), (284213, 1427010267), (284213, 1436816986), (284213, 1436797622), (284213, 1448274506), (284213, 2317049073), (284213, 2316554442), (284213, 2316924858), (284213, 2567742438), (284213, 2567006163), (284213, 2568693926), (284213, 2573036291), (284213, 332578253), (284213, 334044542), (284213, 345433908), (284213, 349465433), (284213, 2235740668), (284213, 2244165631), (284213, 2647111137), (284213, 2650973235), (284213, 975868321), (284213, 981776138), (284213, 979674987), (284213, 981320944), (284213, 983595299), (284213, 984059739), (284213, 995080581), (284213, 625778886), (284213, 623866736), (284213, 625583464), (284213, 633268604), (284213, 1389739537), (284213, 1388553366), (284213, 1391019625), (284213, 1396718751), (284213, 1394760673), (284213, 1398610271), (284213, 1408709526), (284213, 500310924), (284213, 498205888), (284213, 574434814), (284213, 584855001), (284213, 1105987561), (284213, 1114648432), (284213, 1117405575), (284213, 2928015088), (284213, 2932139153), (284213, 2935288766), (284213, 2938112897), (284213, 2941744172), (284213, 2984159901), (284213, 2997606908), (284213, 501507395), (284213, 522353923), (284213, 524311113), (284213, 2086425481), (284213, 2094647486), (284213, 2380410384), (284213, 2388017732), (284213, 2390807157), (284213, 2392572796), (284213, 2397448856), (284213, 2402817219), (284213, 672684760), (284213, 674422456), (284213, 675705732), (284213, 1166864542), (284213, 1168384105), (284213, 1172616222), (284213, 1177053841), (284213, 2857704267), (284213, 2860156392), (284213, 3133868033), (284213, 842912415), (284213, 845729824), (284213, 847735869), (284213, 848131180), (284213, 851221300), (284213, 848892871), (284213, 862737896), (284213, 862373344), (284213, 867108788), (284213, 866900082), (284213, 399733055), (284213, 401023824), (284213, 403759791), (284213, 419429605), (284213, 879029316), (284213, 880653112), (284213, 964712207), (284213, 963464908), (284213, 965402442), (284213, 2666532800), (284213, 2675664909), (284213, 2956618577), (284213, 2956096229), (284213, 2957230547), (284213, 2978196333), (284213, 2982848406), (284213, 2987711258), (284213, 1056790181), (284213, 1064798193), (284213, 1068344400), (284213, 1072086543), (284213, 1479048429), (284213, 1481912426), (284213, 1486627824), (284213, 1491003737), (284213, 3298940250), (284213, 3305100658), (284213, 3304874012), (284213, 257138038), (284213, 269380629), (284213, 269447122), (284213, 2451735455), (284213, 2453370443), (284213, 2454781871), (284213, 2459004425), (284213, 2461094050), (284213, 2461354873), (284213, 1991806967), (284213, 1992493177), (284213, 1997982451), (284213, 2017590410), (284213, 1961056397), (284213, 2030673698), (284213, 2235771176), (284213, 534892205), (284213, 535496537), (284213, 532721516), (284213, 542074990), (284213, 541216907), (284213, 2139219001), (284213, 2140697723), (284213, 2152611294), (284213, 2155071486), (284213, 3071435983), (284213, 3073026980), (284213, 3075073338), (284213, 3079557207), (284213, 3096852034), (284213, 591796204), (284213, 602052293), (284213, 614017823), (284213, 2523653102), (284213, 2525756416), (284213, 2534316767), (284213, 1274953341), (284213, 1280769001), (284213, 2732339188), (284213, 2736832576), (284213, 2740906500), (284213, 2749247061), (284213, 2757394890), (284213, 2759989486), (284213, 2761843277), (284213, 151478930), (284213, 148062450), (284213, 151967530), (284213, 3201855770), (284213, 3202886134), (284213, 3206581251), (284213, 3209039845), (284213, 1332296226), (284213, 189927044), (284213, 1161319334), (284213, 1149974756), (284213, 1565266922), (284213, 1483389682), (284213, 1488539374), (284213, 2268288138), (284213, 2350713619), (284213, 2359810706), (284213, 2372213644), (284213, 1656560630), (284213, 919374493), (284213, 922927368), (284213, 3029701978), (284213, 3052338941), (284213, 137377857), (284213, 141026521), (284213, 2415574441), (284213, 2420218534), (284213, 2418552965), (284213, 2420025714), (284213, 2422775870), (284213, 2428675502), (284213, 2430308838), (284213, 2438740898), (284213, 2504297820), (284213, 2503211326), (284213, 2506610545), (284213, 2605055627), (284213, 2612396396), (284213, 2621904503), (284213, 3394543455), (284213, 3409964405), (284213, 3411589506), (284213, 3418729672), (284213, 2224899284), (284213, 2231689989), (284213, 1848894038), (284213, 1852114871), (284213, 2131863387), (284285, 33636635), (284285, 38918853), (284285, 207492014), (284285, 211105414), (284285, 209106001), (284285, 3143395864), (284285, 3145473019), (284285, 3142672197), (284285, 3155672659), (284285, 3159725898), (284285, 3176674767), (284285, 289970618), (284285, 293436195), (284285, 295551209), (284285, 301354985), (284285, 2035802185), (284285, 2040048200), (284285, 2041046794), (284285, 2043145379), (284285, 3297108619), (284285, 3303926356), (284285, 2274703655), (284285, 2277048543), (284285, 1055039111), (284285, 1060993406), (284285, 1064710980), (284285, 1634400284), (284285, 1318769950), (284285, 1323925394), (284285, 1496090057), (284285, 1499018814), (284285, 1502656421), (284285, 1507985474), (284285, 2088236582), (284285, 2391859388), (284285, 2528689805), (284285, 2531981691), (284285, 965426172), (284285, 985220014), (284285, 982609611), (284285, 1975185812), (284285, 1981802885), (284285, 1981728817), (284285, 1988449684), (284285, 1336050263), (284285, 1341048289), (284285, 1342572231), (284285, 1346029309), (284285, 1347730150), (284285, 1352460232), (284285, 1356522892), (284285, 1360273610), (284285, 2319781514), (284285, 2339487592), (284285, 2347412184), (284285, 499284505), (284285, 511307700), (284285, 511659385), (284285, 515075587), (284285, 518058934), (284285, 520115069), (284285, 4427480685), (284285, 4427214569), (284285, 4425194545), (284285, 4431674790), (284285, 994260527), (284285, 1368910955), (284285, 1367175833), (284285, 1374033876), (284285, 1386606346), (284285, 1384656211), (284285, 1388721050), (284285, 2988973121), (284285, 3539747618), (284285, 3539948481), (284285, 3543847957), (284285, 3549235811), (284285, 3557730189), (284285, 3561061238), (284285, 3562357872), (284285, 3736526628), (284285, 3899225877), (284285, 999722262), (284285, 999639892), (284285, 1004143263), (284285, 1008291274), (284285, 1009068788), (284285, 1014251719), (284285, 1018751664), (284285, 3851092389), (284285, 3873535558), (284285, 878678881), (284285, 877534158), (284285, 1112401192), (284285, 1113847945), (284285, 1119980367), (284285, 1119739228), (284285, 1213485460), (284285, 1212962367), (284285, 1209893812), (284285, 1210513185), (284285, 1667135505), (284285, 1677575261), (284285, 1678529787), (284285, 1679020084), (284285, 1680126507), (284285, 1682568392), (284285, 4313186893), (284285, 4313573020), (284285, 4334181927), (284285, 4343598423), (284285, 4343111497), (284285, 2475734564), (284285, 2481757675), (284285, 2488125156), (284285, 2915221137), (284285, 738665916), (284285, 741982827), (284285, 746218586), (284285, 752141300), (284285, 749366728), (284285, 3498515680), (284285, 3501962006), (284285, 3509413595), (284285, 3513463997), (284285, 3521214100), (284285, 3523923789), (284285, 3527148776), (284285, 3529424154), (284285, 4522870758), (284285, 4530531752), (284285, 4531286513), (284285, 4532704105), (284285, 4535318163), (284285, 3096931846), (284285, 3109674767), (284285, 3118643771), (284285, 3120852711), (284285, 3123163858), (284285, 318037786), (284285, 1791752), (284285, 6631312), (284285, 20343623), (284285, 24914142), (284285, 23817893), (284285, 29496117), (284285, 337960251), (284285, 339777781), (284285, 345955525), (284285, 3264329230), (284285, 3277039668), (284285, 3280522094), (284285, 3288572213), (284285, 3285459952), (284285, 3289974173), (284285, 2699486820), (284285, 2706709718), (284285, 2708450023), (284285, 2715022648), (284285, 2717134080), (284285, 2726881985), (284285, 2729471569), (284285, 2738134601), (284285, 569151765), (284285, 580055061), (284285, 589659059), (284285, 591731538), (284285, 3764654213), (284285, 3766633368), (284285, 3767776533), (284285, 3769891373), (284285, 3784015485), (284285, 3788803651), (284285, 3447301163), (284285, 3447748620), (284285, 3452792303), (284285, 3455822623), (284285, 1408782805), (284285, 1423828443), (284285, 1424526754), (284285, 1431683050), (284285, 1431554252), (284285, 1433526949), (284285, 1433966573), (284285, 1434837632), (284285, 3914706362), (284285, 3916728508), (284285, 2007264489), (284285, 2005942665), (284285, 2009769254), (284285, 2013570114), (284285, 2018725197), (284285, 2020547109), (284285, 2021933564), (284285, 2030266599), (284285, 2032450362), (284285, 263409022), (284285, 264805595), (284285, 1132984363), (284285, 1141354309), (284285, 2403181236), (284285, 2410061994), (284285, 2410581343), (284285, 2420440861), (284285, 2426118246), (284285, 2424641838), (284285, 2426852503), (284285, 2814178068), (284285, 2818715882), (284285, 2832045213), (284285, 2838340009), (284285, 2842810245), (284285, 2064669890), (284285, 2062241295), (284285, 2075547338), (284285, 2078554501), (284285, 472356237), (284285, 469880658), (284285, 471529263), (284285, 477279259), (284285, 479120967), (284285, 493123521), (284285, 494394252), (284285, 267986317), (284285, 276563131), (284285, 278691898), (284285, 1027481328), (284285, 1033005308), (284285, 1042589452), (284285, 1044480023), (284285, 1049475782), (284285, 958584594), (284285, 1064510129), (284285, 1074940088), (284285, 1075860391), (284285, 1077647874), (284285, 1080733737), (284285, 1082844284), (284285, 1083090494), (284285, 1084306108), (284285, 1880842442), (284285, 1933228445), (284285, 2447083686), (284285, 2447550855), (284285, 2451578843), (284285, 2448134399), (284285, 2449062459), (284285, 2467807740), (284285, 2467737635), (284285, 1277564030), (284285, 1281031825), (284285, 1279591708), (284285, 1283322289), (284285, 1280885026), (284285, 81715919), (284285, 89073466), (284285, 93300422), (284285, 98318393), (284285, 107274046), (284285, 108976283), (284285, 3664835635), (284285, 3992966842), (284285, 4011081818), (284285, 1514233299), (284285, 1517779743), (284285, 3888472645), (284285, 3888601315), (284285, 3891832409), (284285, 3894775501), (284285, 3894216640), (284285, 1481162541), (284285, 1481920076), (284285, 1482835779), (284285, 2677519370), (284285, 2685378112), (284285, 653960435), (284285, 652177471), (284285, 663054336), (284285, 662844404), (284285, 666231330), (284285, 666468179), (284285, 927160095), (284285, 927497797), (284285, 930770716), (284285, 940680339), (284285, 940120878), (284285, 1804778257), (284285, 1846269012), (284285, 1852121785), (284285, 1859822692), (284285, 2428680540), (284285, 2432059909), (284285, 2432274807), (284285, 2433676724), (284285, 2436907400), (284285, 114227165), (284285, 118813100), (284285, 119854869), (284285, 1236941725), (284285, 1244353619), (284285, 1247194558), (284285, 3799454738), (284285, 3804615423), (284285, 4046609616), (284285, 142479400), (284285, 145283521), (284285, 642376419), (284285, 638295840), (284285, 643955605), (284285, 4344292495), (284285, 4356839593), (284285, 4354445572), (284285, 4358443170), (284285, 4369908750), (284285, 3938661551), (284285, 3939715319), (284285, 71548953), (284285, 74549569), (284285, 880103889), (284285, 881303288), (284285, 905825136), (284285, 904061103), (284285, 3670175691), (284285, 3696469718), (284285, 2172562332), (284285, 2175297375), (284285, 179001330), (284285, 445793581), (284285, 466272300), (284285, 3715772524), (284285, 3719852500), (284285, 3733180613), (284285, 1088508975), (284285, 1145467198), (284285, 1151266404), (284285, 1808427330), (284285, 1809710763), (284285, 1812320841), (284285, 1820820115), (284285, 2095007346), (284285, 2104592507), (284285, 2103855408), (284285, 2108306080), (284285, 2109271786), (284285, 2117857285), (284285, 848447837), (284285, 856174467), (284285, 860936750), (284285, 857166302), (284285, 867527628), (284285, 789101954), (284285, 793344912), (284285, 826501817), (284285, 830422228), (284285, 2354565969), (284285, 2364296788), (284285, 2365005382), (284285, 2368317937), (284285, 2367116792), (284285, 2380688017), (284285, 2386424498), (284285, 3987338150), (284285, 3985471723), (284285, 1732140134), (284285, 1737964909), (284285, 1737269125), (284285, 2763584811), (284285, 2761699162), (284285, 2787649561), (284285, 2783757993), (284285, 221375462), (284285, 228010991), (284285, 227997239), (284285, 232023015), (284285, 237258038), (284285, 1202552334), (284285, 1205558747), (284285, 2863500526), (284285, 3189979761), (284285, 3576944315), (284285, 3582787808), (284285, 49327304), (284285, 51966999), (284285, 50991772), (284285, 56769031), (284285, 3128601358), (284285, 3473856416), (284285, 3485469945), (284285, 3488494086), (284285, 3491189660), (284285, 1303104112), (284285, 1317064589), (284285, 4476425860), (284285, 4476635023), (284285, 4474642035), (284285, 531286244), (284285, 531171042), (284285, 533538576), (284285, 2349726439), (284285, 598172167), (284285, 1590053392), (284285, 4187413855), (284285, 4187515076), (284285, 4199055247), (284285, 4205918535), (284285, 4209481820), (284285, 4210250607), (284285, 4212741169), (284285, 3218558722), (284285, 3220173293), (284285, 3234664471), (284285, 124890803), (284285, 128593653), (284285, 134192443), (284285, 4062671970), (284285, 4064068763), (284285, 4067239530), (284285, 4065582707), (284285, 4074020680), (284285, 4083839685), (284285, 2947395090), (284285, 2951352243), (284285, 2966408513), (284285, 1526185387), (284285, 1536956181), (284285, 1540881221), (284285, 1547594968), (284285, 1546480615), (284285, 1554461844), (284285, 1553990579), (284285, 1558659666), (284285, 1181186845), (284285, 1188987304), (284285, 1194215486), (284285, 1192391174), (284285, 4541157492), (284285, 4542353894), (284285, 4545060420), (284285, 4088806780), (284285, 4094638019), (284285, 4098551678), (284285, 4113883459), (284285, 2793055639), (284285, 2798678607), (284285, 2798253493), (284285, 2799388220), (284285, 4506005222), (284285, 4515308092), (284285, 4031532173), (284285, 4033464554), (284285, 4036450349), (284285, 570528019), (284285, 725296237), (284285, 728397244), (284285, 733621346), (284285, 732625064), (284285, 3954497072), (284285, 3964109543), (284285, 3964040362), (284285, 3974321805), (284285, 2543325311), (284285, 2557821913), (284285, 2570083423), (284285, 2574513368), (284285, 2574530554), (284285, 2854765782), (284285, 2495023029), (284285, 2496415031), (284285, 2508346508), (284285, 1156903442), (284285, 1158609187), (284285, 1168769728), (284285, 1178084482), (284285, 1390833349), (284285, 1397271529), (284285, 4234350388), (284285, 4242975373), (284285, 4244107018), (284285, 4246759476), (284285, 4245155105), (284285, 4255872468), (284285, 4265483715), (284285, 359861273), (284285, 356807290), (284285, 363158730), (284285, 364679871), (284285, 374267876), (284285, 374964355), (284285, 617397162), (284285, 621443034), (284285, 628517435), (284285, 632096325), (284285, 629972737), (284285, 631561557), (284285, 1453646501), (284285, 1453394389), (284285, 1454912549), (284285, 1464433830), (284285, 1467713759), (284285, 1472607900), (284285, 1474612360), (284285, 3239890293), (284285, 3245823575), (284285, 3250254587), (284285, 3319498880), (284285, 3318885122), (284285, 4144723400), (284285, 4148293515), (284285, 4161924759), (284285, 4163402479), (284285, 4164596973), (284285, 4169621121), (284285, 428299462), (284285, 430849026), (284285, 434528389), (284285, 3017881115), (284285, 3025060409), (284285, 3036538705), (284285, 4438208984), (284285, 4445776145), (284285, 4454725285), (284285, 4465041007), (284285, 2627315119), (284285, 2632630668), (284285, 3086180553), (284285, 4130015795), (284285, 4129535537), (284285, 4132903868), (284285, 4131879802), (284285, 3586448737), (284285, 3585257593), (284285, 3591548434), (284285, 3597136432), (284285, 2181819357), (284285, 2189693645), (284285, 2190834704), (284285, 2200077542), (284285, 2205325284), (284285, 1695969550), (284285, 3702035888), (284285, 3702913333), (284285, 3703273081), (284285, 3708070573), (284285, 3640486603), (284285, 3645099634), (284285, 3648292247), (284285, 3649412794), (284285, 3653604567), (284285, 3657341809), (284285, 3655532747), (284285, 2919734105), (284285, 2929949555), (284285, 2930746508), (284285, 2289473863), (284285, 2296411633), (284285, 2299771376), (284285, 2309048269), (284285, 1636202918), (284285, 1645959396), (284285, 1654379098), (284285, 1653545117), (284285, 3334753510), (284285, 3338599243), (284285, 3341062871), (284285, 3357318236), (284285, 1705198184), (284285, 2660109036), (284285, 2660604168), (284285, 2667238044), (284285, 2668818992), (284285, 3840835079), (284285, 3846328622), (284285, 3849715392), (284285, 2123245760), (284285, 2123831256), (284285, 2123358944), (284285, 2127196523), (284285, 2156623210), (284285, 2160175496), (284285, 2162830462), (284285, 680997030), (284285, 1557374534), (284285, 1562463496), (284285, 2588034839), (284285, 4291645864), (284285, 4291586639), (284285, 4288910191), (284285, 4298147467), (284285, 4303792264), (284285, 2221482201), (284285, 2230410656), (284285, 2226912354), (284285, 2232618144), (284285, 2241745500), (284285, 1611628179), (284285, 1620847371), (284285, 1619594895), (284285, 1621232047), (284285, 1624832068), (284285, 1622288958), (284285, 1628767303), (284285, 715301923), (284285, 762673007), (284285, 779440973), (284285, 537343574), (284285, 551389400), (284285, 558474796), (284285, 2181476454), (284285, 3824979784), (284285, 3829749701), (284285, 3829602784), (284285, 3832534806), (284285, 3833791484), (284285, 3835217665), (284285, 3835225258), (284285, 2316264651), (284285, 2316472662), (284285, 2604542625), (284285, 2610252456), (284285, 1936070412), (284285, 1939557644), (284285, 1955132989), (284285, 1963769478), (284285, 1962334784), (284285, 1440446284), (284285, 1441631203), (284285, 1448795376), (284285, 1575105042), (284285, 1578912544), (284285, 1583614545), (284285, 1908544073), (284285, 1918862607), (284285, 384818546), (284285, 386612138), (284285, 386157439), (284285, 410934606), (284285, 3384359403), (284285, 3397459330), (284285, 1755542416), (284285, 1758367607), (284285, 1764209356), (284285, 3565184557), (284285, 3571149500), (284285, 3577533637), (284285, 3578623768), (284285, 1633497595), (284285, 1249638545), (284285, 1249132525), (284285, 1251279641), (284285, 1254052680), (284285, 1259588595), (284285, 2891059727), (284285, 1844160455), (284285, 1893945497), (284285, 1902215134), (284285, 1902818884), (284285, 1904485161), (284285, 1903669559), (284285, 806886478), (284285, 814075225), (284285, 815490484), (284285, 826280584), (284285, 828708533), (284285, 685859801), (284285, 695523491), (284285, 3418048170), (284285, 3416611686), (284285, 3417502152), (284285, 3424208656), (284285, 3425996629), (284285, 3432660137), (284285, 3437811780), (284285, 3442885413), (284285, 4225832291), (284285, 2988724606), (284285, 2992734704), (284285, 2991656108), (284285, 3000263065), (284285, 3000813723), (284285, 3012919644), (284285, 3016312492), (284285, 1774510750), (284285, 1778605508), (284285, 1793359632), (284285, 1791786552), (284285, 3042958985), (284285, 3055930105), (284285, 3062660960), (284285, 3065496828), (284420, 539128223), (284420, 545479469), (284420, 554820629), (284420, 824935127), (284420, 115520963), (284420, 124027725), (284420, 761830354), (284420, 770327522), (284420, 779142990), (284420, 221396615), (284420, 226580476), (284420, 567764851), (284420, 702751748), (284420, 703343056), (284420, 710168965), (284420, 710255179), (284420, 706581110), (284420, 714736907), (284420, 718659675), (284420, 266449051), (284420, 268086034), (284420, 269348598), (284420, 180119365), (284420, 181342878), (284420, 182761887), (284420, 188577848), (284420, 206984651), (284420, 341077336), (284420, 346105362), (284420, 349672357), (284420, 351569065), (284420, 356238344), (284420, 362163171), (284420, 74356679), (284420, 76099347), (284420, 83312403), (284420, 83549510), (284420, 84557546), (284420, 791437469), (284420, 39331445), (284420, 42695382), (284420, 44976026), (284420, 45790626), (284420, 49614502), (284420, 49913708), (284420, 311776749), (284420, 311292049), (284420, 602319153), (284420, 605042484), (284420, 610296169), (284420, 611554790), (284420, 615690924), (284420, 837034831), (284420, 683484639), (284420, 684036108), (284420, 688983914), (284420, 686839120), (284420, 689928610), (284420, 865769334), (284420, 869910303), (284420, 879893854), (284420, 1697303), (284420, 6260834), (284420, 19294636), (284420, 486072716), (284420, 491193335), (284420, 492555496), (284420, 497392958), (284420, 210336339), (284420, 211860757), (284420, 213688846), (284420, 422387882), (284420, 424041189), (284420, 719643516), (284420, 29425048), (284420, 92082036), (284420, 96739409), (284420, 97800624), (284420, 97337893), (284420, 452800622), (284420, 456406796), (284420, 461540870), (284420, 464421590), (284420, 466737474), (284420, 473645423), (284420, 574296094), (284420, 573242421), (284420, 574026493), (284420, 577617819), (284420, 582590925), (284420, 582808247), (284420, 584193170), (284420, 588006353), (284420, 584878719), (284420, 590089264), (284420, 591146042), (284420, 595655923), (284420, 593333270), (284420, 142650498), (284420, 154649468), (284420, 158288622), (284420, 159733046), (284420, 160386284), (284420, 162780228), (284420, 736792752), (284420, 753378631), (284420, 753299727), (284420, 756595628), (284420, 320666263), (284420, 320356077), (284420, 321392648), (284420, 795253705), (284420, 795308538), (284420, 801593761), (284420, 810351015), (284420, 812264259), (284420, 816635806), (284420, 134552400), (284420, 134358313), (284420, 136596608), (284420, 138899145), (284420, 400306445), (284420, 403975414), (284420, 63106344), (284420, 637133359), (284420, 640704129), (284420, 639383097), (284420, 638221644), (284420, 640443440), (284420, 649494235), (284420, 654370201), (284420, 660451521), (284420, 433674322), (284420, 444356967), (284420, 449700597), (284420, 446825156), (284420, 237606548), (284420, 625295020), (284420, 626138552), (284420, 631776751), (284420, 634025163), (284420, 858217350), (284420, 859103533), (284420, 864868915), (284420, 285596176), (284420, 286694903), (284420, 301330657), (284420, 302938873), (284420, 305858325), (284420, 697345733), (284420, 701365521), (284420, 504050941), (284420, 502874016), (284420, 507356339), (284420, 523579699), (284420, 372479898), (284420, 374838099), (284420, 379566261), (284420, 380545961), (284420, 250187950), (284427, 392505551), (284427, 395651523), (284427, 401558190), (284427, 406646309), (284427, 409731287), (284427, 413609670), (284427, 414395604), (284427, 230838287), (284427, 418597068), (284427, 425648311), (284427, 433407176), (284427, 436905648), (284427, 435526791), (284427, 438153275), (284427, 445512213), (284427, 275044163), (284427, 273829489), (284427, 323666982), (284427, 325959511), (284427, 329028621), (284427, 329744850), (284427, 333257718), (284427, 527991808), (284427, 529145325), (284427, 531064604), (284427, 168456998), (284427, 172993232), (284427, 172574594), (284427, 175001222), (284427, 192361040), (284427, 197284137), (284427, 166785118), (284427, 235561491), (284427, 238193036), (284427, 238993558), (284427, 243002439), (284427, 449041407), (284427, 87027154), (284427, 92532393), (284427, 62101100), (284427, 67110341), (284427, 299121380), (284427, 338106066), (284427, 492081093), (284427, 123543582), (284427, 127859101), (284427, 132636482), (284427, 135808177), (284427, 384003532), (284427, 485960543), (284427, 486543570), (284427, 354893417), (284427, 358945218), (284427, 368267679), (284427, 370030262), (284427, 370658075), (284427, 521025752), (284427, 522173165), (284427, 321510001), (284427, 40621793), (284427, 49529220), (284427, 48664553), (284427, 203369931), (284427, 218126342), (284427, 220250159), (284427, 221979185), (284427, 186240430), (284427, 184852511), (284427, 185054426), (284427, 20311217), (284427, 20174496), (284427, 28935019), (284427, 33942277), (284427, 11268392), (284427, 13096636), (284427, 18423084), (284427, 93163524), (284427, 107085366), (284427, 110646694), (284427, 115464096), (284427, 457748267), (284427, 459063076), (284427, 458448322), (284427, 465382096), (284427, 472063680), (284427, 473272866), (284427, 472105785), (284427, 477176977), (284427, 133380466), (284427, 145753675), (284427, 149946247), (284427, 152458404), (284427, 157132206), (284427, 247819894), (284427, 255323953), (284427, 261286872), (276262, 12241502), (276262, 13647343), (276262, 198181590), (276262, 255004128), (276262, 191476906), (276262, 366216946), (276262, 157951929), (276262, 219513416), (276262, 7160282), (276262, 126115945), (276262, 78609439), (276262, 108109797), (276262, 404124285), (276329, 67649584), (276329, 372178767), (276329, 246999417), (276329, 250386040), (276329, 133096046), (276329, 102349619), (276329, 260927287), (276329, 112387366), (276329, 115922962), (276329, 142650297), (276329, 71039435), (276329, 76160804), (276329, 277617312), (276329, 282573830), (276329, 19659640), (276329, 19075347), (276329, 138616006), (276329, 313784553), (276329, 181000569), (276329, 186351646), (276329, 187254326), (276329, 207602715), (276329, 242427871), (276329, 287238498), (276329, 411900298), (276329, 167534390), (276329, 98972081), (276329, 304550306), (276329, 201405515), (276329, 342398721), (276329, 310320039), (276336, 21273207), (276336, 6843552), (276336, 18040781), (276336, 18758716), (276336, 19385659), (276416, 143538017), (276416, 148159084), (276416, 124106650), (276416, 125792472), (276416, 113629388), (276416, 134005896), (276416, 65624569), (276416, 28043912), (276416, 35408791), (276416, 7612513), (276416, 92938525), (276511, 159344994), (276511, 227121168), (276511, 233743915), (276511, 248005016), (276511, 249844151), (276511, 79967862), (276511, 84849641), (276511, 219365115), (276511, 147446961), (276511, 174338302), (276511, 24260973), (276511, 32926183), (276511, 266426359), (276511, 181357786), (276511, 182858171), (276511, 183801762), (276511, 1183208), (276511, 4154561), (276511, 4735843), (276511, 95688892), (276511, 103283877), (276511, 132322634), (276511, 6477457), (276511, 5920544), (276511, 107156789), (276511, 110970816), (276511, 112398479), (276511, 125207371), (276511, 129332450), (276511, 74064515), (276511, 73769311), (276511, 198957977), (276511, 199282143), (276511, 257523172), (276689, 137109697), (276689, 143074596), (276689, 148879715), (276689, 23929472), (276689, 27292496), (276689, 42023947), (276689, 198530398), (276689, 201728804), (276689, 202903111), (276689, 206101041), (276689, 85069330), (276689, 89384650), (276689, 115425020), (276689, 117237937), (276689, 172727967), (276689, 215560663), (276689, 8167397), (276689, 9680864), (276689, 261453453), (276689, 263199154), (276689, 77815761), (276689, 98684383), (276689, 103129126), (276689, 108532720), (276689, 1156290), (276689, 2640029), (276689, 57290075), (276689, 59748649), (276689, 20420693), (276689, 49207872), (276689, 164401024), (276689, 170474206), (276689, 171359319), (276689, 186780139), (276689, 192011862), (276689, 193051077), (276778, 16041787), (276790, 11276967), (276790, 12110486), (276790, 52748416), (276790, 23078325), (276790, 22495017), (276790, 34538441), (276790, 37589269), (276952, 124070203), (276952, 205579598), (276952, 11888053), (276952, 41857703), (276952, 44242529), (276952, 147258878), (276952, 152814611), (276952, 69524185), (276952, 70773235), (276952, 83921840), (276952, 218433117), (276952, 221081946), (276952, 225867095), (276952, 225466398), (276952, 181078925), (276952, 20310337), (276952, 23744446), (276954, 14574690), (278880, 210318172), (278880, 602265022), (278880, 676792095), (278880, 689755707), (278880, 146778511), (278880, 148342250), (278880, 255538473), (278880, 256393458), (278880, 286576235), (278880, 70264671), (278880, 74174619), (278880, 81445605), (278880, 94801954), (278880, 164505578), (278880, 202139538), (278880, 291210636), (278880, 170499965), (278880, 174445448), (278880, 187835224), (278880, 187910379), (278880, 188228430), (278880, 558085589), (278880, 322668008), (278880, 326402710), (278880, 374369278), (278880, 376121296), (278880, 380385214), (278880, 129786175), (278880, 133038506), (278880, 585833415), (278880, 587265014), (278880, 593009820), (278880, 470197912), (278880, 438328550), (278880, 439565190), (278880, 118180964), (278880, 262270235), (278880, 265998789), (278880, 268630374), (278880, 269180081), (278880, 343397990), (278880, 351883614), (278880, 33685726), (278880, 36588872), (278880, 53513443), (278880, 702200008), (278880, 542587395), (278880, 708878720), (278880, 713175974), (278880, 230061545), (278880, 235385490), (278880, 235517755), (278880, 248583650), (278880, 416560385), (278880, 418053900), (278880, 460066094), (278880, 526379537), (278880, 529065042), (278880, 481414837), (278880, 482487092), (278880, 17985738), (278880, 23266001), (278880, 67423146), (278880, 68561247), (278880, 664807109), (278880, 613104986), (278880, 720200839), (278880, 433085407), (278912, 9325788), (278912, 24180006), (278912, 391830323), (278912, 393428345), (278912, 395672838), (278912, 398174556), (278912, 402368383), (278912, 402248151), (278912, 446740704), (278912, 247226791), (278912, 210164111), (278912, 174301934), (278912, 444778724), (278912, 452320099), (278912, 523727655), (278912, 127070976), (278912, 129230005), (278912, 130967009), (278912, 64417832), (278912, 330690799), (278912, 344532504), (278912, 351056473), (278912, 356562325), (278912, 425889292), (278912, 440821328), (278912, 247472369), (278912, 254465819), (278912, 258958314), (278912, 266113254), (278912, 268525890), (278912, 268869947), (278912, 270704153), (278912, 87571939), (278912, 509095340), (278912, 554264734), (278912, 154518859), (278912, 162475008), (278912, 165148177), (278912, 370087212), (278912, 373296021), (278912, 377909850), (278912, 275131369), (278912, 110561647), (278912, 115742166), (278912, 218423882), (278912, 46664935), (278912, 477148808), (278912, 487054716), (278968, 165182532), (278968, 90174946), (278968, 89956812), (278968, 101489709), (278968, 102767612), (278968, 115572316), (278968, 73571144), (278968, 76769497), (278968, 155339552), (278968, 44114170), (278968, 250824132), (278968, 218357057), (278968, 219828633), (278968, 143260590), (278968, 70324804), (278968, 71490596), (278968, 11649887), (278968, 173738447), (278968, 198894682), (278968, 3659739), (278968, 2329077), (278968, 120012398), (278968, 122865406), (278968, 127440137), (278970, 15845225), (278970, 15760301), (278970, 18356759), (278970, 22424983), (278970, 6132230), (279169, 943996713), (279169, 945083670), (279169, 633433430), (279169, 643462941), (279169, 520296143), (279169, 575857015), (279169, 595636736), (279169, 1469883743), (279169, 1495023079), (279169, 438293368), (279169, 439642378), (279169, 442226342), (279169, 194302338), (279169, 201262625), (279169, 214362147), (279169, 219305303), (279169, 219891400), (279169, 919112711), (279169, 275333897), (279169, 273252362), (279169, 279551154), (279169, 1402864338), (279169, 1401821825), (279169, 1530082412), (279169, 1541038448), (279169, 377875241), (279169, 384300248), (279169, 792841748), (279169, 1447900865), (279169, 1454385855), (279169, 1457631427), (279169, 1461591590), (279169, 612607030), (279169, 1031987980), (279169, 1563254647), (279169, 171512400), (279169, 178315806), (279169, 1103410929), (279169, 1109269936), (279169, 1118067608), (279169, 1502738552), (279169, 1506590293), (279169, 1510296981), (279169, 1211088344), (279169, 1211046418), (279169, 1227526456), (279169, 1231226864), (279169, 1240810263), (279169, 1626433282), (279169, 1644149115), (279169, 1651353222), (279169, 1652072980), (279169, 74878768), (279169, 74272943), (279169, 79981385), (279169, 98877310), (279169, 99460073), (279169, 887998446), (279169, 1312869297), (279169, 1314976476), (279169, 1362180102), (279169, 301744794), (279169, 307888886), (279169, 323690739), (279169, 1246287325), (279169, 1261465613), (279169, 1266924280), (279169, 987341454), (279169, 987577577), (279169, 988458822), (279169, 707648124), (279169, 707568505), (279169, 717681383), (279169, 723981578), (279169, 481962563), (279169, 487473644), (279169, 488883027), (279169, 492009472), (279169, 493588232), (279169, 495697730), (279169, 1600602838), (279169, 1601131811), (279169, 1620265042), (279169, 1052348336), (279169, 1055573472), (279169, 1063099189), (279169, 843802936), (279169, 845268121), (279169, 852984357), (279169, 861205000), (279169, 868808229), (279169, 898947734), (279169, 915126543), (279169, 393777873), (279169, 412778817), (279169, 834609284), (279169, 836143404), (279169, 840498834), (279169, 843015382), (279169, 337210178), (279169, 340406409), (279169, 343555274), (279169, 550545934), (279169, 555766315), (279169, 679173076), (279169, 680351387), (279169, 691777525), (279169, 691072555), (279169, 701892284), (279169, 292554193), (279169, 1408623093), (279169, 1425453083), (279169, 1434103497), (279169, 223326543), (279169, 1276286341), (279169, 1386275048), (279169, 764020905), (279169, 773224456), (279169, 775604446), (279169, 656640231), (279169, 670951445), (279169, 738857915), (279169, 746714708), (279169, 10495054), (279169, 14241626), (279169, 38752459), (279169, 42158648), (279169, 56057584), (279169, 62105065), (279169, 75106139), (279169, 104712796), (279169, 110649292), (279169, 1157924659), (279169, 1157392517), (279169, 1163371091), (279169, 1175355814), (279169, 1173940835), (279169, 1325159713), (279169, 964857934), (279169, 974587831), (279169, 981256056), (279169, 255320225), (279169, 1142754619), (279169, 20613346), (279169, 22695063), (279169, 22325424), (279169, 27853806), (279169, 27346911), (279169, 1585273614), (279169, 1593711986), (279169, 117668500), (279169, 129461531), (279169, 153607428), (279169, 157204853), (279169, 446801433), (279169, 455096017), (279169, 456322832), (279259, 7382766), (279259, 189538654), (279259, 102973716), (279259, 101874907), (279259, 132973056), (279259, 138363059), (279259, 80747505), (279259, 84429720), (279259, 85725926), (279259, 87470015), (279259, 109137471), (279259, 121163788), (279259, 127555797), (279259, 127082625), (279259, 127666691), (279259, 131478932), (279259, 10070234), (279259, 13036249), (279259, 164655706), (279259, 30998749), (279259, 50182595), (279279, 157765700), (279279, 168431568), (279279, 169652815), (279279, 67409918), (279279, 85068026), (279279, 85127053), (279279, 290268491), (279279, 299528243), (279279, 299566094), (279279, 302116573), (279279, 307050736), (279279, 309944889), (279279, 447787237), (279279, 453259422), (279279, 483013239), (279279, 485476237), (279279, 486723062), (279279, 126953859), (279279, 126802184), (279279, 254565509), (279279, 410226903), (279279, 412237714), (279279, 415017426), (279279, 419043534), (279279, 433225859), (279279, 37607554), (279279, 40198656), (279279, 41247657), (279279, 41110764), (279279, 43339592), (279279, 177409592), (279279, 2092291), (279279, 2820861), (279279, 398014464), (279279, 109275223), (279279, 221870318), (279279, 223467366), (279279, 224901359), (279279, 227022877), (279279, 228353326), (279279, 237957054), (279279, 10109417), (279279, 13987633), (279279, 96812330), (279279, 364090925), (279279, 363952307), (279279, 270819332), (279279, 274604367), (279279, 282865118), (279279, 285082097), (279279, 285292483), (279279, 368048886), (279279, 373448746), (279279, 384438338), (279279, 145606367), (279279, 154558799), (279284, 28905365), (279284, 130411483), (279284, 136143656), (279284, 829015000), (279284, 835342939), (279284, 837716724), (279284, 837366208), (279284, 394256920), (279284, 415461541), (279284, 2233942), (279284, 5383290), (279284, 4962413), (279284, 460276836), (279284, 607205529), (279284, 612988048), (279284, 501138096), (279284, 502913949), (279284, 761425665), (279284, 801288658), (279284, 711776478), (279284, 654380441), (279284, 687703411), (279284, 484577148), (279284, 514082039), (279284, 514885483), (279284, 280743447), (279284, 282317355), (279284, 283789373), (279284, 294779317), (279284, 296376533), (279284, 154051371), (279284, 155181782), (279284, 743942311), (279284, 59447991), (279284, 68941988), (279284, 73656051), (279284, 77895813), (279284, 83709286), (279284, 344485613), (279284, 352887723), (279284, 433393828), (279284, 574089358), (279284, 577247890), (279284, 587648267), (279284, 589509722), (279284, 537429716), (279284, 48378100), (279284, 52885094), (279284, 854511572), (279284, 862036119), (279284, 238168122), (279284, 635300126), (279284, 639849600), (279284, 669783559), (279284, 671430320), (279284, 679269563), (279284, 248397464), (279284, 248662417), (279284, 251367153), (279284, 269248448), (279284, 272268398), (279284, 85331968), (279284, 89642837), (279284, 177128897), (279284, 185555331), (279284, 191882785), (279284, 447640716), (279284, 472040355), (279284, 473125716), (279284, 476588693), (279284, 311601042), (279284, 331197293), (279284, 372210446), (279284, 544739342), (279284, 547223675), (279284, 562957561), (279284, 213125379), (279284, 219938554), (279284, 232966410), (279345, 520602143), (279345, 288259752), (279345, 287864601), (279345, 299122084), (279345, 172001233), (279345, 174561880), (279345, 868237357), (279345, 871382796), (279345, 409098444), (279345, 415021297), (279345, 425620990), (279345, 986389970), (279345, 988615034), (279345, 436533637), (279345, 438627316), (279345, 495882386), (279345, 501744769), (279345, 1035190249), (279345, 353160612), (279345, 352651640), (279345, 355025669), (279345, 362343899), (279345, 387977378), (279345, 391534047), (279345, 140224469), (279345, 142067599), (279345, 240762906), (279345, 239642198), (279345, 598401438), (279345, 833596648), (279345, 836382436), (279345, 839222405), (279345, 855322438), (279345, 855083629), (279345, 854708266), (279345, 854585572), (279345, 1212650394), (279345, 538114794), (279345, 540618998), (279345, 738298753), (279345, 745585855), (279345, 771636157), (279345, 959810044), (279345, 230122533), (279345, 232017519), (279345, 235776182), (279345, 243152325), (279345, 163235851), (279345, 211866800), (279345, 1070785781), (279345, 1072388432), (279345, 1074858200), (279345, 1074108987), (279345, 1076452646), (279345, 1076024173), (279345, 1080436445), (279345, 1080239910), (279345, 559910786), (279345, 822683782), (279345, 1288844147), (279345, 1287915007), (279345, 217003404), (279345, 226238055), (279345, 304060822), (279345, 286949721), (279345, 5123407), (279345, 721857512), (279345, 785702676), (279345, 88352598), (279345, 1270445702), (279345, 271977692), (279345, 885256205), (279345, 891679622), (279345, 943499700), (279345, 946809273), (279345, 664254380), (279345, 670608593), (279345, 110996821), (279345, 112071858), (279345, 115874894), (279345, 128839186), (279345, 1014928454), (279345, 362828182), (279345, 708545744), (279345, 726001340), (279345, 902047367), (279345, 908118968), (279345, 911886178), (279345, 922167447), (279345, 785822161), (279345, 935610164), (279345, 1224224035), (279345, 345742201), (279345, 1105239291), (279345, 1162661409), (279345, 1170563502), (279345, 618487713), (279345, 994488043), (279345, 996787419), (279345, 1009472954), (279345, 1067422589), (279345, 1318184448), (279345, 1321398967), (279345, 1325145992), (279345, 1326432358), (279345, 1327204644), (279345, 1344880322), (279345, 95625492), (279345, 96220242), (279345, 1210248345), (279345, 1327837723), (279345, 1335034130), (279345, 1334771383), (279345, 632480228), (279345, 635028969), (279345, 636606307), (279345, 638759437), (279345, 447501400), (279345, 449630229), (279345, 467888331), (279345, 468707961), (279345, 471549014), (279345, 929791657), (279345, 318807004), (279345, 317523398), (279345, 319990672), (279345, 323366206), (279345, 8164514), (279345, 11556745), (279345, 16486019), (279345, 18358344), (279345, 45118043), (279345, 46521827), (279345, 815036794), (279345, 30445828), (279515, 3962434), (279515, 6025764), (279598, 1388891327), (279598, 1394176644), (279598, 1402783909), (279598, 1414448132), (279598, 973620427), (279598, 979595015), (279598, 1357688820), (279598, 1367718704), (279598, 1295010706), (279598, 1325608057), (279598, 1325292726), (279598, 1331886192), (279598, 1333373735), (279598, 968291813), (279598, 778914918), (279598, 791411562), (279598, 792167092), (279598, 793569288), (279598, 802113884), (279598, 374698810), (279598, 1087649368), (279598, 1086700195), (279598, 1099884791), (279598, 1100165415), (279598, 166600860), (279598, 183119109), (279598, 189322469), (279598, 574322297), (279598, 1476144889), (279598, 1480949682), (279598, 1495046331), (279598, 318291690), (279598, 325819776), (279598, 325662467), (279598, 330550056), (279598, 330805523), (279598, 337870049), (279598, 1168991694), (279598, 1462950863), (279598, 1472530964), (279598, 46900118), (279598, 50172613), (279598, 134367249), (279598, 135152816), (279598, 138378804), (279598, 139400399), (279598, 143550149), (279598, 636050899), (279598, 640113663), (279598, 645427167), (279598, 654528034), (279598, 188545455), (279598, 195185261), (279598, 226348599), (279598, 228384923), (279598, 690706845), (279598, 694306428), (279598, 706586806), (279598, 274219499), (279598, 280547611), (279598, 385199347), (279598, 393248273), (279598, 462195139), (279598, 447756374), (279598, 452728423), (279598, 65573096), (279598, 77298165), (279598, 144551097), (279598, 154392977), (279598, 751497185), (279598, 766523514), (279598, 766040455), (279598, 459560248), (279598, 1037949989), (279598, 1045713975), (279598, 230240202), (279598, 232625906), (279598, 243269391), (279598, 242906848), (279598, 983813384), (279598, 57268567), (279598, 75977588), (279598, 85810638), (279598, 946421835), (279598, 948621510), (279598, 884694866), (279598, 1137834059), (279598, 103977647), (279598, 114269921), (279598, 112714572), (279598, 621897976), (279598, 624834907), (279598, 624080216), (279598, 626422330), (279598, 627832560), (279598, 630342724), (279598, 1235398562), (279598, 1237488346), (279598, 1239492690), (279598, 1283427434), (279598, 1384764421), (279598, 515633192), (279598, 529583548), (279598, 1207920667), (279598, 1209120259), (279598, 1216893537), (279598, 1228972019), (279598, 1227261582), (279598, 666698134), (279598, 671396538), (279598, 677029107), (279598, 1112966914), (279598, 1114815598), (279598, 1175389910), (279598, 1177181779), (279598, 1178599861), (279598, 1183212184), (279598, 1185121044), (279598, 1187097618), (279598, 1253293190), (279598, 1254691608), (279598, 1258902383), (279598, 1342732987), (279598, 1348632307), (279598, 202102884), (279598, 206321910), (279598, 735859214), (279598, 736132092), (279598, 917868637), (279598, 920180716), (279598, 985622816), (279598, 994793323), (279598, 997881402), (279598, 999419684), (279598, 857365954), (279598, 856326326), (279598, 1145231627), (279598, 1149974331), (279598, 1154115475), (279598, 1189717883), (279598, 1197191331), (279598, 1198249657), (279598, 850139548), (279598, 853681341), (279598, 866434381), (279598, 876900879), (279598, 892730309), (279598, 898433744), (279598, 902822367), (279598, 905176377), (279598, 1418666154), (279598, 1417706379), (279598, 1446180251), (279598, 1447516086), (279598, 1452474604), (279598, 720949184), (279598, 1502027023), (279598, 1503190290), (279598, 1502430080), (279598, 1510860539), (279598, 551627349), (279598, 601203267), (279598, 602094181), (279598, 314197678), (279598, 925078528), (279598, 929238548), (279598, 935507622), (279598, 9198293), (279598, 11441207), (279598, 13672638), (279598, 1561732067), (279598, 1561952673), (279598, 1565191883), (279598, 432956996), (279598, 433448327), (279598, 437574148), (279598, 288344344), (279598, 1555272155), (279598, 350407838), (279598, 352028446), (279598, 358330446), (279598, 527123760), (279598, 527808485), (279598, 589276780), (279598, 1616503410), (279598, 1616885503), (279598, 1543088721), (279598, 1590951544), (279598, 1593452632), (279598, 1600151675), (279598, 1004261079), (279598, 1002572312), (279598, 1006881782), (279598, 1010589620), (279598, 1014570747), (279598, 1015903907), (279598, 1624740973), (279598, 1643829316), (279685, 569724665), (279685, 902029287), (279685, 906221432), (279685, 905353716), (279685, 908822177), (279685, 1587215741), (279685, 102225689), (279685, 111265479), (279685, 112437604), (279685, 117232487), (279685, 170008812), (279685, 173618549), (279685, 172685200), (279685, 548219355), (279685, 548775161), (279685, 551082383), (279685, 572228553), (279685, 584895490), (279685, 859593162), (279685, 1019141524), (279685, 1041391686), (279685, 1043945604), (279685, 75254343), (279685, 82429255), (279685, 90451060), (279685, 98910890), (279685, 308173810), (279685, 307481942), (279685, 1077573297), (279685, 1079943156), (279685, 994915396), (279685, 1058293500), (279685, 1059691471), (279685, 1060524274), (279685, 1084232152), (279685, 1085663679), (279685, 757468064), (279685, 758660432), (279685, 1449718623), (279685, 1449419797), (279685, 1448800734), (279685, 1458862243), (279685, 931230941), (279685, 1787373449), (279685, 1273019788), (279685, 1623723627), (279685, 1627345414), (279685, 1665215377), (279685, 941561732), (279685, 945808152), (279685, 952069422), (279685, 959386543), (279685, 957489617), (279685, 960091593), (279685, 601199047), (279685, 610366173), (279685, 632813454), (279685, 1825441210), (279685, 1826135061), (279685, 447177602), (279685, 450784276), (279685, 1114561661), (279685, 1145965756), (279685, 1301362874), (279685, 1305530278), (279685, 744120151), (279685, 1479609626), (279685, 1481369452), (279685, 1487977743), (279685, 1486709793), (279685, 1493011696), (279685, 222575576), (279685, 225567252), (279685, 230102870), (279685, 1498853), (279685, 3354467), (279685, 1101776168), (279685, 46448084), (279685, 54285602), (279685, 58410530), (279685, 1182376397), (279685, 1240387257), (279685, 1496184362), (279685, 1817476143), (279685, 648076843), (279685, 651304603), (279685, 660023662), (279685, 659626008), (279685, 66462959), (279685, 68135525), (279685, 26480868), (279685, 497932998), (279685, 178592801), (279685, 179247331), (279685, 1692021026), (279685, 1698150911), (279685, 1717769174), (279685, 1795794646), (279685, 1810537926), (279685, 463073158), (279685, 467817677), (279685, 470133770), (279685, 476165445), (279685, 478420692), (279685, 484119678), (279685, 1474311126), (279685, 252408862), (279685, 616175955), (279685, 615044725), (279685, 617188215), (279685, 710888398), (279685, 717128856), (279685, 1824722195), (279685, 1828119641), (279685, 255853864), (279685, 157159798), (279685, 185747999), (279685, 185578178), (279685, 187779327), (279685, 1216555452), (279685, 1744754317), (279685, 1747211832), (279685, 1748341060), (279685, 1753005273), (279685, 402618250), (279685, 404631466), (279685, 119795507), (279685, 120091061), (279685, 211043904), (279685, 1171421202), (279685, 134159756), (279685, 141460532), (279685, 147255417), (279685, 155870083), (279685, 378532264), (279685, 665461073), (279685, 667677456), (279685, 671112770), (279685, 672741895), (279685, 696755721), (279685, 695307543), (279685, 697244349), (279685, 701432480), (279685, 706392932), (279685, 796806157), (279685, 806779151), (279685, 1546891437), (279685, 1549430039), (279685, 1550267182), (279685, 1552145210), (279685, 1553505171), (279685, 1559780666), (279685, 1562932412), (279685, 1573740582), (279685, 1575135572), (279685, 1576802830), (279685, 967514807), (279685, 967681480), (279685, 973546702), (279685, 973249481), (279685, 528038554), (279685, 1222927166), (279685, 1225955645), (279685, 1154233143), (279685, 841042729), (279685, 845988910), (279685, 847464153), (279685, 847679312), (279685, 897288539), (279685, 1259574788), (279685, 327324918), (279685, 350271855), (279685, 353883987), (279685, 1682320978), (279685, 1727605776), (279685, 1732050788), (279685, 1734545390), (279685, 777495529), (279685, 785254618), (279685, 916319792), (279685, 926937122), (279685, 598508746), (279685, 679806409), (279685, 687090831), (279685, 1372152899), (279685, 1377678026), (279685, 1386934868), (279685, 1389046709), (279685, 1397343325), (279685, 1338092042), (279685, 1339637549), (279685, 1600116897), (279685, 1607910084), (279685, 1610191079), (279685, 1611562685), (279685, 1617446423), (279685, 1364914813), (279685, 771342809), (279685, 770222271), (279685, 769856136), (279685, 1759463409), (279685, 1758881557), (279685, 1770512895), (279685, 1770039305), (279764, 5819788), (279764, 147785766), (279764, 40232410), (279813, 616466172), (279813, 619809037), (279813, 635457094), (279813, 642836718), (279813, 97955957), (279813, 102338113), (279813, 107652008), (279813, 106361232), (279813, 120228827), (279813, 299404856), (279813, 303064762), (279813, 128018090), (279813, 130202428), (279813, 130015733), (279813, 139140794), (279813, 140139893), (279813, 146724224), (279813, 43947930), (279813, 45549576), (279813, 52577520), (279813, 3658787), (279813, 5210712), (279813, 1154321916), (279813, 1158790717), (279813, 1159090290), (279813, 1165572770), (279813, 754406947), (279813, 756800398), (279813, 761144976), (279813, 768822871), (279813, 853840890), (279813, 211655354), (279813, 221445554), (279813, 222492549), (279813, 789441169), (279813, 791778110), (279813, 797592164), (279813, 440447256), (279813, 444048352), (279813, 447706527), (279813, 451702099), (279813, 460232356), (279813, 461352233), (279813, 464634867), (279813, 646372100), (279813, 647978944), (279813, 654188675), (279813, 405800339), (279813, 409339907), (279813, 410688911), (279813, 1068596105), (279813, 1102506220), (279813, 1115180157), (279813, 333100810), (279813, 332941516), (279813, 682743143), (279813, 681445084), (279813, 701309533), (279813, 702546536), (279813, 707476487), (279813, 484253053), (279813, 559204132), (279813, 559137019), (279813, 563071462), (279813, 576910951), (279813, 971824075), (279813, 160199615), (279813, 163499359), (279813, 168546333), (279813, 1178568495), (279813, 1215922757), (279813, 1226590420), (279813, 1235865797), (279813, 1197688367), (279813, 1205015713), (279813, 1242594781), (279813, 1245317384), (279813, 998085516), (279813, 369482646), (279813, 498844966), (279813, 388459936), (279813, 391427043), (279813, 870999559), (279813, 880378200), (279813, 249523725), (279813, 260842731), (279813, 15368714), (279813, 24934870), (279813, 26265330), (279813, 985775743), (279813, 1030903032), (279813, 1100057814), (279813, 720370499), (279813, 1125950845), (279813, 1135480408), (279813, 1148403014), (279813, 174172890), (279813, 188787273), (279813, 198702267), (279813, 261175451), (279813, 265130671), (279813, 281487612), (279813, 279948829), (279813, 280070287), (279813, 287516402), (279813, 1033632667), (279813, 1037311167), (279813, 1050859949), (279813, 1054815393), (279813, 1055943910), (279813, 887283232), (279813, 886117066), (279813, 895690048), (279813, 904706566), (279813, 907326665), (279813, 803716262), (279813, 816588518), (279813, 64799420), (279813, 68953861), (279813, 69378380), (279813, 85998116), (279813, 930068729), (279813, 931303409), (279867, 276462710), (279867, 283478093), (279867, 40374415), (279867, 48205478), (279867, 57832404), (279867, 220727668), (279867, 225201413), (279867, 230083828), (279867, 234090186), (279867, 238214821), (279867, 152315704), (279867, 173150219), (279867, 552916125), (279867, 553492391), (279867, 578475797), (279867, 576636245), (279867, 584246967), (279867, 587806044), (279867, 593262754), (279867, 251156171), (279867, 254720060), (279867, 256562575), (279867, 260388389), (279867, 656092326), (279867, 662938194), (279867, 375865760), (279867, 382566734), (279867, 384262353), (279867, 391137986), (279867, 397526232), (279867, 397540041), (279867, 400144067), (279867, 404250675), (279867, 404098489), (279867, 71976189), (279867, 79482015), (279867, 79330119), (279867, 119159109), (279867, 131839848), (279867, 132829782), (279867, 420847658), (279867, 435767466), (279867, 437218546), (279867, 439333394), (279867, 445515368), (279867, 448633490), (279867, 298901939), (279867, 298322683), (279867, 301192556), (279867, 305637241), (279867, 321738423), (279867, 565324594), (279867, 198556976), (279867, 200365902), (279867, 507533248), (279867, 506970520), (279867, 539183937), (279867, 523629106), (279867, 527358731), (279867, 102905619), (279867, 110790455), (279867, 607416904), (279867, 636596608), (279867, 637566889), (279867, 650399144), (279867, 481990882), (279867, 406846348), (279867, 413020649), (279867, 414061437), (279867, 464538507), (279867, 470960911), (279867, 377607978), (279867, 330766943), (279867, 336013625), (279867, 347635818), (279867, 15012112), (279867, 30367924), (279928, 7904736), (279928, 9543411), (279928, 12132872), (279928, 10267765), (279928, 13923914), (279932, 998123955), (279932, 364772005), (279932, 994715156), (279932, 1005236149), (279932, 1025399141), (279932, 468459692), (279932, 475890612), (279932, 480958467), (279932, 482504840), (279932, 756247031), (279932, 781018138), (279932, 779002166), (279932, 8599822), (279932, 11297069), (279932, 13758917), (279932, 18341275), (279932, 23782059), (279932, 32004457), (279932, 42835472), (279932, 57139278), (279932, 61398373), (279932, 655807898), (279932, 656157158), (279932, 669401622), (279932, 670162684), (279932, 683482319), (279932, 483179039), (279932, 487609186), (279932, 529394225), (279932, 533504637), (279932, 534178827), (279932, 817866564), (279932, 816951913), (279932, 818753917), (279932, 819868781), (279932, 837041074), (279932, 537387934), (279932, 539808166), (279932, 789532614), (279932, 789657845), (279932, 808591363), (279932, 942574028), (279932, 955031554), (279932, 967752540), (279932, 975385966), (279932, 984086477), (279932, 713773421), (279932, 717300387), (279932, 324553947), (279932, 334270094), (279932, 335402320), (279932, 335293482), (279932, 342731578), (279932, 343360308), (279932, 346826503), (279932, 108413293), (279932, 111805388), (279932, 113513911), (279932, 587004807), (279932, 589257352), (279932, 589655067), (279932, 598241304), (279932, 645215674), (279932, 648275647), (279932, 650544540), (279932, 650704969), (279932, 612999477), (279932, 624961067), (279932, 624870367), (279932, 289855172), (279932, 298845396), (279932, 382890312), (279932, 384772370), (279932, 394903722), (279932, 403247539), (279932, 407152872), (279932, 504185577), (279932, 509093509), (279932, 508082245), (279932, 511656679), (279932, 521597703), (279932, 522413971), (279932, 914749114), (279932, 932025556), (279932, 198622212), (279932, 204366335), (279932, 244685199), (279932, 244026524), (279932, 244238860), (279932, 266770046), (279932, 282178729), (279932, 215396000), (279932, 231451835), (279932, 237463069), (279932, 244724002), (279932, 428678783), (279932, 355284109), (279932, 357576354), (279932, 377540805), (279932, 164032909), (279932, 694033901), (279932, 717728719), (279932, 719205259), (279932, 721348777), (279932, 723676165), (279932, 725029952), (279932, 728355726), (279932, 126115705), (279932, 137736437), (279932, 146822795), (279932, 149518335), (279932, 170531949), (279932, 174834997), (279932, 172400430), (279932, 181016157), (279932, 184914053), (279932, 897126465), (279932, 944327392), (279932, 944128650), (279932, 968702873), (279932, 735075940), (279932, 863481189), (279932, 870290007), (279932, 880476512), (279932, 882826003), (279932, 430969735), (279932, 436899787), (279932, 438809167), (279932, 441542389), (279932, 448622663), (279932, 449855856), (279932, 315692580), (279932, 319865821), (279932, 324410202), (279984, 203574371), (279984, 209494295), (279984, 226576929), (279984, 704677185), (279984, 725065273), (279984, 1439950282), (279984, 1467346953), (279984, 132238512), (279984, 431702444), (279984, 438988933), (279984, 441301622), (279984, 286135090), (279984, 296404412), (279984, 660624978), (279984, 662480441), (279984, 668485621), (279984, 696383882), (279984, 871248035), (279984, 1374875253), (279984, 566194111), (279984, 567007312), (279984, 574983306), (279984, 576866499), (279984, 1021322692), (279984, 177530616), (279984, 183527026), (279984, 184583254), (279984, 1111779127), (279984, 1121587255), (279984, 1127647502), (279984, 1133875712), (279984, 1342363616), (279984, 1346473479), (279984, 1348345553), (279984, 1351367224), (279984, 1356393695), (279984, 1357845360), (279984, 1360145796), (279984, 1478546588), (279984, 1479723233), (279984, 1479556604), (279984, 612588484), (279984, 621139315), (279984, 638134633), (279984, 649232536), (279984, 651233229), (279984, 632328323), (279984, 635344308), (279984, 377026438), (279984, 1294597823), (279984, 1295812372), (279984, 1300422864), (279984, 1318499940), (279984, 1391311353), (279984, 1395298056), (279984, 1403930012), (279984, 910584338), (279984, 915779140), (279984, 918777379), (279984, 1053399407), (279984, 1055807660), (279984, 89828430), (279984, 91910483), (279984, 104113253), (279984, 115354325), (279984, 1171798273), (279984, 1175375807), (279984, 1176891721), (279984, 1179008859), (279984, 1183606039), (279984, 1143860751), (279984, 1148604631), (279984, 1149254523), (279984, 1159875136), (279984, 1231063345), (279984, 820536378), (279984, 820836378), (279984, 824599473), (279984, 826173615), (279984, 830614230), (279984, 837218918), (279984, 12778623), (279984, 466189416), (279984, 471202313), (279984, 586104960), (279984, 598971757), (279984, 980040724), (279984, 1075070408), (279984, 1076778676), (279984, 1096572243), (279984, 1097230136), (279984, 796893590), (279984, 803375607), (279984, 807804261), (279984, 818481701), (279984, 238278996), (279984, 244367499), (279984, 242452118), (279984, 1259816663), (279984, 1272290835), (279984, 1277090444), (279984, 1277682507), (279984, 163377331), (279984, 194595648), (279984, 194918883), (279984, 539118309), (279984, 548242271), (279984, 128843345), (279984, 502122075), (279984, 511562984), (279984, 512742536), (279984, 512165378), (279984, 523680108), (279984, 525423661), (279984, 1199110775), (279984, 1219873554), (279984, 328987017), (279984, 341031913), (279984, 356654933), (279984, 1411309100), (279984, 1419513519), (279984, 1433269542), (279984, 1441285496), (279984, 25077169), (279984, 27537063), (279984, 32563160), (279984, 39885749), (279984, 305895209), (279984, 309206165), (279984, 308155401), (279984, 322667967), (279984, 1002613611), (279984, 1012315666), (279984, 1015736657), (279984, 395391978), (279984, 399735682), (279984, 1067305476), (279984, 1072074541), (279984, 61881584), (279984, 66529886), (279984, 774111109), (279984, 776114527), (279984, 784425595), (279984, 677779731), (279984, 682195540), (279984, 743171650), (279984, 743165336), (279984, 749235945), (279984, 415868084), (279984, 415447915), (279984, 56984747), (279984, 58416632), (279984, 60491232), (279984, 123743894), (279984, 127103528), (279984, 473768215), (279984, 488222088), (279984, 500081545), (279984, 274552281), (279984, 341306171), (279984, 345399690), (279984, 346526187), (279984, 154874931), (279984, 152774031), (279984, 927028121), (279984, 941866077), (279984, 942073042), (279984, 940069951), (280231, 2173299266), (280231, 2212872429), (280231, 2216552214), (280231, 1449968217), (280231, 1527271497), (280231, 1534504071), (280231, 1541691770), (280231, 1545610057), (280231, 1552437414), (280231, 2233292561), (280231, 2237120544), (280231, 2237811313), (280231, 2246005121), (280231, 369689579), (280231, 367543760), (280231, 1458179665), (280231, 1474698197), (280231, 1482665388), (280231, 1156069677), (280231, 1157252005), (280231, 1158855586), (280231, 1164197770), (280231, 1180553520), (280231, 1180765527), (280231, 793501146), (280231, 1667479009), (280231, 1676573399), (280231, 1687565918), (280231, 1692799960), (280231, 1698406588), (280231, 1697220415), (280231, 2044826238), (280231, 971849653), (280231, 1002395450), (280231, 1013068944), (280231, 945670592), (280231, 953019147), (280231, 1260055395), (280231, 1263800365), (280231, 1268507030), (280231, 1269911400), (280231, 1273571681), (280231, 1278011838), (280231, 38558870), (280231, 40878906), (280231, 61455973), (280231, 66713800), (280231, 1339192349), (280231, 1344392823), (280231, 217745065), (280231, 227728751), (280231, 231636765), (280231, 235466307), (280231, 2012570930), (280231, 2016636496), (280231, 671510359), (280231, 434101590), (280231, 443192737), (280231, 450134377), (280231, 459055082), (280231, 460538315), (280231, 1973708885), (280231, 1980187692), (280231, 855957288), (280231, 854394699), (280231, 869243622), (280231, 873562692), (280231, 876920574), (280231, 875530537), (280231, 880532971), (280231, 881173153), (280231, 1315844372), (280231, 1313857790), (280231, 1321860185), (280231, 1326534006), (280231, 1356225718), (280231, 1375092666), (280231, 196298124), (280231, 1949842409), (280231, 1931123628), (280231, 1930664315), (280231, 89110006), (280231, 91182123), (280231, 95836512), (280231, 100768792), (280231, 108884461), (280231, 111613478), (280231, 2087566099), (280231, 2096000312), (280231, 2096781713), (280231, 2100684572), (280231, 2103911713), (280231, 2119938426), (280231, 471164304), (280231, 473567922), (280231, 473221885), (280231, 473991357), (280231, 479249399), (280231, 488312835), (280231, 490615902), (280231, 1520861485), (280231, 1528260441), (280231, 1635043760), (280231, 1634847333), (280231, 1640387994), (280231, 1639530458), (280231, 1958665413), (280231, 1964739554), (280231, 1972308456), (280231, 2140453858), (280231, 2148717251), (280231, 2151283867), (280231, 2153712104), (280231, 2161705125), (280231, 2162933936), (280231, 2163098832), (280231, 1655056891), (280231, 1654594888), (280231, 1578063704), (280231, 1581115715), (280231, 1588933605), (280231, 1620659373), (280231, 1621635609), (280231, 561112136), (280231, 569793875), (280231, 1701958330), (280231, 1716112176), (280231, 1718629600), (280231, 12832494), (280231, 11445384), (280231, 13101419), (280231, 14209417), (280231, 19447751), (280231, 19967925), (280231, 27121746), (280231, 1243456494), (280231, 1260778712), (280231, 606171478), (280231, 615592694), (280231, 49282306), (280231, 48459971), (280231, 49570849), (280231, 50060693), (280231, 54294670), (280231, 73396555), (280231, 591443490), (280231, 622639558), (280231, 631088748), (280231, 631753816), (280231, 638446503), (280231, 647084730), (280231, 647441215), (280231, 1072450928), (280231, 1080299669), (280231, 1088259805), (280231, 1093289411), (280231, 400797053), (280231, 407606480), (280231, 417324542), (280231, 420912100), (280231, 1049057108), (280231, 1057775763), (280231, 495433553), (280231, 497678002), (280231, 496555495), (280231, 541558273), (280231, 2028905291), (280231, 2032968631), (280231, 348600562), (280231, 349861950), (280231, 1386675206), (280231, 1387030296), (280231, 1395214136), (280231, 1395978315), (280231, 1413343276), (280231, 1415373351), (280231, 2225072885), (280231, 308583604), (280231, 650446390), (280231, 801609983), (280231, 812889623), (280231, 895818306), (280231, 897375449), (280231, 898263363), (280231, 902393965), (280231, 136391466), (280231, 144644538), (280231, 758891910), (280231, 758987458), (280231, 770711413), (280231, 837219032), (280231, 842594902), (280231, 852619081), (280231, 2189604584), (280231, 1912203263), (280231, 1914766176), (280231, 707984122), (280231, 712923693), (280231, 1500562379), (280231, 1508198363), (280231, 1507843608), (280231, 1097216072), (280231, 1099777576), (280231, 1106135966), (280231, 1116050195), (280231, 1116882997), (280231, 341892480), (280231, 345016738), (280231, 2120184031), (280231, 691741058), (280231, 731223052), (280231, 741232200), (280231, 508826854), (280231, 521848336), (280231, 1212711538), (280231, 1215676249), (280231, 302371622), (280231, 317351811), (280231, 327312659), (280231, 980624274), (280231, 1022196008), (280231, 1026226964), (280231, 1031787135), (280231, 996629778), (280231, 1000502763), (280231, 262686527), (280231, 272031523), (280231, 274498243), (280231, 286401785), (280231, 1575675636), (280231, 1607855932), (280231, 163417619), (280231, 165752059), (280231, 175324013), (280231, 179745591), (280231, 181073967), (280231, 536480514), (280231, 245281313), (280231, 921620215), (280231, 1995330311), (280231, 2058751034), (280319, 562029959), (280319, 567143828), (280319, 573275578), (280319, 591403563), (280319, 733740633), (280319, 1523819931), (280319, 281959301), (280319, 290356572), (280319, 336382906), (280319, 367243891), (280319, 369071591), (280319, 367052586), (280319, 1080619643), (280319, 810881493), (280319, 212091003), (280319, 271544005), (280319, 1167221976), (280319, 1203245495), (280319, 1206062859), (280319, 1205889842), (280319, 179803922), (280319, 179756949), (280319, 184887165), (280319, 194079815), (280319, 563318190), (280319, 695883268), (280319, 695447406), (280319, 701649500), (280319, 509676059), (280319, 512035916), (280319, 513593907), (280319, 515140366), (280319, 518901728), (280319, 524487015), (280319, 1036903160), (280319, 1034517720), (280319, 785236144), (280319, 790450488), (280319, 24388459), (280319, 27495707), (280319, 30626154), (280319, 278408387), (280319, 774601762), (280319, 826676971), (280319, 832932290), (280319, 833909729), (280319, 1120682424), (280319, 528264020), (280319, 318047356), (280319, 319639794), (280319, 326288942), (280319, 1525417169), (280319, 1534808191), (280319, 1537085700), (280319, 1550724777), (280319, 1555280491), (280319, 633887102), (280319, 634398978), (280319, 640806170), (280319, 1691227729), (280319, 227574195), (280319, 239073291), (280319, 1805498900), (280319, 1717915951), (280319, 1176247), (280319, 1883466548), (280319, 1888059765), (280319, 1994844252), (280319, 952055843), (280319, 950653148), (280319, 953307970), (280319, 974019669), (280319, 981646637), (280319, 1090291013), (280319, 1091898446), (280319, 1102018261), (280319, 868271764), (280319, 1225829518), (280319, 1228858773), (280319, 1266571891), (280319, 1268793110), (280319, 1275046676), (280319, 1983955191), (280319, 1989324817), (280319, 1927883623), (280319, 1936849157), (280319, 1936707257), (280319, 1946712502), (280319, 1948913625), (280319, 75809074), (280319, 87910127), (280319, 1828850376), (280319, 1839057146), (280319, 1844923384), (280319, 1844702370), (280319, 745442820), (280319, 752623568), (280319, 798105003), (280319, 722094647), (280319, 760235715), (280319, 1648730072), (280319, 736964000), (280319, 1681460726), (280319, 1682247541), (280319, 1691355864), (280319, 1771934315), (280319, 1775183359), (280319, 1774691556), (280319, 1777191468), (280319, 1822163649), (280319, 1823376735), (280319, 1826273957), (280319, 1826940160), (280319, 1851634850), (280319, 1855972106), (280319, 1864367352), (280319, 1864414128), (280319, 1871948254), (280319, 1873304852), (280319, 1874785103), (280319, 1133321903), (280319, 1139047711), (280319, 1153638375), (280319, 1151415477), (280319, 1153720565), (280319, 1008081445), (280319, 913051817), (280319, 914450704), (280319, 921187787), (280319, 931194131), (280319, 2036770261), (280319, 2042319778), (280319, 2046979488), (280319, 2050121279), (280319, 2058398448), (280319, 726127616), (280319, 1894777433), (280319, 2008777571), (280319, 2013904070), (280319, 2016151584), (280319, 1475173173), (280319, 1479514672), (280319, 1478120277), (280319, 1478257757), (280319, 1488525960), (280319, 1569643892), (280319, 963155881), (280319, 1173822256), (280319, 1178287036), (280319, 1951070306), (280319, 1963080845), (280319, 1965865848), (280319, 1965685628), (280319, 1589594523), (280319, 1596104201), (280319, 1596443921), (280319, 1599250983), (280319, 1621956298), (280319, 1628997553), (280319, 667498270), (280319, 688232169), (280319, 420925509), (280319, 425494828), (280319, 430397837), (280319, 1294198318), (280319, 101558805), (280319, 105389815), (280319, 108272689), (280319, 113253324), (280319, 116449667), (280319, 122212963), (280319, 121504127), (280319, 887921870), (280319, 889450748), (280319, 935184686), (280319, 935513275), (280319, 942862333), (280319, 408586138), (280319, 417241152), (280319, 1355988103), (280319, 1398061854), (280319, 1400246374), (280319, 1401513478), (280319, 1408234862), (280319, 1330192822), (280319, 1337393000), (280319, 1348856615), (280319, 1354491936), (280319, 131565819), (280319, 131691545), (280319, 143449561), (280319, 170322087), (280319, 260408945), (280319, 47716555), (280319, 55118355), (280319, 60906203), (280319, 65631594), (280319, 70697683), (280319, 1331803255), (280319, 649497548), (280319, 476259839), (280319, 1049077141), (280319, 1051348408), (280319, 1072422024), (280319, 840781166), (280319, 844110200), (280319, 862377450), (280319, 1218209634), (280319, 1216278078), (280319, 1253627767), (280319, 295870607), (280319, 298961705), (280319, 1448768963), (280319, 1452532772), (280319, 1460778453), (280319, 1459335527), (280319, 1470974161), (280319, 1473438001), (280319, 356245342), (280319, 401966385), (280319, 443060472), (280319, 445957840), (280319, 453840378), (280319, 461955172), (280319, 468243075), (280319, 1607864717), (280319, 1613732251), (280319, 1378419054), (280319, 1379556550), (280319, 1418979438), (280319, 1425810973), (280319, 1790009047), (280319, 1373261437), (280319, 1427358349), (280319, 593790933), (280319, 610486929), (280319, 373797091), (280319, 384690953), (280319, 387231970), (280319, 404758158), (280319, 36789003), (280319, 40320283), (280368, 18630561), (280368, 51648904), (280368, 54941288), (280368, 98914941), (280368, 102460266), (280368, 111188172), (280368, 110195295), (280368, 111231202), (280368, 3646070), (280368, 35044919), (280368, 37803137), (280368, 46074631), (280368, 119864418), (280368, 120542057), (280368, 122424631), (280368, 126731420), (280368, 20144526), (280368, 28604229), (280368, 86306278), (280368, 157377745), (280368, 145775947), (280368, 76870390), (280368, 159538570), (280423, 361879287), (280423, 362830248), (280423, 364833223), (280423, 373737920), (280423, 376217318), (280423, 373150603), (280423, 381102402), (280423, 382471972), (280423, 385475890), (280423, 1148716645), (280423, 1154025636), (280423, 1254129385), (280423, 394025670), (280423, 395246647), (280423, 395278324), (280423, 400221258), (280423, 1427172638), (280423, 1180567303), (280423, 1185909605), (280423, 1187368199), (280423, 165419390), (280423, 181035460), (280423, 188028507), (280423, 190016366), (280423, 1230869026), (280423, 876312069), (280423, 617874050), (280423, 782844728), (280423, 787249204), (280423, 961887294), (280423, 972534323), (280423, 970727751), (280423, 1002887456), (280423, 1007692904), (280423, 1010794041), (280423, 1382253233), (280423, 1383416018), (280423, 538486944), (280423, 557206463), (280423, 561990306), (280423, 9878484), (280423, 14216983), (280423, 16326388), (280423, 18767832), (280423, 241148225), (280423, 244595846), (280423, 1070353107), (280423, 937828273), (280423, 947795856), (280423, 527038547), (280423, 1031743590), (280423, 1101820335), (280423, 1104512803), (280423, 1118381906), (280423, 1129146016), (280423, 86295392), (280423, 449834672), (280423, 454760804), (280423, 469015037), (280423, 1325322649), (280423, 1357782077), (280423, 1359154942), (280423, 1363741945), (280423, 1364463414), (280423, 28462304), (280423, 349285383), (280423, 349810042), (280423, 353367542), (280423, 1238212366), (280423, 1238753925), (280423, 1239476174), (280423, 880301270), (280423, 926231166), (280423, 1137299942), (280423, 1171790310), (280423, 1395159771), (280423, 1398240379), (280423, 1440351100), (280423, 1442033968), (280423, 1450644524), (280423, 1203185849), (280423, 1260779023), (280423, 1271032060), (280423, 1274946917), (280423, 575438226), (280423, 581449935), (280423, 584326224), (280423, 587953050), (280423, 409497173), (280423, 415687661), (280423, 975667197), (280423, 985158814), (280423, 984716930), (280423, 990209212), (280423, 1040033763), (280423, 628695807), (280423, 630821228), (280423, 630413949), (280423, 858619782), (280423, 861359093), (280423, 865932277), (280423, 116060826), (280423, 122388586), (280423, 206059696), (280423, 211654495), (280423, 224046559), (280423, 227375400), (280423, 632865993), (280423, 654235135), (280423, 657561622), (280423, 129766561), (280423, 138283972), (280423, 152330182), (280423, 286229470), (280423, 307998315), (280423, 313571606), (280423, 316574001), (280423, 892527775), (280423, 893096566), (280423, 895141051), (280423, 914557524), (280423, 918190132), (280423, 671877647), (280423, 692407000), (280423, 697758178), (280423, 700384917), (280423, 699184191), (280423, 295070462), (280423, 298640650), (280423, 300261327), (280423, 398038121), (280423, 419468311), (280423, 429311954), (280423, 439364946), (280423, 440470825), (280423, 440692290), (280423, 259349181), (280423, 262207679), (280423, 262061175), (280423, 263154947), (280423, 263838645), (280423, 272479713), (280423, 1353299397), (280423, 1392249888), (280423, 1455292838), (280423, 1454925780), (280423, 1470162509), (280423, 1013683544), (280423, 1016912491), (280423, 1049866282), (280423, 1051711843), (280423, 725890228), (280423, 740450907), (280423, 744155732), (280423, 743752620), (280423, 194073332), (280423, 199973590), (280423, 200852470), (280423, 201522099), (280423, 203303471), (280423, 65023309), (280423, 64989151), (280423, 66160176), (280423, 67561661), (280423, 68518681), (280423, 72267220), (280423, 490779190), (280423, 495189076), (280423, 1299561766), (280423, 247905881), (280423, 251975039), (280423, 1290387569), (280423, 1201706120), (280423, 1206298512), (280423, 1216431096), (280423, 756513490), (280423, 767520638), (280423, 770310698), (280423, 812035014), (280423, 823451393), (280423, 830257107), (280423, 829574918), (280464, 403679437), (280464, 503924435), (280464, 1083589410), (280464, 1163146080), (280464, 1162478083), (280464, 1164288631), (280464, 710930850), (280464, 703262462), (280464, 600587508), (280464, 607176800), (280464, 245203634), (280464, 249008186), (280464, 251459903), (280464, 254136179), (280464, 682723454), (280464, 686307471), (280464, 688567342), (280464, 689606912), (280464, 693794106), (280464, 947987832), (280464, 952240148), (280464, 725116424), (280464, 735303390), (280464, 738387074), (280464, 152556344), (280464, 458632505), (280464, 460104446), (280464, 463842979), (280464, 468517915), (280464, 232273755), (280464, 196920263), (280464, 200933676), (280464, 273749193), (280464, 272973462), (280464, 1031693888), (280464, 1114412068), (280464, 418652990), (280464, 633972651), (280464, 633220390), (280464, 634574687), (280464, 637155335), (280464, 1160231009), (280464, 214628406), (280464, 217360033), (280464, 528663619), (280464, 220336136), (280464, 221661891), (280464, 226532362), (280464, 226632558), (280464, 553839938), (280464, 563302945), (280464, 565035967), (280464, 175172492), (280464, 176815328), (280464, 568239726), (280464, 572283010), (280464, 572552135), (280464, 581587223), (280464, 1065216667), (280464, 1069118617), (280464, 126759885), (280464, 271733586), (280464, 271647938), (280464, 86107134), (280464, 91133906), (280464, 92700049), (280464, 391974029), (280464, 388911563), (280464, 400621603), (280464, 287676836), (280464, 289009994), (280464, 308881491), (280464, 367648003), (280464, 370260559), (280464, 380561608), (280464, 382928385), (280464, 387213831), (280464, 386525088), (280464, 880447668), (280464, 888303196), (280464, 259950335), (280464, 259765338), (280464, 268881406), (280464, 1130301946), (280464, 1138638990), (280464, 1137776122), (280464, 737099342), (280464, 744662924), (280464, 748251064), (280464, 514796437), (280464, 1138881294), (280464, 1147367215), (280464, 1173373755), (280464, 1185306156), (280464, 1103977707), (280464, 1110296971), (280464, 279661057), (280464, 975352871), (280464, 979075921), (280464, 983442153), (280464, 987957933), (280464, 988819437), (280464, 989634663), (280464, 330503907), (280464, 332597272), (280464, 357975715), (280464, 9219814), (280464, 49735110), (280464, 54605145), (280464, 310541782), (280464, 312614388), (280464, 318887683), (280464, 319806632), (280464, 30366027), (280464, 836579683), (280464, 839912275), (280464, 842333950), (280464, 847153251), (280464, 852064668), (280464, 779913363), (280464, 793047081), (280464, 791995874), (280464, 909578492), (280464, 911354300), (280464, 926316827), (280464, 110061655), (280464, 113411803), (280464, 20288421), (280464, 26048665), (280464, 68823987), (280464, 81902464), (280464, 343969365), (280464, 342160879), (280464, 815285637), (280464, 65413515), (280464, 126125351), (280464, 178978607), (280464, 187603384), (280464, 490965341), (280464, 492847873), (280464, 491456439), (280464, 493532551), (280464, 497126245), (280500, 134703333), (280500, 154142130), (280500, 157250753), (280500, 161506305), (280500, 40285631), (280500, 66590758), (280500, 80784169), (280500, 110635174), (280500, 129681932), (280500, 127520832), (280500, 23335506), (280500, 24345010), (280500, 26259749), (280500, 31766868), (280500, 88711753), (280500, 175173724), (280500, 142811965), (280500, 149327890), (280500, 150787598), (280520, 487785931), (280520, 492044036), (280520, 497803222), (280520, 517744529), (280520, 472984019), (280520, 436928009), (280520, 446183506), (280520, 125120877), (280520, 193329262), (280520, 352549231), (280520, 164065382), (280520, 197168109), (280520, 201281443), (280520, 372978976), (280520, 418145603), (280520, 147743883), (280520, 245928907), (280520, 249866083), (280520, 256947489), (280520, 257632916), (280520, 255478538), (280520, 263837247), (280520, 265476786), (280520, 350819590), (280520, 432126142), (280520, 213138882), (280520, 217266710), (280520, 224127542), (280520, 228135497), (280614, 161177673), (280614, 169745152), (280614, 170767640), (280614, 215146625), (280614, 219127570), (280614, 301178226), (280614, 303707437), (280614, 332449119), (280614, 335003120), (280614, 345722410), (280614, 353058908), (280614, 411236139), (280614, 414979598), (280614, 419235273), (280614, 426610368), (280614, 175746364), (280614, 2832819), (280614, 445394990), (280614, 263895374), (280614, 197529463), (280614, 195487015), (280614, 200548148), (280614, 381849649), (280614, 484299614), (280614, 251899309), (280614, 258595205), (280614, 262503389), (280614, 266054651), (280614, 508036054), (280614, 135108736), (280614, 469203363), (280614, 197406782), (280614, 23884140), (280614, 26304101), (280614, 36897069), (280614, 52567457), (280614, 66251511), (280614, 68094944), (280614, 68851524), (280614, 402762268), (280614, 234643177), (280614, 241494472), (280614, 182710441), (280614, 124825582), (280614, 131963406), (280614, 129554236), (280614, 398377511), (280614, 280156426), (280614, 249695289), (280614, 15314641), (280614, 75177979), (280614, 81554504), (280614, 84242925), (280614, 48491778), (280614, 425895393), (280614, 429688367), (280614, 430584664), (280614, 430786875), (280614, 470180942), (280614, 101543692), (280614, 118170578), (280614, 343741138), (280614, 377386110), (280614, 310506941), (280673, 1561502610), (280673, 627110595), (280673, 635454801), (280673, 667428224), (280673, 668936168), (280673, 676414835), (280673, 1179958099), (280673, 1179577719), (280673, 753417563), (280673, 925801475), (280673, 929027626), (280673, 928808433), (280673, 932066869), (280673, 936543525), (280673, 2177212635), (280673, 2181799462), (280673, 2182347482), (280673, 2183016874), (280673, 2187212326), (280673, 2482538521), (280673, 2765600574), (280673, 2770492663), (280673, 2778816414), (280673, 1340984944), (280673, 1341338341), (280673, 1343587778), (280673, 1356827410), (280673, 2717432142), (280673, 210239745), (280673, 217201639), (280673, 1785965118), (280673, 2532511534), (280673, 2540140200), (280673, 2634973887), (280673, 2638154345), (280673, 2640706025), (280673, 2644529335), (280673, 2353158959), (280673, 2356623320), (280673, 2355325771), (280673, 2362575975), (280673, 2362574478), (280673, 2200915370), (280673, 2167541330), (280673, 2170303336), (280673, 2118192753), (280673, 2119242422), (280673, 2124148901), (280673, 2193498932), (280673, 960791346), (280673, 966344732), (280673, 1001228209), (280673, 353035512), (280673, 388200329), (280673, 3028503266), (280673, 3033721245), (280673, 3041435788), (280673, 3045258635), (280673, 1541222359), (280673, 1903177089), (280673, 1903343123), (280673, 1913750957), (280673, 1927101566), (280673, 1926692554), (280673, 1926495149), (280673, 2489966503), (280673, 2494706635), (280673, 2497573278), (280673, 3077092792), (280673, 3084576045), (280673, 3097295300), (280673, 3108240355), (280673, 2448458780), (280673, 151665751), (280673, 150994206), (280673, 159901037), (280673, 2330851434), (280673, 2335889912), (280673, 2348111074), (280673, 2350683365), (280673, 1366214126), (280673, 1368434425), (280673, 1368106313), (280673, 1370854154), (280673, 1371304327), (280673, 1388443622), (280673, 1598767572), (280673, 1598692856), (280673, 1605479287), (280673, 1607307218), (280673, 1608987310), (280673, 1612751849), (280673, 1615433136), (280673, 1628068009), (280673, 1627193982), (280673, 1632071699), (280673, 1639670651), (280673, 1664330995), (280673, 1674930087), (280673, 2993363444), (280673, 2997148328), (280673, 1952785961), (280673, 1960201606), (280673, 2026525657), (280673, 2028900521), (280673, 2034778729), (280673, 2892196239), (280673, 2893130910), (280673, 2499185660), (280673, 2505613462), (280673, 600059506), (280673, 599870982), (280673, 603985827), (280673, 764333824), (280673, 415504114), (280673, 433390588), (280673, 1823410733), (280673, 2197123741), (280673, 2305157070), (280673, 143442741), (280673, 145327957), (280673, 146058228), (280673, 974479952), (280673, 1115470566), (280673, 1122200277), (280673, 1125565319), (280673, 1446940697), (280673, 1456938274), (280673, 1432608078), (280673, 1439332158), (280673, 1442001118), (280673, 1506108555), (280673, 1507118668), (280673, 940729316), (280673, 948917043), (280673, 952956637), (280673, 1308336479), (280673, 1309842978), (280673, 1312823890), (280673, 1041312063), (280673, 105431623), (280673, 113254383), (280673, 113609086), (280673, 269472024), (280673, 301050464), (280673, 256951192), (280673, 262963837), (280673, 2084153001), (280673, 2096012343), (280673, 2094350623), (280673, 2099192829), (280673, 695743717), (280673, 740399793), (280673, 740833989), (280673, 2699043355), (280673, 2700838882), (280673, 2704280557), (280673, 2702117297), (280673, 2755267267), (280673, 2755748945), (280673, 52197766), (280673, 51903608), (280673, 277801020), (280673, 280047936), (280673, 286316962), (280673, 287350710), (280673, 287567264), (280673, 183913264), (280673, 190962116), (280673, 254167831), (280673, 362515909), (280673, 368705629), (280673, 378884323), (280673, 438647052), (280673, 33080895), (280673, 37404310), (280673, 73257613), (280673, 74321810), (280673, 2058495473), (280673, 2610520806), (280673, 2615440234), (280673, 3061036739), (280673, 3063705592), (280673, 3063983815), (280673, 3069199853), (280673, 987541087), (280673, 993205767), (280673, 1248630674), (280673, 1256550197), (280673, 1282700034), (280673, 1282805298), (280673, 1285256834), (280673, 2967185399), (280673, 2968235722), (280673, 2984633757), (280673, 1838517358), (280673, 1847546351), (280673, 1849982083), (280673, 1693042776), (280673, 1693515134), (280673, 2559633088), (280673, 2564757270), (280673, 2570199648), (280673, 1754905208), (280673, 1765885177), (280673, 776706806), (280673, 779280908), (280673, 786048765), (280673, 826548990), (280673, 1989749719), (280673, 1993721146), (280673, 2003265224), (280673, 880005111), (280673, 881453173), (280673, 880853423), (280673, 879119855), (280673, 885268972), (280673, 893896382), (280673, 921251337), (280673, 920049075), (280673, 619607431), (280673, 620337836), (280673, 800148757), (280673, 805493593), (280673, 2216766663), (280673, 2215203701), (280673, 2224732686), (280673, 1548675198), (280673, 2132591573), (280673, 2135459734), (280673, 2140137426), (280673, 2141521944), (280673, 2139289914), (280673, 517281588), (280673, 518474148), (280673, 521836884), (280673, 524072652), (280673, 529364317), (280673, 527380335), (280673, 541839586), (280673, 545146215), (280673, 1737032501), (280673, 1803102265), (280673, 1805904365), (280673, 862793888), (280673, 1141134627), (280673, 1154242847), (280673, 1152145113), (280673, 1156283181), (280673, 1234105644), (280673, 1238746015), (280673, 1241679168), (280673, 1244259699), (280673, 1288357225), (280673, 1292190420), (280673, 1301023266), (280673, 3161467555), (280673, 3168914014), (280673, 3169608364), (280673, 3170980301), (280673, 2927975162), (280673, 2940655712), (280673, 2938539332), (280673, 2942247737), (280673, 2946249490), (280673, 2943982655), (280673, 2949947284), (280673, 2383804628), (280673, 2394990476), (280673, 2393558202), (280673, 1409701972), (280673, 1015828677), (280673, 1040684819), (280673, 1044120721), (280673, 1055563895), (280673, 1861044367), (280673, 1861840516), (280673, 1563278273), (280673, 1573321097), (280673, 636521337), (280673, 658334485), (280673, 657853395), (280673, 658923859), (280673, 661353763), (280673, 719032876), (280673, 730277027), (280673, 130772988), (280673, 128639410), (280673, 192722347), (280673, 2520714318), (280673, 2524900212), (280673, 540252534), (280673, 1129293375), (280673, 1127880961), (280673, 1127567985), (280673, 1129709373), (280673, 1130442500), (280673, 1204578001), (280673, 1210239213), (280673, 1209987687), (280673, 1793918043), (280673, 1797617325), (280673, 1801893686), (280673, 1802994817), (280673, 1868958632), (280673, 1881612349), (280673, 573577074), (280673, 441791715), (280673, 450639263), (280673, 550449120), (280673, 1400216651), (280673, 1461712657), (280673, 1103085132), (280673, 2829060797), (280673, 2834122239), (280673, 507612086), (280673, 529883757), (280673, 515678340), (280673, 638356141), (280673, 714091151), (280673, 1963106847), (280673, 1970219336), (280673, 1973879931), (280673, 2041576452), (280673, 1189283571), (280673, 1193924154), (280673, 2900701815), (280673, 2911558212), (280673, 2910735588), (280673, 2915446398), (280673, 292745140), (280673, 294918744), (280673, 868664676), (280673, 1943757842), (280673, 2009219993), (280673, 2009186699), (280673, 2016738385), (280673, 2752894471), (280673, 2675317465), (280673, 2672561025), (280673, 905540049), (280673, 1059283304), (280673, 1062503441), (280673, 1065882767), (280673, 2596434341), (280673, 2080012190), (280673, 301723541), (280673, 308973827), (280673, 337108746), (280673, 2849611504), (280673, 2848484692), (280673, 2854571066), (280673, 2857016500), (280673, 2857678756), (280673, 2856700246), (280673, 2861374546), (280673, 484140310), (280673, 2245104868), (280673, 2245529823), (280673, 2274565601), (280673, 2279370083), (280673, 2288397076), (280673, 61651056), (280673, 61793945), (280673, 3053976855), (280673, 588981061), (280673, 592194568), (280673, 679256630), (280673, 680769321), (280673, 679405752), (280673, 685018370), (280673, 690886151), (280673, 460404830), (280673, 2455078568), (280673, 2466014369), (280673, 2467491159), (280673, 2148602850), (280673, 2152193836), (280673, 2156881522), (280673, 159954028), (280673, 1099507887), (280673, 3126832728), (280673, 3127107304), (280673, 3132352042), (280673, 3140983301), (280673, 848535089), (280673, 856939280), (280673, 854182688), (280673, 860166988), (280673, 859509052), (280673, 1416123410), (280673, 1420559613), (280673, 1426036490), (280673, 1683872098), (280673, 1589446887), (280673, 1741238339), (280673, 1746826593), (280673, 1776252952), (280673, 1853050261), (280673, 2806294018), (280673, 85913912), (280673, 117009110), (280673, 243904759), (280673, 266544725), (280673, 270497155), (280753, 365456849), (280753, 376437185), (280753, 27753821), (280753, 30829464), (280753, 39366995), (280753, 43218719), (280753, 44351741), (280753, 74941574), (280753, 79893511), (280753, 89066701), (280753, 95489617), (280753, 96879307), (280753, 766664461), (280753, 768428703), (280753, 778821400), (280753, 813375609), (280753, 811693821), (280753, 134561155), (280753, 177384900), (280753, 864135449), (280753, 864682742), (280753, 240478542), (280753, 346171992), (280753, 351796583), (280753, 354102534), (280753, 358289357), (280753, 363569966), (280753, 422998503), (280753, 441378620), (280753, 61541558), (280753, 66437573), (280753, 69680529), (280753, 635429149), (280753, 732689189), (280753, 649050361), (280753, 210010568), (280753, 217994521), (280753, 221475865), (280753, 567552131), (280753, 568115382), (280753, 572486468), (280753, 574235324), (280753, 592483954), (280753, 797604745), (280753, 807802541), (280753, 828723584), (280753, 833447390), (280753, 266513600), (280753, 268646852), (280753, 333717286), (280753, 333390112), (280753, 679828943), (280753, 698044006), (280753, 13265533), (280753, 17051870), (280753, 19064691), (280753, 54122633), (280753, 55443906), (280753, 59454949), (280753, 848380537), (280753, 847713278), (280753, 850429585), (280753, 867607441), (280753, 398836135), (280753, 403106756), (280753, 406391793), (280753, 412998749), (280753, 527747276), (280753, 528489947), (280753, 530333422), (280753, 272398089), (280753, 272996746), (280753, 274428674), (280753, 314356589), (280753, 317616096), (280753, 321620391), (280753, 321338962), (280753, 325417838), (280753, 326718901), (280753, 330419057), (280753, 735448189), (280753, 745653570), (280753, 746224121), (280753, 744096305), (280753, 745172692), (280753, 754549904), (280753, 758217185), (280753, 297250576), (280753, 709038478), (280753, 383705797), (280753, 388628709), (280753, 395875171), (280753, 139888392), (280753, 168114146), (280753, 491280594), (280753, 496091622), (280753, 503858086), (280753, 508881079), (280753, 508900345), (280753, 510314834), (280753, 446256192), (280753, 466184764), (280753, 471900183), (280753, 537464779), (280753, 537857180), (280753, 538573954), (280753, 548561281), (280753, 721826545), (280753, 721146202), (280753, 723937158), (280753, 129616839), (280753, 144474583), (280753, 151148259), (280753, 104405491), (280753, 102213244), (280753, 112652971), (280753, 299895622), (280753, 300936115), (280753, 301573976), (280753, 304803216), (280753, 314520592), (280753, 778906192), (280753, 779344349), (280753, 784367794), (280753, 793117292), (280753, 622741527), (280753, 626422097), (280753, 474243198), (280753, 475736691), (280753, 485297093), (280753, 486264713), (280753, 486742407), (280753, 486776862), (280753, 173211963), (280753, 171428593), (280753, 180617209), (280753, 181021134), (280753, 179266464), (280753, 186307027), (280753, 191317520), (280753, 197266902), (280853, 12280853), (280853, 33570179), (280853, 34929280), (280853, 40356388), (280853, 20546136), (280853, 84246492), (280853, 85596120), (280853, 88044578), (280853, 90630872), (280853, 130933362), (280853, 116187520), (280853, 119434178), (280853, 29144998), (280853, 64187219), (280853, 137691992), (280853, 144074454), (280853, 149266631), (280853, 146187670), (280853, 88975116), (280853, 99122399), (280853, 106334941), (280853, 107318663), (280853, 104888757), (280853, 46534033), (280853, 58769889), (280853, 68391127), (280862, 1936729688), (280862, 1939640883), (280862, 1990292225), (280862, 821967323), (280862, 857152963), (280862, 713621141), (280862, 746087171), (280862, 203985064), (280862, 229448002), (280862, 612509241), (280862, 657018655), (280862, 663803029), (280862, 2553060717), (280862, 2554443443), (280862, 2814934281), (280862, 2821494034), (280862, 2710543225), (280862, 2724475109), (280862, 2402827453), (280862, 2423759093), (280862, 15860086), (280862, 22107217), (280862, 43776347), (280862, 42416817), (280862, 1640972519), (280862, 1642090940), (280862, 1651901077), (280862, 1649496131), (280862, 1652832256), (280862, 1327171764), (280862, 1329650273), (280862, 1342897375), (280862, 56730589), (280862, 62673646), (280862, 93077037), (280862, 99420604), (280862, 133954936), (280862, 140387903), (280862, 141121340), (280862, 1291240322), (280862, 1314102134), (280862, 290732474), (280862, 299935456), (280862, 311404245), (280862, 1690685297), (280862, 1700860944), (280862, 1715156393), (280862, 867603545), (280862, 896122487), (280862, 896383546), (280862, 896945507), (280862, 2738723628), (280862, 2428284929), (280862, 1210198658), (280862, 1211845504), (280862, 1215231325), (280862, 1226234981), (280862, 951121817), (280862, 956744691), (280862, 715462687), (280862, 724143788), (280862, 727069118), (280862, 807006290), (280862, 809621319), (280862, 812612068), (280862, 818301705), (280862, 1334790134), (280862, 1389016245), (280862, 1395169725), (280862, 1008250128), (280862, 1035630940), (280862, 545557701), (280862, 546949626), (280862, 567468081), (280862, 570314712), (280862, 629847337), (280862, 633573311), (280862, 2743119066), (280862, 2764711185), (280862, 2765637164), (280862, 2768183806), (280862, 1244772049), (280862, 1255681830), (280862, 1256103772), (280862, 1256009495), (280862, 1258305841), (280862, 1265008715), (280862, 2037607826), (280862, 2040024507), (280862, 2045468401), (280862, 2107725751), (280862, 2112942609), (280862, 2122516125), (280862, 2120629988), (280862, 2537670027), (280862, 2542190370), (280862, 2158080235), (280862, 2159024598), (280862, 2157786872), (280862, 2164196799), (280862, 2169573471), (280862, 2171297732), (280862, 2175720789), (280862, 2179742953), (280862, 976613967), (280862, 979898299), (280862, 986506321), (280862, 991177184), (280862, 2276671032), (280862, 2281197545), (280862, 2289575465), (280862, 2232202599), (280862, 2238228435), (280862, 2241430816), (280862, 2239384335), (280862, 2240949225), (280862, 1666130369), (280862, 1667750866), (280862, 1669406620), (280862, 1682719992), (280862, 1685189623), (280862, 1689879531), (280862, 2068254682), (280862, 2079299679), (280862, 2078538876), (280862, 1195152778), (280862, 2794984941), (280862, 2800983297), (280862, 1161378968), (280862, 1162412120), (280862, 1177120505), (280862, 1176007128), (280862, 1178698178), (280862, 1187914969), (280862, 1186425075), (280862, 1189445789), (280862, 1190057139), (280862, 1108281142), (280862, 1113116381), (280862, 1117312152), (280862, 1144753088), (280862, 1913058206), (280862, 1920023133), (280862, 1922260023), (280862, 1942673546), (280862, 1946330493), (280862, 1948746787), (280862, 2091669582), (280862, 2093959715), (280862, 2144270206), (280862, 2146144224), (280862, 1099773133), (280862, 1104547958), (280862, 1998019138), (280862, 2005713864), (280862, 1569260676), (280862, 2694393663), (280862, 119799453), (280862, 128240362), (280862, 130519007), (280862, 130479131), (280862, 753245725), (280862, 756185863), (280862, 272130933), (280862, 574551286), (280862, 518000123), (280862, 518670612), (280862, 529592999), (280862, 529969791), (280862, 2594025546), (280862, 2592807741), (280862, 1534382210), (280862, 1543216121), (280862, 1545545228), (280862, 2488691940), (280862, 1235245545), (280862, 1236983053), (280862, 1277626098), (280862, 1280829228), (280862, 1428881574), (280862, 1432775428), (280862, 1435958310), (280862, 1467938622), (280862, 1470418864), (280862, 1506396265), (280862, 1512029239), (280862, 1512574377), (280862, 482711349), (280862, 484242904), (280862, 486725465), (280862, 490217718), (280862, 496650932), (280862, 499969488), (280862, 502779400), (280862, 505942519), (280862, 349367078), (280862, 359120213), (280862, 359514221), (280862, 366644149), (280862, 371475378), (280862, 371854967), (280862, 328205191), (280862, 331874629), (280862, 336203476), (280862, 338073877), (280862, 1359484923), (280862, 1367486108), (280862, 1489789760), (280862, 1498098377), (280862, 911372192), (280862, 191495989), (280862, 400422481), (280862, 399408254), (280862, 405703078), (280862, 412703611), (280862, 414838548), (280862, 418647465), (280862, 419893532), (280862, 1881257041), (280862, 1890503462), (280862, 1896192790), (280862, 1902521620), (280862, 1905613362), (280862, 467673712), (280862, 475297805), (280862, 480572831), (280862, 1204314195), (280862, 1206865151), (280862, 1210795875), (280862, 2554738642), (280862, 2555403349), (280862, 1128855636), (280862, 1128654572), (280862, 1139937029), (280862, 1719322879), (280862, 1732456364), (280862, 1731646721), (280862, 1747017202), (280862, 1746814883), (280862, 2358092347), (280862, 2357012942), (280862, 2373704825), (280862, 2201343365), (280862, 2209057199), (280862, 2215225892), (280862, 372987968), (280862, 385473040), (280862, 1603566196), (280862, 1613280670), (280862, 1614281766), (280862, 1623364984), (280862, 172377859), (280862, 185306777), (280862, 267942018), (280862, 2839580707), (280862, 2844485290), (280862, 2845391423), (280862, 36459351), (280862, 40180071), (280862, 214815856), (280862, 218381590), (280862, 779627720), (280862, 788837479), (280862, 796723737), (280862, 802425527), (280862, 2304775305), (280862, 2314457834), (280862, 2339563661), (280862, 2338300334), (280862, 429036746), (280862, 429576381), (280862, 443264366), (280862, 2043607768), (280862, 2056918125), (280862, 838759902), (280862, 838396870), (280862, 837898324), (280862, 922951041), (280862, 927190041), (280862, 2259173821), (280862, 2264841189), (280862, 2460190921), (280862, 2463622000), (280862, 1381019832), (280862, 1765201656), (280862, 1768499397), (280862, 2327547421), (280862, 2391395233), (280862, 670901657), (280862, 672365919), (280862, 684807023), (280862, 730553949), (280862, 743375024), (280862, 1906755767), (280862, 650741360), (280862, 692690208), (280862, 698045808), (280862, 2642124476), (280862, 2652318187), (280862, 2679892082), (280862, 1852091942), (280862, 1859495024), (280862, 1861341486), (280862, 1867554834), (280862, 4557498), (280862, 1956304251), (280862, 1967369720), (280862, 1975214121), (280862, 1976918308), (280862, 1784778936), (280862, 1812882271), (280862, 2506404062), (280862, 2521556515), (280862, 2524252375), (280862, 2529070602), (280862, 2527789606), (280862, 2529176065), (280862, 2532785557), (280862, 2444434784), (280862, 2471758467), (280862, 1827824719), (280862, 1000389632), (280862, 1000345540), (280862, 999253428), (280862, 1002714896), (280950, 9187792), (280950, 10573357), (280950, 15426066), (280950, 46269099), (280950, 1940683396), (280950, 1941715174), (280950, 1947825900), (280950, 1952905345), (280950, 1956837999), (280950, 1959532130), (280950, 1961848279), (280950, 1962030557), (280950, 785219841), (280950, 1401071968), (280950, 1403064168), (280950, 2196490951), (280950, 2206078699), (280950, 2262474812), (280950, 2120041978), (280950, 2169421001), (280950, 2170277470), (280950, 2178144511), (280950, 2176782694), (280950, 918318666), (280950, 927134967), (280950, 933235833), (280950, 2013504605), (280950, 2018155443), (280950, 2021915036), (280950, 1448702144), (280950, 1453108272), (280950, 1455215108), (280950, 1462402856), (280950, 31622797), (280950, 35168551), (280950, 43030101), (280950, 1442542891), (280950, 2530424009), (280950, 1800383430), (280950, 2515838222), (280950, 2630916879), (280950, 514241981), (280950, 2676172703), (280950, 1896655511), (280950, 1980256960), (280950, 1042194167), (280950, 460922609), (280950, 460060389), (280950, 2759986721), (280950, 547970785), (280950, 1194698193), (280950, 1196987667), (280950, 1197424102), (280950, 1196471523), (280950, 1201551663), (280950, 2040164846), (280950, 2073381890), (280950, 217010196), (280950, 216241130), (280950, 218544658), (280950, 224155340), (280950, 222576270), (280950, 1615760514), (280950, 1622709325), (280950, 1632852912), (280950, 1641044367), (280950, 2432357397), (280950, 2432380255), (280950, 2433659234), (280950, 2433504468), (280950, 2435858510), (280950, 2472439228), (280950, 202310071), (280950, 211275664), (280950, 686771187), (280950, 690085116), (280950, 699797332), (280950, 1206536739), (280950, 1224356812), (280950, 1226964877), (280950, 1229969147), (280950, 896106167), (280950, 898463347), (280950, 900390575), (280950, 903717758), (280950, 903685949), (280950, 902188528), (280950, 597354230), (280950, 616443696), (280950, 620428396), (280950, 686770893), (280950, 769238391), (280950, 782960901), (280950, 780584805), (280950, 2698933738), (280950, 2725480045), (280950, 2727186545), (280950, 2727922757), (280950, 2730100018), (280950, 1203696268), (280950, 2668705330), (280950, 618585677), (280950, 2644770071), (280950, 2654921358), (280950, 2672582001), (280950, 568573960), (280950, 592317107), (280950, 640631308), (280950, 871595251), (280950, 2091805267), (280950, 2099319268), (280950, 172546934), (280950, 178447971), (280950, 180731110), (280950, 1381143962), (280950, 1382719827), (280950, 1382286130), (280950, 1396600388), (280950, 1421139067), (280950, 1643886106), (280950, 1649847875), (280950, 1678561481), (280950, 1681380804), (280950, 1685958364), (280950, 2506702592), (280950, 2531013364), (280950, 2538022589), (280950, 2232143594), (280950, 2235724297), (280950, 2397100911), (280950, 2400091803), (280950, 55938289), (280950, 164293201), (280950, 164758887), (280950, 740419859), (280950, 748953982), (280950, 798503363), (280950, 1550678128), (280950, 1551141875), (280950, 1565132053), (280950, 1577685175), (280950, 415960293), (280950, 429105295), (280950, 432442865), (280950, 1853411342), (280950, 1854943843), (280950, 2459054882), (280950, 2182468282), (280950, 2185594221), (280950, 2193074722), (280950, 2212404870), (280950, 2215674158), (280950, 2223413389), (280950, 2225108144), (280950, 1245124618), (280950, 1243668726), (280950, 1252038712), (280950, 100994888), (280950, 2565448924), (280950, 2366568844), (280950, 2370482874), (280950, 2381837292), (280950, 2390299835), (280950, 779094582), (280950, 2608806073), (280950, 2611412637), (280950, 2465702865), (280950, 2490088451), (280950, 2578986171), (280950, 2581625840), (280950, 2586125413), (280950, 2588526174), (280950, 2588738299), (280950, 1255920926), (280950, 1279027199), (280950, 1314769620), (280950, 1318313104), (280950, 2305064763), (280950, 2302717073), (280950, 2309448731), (280950, 2309348064), (280950, 821399184), (280950, 2281920330), (280950, 2298973606), (280950, 1885824052), (280950, 390884024), (280950, 391290294), (280950, 394699644), (280950, 486908069), (280950, 486132085), (280950, 490595926), (280950, 305591552), (280950, 359989187), (280950, 402676873), (280950, 409635007), (280950, 150050882), (280950, 188005538), (280950, 188546090), (280950, 191857467), (280950, 198806467), (280950, 666853790), (280950, 678649811), (280950, 1331151907), (280950, 1334888408), (280950, 1340224942), (280950, 1340246351), (280950, 1341251784), (280950, 1345336268), (280950, 1344999325), (280950, 1368686209), (280950, 1369587334), (280950, 1379598532), (280950, 1381155620), (280950, 1747349975), (280950, 2151714800), (280950, 2153242888), (280950, 2165461918), (280950, 1089394105), (280950, 1092184227), (280950, 1098848585), (280950, 291471134), (280950, 291165699), (280950, 292388086), (280950, 339673226), (280950, 338862055), (280950, 342882783), (280950, 343500323), (280950, 348591802), (280950, 348996382), (280950, 1488177585), (280950, 1509611449), (280950, 1515974652), (280950, 1523070263), (280950, 1530576371), (280950, 1530681802), (280950, 1533824804), (280950, 1533777383), (280950, 1542907252), (280950, 1546548452), (280950, 942098275), (280950, 952307608), (280950, 955382378), (280950, 958077598), (280950, 958478251), (280950, 1348297776), (280950, 1351511901), (280950, 1819528064), (280950, 1823941983), (280950, 1826396540), (280950, 1829445299), (280950, 1835138534), (280950, 1839793045), (280950, 2409375600), (280950, 2084970545), (280950, 2334399095), (280950, 2339120571), (280950, 2338464004), (280950, 2345395320), (280950, 2357744286), (280950, 1252934566), (280950, 1254642535), (280950, 1301373943), (280950, 514391868), (280950, 2558688824), (280950, 2570736613), (280950, 2572515614), (280950, 2591739883), (280950, 2590356712), (280950, 1106733176), (280950, 1115347484), (280950, 1121101659), (280950, 1136380420), (280950, 278954200), (280950, 1170998405), (280950, 1178038074), (280950, 1182566484), (280950, 2048105149), (280950, 2057177350), (280950, 2069061825), (280950, 1741224312), (280950, 1758566231), (280950, 121388814), (280950, 129781940), (280950, 141286649), (280950, 841986149), (280950, 1304276175), (280950, 1858428247), (280950, 2553499282), (280950, 1138365575), (280950, 1143441355), (280950, 1148253879), (280950, 624173882), (280950, 626677314), (280950, 625909626), (280950, 630053485), (280950, 633265575), (280950, 631597106), (280950, 633550198), (280950, 714767325), (280950, 1441891656), (280950, 2708801908), (280950, 1212121970), (280950, 1215532849), (280950, 253357251), (280950, 2250737075), (280950, 2254483171), (280950, 2255300639), (280950, 1659042563), (280950, 1662876409), (280950, 1596439210), (280950, 1599492079), (280950, 1600645713), (280950, 1608476523), (280950, 1912550607), (280950, 1913498795), (280950, 1923586719), (280950, 1926123390), (280950, 1004275197), (280950, 1003968518), (280950, 1703331530), (280950, 1714222073), (280950, 1718175549), (280950, 1723617236), (280950, 1730950376), (280950, 1732502258), (280950, 57659816), (280950, 57339283), (280950, 68258663), (280950, 74728508), (280950, 79158940), (280950, 969962423), (280950, 975470051), (280950, 987998671), (280950, 988405369), (280950, 441058642), (280950, 441841561), (280950, 447892321), (280950, 450418617), (280950, 458532184), (280950, 471529575), (280950, 477724912), (280950, 1584828435), (280950, 1585333327), (280950, 1687866358), (280950, 1692308383), (280950, 1759796335), (280950, 1780363835), (280950, 1782406431), (280950, 1847266266), (280977, 365476451), (280977, 364189059), (280977, 378598000), (280977, 379847289), (280977, 384502784), (280977, 168219347), (280977, 170150834), (280977, 175265938), (280977, 260779171), (280977, 263358794), (280977, 262998198), (280977, 270748746), (280977, 308420144), (280977, 314744346), (280977, 313117914), (280977, 318579550), (280977, 323924193), (280977, 328004323), (280977, 651919378), (280977, 657069957), (280977, 687757675), (280977, 689418308), (280977, 690568203), (280977, 6454166), (280977, 291533608), (280977, 297919938), (280977, 522768282), (280977, 526225015), (280977, 525533660), (280977, 527183092), (280977, 538785640), (280977, 539021081), (280977, 575593408), (280977, 608429027), (280977, 617104047), (280977, 621060722), (280977, 224326637), (280977, 233906123), (280977, 395393455), (280977, 401165409), (280977, 405380990), (280977, 405911735), (280977, 406614162), (280977, 678795478), (280977, 634166393), (280977, 639503585), (280977, 208210784), (280977, 210689436), (280977, 216258743), (280977, 332039712), (280977, 336935310), (280977, 352487256), (280977, 153230677), (280977, 166250829), (280977, 66074774), (280977, 67127586), (280977, 76055636), (280977, 83852289), (280977, 412254450), (280977, 410086940), (280977, 414781074), (280977, 413178405), (280977, 448899856), (280977, 33743971), (280977, 560430540), (280977, 564988210), (280977, 454519437), (280977, 454676225), (280977, 457989478), (280977, 458331691), (280977, 460722996), (280977, 463704913), (280977, 483725490), (280977, 486034888), (280977, 491265322), (280977, 492901163), (280977, 493856576), (280977, 492987217), (280977, 112230533), (280977, 117017185), (280977, 121554458), (280977, 125364129), (280977, 128580510), (280977, 127087245), (280977, 133646013), (280977, 92772944), (280977, 141971410), (280977, 179538658), (280977, 190066310), (280977, 472641774), (280977, 387762143), (280977, 392312600), (280977, 392269655), (280977, 391564990), (281070, 192337253), (281070, 192416400), (281070, 242797712), (281070, 245696669), (281070, 162773670), (281070, 38006893), (281070, 111059704), (281070, 117559049), (281070, 205031551), (281070, 208844055), (281070, 211244538), (281070, 211220593), (281070, 218253382), (281070, 47932856), (281070, 51835840), (281070, 231555092), (281070, 222924259), (281070, 221759413), (281070, 221189065), (281070, 228367360), (281070, 131313504), (281070, 135752567), (281070, 135030279), (281070, 72656009), (281070, 78383468), (281070, 96376699), (281070, 97931771), (281070, 86943653), (281070, 137681597), (281070, 140381102), (281070, 142449920), (281070, 144465752), (281070, 171575804), (281070, 7736444), (281070, 14510533), (281070, 18259543), (281070, 15430442), (281070, 19309202), (281070, 19513374), (281070, 23385511), (281070, 23541950), (281070, 25470016), (281070, 65188443), (281070, 65714474), (281070, 67028285), (281074, 888484336), (281074, 273537729), (281074, 276212772), (281074, 280942138), (281074, 619507362), (281074, 630092935), (281074, 640436165), (281074, 645548959), (281074, 34808881), (281074, 325482124), (281074, 330318367), (281074, 366247814), (281074, 369538972), (281074, 381602704), (281074, 397184907), (281074, 406959623), (281074, 285329216), (281074, 360913395), (281074, 453544923), (281074, 459621542), (281074, 460050685), (281074, 465477012), (281074, 335421019), (281074, 339822511), (281074, 344811336), (281074, 414147451), (281074, 439321357), (281074, 840278119), (281074, 708549150), (281074, 718698674), (281074, 524711937), (281074, 535678391), (281074, 537148497), (281074, 550235441), (281074, 760541692), (281074, 760209243), (281074, 767516472), (281074, 769024585), (281074, 770721279), (281074, 779275957), (281074, 244683125), (281074, 244814916), (281074, 250761141), (281074, 552578557), (281074, 559889754), (281074, 570633644), (281074, 572602585), (281074, 577173612), (281074, 584363979), (281074, 597333283), (281074, 893176571), (281074, 892244664), (281074, 895550244), (281074, 113603384), (281074, 193168847), (281074, 197278677), (281074, 200411496), (281074, 200984217), (281074, 205670863), (281074, 206410720), (281074, 472895841), (281074, 579330928), (281074, 647383111), (281074, 650371446), (281074, 658452666), (281074, 664281861), (281074, 669697895), (281074, 669033136), (281074, 669198066), (281074, 129967617), (281074, 133959788), (281074, 136321117), (281074, 137479241), (281074, 218345823), (281074, 228988690), (281074, 238126522), (281074, 238540891), (281074, 141696082), (281074, 149311146), (281074, 154146117), (281074, 160561783), (281074, 303344684), (281074, 722474558), (281074, 722497656), (281074, 725579326), (281074, 729485499), (281074, 739848233), (281074, 744960772), (281074, 495225638), (281074, 482688754), (281074, 483413322), (281074, 480396575), (281074, 489869351), (281074, 789247969), (281074, 792747399), (281074, 794519565), (281074, 794631689), (281074, 797536535), (281074, 800188797), (281074, 821563734), (281074, 823917117), (281074, 824327382), (281074, 851911621), (281074, 58980774), (281074, 62062566), (281074, 66468550), (281074, 68234192), (281074, 265893479), (281074, 268485881), (281074, 3994271), (281074, 31061967), (281075, 1901934), (281075, 10768291), (281075, 18968296), (281075, 16705086), (281130, 316962841), (281130, 314158900), (281130, 303467992), (281130, 306513303), (281130, 151852403), (281130, 118932816), (281130, 122882407), (281130, 123838423), (281130, 141225843), (281130, 145368974), (281130, 210656037), (281130, 191798820), (281130, 196179651), (281130, 216584551), (281130, 217499609), (281130, 222954151), (281130, 244504707), (281130, 246734873), (281130, 393187507), (281130, 46220569), (281130, 131823719), (281130, 281194765), (281130, 122990048), (281130, 160070069), (281130, 165438380), (281130, 173108140), (281130, 183086891), (281130, 183946265), (281130, 5428775), (281130, 28119213), (281130, 58308319), (281130, 359568397), (281130, 366141086), (281130, 371919789), (281130, 286532535), (281130, 286251240), (281130, 294442485), (281130, 39252595), (281130, 62533604), (281130, 71034790), (281130, 398165520), (281130, 92892529), (281130, 104827700), (281143, 157595537), (281143, 333156839), (281143, 333619871), (281143, 347320050), (281143, 2032281195), (281143, 2037877561), (281143, 1234798740), (281143, 1239163686), (281143, 1243066433), (281143, 1247808657), (281143, 1251899109), (281143, 1255678609), (281143, 1979316791), (281143, 2008822283), (281143, 951503985), (281143, 956153284), (281143, 3061612232), (281143, 3063409045), (281143, 3062680360), (281143, 3071698440), (281143, 3072038605), (281143, 806559205), (281143, 813593589), (281143, 2319301390), (281143, 3461810341), (281143, 3470210182), (281143, 3473567503), (281143, 205434538), (281143, 216658970), (281143, 215583292), (281143, 425370058), (281143, 256754619), (281143, 1202495606), (281143, 1221726046), (281143, 2646382125), (281143, 2644875629), (281143, 2644618760), (281143, 2644347068), (281143, 1116332496), (281143, 1127155737), (281143, 1125402431), (281143, 1134122026), (281143, 1136070997), (281143, 2730733203), (281143, 2742489017), (281143, 2745879884), (281143, 2747109642), (281143, 585174740), (281143, 627857416), (281143, 1583607000), (281143, 3352377218), (281143, 3363067074), (281143, 3412975265), (281143, 3412354320), (281143, 3423020787), (281143, 840870609), (281143, 843593950), (281143, 850167655), (281143, 2289348760), (281143, 2299002002), (281143, 2310641698), (281143, 996119847), (281143, 1003063210), (281143, 1000046734), (281143, 1003652866), (281143, 1013707046), (281143, 1010848037), (281143, 1010430921), (281143, 1016637269), (281143, 1019820624), (281143, 2837116235), (281143, 2835623662), (281143, 2850328518), (281143, 1747460907), (281143, 1747688852), (281143, 1767844683), (281143, 1455827208), (281143, 1461169862), (281143, 1463881902), (281143, 1473882717), (281143, 1477019555), (281143, 1725686810), (281143, 1725822113), (281143, 1401955295), (281143, 1412262046), (281143, 1415285278), (281143, 1420115705), (281143, 1419347139), (281143, 1421363192), (281143, 623654255), (281143, 3595181463), (281143, 3602409437), (281143, 3601870538), (281143, 3609556274), (281143, 676867234), (281143, 678554447), (281143, 1492687951), (281143, 1518002588), (281143, 3905430950), (281143, 2077545436), (281143, 2083628985), (281143, 2106914318), (281143, 38105202), (281143, 55081438), (281143, 60845464), (281143, 57726921), (281143, 65061871), (281143, 1257144239), (281143, 1264564611), (281143, 1263737532), (281143, 2783687433), (281143, 2785643143), (281143, 2788666669), (281143, 2791888303), (281143, 2795422122), (281143, 2799707900), (281143, 1534777181), (281143, 1538080978), (281143, 1537115408), (281143, 1548229928), (281143, 1550903174), (281143, 1622204649), (281143, 1625307021), (281143, 1647435924), (281143, 1649806534), (281143, 2246989491), (281143, 2252447406), (281143, 2270923360), (281143, 2554623654), (281143, 2565211002), (281143, 3284741171), (281143, 3334235996), (281143, 3339428466), (281143, 3348951685), (281143, 2687920571), (281143, 2184506418), (281143, 4223756601), (281143, 4229645827), (281143, 143059276), (281143, 142287587), (281143, 141306090), (281143, 4152602640), (281143, 1788217665), (281143, 1790921846), (281143, 1791744222), (281143, 1802805812), (281143, 1802356894), (281143, 2341726799), (281143, 712697671), (281143, 2863691662), (281143, 2869448870), (281143, 2879063404), (281143, 2879132229), (281143, 2881423057), (281143, 2882934281), (281143, 2885269854), (281143, 2889163508), (281143, 2451692247), (281143, 2457472381), (281143, 2471725123), (281143, 2471637185), (281143, 2066381892), (281143, 2066358496), (281143, 2073387720), (281143, 3248338144), (281143, 3254266012), (281143, 3263486956), (281143, 3267096980), (281143, 3274987680), (281143, 469895296), (281143, 473053691), (281143, 481896991), (281143, 867227854), (281143, 3570845149), (281143, 3700234654), (281143, 3705064006), (281143, 35980951), (281143, 185368900), (281143, 185558909), (281143, 3972163292), (281143, 3558718112), (281143, 3564724489), (281143, 3568326480), (281143, 3571861904), (281143, 302269251), (281143, 303376108), (281143, 304409387), (281143, 315328905), (281143, 317401697), (281143, 1937194549), (281143, 1941898983), (281143, 1953807538), (281143, 1967829737), (281143, 3626709104), (281143, 735126205), (281143, 737825896), (281143, 741721313), (281143, 687713916), (281143, 690622746), (281143, 1874777712), (281143, 1883147330), (281143, 1891159931), (281143, 1060702981), (281143, 1081424334), (281143, 587915869), (281143, 590877447), (281143, 592547173), (281143, 593015307), (281143, 594103820), (281143, 598254838), (281143, 610397433), (281143, 3089558356), (281143, 3141145145), (281143, 3142150545), (281143, 3140353149), (281143, 3143500116), (281143, 3144815266), (281143, 3149260607), (281143, 882854121), (281143, 888231558), (281143, 2402048662), (281143, 2402067900), (281143, 2413902475), (281143, 2413959429), (281143, 2419397288), (281143, 1838274807), (281143, 1846413688), (281143, 1853436960), (281143, 1851750722), (281143, 1024296031), (281143, 2204340582), (281143, 2206945713), (281143, 2208801285), (281143, 2214581867), (281143, 3204740050), (281143, 3209039866), (281143, 3211528833), (281143, 2442716992), (281143, 504259125), (281143, 526827836), (281143, 3533048294), (281143, 3547406065), (281143, 1365468325), (281143, 1367516994), (281143, 1382914120), (281143, 1383973147), (281143, 1387266804), (281143, 1385973507), (281143, 152915185), (281143, 154608774), (281143, 156381922), (281143, 4196794118), (281143, 4205595171), (281143, 4208442399), (281143, 4213738161), (281143, 2761202471), (281143, 759027281), (281143, 761304834), (281143, 769368571), (281143, 778111761), (281143, 783679510), (281143, 782022651), (281143, 2478223815), (281143, 2495347223), (281143, 1081092273), (281143, 1093583895), (281143, 1109700494), (281143, 1109322409), (281143, 3295261786), (281143, 3307978769), (281143, 2945783255), (281143, 2951857003), (281143, 2952973606), (281143, 2968703933), (281143, 2976641388), (281143, 2977578156), (281143, 3096808706), (281143, 3123104163), (281143, 3753336078), (281143, 3758069083), (281143, 3763472525), (281143, 3785778424), (281143, 3428628298), (281143, 3428729768), (281143, 3435313396), (281143, 3445141280), (281143, 3446160451), (281143, 3456425420), (281143, 3458166225), (281143, 3456266623), (281143, 98702485), (281143, 107009256), (281143, 116605576), (281143, 117840018), (281143, 119047242), (281143, 2983956191), (281143, 2985557102), (281143, 2702060967), (281143, 2709145254), (281143, 2710239244), (281143, 2712247657), (281143, 2715576586), (281143, 3046811437), (281143, 3047583327), (281143, 972514684), (281143, 981032119), (281143, 3814779570), (281143, 638826157), (281143, 649742776), (281143, 656846303), (281143, 661819091), (281143, 1568666882), (281143, 1580094041), (281143, 1688012722), (281143, 1700089887), (281143, 1706750974), (281143, 3166661545), (281143, 3223632514), (281143, 3230944477), (281143, 4072332515), (281143, 4084860737), (281143, 4084145884), (281143, 4096486712), (281143, 4095856169), (281143, 4101946684), (281143, 2108694354), (281143, 2111790854), (281143, 2120584830), (281143, 2132546579), (281143, 437738114), (281143, 445959894), (281143, 449043103), (281143, 452944263), (281143, 454736249), (281143, 3372010167), (281143, 3801303010), (281143, 3801153977), (281143, 3808070823), (281143, 3811917914), (281143, 176303631), (281143, 184989418), (281143, 183031458), (281143, 265196423), (281143, 541672995), (281143, 542382512), (281143, 546198417), (281143, 546878667), (281143, 550833127), (281143, 2654323785), (281143, 2659469406), (281143, 2659630671), (281143, 1172403041), (281143, 1183838491), (281143, 3881496657), (281143, 3887796806), (281143, 3897305500), (281143, 3901054726), (281143, 1138789946), (281143, 1142412487), (281143, 1145384194), (281143, 1152447689), (281143, 1150105806), (281143, 1156000849), (281143, 1157422020), (281143, 1163277282), (281143, 280514869), (281143, 3010000753), (281143, 3018777947), (281143, 3512212480), (281143, 3516170502), (281143, 3520289068), (281143, 3525794265), (281143, 3678497429), (281143, 3680449961), (281143, 3751149759), (281143, 820823967), (281143, 830729691), (281143, 68656648), (281143, 77148174), (281143, 95193594), (281143, 93074616), (281143, 1896997077), (281143, 1904800650), (281143, 1912257707), (281143, 1917430690), (281143, 2931804457), (281143, 2991935317), (281143, 2996718205), (281143, 4037788178), (281143, 4038457975), (281143, 4045366719), (281143, 4048314793), (281143, 4052795248), (281143, 4053510388), (281143, 4051936651), (281143, 2050455506), (281143, 2060434996), (281143, 3689572719), (281143, 3691241074), (281143, 3702412630), (281143, 3705826100), (281143, 3712828940), (281143, 3723702909), (281143, 2576651931), (281143, 2584641333), (281143, 2586417263), (281143, 2584370048), (281143, 2598772901), (281143, 930207541), (281143, 1430806120), (281143, 1435246489), (281143, 1445827843), (281143, 1443984051), (281143, 1448418108), (281143, 497238709), (281143, 361030086), (281143, 362222246), (281143, 375548425), (281143, 322076796), (281143, 327939823), (281143, 330209440), (281143, 2229992476), (281143, 2239539990), (281143, 1808896031), (281143, 1812577312), (281143, 1812157791), (281143, 1032330697), (281143, 1041326703), (281143, 1057417818), (281143, 381820393), (281143, 395348181), (281143, 394617983), (281143, 401329985), (281143, 399121161), (281143, 397846921), (281143, 2150353112), (281143, 2160156197), (281143, 2164461832), (281143, 2165720688), (281143, 3919429582), (281143, 3932479759), (281143, 2756431), (281143, 11106510), (281143, 11050325), (281143, 25756691), (281143, 28144957), (281143, 1333449112), (281143, 1339005972), (281143, 1338366733), (281143, 721203231), (281143, 2043826073), (281143, 1982282379), (281143, 4009947724), (281143, 4179450299), (281143, 4187220539), (281143, 3181489347), (281143, 3185362500), (281143, 3185657411), (281143, 3190497661), (281143, 3200995243), (281143, 4023612212), (281143, 4028049269), (281143, 4031368686), (281143, 4127241917), (281143, 4140411189), (281143, 908671097), (281143, 914008100), (281143, 913495166), (281143, 918852184), (281143, 919220828), (281143, 2368205853), (281143, 2377009233), (281143, 2389832336), (281143, 2400245319), (281143, 3834775499), (281143, 3848924798), (281143, 3855738234), (281143, 3319954939), (281143, 3323639709), (281143, 227084758), (281143, 237116621), (281143, 240841256), (281143, 250997266), (281143, 2514319250), (281143, 2515072889), (281143, 2526203403), (281143, 2526938628), (281143, 3950299722), (281143, 2610880409), (281143, 2627156766), (281143, 2627322721), (281143, 2630747559), (281143, 2633581850), (281143, 288986712), (281143, 289469861), (281143, 293902396), (281143, 298413220), (281143, 1602346659), (281143, 1613154549), (281143, 1661088138), (281143, 1667082188), (281143, 1668638047), (281143, 1674983167), (281143, 1676949270), (281143, 1676671010), (281143, 1676999016), (281143, 1679177550), (281143, 3240089300), (281143, 4106098845), (281143, 4113697974), (281143, 4117256686), (281143, 4119363295), (281143, 1282591969), (281143, 1285789506), (281143, 1287074927), (281143, 2899261219), (281143, 2907127329), (281143, 2910948284), (281143, 2919579992), (281143, 2921247872), (281143, 1777076882), (281143, 3654995106), (281143, 3656926151), (281143, 3663007478), (281143, 3669937719), (281143, 3670518898), (281143, 3677939818), (281317, 32518025), (281317, 35402318), (281317, 394529793), (281317, 395792496), (281317, 397491850), (281317, 259973640), (281317, 145824965), (281317, 155818668), (281317, 363862383), (281317, 39330713), (281317, 47208018), (281317, 56434457), (281317, 60177362), (281317, 69074711), (281317, 322578241), (281317, 383138111), (281317, 410841126), (281317, 414490582), (281317, 418398611), (281317, 431245411), (281317, 160741254), (281317, 173020785), (281317, 171616660), (281317, 177421660), (281317, 192765043), (281317, 189952644), (281317, 7026550), (281317, 8185433), (281317, 7591136), (281317, 8661374), (281317, 15249375), (281317, 27265533), (281317, 292294684), (281317, 298825016), (281317, 305890084), (281317, 229039232), (281317, 234566222), (281317, 241415349), (281317, 242796222), (281317, 248264282), (281317, 251714859), (281317, 96214206), (281317, 227422336), (281317, 229567177), (281317, 274763899), (281317, 275688193), (281317, 278980962), (281317, 282530232), (281317, 332027659), (281317, 336102716), (281317, 347939257), (281317, 111927337), (281317, 115742920), (281317, 116599249), (281317, 120482530), (281317, 123680104), (281317, 129416389), (281317, 130455328), (281317, 136601838), (281317, 135648929), (281317, 138895774), (281385, 1166803573), (281385, 1169829490), (281385, 1179336499), (281385, 1388079518), (281385, 1917657899), (281385, 1492378778), (281385, 1491609265), (281385, 1502393604), (281385, 495747737), (281385, 501189070), (281385, 517461069), (281385, 574881507), (281385, 590696146), (281385, 605326260), (281385, 1540080460), (281385, 1549918738), (281385, 1556317449), (281385, 1557381290), (281385, 2140165087), (281385, 2153043496), (281385, 539913767), (281385, 543335546), (281385, 544383660), (281385, 545794434), (281385, 547027374), (281385, 552732304), (281385, 553059816), (281385, 552172327), (281385, 556037306), (281385, 553782387), (281385, 557340600), (281385, 560856414), (281385, 1856011992), (281385, 2115963135), (281385, 2129611655), (281385, 2133905081), (281385, 2176100628), (281385, 2178917324), (281385, 2179172162), (281385, 2182077711), (281385, 2184415713), (281385, 2183737175), (281385, 1328411487), (281385, 1333819359), (281385, 1403781898), (281385, 1404677260), (281385, 1408089491), (281385, 1409869505), (281385, 1413063128), (281385, 1417497573), (281385, 1425157474), (281385, 1428853992), (281385, 704644469), (281385, 715418167), (281385, 721177433), (281385, 729057069), (281385, 734643796), (281385, 734249191), (281385, 737079227), (281385, 1741254183), (281385, 1745166456), (281385, 1744571536), (281385, 1747777200), (281385, 1761628323), (281385, 1761552493), (281385, 2039310342), (281385, 2038413098), (281385, 2042942686), (281385, 1697695625), (281385, 1698690641), (281385, 1700193361), (281385, 483238850), (281385, 489870078), (281385, 623305995), (281385, 629655981), (281385, 640513875), (281385, 641197422), (281385, 642656796), (281385, 1034954318), (281385, 1042651235), (281385, 1048545116), (281385, 1050926491), (281385, 1065164967), (281385, 1067898580), (281385, 1071998037), (281385, 1974985259), (281385, 1982535752), (281385, 1983462364), (281385, 1985849127), (281385, 1998285428), (281385, 2001825787), (281385, 439346906), (281385, 445429273), (281385, 447527528), (281385, 1828865231), (281385, 1839338993), (281385, 1850931701), (281385, 528278767), (281385, 1467852201), (281385, 1471344634), (281385, 1475932184), (281385, 1528364261), (281385, 1531745150), (281385, 910181586), (281385, 911566493), (281385, 916280650), (281385, 923227825), (281385, 1918033635), (281385, 1091486360), (281385, 1507819072), (281385, 1512171947), (281385, 1514749613), (281385, 1514537924), (281385, 1575803953), (281385, 1581687082), (281385, 1605804623), (281385, 1613039197), (281385, 2008745132), (281385, 2010751381), (281385, 2013244918), (281385, 2015071288), (281385, 2017007784), (281385, 2021432069), (281385, 2032998684), (281385, 2032211331), (281385, 2035326933), (281385, 1184958970), (281385, 1200292642), (281385, 1208550872), (281385, 1073528150), (281385, 1122597203), (281385, 1124670577), (281385, 1134765913), (281385, 1147186602), (281385, 1662615434), (281385, 1667987118), (281385, 1673993137), (281385, 1671994282), (281385, 1677164357), (281385, 1679241983), (281385, 1680724294), (281385, 1694144618), (281385, 963069256), (281385, 962516681), (281385, 965793898), (281385, 968674189), (281385, 975113633), (281385, 890140254), (281385, 894981872), (281385, 1661921906), (281385, 1028563565), (281385, 977766425), (281385, 980730781), (281385, 987336483), (281385, 990291653), (281385, 991989937), (281385, 989640726), (281385, 1001824746), (281385, 999491313), (281385, 1003009744), (281385, 1007146005), (281385, 1010573099), (281385, 1011263926), (281385, 1018432099), (281385, 1019184930), (281385, 1022747304), (281385, 653516481), (281385, 870081375), (281385, 872077132), (281385, 1968876126), (281385, 1970719918), (281385, 1969115879), (281385, 1082740267), (281385, 1097785216), (281385, 1098207242), (281385, 1097530077), (281385, 1102044123), (281385, 1739962232), (281385, 825847190), (281385, 419813596), (281385, 425599496), (281385, 1256517836), (281385, 1214161516), (281385, 1217645604), (281385, 1794197259), (281385, 1803728783), (281385, 1801133887), (281385, 1809691076), (281385, 1622566040), (281385, 1622313659), (281385, 1623541543), (281385, 1626020598), (281385, 1651702198), (281385, 1350709903), (281385, 1352776810), (281385, 1357638537), (281385, 1369136090), (281385, 1382834411), (281385, 1156946546), (281385, 1156563153), (281385, 1714194557), (281385, 1715451942), (281385, 1721212809), (281385, 2084309371), (281385, 2096916097), (281385, 2099466381), (281385, 1941358448), (281385, 1940731451), (281385, 1947418685), (281385, 1956759197), (281385, 1956357890), (281385, 747799865), (281385, 1885455563), (281385, 1269983750), (281385, 1277281219), (281385, 1284596682), (281385, 1283350391), (281385, 1244384867), (281385, 1434239234), (281385, 1432486123), (281385, 1433928160), (281385, 1440594116), (281385, 1453117941), (281385, 930534379), (281385, 947299446), (281385, 1285523334), (281385, 1611650175), (281385, 1617754646), (281385, 797345264), (281385, 2200163602), (281385, 2206392910), (281385, 2204124322), (281385, 2208015440), (281385, 858309749), (281385, 857280222), (281385, 1822084888), (281385, 1602882145), (281411, 137947779), (281411, 151338255), (281411, 159844857), (281411, 160858710), (281411, 1877331539), (281411, 1884696854), (281411, 1886962280), (281411, 915533943), (281411, 38319417), (281411, 40536636), (281411, 38845323), (281411, 54152727), (281411, 410543375), (281411, 412792380), (281411, 416946572), (281411, 420642269), (281411, 426686043), (281411, 424158800), (281411, 426725072), (281411, 433328640), (281411, 1120344246), (281411, 1125139041), (281411, 1131825431), (281411, 617441193), (281411, 829522133), (281411, 830202183), (281411, 534856399), (281411, 537636170), (281411, 547867890), (281411, 547686532), (281411, 550654951), (281411, 1898226718), (281411, 1898973049), (281411, 1917609981), (281411, 432455402), (281411, 437744959), (281411, 436096458), (281411, 439242043), (281411, 442107985), (281411, 445209396), (281411, 454457098), (281411, 90526410), (281411, 2329082087), (281411, 2339000952), (281411, 2341013887), (281411, 2347420152), (281411, 2356127194), (281411, 1274956815), (281411, 1275858850), (281411, 1296200774), (281411, 1299729555), (281411, 1301827098), (281411, 1302436693), (281411, 1682241379), (281411, 1690031203), (281411, 569993507), (281411, 572870027), (281411, 571659871), (281411, 576600323), (281411, 577227389), (281411, 586206683), (281411, 2076944854), (281411, 2073929920), (281411, 2082828478), (281411, 2175425186), (281411, 2182090915), (281411, 2201577115), (281411, 392351854), (281411, 397225157), (281411, 396450611), (281411, 398205093), (281411, 403021648), (281411, 408315181), (281411, 1737729881), (281411, 1737776182), (281411, 1741683287), (281411, 1742791232), (281411, 1751875086), (281411, 1751467021), (281411, 949421112), (281411, 2089932835), (281411, 2095570578), (281411, 654855803), (281411, 652908327), (281411, 662778023), (281411, 663035212), (281411, 671026946), (281411, 677835239), (281411, 678571454), (281411, 679951483), (281411, 1402120349), (281411, 1401588869), (281411, 1407271725), (281411, 1424547033), (281411, 1426939915), (281411, 512291583), (281411, 514471989), (281411, 522686254), (281411, 522315907), (281411, 524682367), (281411, 121873192), (281411, 131739317), (281411, 128639106), (281411, 699184528), (281411, 704143866), (281411, 721936958), (281411, 1762519428), (281411, 1777039309), (281411, 1782989700), (281411, 1786384106), (281411, 9085842), (281411, 20872509), (281411, 25971095), (281411, 28521815), (281411, 26923907), (281411, 172233365), (281411, 189768272), (281411, 189700911), (281411, 561500432), (281411, 2269423696), (281411, 2274894478), (281411, 2281750497), (281411, 2464515149), (281411, 2475503986), (281411, 2492127680), (281411, 2508628457), (281411, 2509744902), (281411, 206916373), (281411, 208354805), (281411, 208256375), (281411, 624819143), (281411, 639105340), (281411, 638917378), (281411, 639300418), (281411, 640659994), (281411, 643404469), (281411, 644870515), (281411, 1429542022), (281411, 1444179270), (281411, 2295873390), (281411, 1060612921), (281411, 1064636512), (281411, 1061264910), (281411, 1066043374), (281411, 1076509976), (281411, 1073518979), (281411, 2372962450), (281411, 2377414339), (281411, 2381168931), (281411, 2383752692), (281411, 2387785755), (281411, 1639815238), (281411, 1642185274), (281411, 1643536629), (281411, 1654807440), (281411, 1660478022), (281411, 1667766524), (281411, 1664940957), (281411, 504936849), (281411, 505222624), (281411, 1989273463), (281411, 1996284623), (281411, 1999728749), (281411, 2002791029), (281411, 2004911940), (281411, 2008535736), (281411, 2012947340), (281411, 298059912), (281411, 298725986), (281411, 301170660), (281411, 300890468), (281411, 304076788), (281411, 301686448), (281411, 307114673), (281411, 319951976), (281411, 920780273), (281411, 922917599), (281411, 924946371), (281411, 923092694), (281411, 927837765), (281411, 930378675), (281411, 930910410), (281411, 933994108), (281411, 936788463), (281411, 938507929), (281411, 944256998), (281411, 1161386513), (281411, 1802322833), (281411, 1804250261), (281411, 1804350243), (281411, 1811086894), (281411, 1813089653), (281411, 1821189740), (281411, 228499834), (281411, 238523563), (281411, 1918924707), (281411, 1923983984), (281411, 1930699915), (281411, 1936331234), (281411, 2015258715), (281411, 956291541), (281411, 959924897), (281411, 967047746), (281411, 980370277), (281411, 982981644), (281411, 460519601), (281411, 1023709332), (281411, 1024744798), (281411, 1043963279), (281411, 1046449998), (281411, 366889605), (281411, 369846251), (281411, 371306667), (281411, 382504714), (281411, 1336498299), (281411, 1350658011), (281411, 323089751), (281411, 327108674), (281411, 325868535), (281411, 327896142), (281411, 336871930), (281411, 337278310), (281411, 339637663), (281411, 2054325875), (281411, 2058285734), (281411, 2063682603), (281411, 2067356902), (281411, 2073235988), (281411, 2124774364), (281411, 2127732713), (281411, 2131611852), (281411, 2134569102), (281411, 1623071773), (281411, 1623484350), (281411, 1625158423), (281411, 1631335719), (281411, 256276592), (281411, 263416623), (281411, 263999789), (281411, 1553496398), (281411, 1570452113), (281411, 1569537841), (281411, 2244180012), (281411, 2265506376), (281411, 2421142016), (281411, 2433070377), (281411, 2442759932), (281411, 1370693637), (281411, 1377733038), (281411, 1379425170), (281411, 1380185764), (281411, 1381009217), (281411, 1386861205), (281411, 1389343074), (281411, 1393369239), (281411, 1826713256), (281411, 1826130829), (281411, 1837498611), (281411, 1840276080), (281411, 1843418919), (281411, 1203280503), (281411, 1213732411), (281411, 1218153332), (281411, 1230249461), (281411, 2517933330), (281411, 2523860792), (281411, 2527931236), (281411, 2536166240), (281411, 1962858529), (281411, 1962612569), (281411, 1973067398), (281411, 1983755088), (281411, 1470336291), (281411, 1481285252), (281411, 735346718), (281411, 736125997), (281411, 743800219), (281411, 744889899), (281411, 1088393891), (281411, 1088736682), (281411, 1096407143), (281411, 1105359643), (281411, 1103884353), (281411, 1107878825), (281411, 1110838324), (281411, 2541722927), (281411, 2547903479), (281411, 2554760257), (281411, 1598185829), (281411, 1598703739), (281411, 66704854), (281411, 111828957), (281411, 267687679), (281411, 270520861), (281411, 271888559), (281411, 276782551), (281411, 278641857), (281411, 282497094), (281411, 288056813), (281411, 2210087467), (281411, 2230056977), (281411, 1502470070), (281411, 1506284529), (281411, 1507999446), (281411, 1511142338), (281411, 354859965), (281411, 362754527), (281411, 365434952), (281411, 363728210), (281411, 1523363845), (281411, 1528931922), (281411, 1540682207), (281411, 1707440174), (281411, 1707727906), (281411, 1713788480), (281411, 1716158228), (281411, 1715064431), (281411, 1717372051), (281411, 1718963830), (281411, 1719854126), (281411, 1727728457), (281411, 484332137), (281411, 486586484), (281411, 489403072), (281411, 489685439), (281411, 490490640), (281411, 493434821), (281411, 499851606), (281411, 502528289), (281411, 502195101), (281411, 1301887021), (281411, 1303181507), (281411, 1308148385), (281411, 1322682565), (281411, 1326195379), (281411, 2388472707), (281411, 2398070546), (281411, 2410535535), (281411, 2415712821), (281411, 2413956907), (281411, 2141794107), (281411, 2171142496), (281411, 1238440672), (281411, 1248094002), (281411, 1246262900), (281411, 1257009156), (281411, 1255434196), (281411, 1265086457), (281411, 593147924), (281411, 612822411), (281411, 615088109), (281411, 994006798), (281411, 995922398), (281411, 1002678075), (281411, 1003043229), (281411, 1008954784), (281411, 1011309099), (281411, 692671354), (281411, 1175343312), (281411, 1179230017), (281411, 1178102591), (281411, 1181673278), (281411, 1181834093), (281411, 1183385738), (281411, 1195121856), (281411, 2014996510), (281411, 2014878068), (281411, 2024353197), (281411, 2027208695), (281411, 2029522374), (281411, 2030114830), (281411, 2035915455), (282631, 164145147), (282631, 172636144), (282631, 172152699), (282631, 174434844), (282631, 179928046), (282631, 183230456), (282631, 140457108), (282631, 72394287), (282631, 79322921), (282631, 87687843), (282631, 457133688), (282631, 464432582), (282631, 464840905), (282631, 48431519), (282631, 54105578), (282631, 57793888), (282631, 13691678), (282631, 23420702), (282631, 22244749), (282631, 25360542), (282631, 31817306), (282631, 66831383), (282631, 105030383), (282631, 107770511), (282631, 114199554), (282631, 113605190), (282631, 116129552), (282631, 199067188), (282631, 200972369), (282631, 204448318), (282631, 208368489), (282631, 287220382), (282631, 288771130), (282631, 300466818), (282631, 523659965), (282631, 524175880), (282631, 526307054), (282631, 528525381), (282631, 532426345), (282631, 534692956), (282631, 223143649), (282631, 226372046), (282631, 236561993), (282631, 241403014), (282631, 243709095), (282631, 247027686), (282631, 247686013), (282631, 103605080), (282631, 406209206), (282631, 414785039), (282631, 414343446), (282631, 419290818), (282631, 425722136), (282631, 429717615), (282631, 481796677), (282631, 181190985), (282631, 189604314), (282631, 316847565), (282631, 329158325), (282631, 344823384), (282631, 350091474), (282631, 349401847), (282631, 353204333), (282631, 435233292), (282631, 440803772), (282631, 443850796), (282631, 478142100), (282631, 338236152), (282631, 340084300), (282631, 360771635), (282631, 375906112), (282631, 498994058), (282631, 507875751), (282712, 281503239), (282712, 286434708), (282712, 1013927163), (282712, 1019120311), (282712, 1026923892), (282712, 449799817), (282712, 455154639), (282712, 453301508), (282712, 479965646), (282712, 1591686909), (282712, 1616587791), (282712, 514291356), (282712, 239459900), (282712, 7885361), (282712, 14042241), (282712, 88319302), (282712, 88866193), (282712, 92985689), (282712, 100280934), (282712, 102382789), (282712, 107153133), (282712, 109273376), (282712, 108657057), (282712, 116068553), (282712, 1250511769), (282712, 1255031765), (282712, 1258916908), (282712, 1265229947), (282712, 301751957), (282712, 303004392), (282712, 307309098), (282712, 345601072), (282712, 346112488), (282712, 812877298), (282712, 830369607), (282712, 837625008), (282712, 1140248495), (282712, 695773453), (282712, 709436355), (282712, 615082015), (282712, 794729112), (282712, 794950039), (282712, 1453337605), (282712, 1451969787), (282712, 1456770956), (282712, 1458706470), (282712, 1463869951), (282712, 1471463602), (282712, 1473372122), (282712, 1477668749), (282712, 38660565), (282712, 45320617), (282712, 45694035), (282712, 117297847), (282712, 119169907), (282712, 790734487), (282712, 798638754), (282712, 802746378), (282712, 806690932), (282712, 807698273), (282712, 769738952), (282712, 768263543), (282712, 466717584), (282712, 215316272), (282712, 1203789614), (282712, 1215039466), (282712, 1219471579), (282712, 1222956523), (282712, 128715187), (282712, 134141735), (282712, 135343271), (282712, 138539853), (282712, 139101984), (282712, 138973686), (282712, 63856919), (282712, 65533295), (282712, 70492518), (282712, 75489278), (282712, 74120086), (282712, 632336039), (282712, 638093613), (282712, 649946548), (282712, 1485446237), (282712, 1514444547), (282712, 1522069277), (282712, 359158896), (282712, 360337972), (282712, 372430062), (282712, 743204098), (282712, 747377098), (282712, 748038550), (282712, 269148113), (282712, 270681847), (282712, 271566281), (282712, 276161360), (282712, 278926535), (282712, 282058736), (282712, 287565611), (282712, 289265632), (282712, 289715928), (282712, 309362408), (282712, 325490901), (282712, 1083077939), (282712, 1091658790), (282712, 89225285), (282712, 418966250), (282712, 429731165), (282712, 437430600), (282712, 338036190), (282712, 914892035), (282712, 922692047), (282712, 927687869), (282712, 926015329), (282712, 402220110), (282712, 489228759), (282712, 495840062), (282712, 496800748), (282712, 1442423427), (282712, 1445872111), (282712, 1446643220), (282712, 1449701487), (282712, 1449065783), (282712, 555857703), (282712, 577598305), (282712, 845473343), (282712, 845627908), (282712, 851839315), (282712, 854964652), (282712, 937575447), (282712, 941456314), (282712, 956229444), (282712, 971260457), (282712, 1688405539), (282712, 1689695945), (282712, 1701662423), (282712, 1702472198), (282712, 1179943863), (282712, 1184281103), (282712, 1190782484), (282712, 1191798010), (282712, 528390450), (282712, 533218350), (282712, 538918442), (282712, 537386367), (282712, 1328858563), (282712, 1369307982), (282712, 1374704448), (282712, 1379018645), (282712, 1385936630), (282712, 1120936199), (282712, 1657341999), (282712, 1662966956), (282712, 1662022616), (282712, 865247513), (282712, 867974903), (282712, 875838618), (282712, 878291731), (282712, 881617396), (282712, 25908370), (282712, 27319310), (282712, 29878572), (282712, 585480051), (282712, 582591255), (282712, 586909199), (282712, 601035211), (282712, 1363519019), (282712, 1363469522), (282712, 155594944), (282712, 164150731), (282712, 169949251), (282712, 179646546), (282712, 177952632), (282712, 180667539), (282712, 966481555), (282712, 987951300), (282712, 987892137), (282712, 992669933), (282712, 673829644), (282712, 675404714), (282712, 675214565), (282712, 675327498), (282712, 676034846), (282712, 682515221), (282712, 685348605), (282712, 1154811079), (282712, 1162143477), (282712, 1169114059), (282712, 1167190380), (282712, 1174090853), (282712, 1178575044), (282712, 376269137), (282712, 380679836), (282712, 387667239), (282712, 395429988), (282712, 567388425), (282712, 645142748), (282712, 247223028), (282712, 257696585), (282712, 261095829), (282712, 266015717), (282712, 267801783), (282712, 1400405523), (282712, 1413840599), (282712, 1421477395), (282712, 1421547094), (282712, 684946496), (282712, 737373695), (282712, 744238898), (282712, 1345610885), (282712, 1357056666), (282712, 658152214), (282712, 151343646), (282712, 228154044), (282712, 229460118), (282712, 1036581793), (282712, 1035806227), (282712, 1037328879), (282712, 1048897072), (282712, 1045259557), (282712, 1055128234), (282712, 1056418297), (282712, 1059587994), (282712, 1062474835), (282712, 1066204788), (282712, 1617021782), (282712, 1634019125), (282712, 1639755171), (282712, 1645394184), (282712, 1647118432), (282712, 183071675), (282712, 183824040), (282712, 1232413675), (282712, 1234507659), (282712, 1238950355), (282712, 1242440883), (282712, 202492892), (282712, 212041168), (282712, 213280350), (282712, 1566723774), (282712, 1576865231), (282712, 1301866112), (282712, 1303987841), (282712, 1309702397), (282712, 1322701344), (282712, 1280062625), (282712, 1280421338), (282712, 1522431536), (282712, 1529576228), (282712, 1538987376), (282712, 1554186064), (282784, 214990654), (282784, 186669593), (282784, 190115226), (282784, 192328893), (282784, 198450167), (282784, 201009003), (282784, 199693025), (282784, 205139952), (282784, 210950615), (282784, 212502657), (282992, 1369468980), (282992, 1384541083), (282992, 1487289827), (282992, 1688369842), (282992, 1694560400), (282992, 1697233400), (282992, 1699794724), (282992, 1703028820), (282992, 1703479842), (282992, 1710868796), (282992, 1815708714), (282992, 1821291048), (282992, 1825141642), (282992, 1824915980), (282992, 1677932827), (282992, 1676444247), (282992, 1684323682), (282992, 1833331320), (282992, 1837202715), (282992, 1839748999), (282992, 86800076), (282992, 94469874), (282992, 99310122), (282992, 105401527), (282992, 118338605), (282992, 834609128), (282992, 842107496), (282992, 859364748), (282992, 156139420), (282992, 154177383), (282992, 162471403), (282992, 167632681), (282992, 172265484), (282992, 1490332461), (282992, 1488281007), (282992, 1503888366), (282992, 1512288755), (282992, 1519961330), (282992, 351580395), (282992, 371192926), (282992, 379626357), (282992, 378563244), (282992, 1108365502), (282992, 1028923119), (282992, 1033296444), (282992, 1037058205), (282992, 1042589043), (282992, 620757647), (282992, 627993366), (282992, 636346167), (282992, 637542203), (282992, 303902811), (282992, 528200428), (282992, 553940478), (282992, 74028032), (282992, 948226460), (282992, 956957137), (282992, 956337043), (282992, 966193126), (282992, 969659490), (282992, 969956701), (282992, 1580650260), (282992, 1588974554), (282992, 2057118256), (282992, 941783114), (282992, 1887494624), (282992, 1893242089), (282992, 1898092758), (282992, 1899072635), (282992, 1914503524), (282992, 1266369114), (282992, 1270173928), (282992, 1289991550), (282992, 1295117616), (282992, 703509169), (282992, 703648166), (282992, 708366977), (282992, 710507315), (282992, 709048911), (282992, 710471116), (282992, 713984794), (282992, 712131398), (282992, 721765977), (282992, 723044147), (282992, 724740770), (282992, 731376548), (282992, 733153192), (282992, 602780333), (282992, 610181314), (282992, 612578585), (282992, 614861689), (282992, 189048096), (282992, 788265646), (282992, 1856028682), (282992, 1859992654), (282992, 1859348300), (282992, 1863556838), (282992, 1863087351), (282992, 1872531805), (282992, 1873480399), (282992, 1878042450), (282992, 245666044), (282992, 250165465), (282992, 262077444), (282992, 1636579531), (282992, 1640383529), (282992, 1641252236), (282992, 1652213186), (282992, 1658189811), (282992, 1659187722), (282992, 1662461275), (282992, 1666559306), (282992, 866104136), (282992, 876204178), (282992, 878535487), (282992, 887625285), (282992, 343422334), (282992, 344362973), (282992, 346932440), (282992, 696421227), (282992, 619486735), (282992, 1230041483), (282992, 1240462701), (282992, 1250741850), (282992, 1187597163), (282992, 1152515775), (282992, 1158826398), (282992, 1161161836), (282992, 559048523), (282992, 1095486584), (282992, 1101508812), (282992, 437236161), (282992, 445313545), (282992, 1193506553), (282992, 1204082141), (282992, 1225028371), (282992, 907134588), (282992, 909855422), (282992, 917937031), (282992, 1441602093), (282992, 1542328364), (282992, 1778608809), (282992, 860715296), (282992, 864346080), (282992, 867287651), (282992, 120877521), (282992, 1786706653), (282992, 1796268256), (282992, 1798188652), (282992, 316346808), (282992, 318543518), (282992, 322487299), (282992, 340103616), (282992, 1987380229), (282992, 1993811040), (282992, 1998841988), (282992, 2003118036), (282992, 2009327605), (282992, 2009882343), (282992, 2014033155), (282992, 675779717), (282992, 680401496), (282992, 680401677), (282992, 681640257), (282992, 684177504), (282992, 686320809), (282992, 690149979), (282992, 33082249), (282992, 130497780), (282992, 149646511), (282992, 499645985), (282992, 506220530), (282992, 503698882), (282992, 508751263), (282992, 983189140), (282992, 983212343), (282992, 985489420), (282992, 991760279), (282992, 991920605), (282992, 997407124), (282992, 1004735019), (282992, 1556496187), (282992, 1558852819), (282992, 1566512813), (282992, 1567867313), (282992, 1575275403), (282992, 1576403301), (282992, 560710255), (282992, 564635153), (282992, 576169719), (282992, 576038965), (282992, 1744423827), (282992, 1750290008), (282992, 1764221550), (282992, 1767287806), (282992, 1770620825), (282992, 1170319725), (282992, 1174962492), (282992, 227843463), (282992, 232389139), (282992, 902305658), (282992, 1121688638), (282992, 1125786066), (282992, 1130386322), (282992, 1137689537), (282992, 1147014465), (282992, 589569963), (282992, 595748111), (282992, 1590081674), (282992, 1593109055), (282992, 1600857751), (282992, 1603607155), (282992, 1609087998), (282992, 1614450082), (282992, 395679384), (282992, 399887047), (282992, 406047446), (282992, 402843592), (282992, 406100830), (282992, 415397114), (282992, 419057119), (282992, 418462677), (282992, 797628482), (282992, 808180777), (282992, 809857909), (282992, 2024251316), (282992, 2027115584), (282992, 2034516914), (282992, 2037315874), (282992, 2038612523), (282992, 2045674360), (282992, 2049630608), (282992, 1344358957), (282992, 1345599765), (282992, 58084171), (282992, 61106243), (282992, 932190055), (282992, 929965989), (282992, 934679987), (282992, 277126723), (282992, 279720069), (282992, 277933972), (282992, 287893949), (282992, 295195884), (282992, 1059179264), (282992, 1059366283), (282992, 1064382267), (282992, 1716174230), (282992, 1522571756), (282992, 1525513618), (282992, 1525692773), (282992, 1529571099), (282992, 1450847850), (282992, 1456164393), (282992, 462841266), (282992, 473764450), (282992, 482902372), (282992, 1393055058), (282992, 1397792638), (282992, 1397487166), (282992, 1402934344), (282992, 1411488371), (282992, 1415188041), (282992, 1420929731), (282992, 1227658113), (282992, 1307053624), (282992, 1939951520), (282992, 1950010036), (282992, 1961511934), (282992, 197789704), (282992, 198076477), (282992, 196052754), (282992, 200902747), (282992, 204329774), (282992, 220678674), (282992, 1614318414), (282992, 1624075976), (282992, 1626065956), (282992, 1627250791), (282992, 1633247809), (282992, 1631070459), (282992, 1632260828), (282992, 1785055939), (282992, 2069018885), (282992, 748987174), (282992, 746940214), (282992, 750601558), (282992, 753205069), (282992, 757041740), (282992, 773301112), (282992, 1754460), (282992, 3869674), (282992, 9614057), (282992, 13874393), (283074, 413962421), (283074, 125393055), (283074, 35092814), (283074, 58796804), (283074, 60034698), (283074, 64083335), (283074, 852156132), (283074, 855503794), (283074, 857774819), (283074, 859603837), (283074, 869146271), (283074, 443223995), (283074, 457800440), (283074, 462039488), (283074, 467035898), (283074, 171948160), (283074, 171514785), (283074, 177208813), (283074, 180793725), (283074, 178404694), (283074, 181925388), (283074, 203366813), (283074, 982240747), (283074, 730567567), (283074, 737010345), (283074, 885060386), (283074, 892431376), (283074, 908334404), (283074, 914310650), (283074, 923121020), (283074, 922310719), (283074, 407586874), (283074, 431306664), (283074, 433649415), (283074, 646013336), (283074, 650629004), (283074, 654947848), (283074, 669849879), (283074, 668368900), (283074, 519196350), (283074, 521143241), (283074, 528440854), (283074, 532569046), (283074, 340999735), (283074, 343509910), (283074, 482123898), (283074, 498062067), (283074, 349663342), (283074, 346793587), (283074, 824011492), (283074, 830863121), (283074, 844175588), (283074, 843152720), (283074, 149881125), (283074, 151747353), (283074, 236243179), (283074, 297881234), (283074, 302229066), (283074, 302410366), (283074, 301291543), (283074, 3232598), (283074, 19142224), (283074, 242750003), (283074, 247079410), (283074, 254543909), (283074, 394026334), (283074, 397204580), (283074, 416583891), (283074, 432311874), (283074, 431136905), (283074, 173465640), (283074, 622740088), (283074, 909917370), (283074, 87529457), (283074, 84989916), (283074, 752929218), (283074, 800821491), (283074, 808557274), (283074, 810573999), (283074, 77480842), (283074, 79556274), (283074, 83326275), (283074, 85629156), (283074, 92028977), (283074, 22186194), (283074, 27059898), (283074, 572851277), (283074, 593984818), (283074, 593259555), (283074, 108608961), (283074, 118196938), (283074, 603009893), (283074, 608371529), (283074, 615339862), (283074, 632894283), (283074, 170112725), (283074, 537612567), (283074, 539762853), (283074, 500072422), (283074, 512174529), (283074, 562409932), (283074, 310356627), (283074, 369753747), (283074, 377307282), (283074, 1012699693), (283074, 1015196526), (283074, 699588484), (283074, 705700940), (283074, 711679453), (283074, 959195913), (283074, 957045172), (283074, 965402006), (283074, 966620502), (283074, 261307649), (283074, 264687684), (283074, 262069609), (283074, 265477195), (283074, 265311981), (283074, 275360017), (283074, 277300892), (283074, 279910138), (283074, 785412612), (283074, 793663598), (283074, 792304498), (283074, 386056127), (283074, 390669110), (283074, 392802805), (283074, 188467611), (283074, 190702979), (283155, 255415335), (283155, 31961439), (283155, 29825428), (283155, 66830298), (283155, 74220812), (283155, 78463673), (283155, 80000034), (283155, 81231352), (283155, 82108929), (283155, 455612776), (283155, 464364209), (283155, 466591493), (283155, 251325493), (283155, 265780702), (283155, 265392746), (283155, 60335975), (283155, 63431180), (283155, 65031520), (283155, 339776290), (283155, 351448942), (283155, 353690469), (283155, 404129905), (283155, 407734955), (283155, 2434826), (283155, 12593978), (283155, 13516481), (283155, 15581545), (283155, 19157358), (283155, 22059563), (283155, 25103385), (283155, 514586471), (283155, 375332043), (283155, 372987828), (283155, 378054182), (283155, 390431257), (283155, 411870342), (283155, 326599941), (283155, 334276112), (283155, 353041192), (283155, 357697338), (283155, 127414098), (283155, 269547021), (283155, 278387638), (283155, 281383602), (283155, 482701672), (283155, 495422653), (283155, 497751094), (283155, 173310297), (283155, 179959945), (283155, 192055255), (283155, 235609940), (283155, 245767391), (283155, 411623221), (283155, 416341368), (283155, 424910220), (283155, 431784196), (283155, 441773001), (283155, 210202168), (283155, 223342059), (283155, 226138675), (283155, 225543919), (283155, 298057100), (283155, 302125674), (283155, 311379775), (283155, 35030390), (283155, 43072717), (283155, 51971999), (283155, 211406580), (283155, 92191386), (283155, 94001150), (283155, 93208800), (283155, 137685525), (283155, 141439776), (283155, 145900642), (283155, 145535911), (283155, 145537315), (283155, 150613654), (283155, 153803009), (283155, 157555819), (283155, 155743540), (283155, 159332962), (283155, 196063676), (283270, 33294235), (283270, 36192261), (283270, 59321623), (283270, 58058012), (283270, 1820228), (283270, 4498654), (283270, 3617124), (283270, 6598496), (283270, 9906075), (283270, 12351943), (283270, 137056290), (283270, 144679678), (283270, 143022586), (283270, 144968888), (283270, 100376419), (283270, 102016811), (283270, 102735375), (283270, 187178678), (283270, 194896126), (283270, 122793824), (283270, 127780643), (283270, 132087804), (283270, 198632194), (283270, 200259063), (283270, 151920098), (283270, 149356594), (283270, 164944045), (283270, 168684140), (283270, 169574492), (283270, 168198551), (283270, 90191285), (283270, 90877228), (283270, 92847189), (283270, 92446332), (283270, 60312914), (283270, 65323314), (283270, 66654094), (283270, 177425604), (283270, 186523400), (283270, 187582241), (283270, 196284164), (283270, 22527357), (283270, 24693622), (283270, 33253502), (283270, 77688725), (283270, 79011437), (283270, 83039711), (283429, 1568219006), (283429, 244485841), (283429, 247006731), (283429, 247340541), (283429, 250729503), (283429, 130985192), (283429, 136074718), (283429, 152898599), (283429, 1610875741), (283429, 1630687495), (283429, 493306414), (283429, 500716570), (283429, 1739935191), (283429, 1748348130), (283429, 1760812562), (283429, 3154832141), (283429, 3163370499), (283429, 3166626130), (283429, 432308390), (283429, 438987055), (283429, 453007110), (283429, 452746668), (283429, 4287180121), (283429, 4289714320), (283429, 4303772153), (283429, 4308246034), (283429, 3984249254), (283429, 3992442565), (283429, 4002305370), (283429, 3201252170), (283429, 3206252045), (283429, 3211497408), (283429, 3214499570), (283429, 97700639), (283429, 110931576), (283429, 108211614), (283429, 109939007), (283429, 112927238), (283429, 115655026), (283429, 975012959), (283429, 985822987), (283429, 994827429), (283429, 889160859), (283429, 930426329), (283429, 931856983), (283429, 946405503), (283429, 959435798), (283429, 961840220), (283429, 962030017), (283429, 2565172596), (283429, 2566373514), (283429, 2570815020), (283429, 1092410746), (283429, 3832416470), (283429, 3832095668), (283429, 3834350993), (283429, 3835111780), (283429, 3834325054), (283429, 3843068920), (283429, 3846943720), (283429, 3844826725), (283429, 3850130737), (283429, 3854984852), (283429, 3899905144), (283429, 3902255541), (283429, 3902406164), (283429, 3903956539), (283429, 3910264546), (283429, 919575980), (283429, 927166860), (283429, 1138765052), (283429, 1142429272), (283429, 1146786562), (283429, 1148515735), (283429, 4319779759), (283429, 3250899224), (283429, 3262843742), (283429, 2965553285), (283429, 2977648409), (283429, 2980144403), (283429, 2983755714), (283429, 3045583763), (283429, 191432685), (283429, 203409887), (283429, 205793440), (283429, 203941339), (283429, 779193563), (283429, 789613734), (283429, 791578685), (283429, 791560253), (283429, 793497821), (283429, 3658909047), (283429, 3658563341), (283429, 1854549429), (283429, 710988344), (283429, 715251126), (283429, 726764622), (283429, 759171954), (283429, 764356472), (283429, 765851778), (283429, 767728949), (283429, 771439619), (283429, 769829729), (283429, 4025323188), (283429, 4024244068), (283429, 4029368436), (283429, 4040229899), (283429, 4041097666), (283429, 4040389161), (283429, 3720369363), (283429, 3858160171), (283429, 3856484892), (283429, 3862943273), (283429, 3874003074), (283429, 3880790472), (283429, 4376574550), (283429, 4382553006), (283429, 3617300603), (283429, 2041283869), (283429, 2050026896), (283429, 2054795990), (283429, 2063988991), (283429, 2067288657), (283429, 2071331679), (283429, 2077565655), (283429, 4051947625), (283429, 4064107769), (283429, 4062204931), (283429, 4065520608), (283429, 4067188391), (283429, 4072878367), (283429, 4076825505), (283429, 4081293443), (283429, 3460567151), (283429, 3462075389), (283429, 3465467335), (283429, 3468422260), (283429, 3472653911), (283429, 3475164236), (283429, 29863443), (283429, 36912675), (283429, 558569517), (283429, 570456916), (283429, 567782100), (283429, 3775156959), (283429, 3777512506), (283429, 3789189626), (283429, 1691485510), (283429, 1701962439), (283429, 1705665608), (283429, 167359932), (283429, 165676008), (283429, 172673772), (283429, 1497078368), (283429, 1497461720), (283429, 1499296873), (283429, 3368399226), (283429, 3369511102), (283429, 3370455364), (283429, 3377644708), (283429, 3380450858), (283429, 3389047231), (283429, 3390071769), (283429, 2589713617), (283429, 2596702142), (283429, 2602444722), (283429, 2602098431), (283429, 2600529493), (283429, 2606581332), (283429, 2712151929), (283429, 2715080532), (283429, 2719123793), (283429, 2721256348), (283429, 2724216377), (283429, 2725514909), (283429, 2798374229), (283429, 2134419828), (283429, 2149066396), (283429, 2154109300), (283429, 2158705712), (283429, 2170931364), (283429, 1411251880), (283429, 1960933562), (283429, 1973709523), (283429, 1974079176), (283429, 296045908), (283429, 296357193), (283429, 297523875), (283429, 301525545), (283429, 302105104), (283429, 305746143), (283429, 305493606), (283429, 3275801214), (283429, 3278435582), (283429, 3299159541), (283429, 1001056843), (283429, 1018867418), (283429, 1024295603), (283429, 1032296511), (283429, 214343518), (283429, 226772014), (283429, 3091100277), (283429, 3099868561), (283429, 3108629569), (283429, 3113014176), (283429, 3113073679), (283429, 673886676), (283429, 679351213), (283429, 679978717), (283429, 679730532), (283429, 681304456), (283429, 685193626), (283429, 687066592), (283429, 688427583), (283429, 3505588038), (283429, 3510530848), (283429, 3512779320), (283429, 3514463952), (283429, 3517901017), (283429, 3532020390), (283429, 745052602), (283429, 754261689), (283429, 760669830), (283429, 43262327), (283429, 47486802), (283429, 56229484), (283429, 54836344), (283429, 60530253), (283429, 57905552), (283429, 1422277783), (283429, 1923742587), (283429, 1954595987), (283429, 190690269), (283429, 189780618), (283429, 230196771), (283429, 231338891), (283429, 361253582), (283429, 363078983), (283429, 367517457), (283429, 370318809), (283429, 2080849777), (283429, 2078573315), (283429, 1594744936), (283429, 3538737879), (283429, 3551290031), (283429, 3555061094), (283429, 3555837313), (283429, 3559905432), (283429, 3567206309), (283429, 1672817258), (283429, 3683952589), (283429, 3689518027), (283429, 3701752323), (283429, 3707488220), (283429, 3712909476), (283429, 2322124907), (283429, 2324677768), (283429, 2331267540), (283429, 2807247984), (283429, 2807823212), (283429, 2805910454), (283429, 2824178115), (283429, 321312843), (283429, 326932750), (283429, 328995004), (283429, 334318321), (283429, 1428487157), (283429, 1431543265), (283429, 1430371235), (283429, 1444619042), (283429, 1448204477), (283429, 1451549730), (283429, 1452257562), (283429, 1458434832), (283429, 2478349822), (283429, 2645719604), (283429, 2649828905), (283429, 2662413856), (283429, 2666023662), (283429, 2670419257), (283429, 2673593832), (283429, 3924890130), (283429, 3927361733), (283429, 3939657121), (283429, 273590802), (283429, 278833118), (283429, 279751057), (283429, 282731641), (283429, 283168232), (283429, 1893054343), (283429, 1907078338), (283429, 1905490517), (283429, 1906339863), (283429, 1289025873), (283429, 873832655), (283429, 880604991), (283429, 1785672245), (283429, 1793004654), (283429, 403679302), (283429, 1542179329), (283429, 1545147684), (283429, 2457503578), (283429, 2460940619), (283429, 2467411411), (283429, 2468851110), (283429, 2467614009), (283429, 3028259758), (283429, 3339249463), (283429, 1874233061), (283429, 4333055508), (283429, 4345902245), (283429, 4353011335), (283429, 4360234404), (283429, 4359784933), (283429, 2259226438), (283429, 2265174467), (283429, 2265505835), (283429, 2268586840), (283429, 2281706051), (283429, 2285086152), (283429, 2288554919), (283429, 3396333867), (283429, 3404253778), (283429, 1777389605), (283429, 1774499522), (283429, 1783805170), (283429, 619115370), (283429, 625818835), (283429, 630689310), (283429, 632240653), (283429, 636723935), (283429, 641297584), (283429, 1001418601), (283429, 2109819049), (283429, 2111498696), (283429, 2121797053), (283429, 1470407735), (283429, 1472927198), (283429, 1474612726), (283429, 1473282681), (283429, 2862578531), (283429, 2861251935), (283429, 2868557501), (283429, 2872669265), (283429, 2877049740), (283429, 2292211727), (283429, 2296247868), (283429, 2296837506), (283429, 2492528996), (283429, 2492997104), (283429, 2493706220), (283429, 2501355218), (283429, 2804685501), (283429, 2514477542), (283429, 1042922326), (283429, 519055607), (283429, 520801387), (283429, 521233569), (283429, 528342675), (283429, 533443923), (283429, 534892139), (283429, 1338715098), (283429, 1341227525), (283429, 1345933502), (283429, 1347572381), (283429, 1350628719), (283429, 1353750201), (283429, 1710451591), (283429, 1712457222), (283429, 1714267360), (283429, 1725472193), (283429, 1731691979), (283429, 1262083256), (283429, 2168165121), (283429, 387232267), (283429, 385696011), (283429, 469139851), (283429, 470252232), (283429, 476014765), (283429, 473119260), (283429, 478765328), (283429, 483913232), (283429, 2222485530), (283429, 2226167441), (283429, 2227436004), (283429, 2241407046), (283429, 660386328), (283429, 667238559), (283429, 670704258), (283429, 1641788340), (283429, 1648356349), (283429, 1652779083), (283429, 1650961418), (283429, 1653088121), (283429, 1654780636), (283429, 4119344671), (283429, 4122529634), (283429, 4120936515), (283429, 4126424447), (283429, 4139856975), (283429, 4145084929), (283429, 4149114126), (283429, 837859816), (283429, 847065940), (283429, 1301737586), (283429, 1302326650), (283429, 1302356172), (283429, 1303174246), (283429, 1309077525), (283429, 2177602759), (283429, 2185680487), (283429, 2204205931), (283429, 2206742965), (283429, 1203632208), (283429, 1255479864), (283429, 3061607704), (283429, 3069835072), (283429, 3073394332), (283429, 504770333), (283429, 508533816), (283429, 508791938), (283429, 509846159), (283429, 515007267), (283429, 514419073), (283429, 2377780619), (283429, 2380812873), (283429, 2383699803), (283429, 578385949), (283429, 587274544), (283429, 594567488), (283429, 599439862), (283429, 606280065), (283429, 3807815327), (283429, 3808711099), (283429, 3818027379), (283429, 3828974950), (283429, 3450044180), (283429, 571929234), (283429, 1085283746), (283429, 4094774025), (283429, 2247302053), (283429, 2248557476), (283429, 2300072786), (283429, 2300474375), (283429, 2306265719), (283429, 2309074071), (283429, 2616834008), (283429, 2626664227), (283429, 2635374872), (283429, 614899326), (283429, 1982551741), (283429, 1985809357), (283429, 1993294074), (283429, 2001454718), (283429, 1998281606), (283429, 2006147523), (283429, 1119270326), (283429, 1116497310), (283429, 1124415366), (283429, 1127072185), (283429, 1127605030), (283429, 1153630855), (283429, 4242479524), (283429, 4243012845), (283429, 4254037800), (283429, 4260292556), (283429, 2924571602), (283429, 2929287436), (283429, 2943703779), (283429, 2947551678), (283429, 2948633892), (283429, 2959332695), (283429, 3888795367), (283429, 3952584570), (283429, 3959814402), (283429, 3969734607), (283429, 3973943845), (283429, 3973087613), (283429, 3537345202), (283429, 3725899743), (283429, 3728313248), (283429, 3730635520), (283429, 3745033277), (283429, 3408085420), (283429, 3420104884), (283429, 3425693670), (283429, 3425930013), (283429, 3432953454), (283429, 3431631450), (283429, 3439455866), (283429, 1318435491), (283429, 1326788884), (283429, 1327516212), (283429, 3594906738), (283429, 3595153036), (283429, 1812929456), (283429, 1822408863), (283429, 1824967979), (283429, 1219879484), (283429, 1228982280), (283429, 1233393258), (283429, 1237024743), (283429, 1236247156), (283429, 1241669258), (283429, 2690802429), (283429, 2752070992), (283429, 64812095), (283429, 66543092), (283429, 67551797), (283429, 66413539), (283429, 461288363), (283429, 2009703357), (283429, 2013785421), (283429, 2014166506), (283429, 2013259179), (283429, 2033368422), (283429, 2406979974), (283429, 2426140270), (283429, 2423371590), (283429, 346552488), (283429, 350441743), (283429, 415905704), (283429, 423017570), (283429, 421244554), (283429, 425692996), (283429, 883661690), (283429, 1080451873), (283429, 1358857561), (283429, 2996639550), (283429, 3000465308), (283429, 3010114648), (283429, 3012836552), (283429, 3018374053), (283429, 3021384870), (283429, 5961771), (283429, 7253149), (283429, 15570795), (283429, 20154264), (283429, 19685710), (283429, 4267295154), (283429, 4279255345), (283429, 4279523644), (283429, 822228323), (283429, 835374236), (283429, 836791829), (283429, 2433749393), (283429, 2433775635), (283429, 2437613859), (283429, 2536502620), (283429, 2536232272), (283429, 2537859565), (283429, 2539502626), (283429, 2541082686), (283429, 2542905291), (283429, 2559536502), (283429, 314350829), (283429, 316107436), (283429, 316588549), (283429, 542406971), (283429, 549310005), (283429, 695567037), (283429, 695914374), (283429, 654093188), (283429, 652490083), (283429, 1157082497), (283429, 1399981608), (283429, 1402190633), (283429, 2886327653), (283429, 4190755807), (283429, 4194329473), (283429, 4200790959), (283429, 4204458339), (283429, 4206272332), (283429, 4206862755), (283429, 4215249761), (283429, 2842231648), (283429, 2841058576), (283429, 957062010), (283429, 734935200), (283429, 3173693858), (283429, 3175532695), (283429, 1522124357), (283429, 1523460241), (283429, 1528911699), (283429, 1529058807), (283429, 897799768), (283429, 898802791), (283429, 4155624346), (283429, 4155148108), (283429, 4159769626), (283429, 4162755704), (283429, 4176942076), (283429, 1371282786), (283429, 1418982615), (283429, 1421516753), (283429, 1943542253), (283429, 1948627460), (283429, 1954787433), (283429, 2761394969), (283429, 2762686314), (283429, 2769748038), (283429, 2777190725), (283429, 2782265861), (283429, 2785600722), (283429, 2784289792), (283429, 2789001055), (283429, 3121953603), (283429, 3132074200), (283429, 3193668384), (283429, 1166414802), (283429, 1169639766), (283429, 1188221585), (283429, 2889419075), (283429, 2896761969), (283429, 2911371579), (283429, 2914552420), (283429, 2916047563), (283608, 254812251), (283608, 260653310), (283608, 263593060), (283608, 509147330), (283608, 513195901), (283608, 512519793), (283608, 512920303), (283608, 440327782), (283608, 442097325), (283608, 503332057), (283608, 506002791), (283608, 519204763), (283608, 526172034), (283608, 526906545), (283608, 526309772), (283608, 531087861), (283608, 531327937), (283608, 86694374), (283608, 139624232), (283608, 142637908), (283608, 143402327), (283608, 156079832), (283608, 91017438), (283608, 97869609), (283608, 7998489), (283608, 12545393), (283608, 20408461), (283608, 353533622), (283608, 358208870), (283608, 230783744), (283608, 239120681), (283608, 244556602), (283608, 245127400), (283608, 294067137), (283608, 308433261), (283608, 313174940), (283608, 200218740), (283608, 179229333), (283608, 180751046), (283608, 197792416), (283608, 205988942), (283608, 330302665), (283608, 351007207), (283608, 445070852), (283608, 453810671), (283608, 459220233), (283608, 458220275), (283608, 464005501), (283608, 465958375), (283608, 39049180), (283608, 432052906), (283608, 437520149), (283608, 368252592), (283608, 369502190), (283608, 375358455), (283608, 375223072), (283608, 390435260), (283608, 393478393), (283608, 400421189), (283608, 267903407), (283608, 282507624), (283608, 279479526), (283608, 286907351), (283608, 287740302), (283608, 57071810), (283608, 64244341), (283780, 2389418545), (283780, 2473543519), (283780, 2473238267), (283780, 2475920584), (283780, 2480374821), (283780, 2488887403), (283780, 2492904095), (283780, 1980444067), (283780, 2001285396), (283780, 666381247), (283780, 681726046), (283780, 870341786), (283780, 888241480), (283780, 890397823), (283780, 893810944), (283780, 897326713), (283780, 2592392602), (283780, 2593442590), (283780, 1475295752), (283780, 1490157740), (283780, 1766657750), (283780, 1767902629), (283780, 756541389), (283780, 2429751212), (283780, 2439695784), (283780, 2449299932), (283780, 1732702970), (283780, 1735762915), (283780, 1738639519), (283780, 1738566216), (283780, 1741967934), (283780, 1750105019), (283780, 1754961006), (283780, 87380767), (283780, 94421099), (283780, 94267745), (283780, 94013898), (283780, 93712366), (283780, 203593948), (283780, 200794822), (283780, 202143006), (283780, 200617064), (283780, 1540374071), (283780, 1544802210), (283780, 1549059206), (283780, 1555537208), (283780, 1557739082), (283780, 1576574168), (283780, 518499697), (283780, 523768529), (283780, 527229904), (283780, 539121182), (283780, 550748883), (283780, 101195958), (283780, 101114770), (283780, 113006728), (283780, 118639609), (283780, 119785217), (283780, 66498980), (283780, 178345882), (283780, 183485709), (283780, 188512535), (283780, 188231490), (283780, 192173081), (283780, 267637627), (283780, 268589354), (283780, 274706595), (283780, 909703008), (283780, 915453821), (283780, 916106931), (283780, 925637478), (283780, 927148118), (283780, 2559556325), (283780, 2560941638), (283780, 2564836329), (283780, 2569654623), (283780, 2577886435), (283780, 2580783140), (283780, 2585614566), (283780, 683605023), (283780, 690324781), (283780, 693584166), (283780, 693798728), (283780, 704970432), (283780, 712078159), (283780, 28009081), (283780, 191658792), (283780, 194849381), (283780, 196520440), (283780, 2060908403), (283780, 2065311306), (283780, 2064701836), (283780, 2065116793), (283780, 2066788725), (283780, 2074812482), (283780, 2078130199), (283780, 1798676518), (283780, 1803046616), (283780, 1806081477), (283780, 1810961794), (283780, 2081946655), (283780, 2085798792), (283780, 2086252833), (283780, 2089007488), (283780, 2105972603), (283780, 335850785), (283780, 339057435), (283780, 362461147), (283780, 1159189132), (283780, 1174241368), (283780, 2640124660), (283780, 2656177358), (283780, 1307206757), (283780, 1319035095), (283780, 1324452253), (283780, 1328281889), (283780, 1813885580), (283780, 1813087153), (283780, 1816847846), (283780, 1817770651), (283780, 1827150122), (283780, 1832411756), (283780, 1833135460), (283780, 1838248947), (283780, 462491199), (283780, 466406477), (283780, 1261531439), (283780, 1262267161), (283780, 1273815327), (283780, 1278486261), (283780, 624842914), (283780, 625806004), (283780, 1210657936), (283780, 1215226405), (283780, 1682158759), (283780, 778636133), (283780, 787952516), (283780, 794582438), (283780, 797603977), (283780, 800125939), (283780, 801178696), (283780, 70339459), (283780, 72918714), (283780, 81177742), (283780, 947703349), (283780, 944533894), (283780, 947775060), (283780, 1949173296), (283780, 1970982743), (283780, 2016113982), (283780, 2020137235), (283780, 2227986045), (283780, 2325080513), (283780, 2332034094), (283780, 2342562554), (283780, 2345096226), (283780, 980624575), (283780, 167077117), (283780, 167942542), (283780, 170778703), (283780, 174821602), (283780, 175411168), (283780, 423543200), (283780, 125366642), (283780, 131626974), (283780, 130830560), (283780, 138180340), (283780, 137367979), (283780, 150694550), (283780, 153786298), (283780, 2512586540), (283780, 2524472090), (283780, 2527868926), (283780, 2535640341), (283780, 2540419530), (283780, 2541213497), (283780, 2011896347), (283780, 2167833401), (283780, 2177677325), (283780, 2177571279), (283780, 2177777889), (283780, 294112986), (283780, 296777171), (283780, 309087957), (283780, 321578367), (283780, 1551516628), (283780, 1184485916), (283780, 1187992259), (283780, 1196136542), (283780, 1201973266), (283780, 1201865724), (283780, 1201652453), (283780, 1204194690), (283780, 366288685), (283780, 371749209), (283780, 375025974), (283780, 1893398603), (283780, 1906300657), (283780, 2131634042), (283780, 2130601760), (283780, 1443173386), (283780, 1441467169), (283780, 1446104021), (283780, 1465269725), (283780, 278900477), (283780, 276772331), (283780, 278375880), (283780, 278598264), (283780, 277804952), (283780, 284895231), (283780, 1349601584), (283780, 1917417743), (283780, 1922090608), (283780, 1934009008), (283780, 1937945821), (283780, 713280368), (283780, 710652837), (283780, 712073305), (283780, 711925887), (283780, 716176501), (283780, 640444013), (283780, 641566258), (283780, 656692670), (283780, 657959463), (283780, 1096977121), (283780, 959120376), (283780, 963191151), (283780, 974035270), (283780, 2136852538), (283780, 2137232889), (283780, 2139344055), (283780, 2149883111), (283780, 2150701838), (283780, 2155749019), (283780, 2157986043), (283780, 2157803510), (283780, 2161916971), (283780, 2181816970), (283780, 1723482573), (283780, 2555328674), (283780, 214925692), (283780, 223394056), (283780, 228985953), (283780, 231734345), (283780, 433996420), (283780, 441772719), (283780, 2506326511), (283780, 2504372931), (283780, 2505965436), (283780, 2611794178), (283780, 2610209177), (283780, 2610224800), (283780, 2613386559), (283780, 2627639784), (283780, 2628918998), (283780, 242193950), (283780, 245617995), (283780, 1676712722), (283780, 1681959398), (283780, 1147340365), (283780, 1337563838), (283780, 1344795319), (283780, 1592639869), (283780, 1598505674), (283780, 1626606125), (283780, 1632334217), (283780, 1636690402), (283780, 1644280110), (283780, 840059628), (283780, 837957595), (283780, 847287470), (283780, 850167259), (283780, 862347651), (283780, 1124607559), (283780, 40703269), (283780, 42144692), (283780, 47064959), (283780, 58802565), (283780, 1000820332), (283780, 1005507327), (283780, 1022012948), (283780, 2030214240), (283780, 2032921083), (283780, 2031141562), (283780, 2034390837), (283780, 2043384183), (283780, 2260271400), (283780, 2263863548), (283780, 2265385358), (283780, 2267194299), (283780, 2275651235), (283780, 1511697999), (283780, 1516395116), (283780, 1514350463), (283780, 1516077804), (283780, 1516705249), (283780, 1525092040), (283780, 2198292342), (283780, 2199122076), (283780, 2203598539), (283780, 2214621793), (283780, 2216512407), (283780, 2217276294), (283780, 1392487382), (283780, 1391001400), (283780, 1421206703), (283780, 1418910954), (283780, 816902186), (283780, 819762850), (283780, 929733252), (283780, 1032048497), (283780, 1030836837), (283780, 1033851455), (283780, 1039767810), (283780, 1428638986), (283780, 1430539731), (283780, 1433719557), (283780, 1867185570), (283780, 1881959481), (283780, 1885858424), (283780, 587840111), (283780, 594571853), (283780, 555628283), (283780, 557704755), (283780, 559757094), (283780, 559443685), (283780, 560485210), (283780, 565472909), (283780, 566390509), (283780, 570652920), (283780, 573791047), (283780, 575706251), (283780, 582163072), (283780, 2611963), (283780, 11621285), (283780, 19923734), (283780, 20256596), (283780, 1692454048), (283780, 1695134225), (283780, 1711084634), (283780, 471603232), (283780, 476536608), (283780, 478746421), (283780, 480245180), (283780, 489490534), (283780, 1231802205), (283780, 1233779000), (283780, 1236898248), (283780, 1241120162), (283780, 1248855254), (283780, 1248866990), (283780, 1248967062), (283780, 1252879432), (283780, 1254543462), (283780, 1284687687), (283780, 1295453648), (283780, 1454180886), (283780, 1454542896), (283780, 393485075), (283780, 404971466), (283780, 412873908), (283780, 2279327546), (283780, 2283223237), (283780, 2291565405), (283780, 2296369487), (283780, 2304991561), (283780, 2689449856), (283780, 2705644699), (283780, 499926895), (283780, 496867991), (283780, 502360914), (283780, 500911892), (283780, 504619674), (283780, 509026410), (283780, 721694409), (283780, 722228482), (283780, 730763053), (283780, 730407119), (283780, 733067966), (283780, 735734366), (283780, 754309425), (283780, 2347958665), (283780, 2350581063), (283780, 2351638644), (283780, 2362030202), (283780, 2414096269), (283780, 1050821159), (283780, 1070263713), (283780, 1067610995), (283780, 1071037144), (283780, 2116353620), (283780, 2115408099), (283780, 2233994159), (284006, 547467726), (284006, 551678576), (284006, 562474153), (284006, 388693677), (284006, 392481712), (284006, 221470687), (284006, 224004348), (284006, 223182147), (284006, 294049599), (284006, 297777910), (284006, 325269803), (284006, 333315135), (284006, 334464904), (284006, 336685123), (284006, 337517456), (284006, 350995421), (284006, 354386329), (284006, 367319026), (284006, 373431697), (284006, 439628616), (284006, 440826245), (284006, 287486456), (284006, 87053704), (284006, 89564068), (284006, 31423737), (284006, 82541878), (284006, 193712914), (284006, 206720357), (284006, 402174009), (284006, 405852427), (284006, 482550001), (284006, 490335078), (284006, 490380894), (284006, 227729968), (284006, 245664248), (284006, 246780181), (284006, 129348968), (284006, 262994884), (284006, 268278540), (284006, 272426846), (284006, 273884444), (284006, 275749711), (284006, 285142502), (284006, 101949741), (284006, 112817621), (284006, 113703124), (284006, 115957948), (284006, 123558845), (284006, 416212700), (284006, 419612781), (284006, 420537648), (284006, 429008488), (284006, 431237040), (284006, 438671941), (284006, 572128834), (284006, 138975822), (284006, 151464467), (284006, 153547703), (284006, 255011554), (284006, 301449277), (284006, 304466281), (284006, 309018135), (284006, 312361133), (284006, 323905136), (284006, 327109167), (284006, 454568805), (284006, 459900774), (284006, 472992658), (284006, 2507151), (284006, 8951810), (284006, 19745678), (284006, 16718185), (284006, 404857501), (284006, 524854343), (284006, 524941222), (284006, 529811290), (284006, 530631320), (284006, 539109071), (284006, 509183751), (284006, 517428436), (284006, 517163850), (284006, 518717918), (284006, 519646797), (284006, 519921691), (284006, 69879289), (284006, 38259632), (284006, 44562677), (284006, 42498766), (284006, 47992703), (284006, 164165371), (284154, 118872765), (284154, 176033671), (284154, 184498941), (284154, 194771443), (284154, 89448633), (284154, 90793231), (284154, 93561245), (284154, 95065424), (284154, 102194480), (284154, 111600155), (284154, 112664111), (284154, 204961698), (284154, 122551501), (284154, 10738450), (284154, 13391783), (284154, 21136264), (284154, 22166811), (284154, 24148803), (284154, 33512236), (284154, 35596347), (284154, 55499495), (284154, 62796697), (284154, 70056781), (284154, 73333358), (284154, 157090375), (284154, 161570733), (284154, 80410022), (284213, 2606549963), (284213, 161366075), (284213, 169333189), (284213, 177711062), (284213, 176660591), (284213, 176462288), (284213, 183551120), (284213, 775356331), (284213, 1638401664), (284213, 1638239326), (284213, 1642948162), (284213, 1770110875), (284213, 756486209), (284213, 755944412), (284213, 197457357), (284213, 201242364), (284213, 209829421), (284213, 211954641), (284213, 217331043), (284213, 816562833), (284213, 817245216), (284213, 825591829), (284213, 829317684), (284213, 833765414), (284213, 2271290498), (284213, 2273679633), (284213, 2336497150), (284213, 2358777375), (284213, 431235053), (284213, 430445619), (284213, 435764435), (284213, 444119788), (284213, 3236401728), (284213, 3258893429), (284213, 2770340214), (284213, 2775857500), (284213, 3485630881), (284213, 3488042797), (284213, 3488473902), (284213, 3496552410), (284213, 3497015333), (284213, 456287316), (284213, 461086024), (284213, 2260188263), (284213, 1216797577), (284213, 1225019345), (284213, 2110975544), (284213, 224202608), (284213, 228528965), (284213, 234267578), (284213, 243892848), (284213, 1585778210), (284213, 1588032339), (284213, 1594221239), (284213, 1595725922), (284213, 1596725322), (284213, 1597926091), (284213, 1604140042), (284213, 1609071327), (284213, 1610967920), (284213, 3139326081), (284213, 3155376172), (284213, 1022918607), (284213, 1025812928), (284213, 1029213266), (284213, 1028629248), (284213, 1031297703), (284213, 1048455982), (284213, 1048308565), (284213, 1047110291), (284213, 1801074890), (284213, 1450535116), (284213, 1453273502), (284213, 1457713244), (284213, 1471968761), (284213, 739568956), (284213, 736444338), (284213, 740441336), (284213, 9950375), (284213, 686410117), (284213, 687929212), (284213, 685471606), (284213, 695479982), (284213, 695532799), (284213, 698080792), (284213, 698415354), (284213, 701584122), (284213, 1345672615), (284213, 1344029112), (284213, 1234617838), (284213, 1240343170), (284213, 1245626229), (284213, 1251812467), (284213, 1258927258), (284213, 1261343971), (284213, 1262138938), (284213, 554874455), (284213, 566210271), (284213, 565987259), (284213, 566592442), (284213, 775495685), (284213, 778732256), (284213, 641074443), (284213, 1853502392), (284213, 1879639644), (284213, 1894007530), (284213, 3271279683), (284213, 3269925104), (284213, 3273185788), (284213, 1121569975), (284213, 1128287072), (284213, 1132110496), (284213, 1313825574), (284213, 1354669192), (284213, 1910966591), (284213, 2123721424), (284213, 2135842288), (284213, 2137791888), (284213, 96085946), (284213, 93968203), (284213, 99021698), (284213, 103830977), (284213, 121958939), (284213, 2720583567), (284213, 2730905826), (284213, 2729906588), (284213, 2731258883), (284213, 25276021), (284213, 30417830), (284213, 1081666837), (284213, 1084979045), (284213, 1085685073), (284213, 1085096455), (284213, 1087157447), (284213, 1094923389), (284213, 1097144130), (284213, 1101010024), (284213, 1104889370), (284213, 1534056902), (284213, 1550024149), (284213, 1558894621), (284213, 1698641955), (284213, 1697681182), (284213, 1716250135), (284213, 1718925344), (284213, 3312227123), (284213, 1738931975), (284213, 1749326068), (284213, 1749676909), (284213, 1757705807), (284213, 67410408), (284213, 70630496), (284213, 79710282), (284213, 88454298), (284213, 91407137), (284213, 3501517600), (284213, 3432368048), (284213, 3433851309), (284213, 3444665554), (284213, 3463460830), (284213, 2065843643), (284213, 2069615288), (284213, 3186691218), (284213, 3188244614), (284213, 3190335306), (284213, 3200464265), (284213, 2175372848), (284213, 2175610165), (284213, 2181108142), (284213, 2183068865), (284213, 384981185), (284213, 387234161), (284213, 390564195), (284213, 2793097905), (284213, 2799730338), (284213, 2801711746), (284213, 2799754430), (284213, 786171537), (284213, 786772490), (284213, 793695698), (284213, 710863241), (284213, 718531316), (284213, 722559334), (284213, 726712477), (284213, 353496124), (284213, 359697195), (284213, 365980010), (284213, 364977299), (284213, 366390662), (284213, 369775249), (284213, 371705696), (284213, 371487930), (284213, 1300673862), (284213, 1302920029), (284213, 1305115410), (284213, 1308070884), (284213, 2276654185), (284213, 2277706332), (284213, 2286971971), (284213, 2295547574), (284213, 2302765330), (284213, 2306642894), (284213, 2308651219), (284213, 2306812235), (284213, 1672767284), (284213, 1674106771), (284213, 1678919907), (284213, 1735662568), (284213, 1736007654), (284213, 2039327191), (284213, 468287250), (284213, 476467816), (284213, 481115908), (284213, 481876228), (284213, 482867313), (284213, 996700729), (284213, 1001851002), (284213, 1983583940), (284213, 3357123421), (284213, 3362172364), (284213, 3370054303), (284213, 3373779500), (284213, 3391707702), (284213, 2999361153), (284213, 3005816400), (284213, 3010025478), (284213, 3017691907), (284213, 3024846380), (284213, 3025810159), (284213, 1207916736), (284213, 1210734874), (284213, 1211754435), (284213, 1224664176), (284213, 1226199720), (284213, 1504789272), (284213, 2877522955), (284213, 2878097645), (284213, 2892618455), (284213, 2898979796), (284213, 2899684644), (284213, 2902315954), (284213, 2903169247), (284213, 42622525), (284213, 56875864), (284213, 2612523651), (284213, 39584793), (284213, 1511479390), (284213, 1510741119), (284213, 1513295575), (284213, 1517043476), (284213, 1814691648), (284213, 1831719074), (284213, 1837360057), (284213, 1840844655), (284213, 1766707786), (284213, 902989701), (284213, 903139394), (284213, 912954696), (284213, 282412784), (284213, 293917263), (284213, 2586927043), (284213, 2594588885), (284213, 2598125179), (284213, 305547779), (284213, 307647315), (284213, 310341155), (284213, 308399028), (284213, 315763570), (284213, 2843480046), (284213, 2848725654), (284213, 1899466452), (284213, 1931630267), (284213, 1939721032), (284213, 3103992386), (284213, 3108707150), (284213, 3109338684), (284213, 3111344203), (284213, 3113559447), (284213, 3113585460), (284213, 3115969872), (284213, 1730411716), (284213, 934560603), (284213, 934839849), (284213, 2905006637), (284213, 798220406), (284213, 800561272), (284213, 803956925), (284213, 806281954), (284213, 2191434612), (284213, 2203582262), (284213, 2206933352), (284213, 2215721478), (284213, 2696622867), (284213, 2711396820), (284213, 647077947), (284213, 653774603), (284213, 655316990), (284213, 656210261), (284213, 666696055), (284213, 665528855), (284213, 1425091763), (284213, 1427010267), (284213, 1436816986), (284213, 1436797622), (284213, 1448274506), (284213, 2386668945), (284213, 2391680804), (284213, 2413422871), (284213, 2464548470), (284213, 2465838953), (284213, 2470837500), (284213, 332578253), (284213, 334044542), (284213, 345433908), (284213, 349465433), (284213, 2235740668), (284213, 2244165631), (284213, 2647111137), (284213, 2650973235), (284213, 975868321), (284213, 981776138), (284213, 979674987), (284213, 981320944), (284213, 983595299), (284213, 984059739), (284213, 995080581), (284213, 625778886), (284213, 623866736), (284213, 625583464), (284213, 633268604), (284213, 1389739537), (284213, 1388553366), (284213, 1391019625), (284213, 1396718751), (284213, 1394760673), (284213, 1398610271), (284213, 1408709526), (284213, 500310924), (284213, 498205888), (284213, 574434814), (284213, 584855001), (284213, 1105987561), (284213, 1114648432), (284213, 1117405575), (284213, 2928015088), (284213, 2932139153), (284213, 2935288766), (284213, 2938112897), (284213, 2941744172), (284213, 2984159901), (284213, 2997606908), (284213, 501507395), (284213, 522353923), (284213, 524311113), (284213, 2317049073), (284213, 2316554442), (284213, 2316924858), (284213, 2567742438), (284213, 2567006163), (284213, 2568693926), (284213, 2573036291), (284213, 2380410384), (284213, 2388017732), (284213, 2390807157), (284213, 2392572796), (284213, 2397448856), (284213, 2402817219), (284213, 672684760), (284213, 674422456), (284213, 675705732), (284213, 1166864542), (284213, 1168384105), (284213, 1172616222), (284213, 1177053841), (284213, 2857704267), (284213, 2860156392), (284213, 3133868033), (284213, 842912415), (284213, 845729824), (284213, 847735869), (284213, 848131180), (284213, 851221300), (284213, 848892871), (284213, 862737896), (284213, 862373344), (284213, 867108788), (284213, 866900082), (284213, 399733055), (284213, 401023824), (284213, 403759791), (284213, 419429605), (284213, 879029316), (284213, 880653112), (284213, 964712207), (284213, 963464908), (284213, 965402442), (284213, 2666532800), (284213, 2675664909), (284213, 2956618577), (284213, 2956096229), (284213, 2957230547), (284213, 2978196333), (284213, 2982848406), (284213, 2987711258), (284213, 1056790181), (284213, 1064798193), (284213, 1068344400), (284213, 1072086543), (284213, 2086425481), (284213, 2094647486), (284213, 3298940250), (284213, 3305100658), (284213, 3304874012), (284213, 257138038), (284213, 269380629), (284213, 269447122), (284213, 2451735455), (284213, 2453370443), (284213, 2454781871), (284213, 2459004425), (284213, 2461094050), (284213, 2461354873), (284213, 1991806967), (284213, 1992493177), (284213, 1997982451), (284213, 2017590410), (284213, 1961056397), (284213, 2030673698), (284213, 2235771176), (284213, 534892205), (284213, 535496537), (284213, 532721516), (284213, 542074990), (284213, 541216907), (284213, 2139219001), (284213, 2140697723), (284213, 2152611294), (284213, 2155071486), (284213, 1479048429), (284213, 1481912426), (284213, 1486627824), (284213, 1491003737), (284213, 591796204), (284213, 602052293), (284213, 614017823), (284213, 2523653102), (284213, 2525756416), (284213, 2534316767), (284213, 1274953341), (284213, 1280769001), (284213, 2732339188), (284213, 2736832576), (284213, 2740906500), (284213, 2749247061), (284213, 2757394890), (284213, 2759989486), (284213, 2761843277), (284213, 151478930), (284213, 148062450), (284213, 151967530), (284213, 3201855770), (284213, 3202886134), (284213, 3206581251), (284213, 3209039845), (284213, 1332296226), (284213, 189927044), (284213, 1161319334), (284213, 1149974756), (284213, 1565266922), (284213, 3071435983), (284213, 3073026980), (284213, 3075073338), (284213, 3079557207), (284213, 3096852034), (284213, 1656560630), (284213, 919374493), (284213, 922927368), (284213, 3029701978), (284213, 3052338941), (284213, 137377857), (284213, 141026521), (284213, 2415574441), (284213, 2420218534), (284213, 2418552965), (284213, 2420025714), (284213, 2422775870), (284213, 2428675502), (284213, 2430308838), (284213, 2438740898), (284213, 2504297820), (284213, 2503211326), (284213, 2506610545), (284213, 2605055627), (284213, 2612396396), (284213, 2621904503), (284213, 3394543455), (284213, 3409964405), (284213, 3411589506), (284213, 3418729672), (284213, 2224899284), (284213, 2231689989), (284213, 1848894038), (284213, 1852114871), (284213, 2131863387), (284213, 1483389682), (284213, 1488539374), (284213, 2268288138), (284213, 2350713619), (284213, 2359810706), (284213, 2372213644), (284285, 33636635), (284285, 38918853), (284285, 207492014), (284285, 211105414), (284285, 209106001), (284285, 2035802185), (284285, 2040048200), (284285, 2041046794), (284285, 2043145379), (284285, 3297108619), (284285, 3303926356), (284285, 2274703655), (284285, 2277048543), (284285, 1055039111), (284285, 1060993406), (284285, 1064710980), (284285, 1634400284), (284285, 1318769950), (284285, 1323925394), (284285, 1496090057), (284285, 1499018814), (284285, 1502656421), (284285, 1507985474), (284285, 2088236582), (284285, 2391859388), (284285, 2528689805), (284285, 2531981691), (284285, 289970618), (284285, 293436195), (284285, 295551209), (284285, 301354985), (284285, 1975185812), (284285, 1981802885), (284285, 1981728817), (284285, 1988449684), (284285, 1336050263), (284285, 1341048289), (284285, 1342572231), (284285, 1346029309), (284285, 1347730150), (284285, 1352460232), (284285, 1356522892), (284285, 1360273610), (284285, 2319781514), (284285, 2339487592), (284285, 2347412184), (284285, 499284505), (284285, 511307700), (284285, 511659385), (284285, 515075587), (284285, 518058934), (284285, 520115069), (284285, 4427480685), (284285, 4427214569), (284285, 4425194545), (284285, 4431674790), (284285, 994260527), (284285, 1368910955), (284285, 1367175833), (284285, 1374033876), (284285, 1386606346), (284285, 1384656211), (284285, 1388721050), (284285, 2988973121), (284285, 3539747618), (284285, 3539948481), (284285, 3543847957), (284285, 3549235811), (284285, 3557730189), (284285, 3561061238), (284285, 3562357872), (284285, 3736526628), (284285, 3899225877), (284285, 965426172), (284285, 985220014), (284285, 982609611), (284285, 3851092389), (284285, 3873535558), (284285, 878678881), (284285, 877534158), (284285, 1112401192), (284285, 1113847945), (284285, 1119980367), (284285, 1119739228), (284285, 1213485460), (284285, 1212962367), (284285, 1209893812), (284285, 1210513185), (284285, 1667135505), (284285, 1677575261), (284285, 1678529787), (284285, 1679020084), (284285, 1680126507), (284285, 1682568392), (284285, 4313186893), (284285, 4313573020), (284285, 4334181927), (284285, 4343598423), (284285, 4343111497), (284285, 2475734564), (284285, 2481757675), (284285, 2488125156), (284285, 2915221137), (284285, 738665916), (284285, 741982827), (284285, 746218586), (284285, 752141300), (284285, 749366728), (284285, 3498515680), (284285, 3501962006), (284285, 3509413595), (284285, 3513463997), (284285, 3521214100), (284285, 3523923789), (284285, 3527148776), (284285, 3529424154), (284285, 4522870758), (284285, 4530531752), (284285, 4531286513), (284285, 4532704105), (284285, 4535318163), (284285, 999722262), (284285, 999639892), (284285, 1004143263), (284285, 1008291274), (284285, 1009068788), (284285, 1014251719), (284285, 1018751664), (284285, 318037786), (284285, 1791752), (284285, 6631312), (284285, 20343623), (284285, 24914142), (284285, 23817893), (284285, 29496117), (284285, 337960251), (284285, 339777781), (284285, 345955525), (284285, 3264329230), (284285, 3277039668), (284285, 3280522094), (284285, 3288572213), (284285, 3285459952), (284285, 3289974173), (284285, 2699486820), (284285, 2706709718), (284285, 2708450023), (284285, 2715022648), (284285, 2717134080), (284285, 2726881985), (284285, 2729471569), (284285, 2738134601), (284285, 569151765), (284285, 580055061), (284285, 589659059), (284285, 591731538), (284285, 3764654213), (284285, 3766633368), (284285, 3767776533), (284285, 3769891373), (284285, 3784015485), (284285, 3788803651), (284285, 3447301163), (284285, 3447748620), (284285, 3452792303), (284285, 3455822623), (284285, 1408782805), (284285, 1423828443), (284285, 1424526754), (284285, 1431683050), (284285, 1431554252), (284285, 1433526949), (284285, 1433966573), (284285, 1434837632), (284285, 3914706362), (284285, 3916728508), (284285, 3096931846), (284285, 3109674767), (284285, 3118643771), (284285, 3120852711), (284285, 3123163858), (284285, 263409022), (284285, 264805595), (284285, 1132984363), (284285, 1141354309), (284285, 2403181236), (284285, 2410061994), (284285, 2410581343), (284285, 2420440861), (284285, 2426118246), (284285, 2424641838), (284285, 2426852503), (284285, 2814178068), (284285, 2818715882), (284285, 2832045213), (284285, 2838340009), (284285, 2842810245), (284285, 2064669890), (284285, 2062241295), (284285, 2075547338), (284285, 2078554501), (284285, 472356237), (284285, 469880658), (284285, 471529263), (284285, 477279259), (284285, 479120967), (284285, 493123521), (284285, 494394252), (284285, 267986317), (284285, 276563131), (284285, 278691898), (284285, 1027481328), (284285, 1033005308), (284285, 1042589452), (284285, 1044480023), (284285, 1049475782), (284285, 958584594), (284285, 1064510129), (284285, 1074940088), (284285, 1075860391), (284285, 1077647874), (284285, 1080733737), (284285, 1082844284), (284285, 1083090494), (284285, 1084306108), (284285, 2007264489), (284285, 2005942665), (284285, 2009769254), (284285, 2013570114), (284285, 2018725197), (284285, 2020547109), (284285, 2021933564), (284285, 2030266599), (284285, 2032450362), (284285, 1880842442), (284285, 1933228445), (284285, 2447083686), (284285, 2447550855), (284285, 2451578843), (284285, 2448134399), (284285, 2449062459), (284285, 2467807740), (284285, 2467737635), (284285, 1277564030), (284285, 1281031825), (284285, 1279591708), (284285, 1283322289), (284285, 1280885026), (284285, 81715919), (284285, 89073466), (284285, 93300422), (284285, 98318393), (284285, 107274046), (284285, 108976283), (284285, 3664835635), (284285, 3992966842), (284285, 4011081818), (284285, 1514233299), (284285, 1517779743), (284285, 3888472645), (284285, 3888601315), (284285, 3891832409), (284285, 3894775501), (284285, 3894216640), (284285, 1481162541), (284285, 1481920076), (284285, 1482835779), (284285, 2677519370), (284285, 2685378112), (284285, 927160095), (284285, 927497797), (284285, 930770716), (284285, 940680339), (284285, 940120878), (284285, 1804778257), (284285, 1846269012), (284285, 1852121785), (284285, 1859822692), (284285, 2428680540), (284285, 2432059909), (284285, 2432274807), (284285, 2433676724), (284285, 2436907400), (284285, 114227165), (284285, 118813100), (284285, 119854869), (284285, 1236941725), (284285, 1244353619), (284285, 1247194558), (284285, 3799454738), (284285, 3804615423), (284285, 4046609616), (284285, 653960435), (284285, 652177471), (284285, 663054336), (284285, 662844404), (284285, 666231330), (284285, 666468179), (284285, 642376419), (284285, 638295840), (284285, 643955605), (284285, 4344292495), (284285, 4356839593), (284285, 4354445572), (284285, 4358443170), (284285, 4369908750), (284285, 3938661551), (284285, 3939715319), (284285, 71548953), (284285, 74549569), (284285, 880103889), (284285, 881303288), (284285, 905825136), (284285, 904061103), (284285, 3670175691), (284285, 3696469718), (284285, 142479400), (284285, 145283521), (284285, 179001330), (284285, 445793581), (284285, 466272300), (284285, 3715772524), (284285, 3719852500), (284285, 3733180613), (284285, 1088508975), (284285, 1145467198), (284285, 1151266404), (284285, 1808427330), (284285, 1809710763), (284285, 1812320841), (284285, 1820820115), (284285, 2095007346), (284285, 2104592507), (284285, 2103855408), (284285, 2108306080), (284285, 2109271786), (284285, 2117857285), (284285, 848447837), (284285, 856174467), (284285, 860936750), (284285, 857166302), (284285, 867527628), (284285, 789101954), (284285, 793344912), (284285, 826501817), (284285, 830422228), (284285, 2354565969), (284285, 2364296788), (284285, 2365005382), (284285, 2368317937), (284285, 2367116792), (284285, 2380688017), (284285, 2386424498), (284285, 2172562332), (284285, 2175297375), (284285, 3987338150), (284285, 3985471723), (284285, 1732140134), (284285, 1737964909), (284285, 1737269125), (284285, 2763584811), (284285, 2761699162), (284285, 2787649561), (284285, 2783757993), (284285, 221375462), (284285, 228010991), (284285, 227997239), (284285, 232023015), (284285, 237258038), (284285, 1202552334), (284285, 1205558747), (284285, 2863500526), (284285, 3143395864), (284285, 3145473019), (284285, 3142672197), (284285, 3155672659), (284285, 3159725898), (284285, 3176674767), (284285, 49327304), (284285, 51966999), (284285, 50991772), (284285, 56769031), (284285, 3128601358), (284285, 3473856416), (284285, 3485469945), (284285, 3488494086), (284285, 3491189660), (284285, 1303104112), (284285, 1317064589), (284285, 4476425860), (284285, 4476635023), (284285, 4474642035), (284285, 531286244), (284285, 531171042), (284285, 533538576), (284285, 2349726439), (284285, 598172167), (284285, 1590053392), (284285, 4187413855), (284285, 4187515076), (284285, 4199055247), (284285, 4205918535), (284285, 4209481820), (284285, 4210250607), (284285, 4212741169), (284285, 3189979761), (284285, 3576944315), (284285, 3582787808), (284285, 124890803), (284285, 128593653), (284285, 134192443), (284285, 4062671970), (284285, 4064068763), (284285, 4067239530), (284285, 4065582707), (284285, 4074020680), (284285, 4083839685), (284285, 2947395090), (284285, 2951352243), (284285, 2966408513), (284285, 1526185387), (284285, 1536956181), (284285, 1540881221), (284285, 1547594968), (284285, 1546480615), (284285, 1554461844), (284285, 1553990579), (284285, 1558659666), (284285, 1181186845), (284285, 1188987304), (284285, 1194215486), (284285, 1192391174), (284285, 4541157492), (284285, 4542353894), (284285, 4545060420), (284285, 4088806780), (284285, 4094638019), (284285, 4098551678), (284285, 4113883459), (284285, 2793055639), (284285, 2798678607), (284285, 2798253493), (284285, 2799388220), (284285, 4506005222), (284285, 4515308092), (284285, 4031532173), (284285, 4033464554), (284285, 4036450349), (284285, 3218558722), (284285, 3220173293), (284285, 3234664471), (284285, 3954497072), (284285, 3964109543), (284285, 3964040362), (284285, 3974321805), (284285, 2543325311), (284285, 2557821913), (284285, 2570083423), (284285, 2574513368), (284285, 2574530554), (284285, 2854765782), (284285, 2495023029), (284285, 2496415031), (284285, 2508346508), (284285, 1156903442), (284285, 1158609187), (284285, 1168769728), (284285, 1178084482), (284285, 1390833349), (284285, 1397271529), (284285, 4234350388), (284285, 4242975373), (284285, 4244107018), (284285, 4246759476), (284285, 4245155105), (284285, 4255872468), (284285, 4265483715), (284285, 359861273), (284285, 356807290), (284285, 363158730), (284285, 364679871), (284285, 374267876), (284285, 374964355), (284285, 617397162), (284285, 621443034), (284285, 628517435), (284285, 632096325), (284285, 629972737), (284285, 631561557), (284285, 570528019), (284285, 725296237), (284285, 728397244), (284285, 733621346), (284285, 732625064), (284285, 3239890293), (284285, 3245823575), (284285, 3250254587), (284285, 3319498880), (284285, 3318885122), (284285, 4144723400), (284285, 4148293515), (284285, 4161924759), (284285, 4163402479), (284285, 4164596973), (284285, 4169621121), (284285, 428299462), (284285, 430849026), (284285, 434528389), (284285, 3017881115), (284285, 3025060409), (284285, 3036538705), (284285, 4438208984), (284285, 4445776145), (284285, 4454725285), (284285, 4465041007), (284285, 2627315119), (284285, 2632630668), (284285, 3086180553), (284285, 4130015795), (284285, 4129535537), (284285, 4132903868), (284285, 4131879802), (284285, 3586448737), (284285, 3585257593), (284285, 3591548434), (284285, 3597136432), (284285, 1453646501), (284285, 1453394389), (284285, 1454912549), (284285, 1464433830), (284285, 1467713759), (284285, 1472607900), (284285, 1474612360), (284285, 1695969550), (284285, 3702035888), (284285, 3702913333), (284285, 3703273081), (284285, 3708070573), (284285, 3640486603), (284285, 3645099634), (284285, 3648292247), (284285, 3649412794), (284285, 3653604567), (284285, 3657341809), (284285, 3655532747), (284285, 2919734105), (284285, 2929949555), (284285, 2930746508), (284285, 2289473863), (284285, 2296411633), (284285, 2299771376), (284285, 2309048269), (284285, 1636202918), (284285, 1645959396), (284285, 1654379098), (284285, 1653545117), (284285, 3334753510), (284285, 3338599243), (284285, 3341062871), (284285, 3357318236), (284285, 1705198184), (284285, 2660109036), (284285, 2660604168), (284285, 2667238044), (284285, 2668818992), (284285, 3840835079), (284285, 3846328622), (284285, 3849715392), (284285, 2181819357), (284285, 2189693645), (284285, 2190834704), (284285, 2200077542), (284285, 2205325284), (284285, 2156623210), (284285, 2160175496), (284285, 2162830462), (284285, 680997030), (284285, 1557374534), (284285, 1562463496), (284285, 2588034839), (284285, 4291645864), (284285, 4291586639), (284285, 4288910191), (284285, 4298147467), (284285, 4303792264), (284285, 2221482201), (284285, 2230410656), (284285, 2226912354), (284285, 2232618144), (284285, 2241745500), (284285, 1611628179), (284285, 1620847371), (284285, 1619594895), (284285, 1621232047), (284285, 1624832068), (284285, 1622288958), (284285, 1628767303), (284285, 715301923), (284285, 762673007), (284285, 779440973), (284285, 537343574), (284285, 551389400), (284285, 558474796), (284285, 2123245760), (284285, 2123831256), (284285, 2123358944), (284285, 2127196523), (284285, 3824979784), (284285, 3829749701), (284285, 3829602784), (284285, 3832534806), (284285, 3833791484), (284285, 3835217665), (284285, 3835225258), (284285, 2316264651), (284285, 2316472662), (284285, 2604542625), (284285, 2610252456), (284285, 1936070412), (284285, 1939557644), (284285, 1955132989), (284285, 1963769478), (284285, 1962334784), (284285, 1440446284), (284285, 1441631203), (284285, 1448795376), (284285, 1575105042), (284285, 1578912544), (284285, 1583614545), (284285, 1908544073), (284285, 1918862607), (284285, 384818546), (284285, 386612138), (284285, 386157439), (284285, 410934606), (284285, 3384359403), (284285, 3397459330), (284285, 1755542416), (284285, 1758367607), (284285, 1764209356), (284285, 3565184557), (284285, 3571149500), (284285, 3577533637), (284285, 3578623768), (284285, 1633497595), (284285, 2181476454), (284285, 2891059727), (284285, 1844160455), (284285, 1893945497), (284285, 1902215134), (284285, 1902818884), (284285, 1904485161), (284285, 1903669559), (284285, 806886478), (284285, 814075225), (284285, 815490484), (284285, 826280584), (284285, 828708533), (284285, 685859801), (284285, 695523491), (284285, 3418048170), (284285, 3416611686), (284285, 3417502152), (284285, 3424208656), (284285, 3425996629), (284285, 3432660137), (284285, 3437811780), (284285, 3442885413), (284285, 4225832291), (284285, 2988724606), (284285, 2992734704), (284285, 2991656108), (284285, 3000263065), (284285, 3000813723), (284285, 3012919644), (284285, 3016312492), (284285, 1774510750), (284285, 1778605508), (284285, 1793359632), (284285, 1791786552), (284285, 3042958985), (284285, 3055930105), (284285, 3062660960), (284285, 3065496828), (284285, 1249638545), (284285, 1249132525), (284285, 1251279641), (284285, 1254052680), (284285, 1259588595), (284420, 539128223), (284420, 545479469), (284420, 554820629), (284420, 115520963), (284420, 124027725), (284420, 761830354), (284420, 770327522), (284420, 779142990), (284420, 221396615), (284420, 226580476), (284420, 567764851), (284420, 702751748), (284420, 703343056), (284420, 710168965), (284420, 710255179), (284420, 706581110), (284420, 714736907), (284420, 718659675), (284420, 266449051), (284420, 268086034), (284420, 269348598), (284420, 180119365), (284420, 181342878), (284420, 182761887), (284420, 188577848), (284420, 206984651), (284420, 341077336), (284420, 346105362), (284420, 349672357), (284420, 351569065), (284420, 356238344), (284420, 362163171), (284420, 74356679), (284420, 76099347), (284420, 83312403), (284420, 83549510), (284420, 84557546), (284420, 824935127), (284420, 39331445), (284420, 42695382), (284420, 44976026), (284420, 45790626), (284420, 49614502), (284420, 49913708), (284420, 311776749), (284420, 311292049), (284420, 602319153), (284420, 605042484), (284420, 610296169), (284420, 611554790), (284420, 615690924), (284420, 837034831), (284420, 683484639), (284420, 684036108), (284420, 688983914), (284420, 686839120), (284420, 689928610), (284420, 865769334), (284420, 869910303), (284420, 879893854), (284420, 1697303), (284420, 6260834), (284420, 19294636), (284420, 486072716), (284420, 491193335), (284420, 492555496), (284420, 497392958), (284420, 210336339), (284420, 211860757), (284420, 213688846), (284420, 791437469), (284420, 719643516), (284420, 29425048), (284420, 92082036), (284420, 96739409), (284420, 97800624), (284420, 97337893), (284420, 452800622), (284420, 456406796), (284420, 461540870), (284420, 464421590), (284420, 466737474), (284420, 473645423), (284420, 574296094), (284420, 573242421), (284420, 574026493), (284420, 577617819), (284420, 582590925), (284420, 582808247), (284420, 584193170), (284420, 588006353), (284420, 584878719), (284420, 590089264), (284420, 591146042), (284420, 595655923), (284420, 593333270), (284420, 142650498), (284420, 154649468), (284420, 158288622), (284420, 159733046), (284420, 160386284), (284420, 162780228), (284420, 736792752), (284420, 753378631), (284420, 753299727), (284420, 756595628), (284420, 422387882), (284420, 424041189), (284420, 795253705), (284420, 795308538), (284420, 801593761), (284420, 810351015), (284420, 812264259), (284420, 816635806), (284420, 134552400), (284420, 134358313), (284420, 136596608), (284420, 138899145), (284420, 400306445), (284420, 403975414), (284420, 63106344), (284420, 637133359), (284420, 640704129), (284420, 639383097), (284420, 638221644), (284420, 640443440), (284420, 649494235), (284420, 654370201), (284420, 660451521), (284420, 433674322), (284420, 444356967), (284420, 449700597), (284420, 446825156), (284420, 237606548), (284420, 625295020), (284420, 626138552), (284420, 631776751), (284420, 634025163), (284420, 858217350), (284420, 859103533), (284420, 864868915), (284420, 320666263), (284420, 320356077), (284420, 321392648), (284420, 285596176), (284420, 286694903), (284420, 301330657), (284420, 302938873), (284420, 305858325), (284420, 697345733), (284420, 701365521), (284420, 504050941), (284420, 502874016), (284420, 507356339), (284420, 523579699), (284420, 372479898), (284420, 374838099), (284420, 379566261), (284420, 380545961), (284420, 250187950), (284427, 392505551), (284427, 395651523), (284427, 401558190), (284427, 406646309), (284427, 409731287), (284427, 413609670), (284427, 414395604), (284427, 418597068), (284427, 425648311), (284427, 433407176), (284427, 436905648), (284427, 435526791), (284427, 438153275), (284427, 445512213), (284427, 275044163), (284427, 273829489), (284427, 323666982), (284427, 325959511), (284427, 329028621), (284427, 329744850), (284427, 333257718), (284427, 527991808), (284427, 529145325), (284427, 531064604), (284427, 168456998), (284427, 172993232), (284427, 172574594), (284427, 175001222), (284427, 192361040), (284427, 197284137), (284427, 166785118), (284427, 235561491), (284427, 238193036), (284427, 238993558), (284427, 243002439), (284427, 449041407), (284427, 87027154), (284427, 92532393), (284427, 230838287), (284427, 62101100), (284427, 67110341), (284427, 299121380), (284427, 338106066), (284427, 492081093), (284427, 123543582), (284427, 127859101), (284427, 132636482), (284427, 135808177), (284427, 384003532), (284427, 485960543), (284427, 486543570), (284427, 354893417), (284427, 358945218), (284427, 368267679), (284427, 370030262), (284427, 370658075), (284427, 521025752), (284427, 522173165), (284427, 321510001), (284427, 40621793), (284427, 49529220), (284427, 48664553), (284427, 186240430), (284427, 184852511), (284427, 185054426), (284427, 203369931), (284427, 218126342), (284427, 220250159), (284427, 221979185), (284427, 20311217), (284427, 20174496), (284427, 28935019), (284427, 33942277), (284427, 11268392), (284427, 13096636), (284427, 18423084), (284427, 93163524), (284427, 107085366), (284427, 110646694), (284427, 115464096), (284427, 457748267), (284427, 459063076), (284427, 458448322), (284427, 465382096), (284427, 472063680), (284427, 473272866), (284427, 472105785), (284427, 477176977), (284427, 133380466), (284427, 145753675), (284427, 149946247), (284427, 152458404), (284427, 157132206), (284427, 247819894), (284427, 255323953), (284427, 261286872)]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DataPrepJobProperties.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DataPrepJobProperties.py
new file mode 100644
index 000000000000..25488fdf6b86
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/DataPrepJobProperties.py
@@ -0,0 +1,27 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+# From Marcelo Vogel to allow setting the name of the output ROOT file for DAPR0
+# See https://its.cern.ch/jira/browse/PRODSYS-601 for more info
+
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from AthenaCommon.JobProperties import jobproperties
+ 
+class outputFile(JobProperty):
+    statusOn     = True
+    allowedTypes = ['str']
+    StoredValue  = 'PILEUP.root'
+    
+## Definition of the flag container
+class DataPrepJobProperties(JobPropertyContainer):
+    """Container for the DerivationFrameworkDataPrep key flags
+    """
+    pass
+
+## adding the container to the general top-level container
+jobproperties.add_Container(DataPrepJobProperties)
+ 
+## adding the flag to the  container
+jobproperties.DataPrepJobProperties.add_JobProperty( outputFile )
+
+## shortcut to access flags
+DataPrepFlags = jobproperties.DataPrepJobProperties
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/__init__.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/__init__.py
new file mode 100644
index 000000000000..74583d364ec2
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/python/__init__.py
@@ -0,0 +1,2 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR0.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR0.py
new file mode 100644
index 000000000000..7c53c5b1dc6e
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR0.py
@@ -0,0 +1,24 @@
+#====================================================================
+# DAPR0.py 
+# reductionConf flag DAPR0 in Reco_tf.py   
+#====================================================================
+
+from DerivationFrameworkCore.DerivationFrameworkMaster import *
+streamName = derivationFlags.WriteDAOD_DAPR0Stream.StreamName
+fileName   = buildFileName( derivationFlags.WriteDAOD_DAPR0Stream )
+from DerivationFrameworkDataPrep.DataPrepJobProperties import DataPrepFlags
+pileupFileName = DataPrepFlags.outputFile()
+DAPR0Stream = MSMgr.NewPoolRootStream( streamName, fileName )
+
+
+##use pileupreweighting provider to generate a df.metadata.root prw config file
+##only to run if the input file is post-digitization (i.e. dont run this on EVNT)
+from RecExConfig.InputFilePeeker import inputFileSummary
+
+if 'metadata' in inputFileSummary and '/Digitization/Parameters' in inputFileSummary['metadata']:
+    ToolSvc += CfgMgr.CP__PileupReweightingTool("auto",ConfigFiles=[],LumiCalcFiles=[])
+    DerivationFrameworkJob += CfgMgr.CP__PileupReweightingProvider(ConfigOutputStream="DFMETADATA",Tool=ToolSvc.auto,RunSystematics=False)
+    if not hasattr(svcMgr,'THistSvc'):
+        svcMgr += CfgMgr.THistSvc()
+    histString = "DFMETADATA DATAFILE=\'"+pileupFileName+"\' OPT=\'RECREATE\'"
+    svcMgr.THistSvc.Output += [histString]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR1.py
new file mode 100644
index 000000000000..f61767146f41
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR1.py
@@ -0,0 +1,55 @@
+#====================================================================
+# DAPR1.py 
+# reductionConf flag DAPR1 in Reco_tf.py   
+#====================================================================
+
+from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkJetEtMiss.JetCommon import *
+#from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
+#from DerivationFrameworkJetEtMiss.METCommon import *
+
+#====================================================================
+# SKIMMING TOOL 
+#====================================================================
+# NOTE: need to be able to OR isSimulated as an OR with the trigger
+trigger = '(EF_j360_a4tchad || HLT_j360_a4tchad || L1_BCM_AC_CA_BGRP0 || L1_BCM_Wide_EMPTY || L1_BCM_Wide_UNPAIRED_ISO || L1_BCM_Wide_UNPAIRED_NONISO || L1_BCM_Wide_CALIB || L1_BCM_Wide_ABORTGAPNOTCALIB || L1_BCM_AC_UNPAIRED_ISO || L1_BCM_CA_UNPAIRED_ISO || L1_BCM_AC_UNPAIRED_NONISO || L1_BCM_CA_UNPAIRED_NONISO || L1_BCM_AC_ABORTGAPNOTCALIB || L1_BCM_CA_ABORTGAPNOTCALIB || L1_BCM_AC_CALIB || L1_BCM_CA_CALIB || L1_J12_UNPAIRED_ISO || L1_J12_UNPAIRED_NONISO || L1_J12_ABORTGAPNOTCALIB || L1_J12 || L1_J12_EMPTY)'
+expression = trigger+' || (EventInfo.eventTypeBitmask==1)'
+
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
+DAPR1SkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "DAPR1SkimmingTool1",
+                                                                    expression = expression)
+ToolSvc += DAPR1SkimmingTool
+
+#=======================================
+# CREATE THE DERIVATION KERNEL ALGORITHM   
+#=======================================
+
+from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
+DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("DAPR1Kernel",
+                                                                       SkimmingTools = [DAPR1SkimmingTool])
+                                                                        
+
+#====================================================================
+# SET UP STREAM   
+#====================================================================
+streamName = derivationFlags.WriteDAOD_DAPR1Stream.StreamName
+fileName   = buildFileName( derivationFlags.WriteDAOD_DAPR1Stream )
+DAPR1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
+DAPR1Stream.AcceptAlgs(["DAPR1Kernel"])
+
+#====================================================================
+# Add the containers to the output stream - slimming done here
+#====================================================================
+from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
+DAPR1SlimmingHelper = SlimmingHelper("DAPR1SlimmingHelper")
+DAPR1SlimmingHelper.SmartCollections = ["Muons", "PrimaryVertices"]
+DAPR1SlimmingHelper.AllVariables = ["AntiKt4LCTopoJets",
+                                   "AntiKt4EMTopoJets",
+                                   "CaloCalTopoClusters",
+                                   "MuonSegments" ]
+DAPR1SlimmingHelper.IncludeMuonTriggerContent = True
+DAPR1SlimmingHelper.IncludeEGammaTriggerContent = True
+DAPR1SlimmingHelper.IncludeBPhysTriggerContent = True
+DAPR1SlimmingHelper.IncludeJetTauEtMissTriggerContent = True
+
+DAPR1SlimmingHelper.AppendContentToStream(DAPR1Stream)
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR2.py
new file mode 100644
index 000000000000..153be9c80275
--- /dev/null
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkDataPrep/share/DAPR2.py
@@ -0,0 +1,35 @@
+#====================================================================
+# DAPR2.py 
+# reductionConf flag DAPR2 in Reco_tf.py   
+# Special event picking format, to be used in case of event index
+# failure
+#====================================================================
+
+from DerivationFrameworkCore.DerivationFrameworkMaster import *
+
+#====================================================================
+# EVENT PICKING   
+#====================================================================
+from DerivationFrameworkDataPrep.DAPR2EventList import EventList
+seq = CfgMgr.AthSequencer("DFEventPickingSequence") 
+from GaudiSequencer.PyComps import PyEvtFilter
+seq += PyEvtFilter(
+   'DFEventPickingAlg',
+   # the store-gate key. leave as an empty string to take any eventinfo instance
+   evt_info='',
+   OutputLevel=Lvl.WARNING)
+seq.DFEventPickingAlg.evt_list = EventList
+DerivationFrameworkJob += seq
+#====================================================================
+# SET UP STREAM   
+#====================================================================
+streamName = derivationFlags.WriteDAOD_DAPR2Stream.StreamName
+fileName   = buildFileName( derivationFlags.WriteDAOD_DAPR2Stream )
+DAPR2Stream = MSMgr.NewPoolRootStream( streamName, fileName )
+DAPR2Stream.AcceptAlgs(["DFEventPickingAlg"])
+#====================================================================
+# Store all containers
+#====================================================================
+from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
+excludeList = []
+dpdOutput.addAllItemsFromInputExceptExcludeList( streamName, excludeList )
diff --git a/PhysicsAnalysis/PATJobTransforms/share/skeleton.AODtoDAOD_tf.py b/PhysicsAnalysis/PATJobTransforms/share/skeleton.AODtoDAOD_tf.py
index 70f399fe7c4c..6aff290decc8 100644
--- a/PhysicsAnalysis/PATJobTransforms/share/skeleton.AODtoDAOD_tf.py
+++ b/PhysicsAnalysis/PATJobTransforms/share/skeleton.AODtoDAOD_tf.py
@@ -15,11 +15,12 @@ def getSubSequences(sequence,sequenceList):
             getSubSequences(item,sequenceList)
     return
 
-if hasattr(runArgs, "reductionConf"):
-    msg.info('Will attempt to make the following reduced formats: {0}'.format(runArgs.reductionConf))
-else:
-    msg.error('AOD Reduction job started, but with no "reductionConf" array - aborting')
-    raise RuntimeError("No reductions configured")
+if not hasattr(runArgs, "outputNTUP_PILEUPFile"):
+    if hasattr(runArgs, "reductionConf"):
+        msg.info('Will attempt to make the following reduced formats: {0}'.format(runArgs.reductionConf))
+    else:
+        msg.error('AOD Reduction job started, but with no "reductionConf" array - aborting')
+        raise RuntimeError("No reductions configured")
 
 include("RecJobTransforms/CommonRecoSkeletonJobOptions.py")
 
@@ -66,6 +67,13 @@ else:
     msg.error('AOD Reduction job started, but with no AOD inputs - aborting')
     raise RuntimeError("No AOD input")
 
+# Deal appropriately with NTUP_PILEUP
+if hasattr(runArgs, "outputNTUP_PILEUPFile"):
+    from DerivationFrameworkDataPrep.DataPrepJobProperties import DataPrepFlags
+    DataPrepFlags.outputFile = runArgs.outputNTUP_PILEUPFile
+    runArgs.outputDAOD_DAPR0File = "DAOD_DAPR0.root"
+    runArgs.reductionConf = "DAPR0"
+
 listOfFlags=[]
 
 try:
-- 
GitLab


From a84d6d45530d14b7028713dc2ca009419e81352a Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Thu, 17 Dec 2020 17:33:26 +0000
Subject: [PATCH 091/308] Make CaloBanChanTool EventContext aware to avoid
 lookups

---
 .../CaloBadChannelTool/CaloBadChanTool.h      | 22 ++++---
 .../src/CaloBadChanTool.cxx                   | 57 +++++++++----------
 .../src/CaloClusterBadChannelList.cxx         | 11 ++--
 .../CaloConditions/ICaloBadChanTool.h         | 13 ++++-
 .../TileConditions/TileBadChanTool.h          |  4 +-
 .../TileConditions/src/TileBadChanTool.cxx    |  6 +-
 6 files changed, 67 insertions(+), 46 deletions(-)

diff --git a/Calorimeter/CaloBadChannelTool/CaloBadChannelTool/CaloBadChanTool.h b/Calorimeter/CaloBadChannelTool/CaloBadChannelTool/CaloBadChanTool.h
index db0b28852b32..38c44b229ae6 100644
--- a/Calorimeter/CaloBadChannelTool/CaloBadChannelTool/CaloBadChanTool.h
+++ b/Calorimeter/CaloBadChannelTool/CaloBadChannelTool/CaloBadChanTool.h
@@ -22,17 +22,25 @@ public:
   CaloBadChanTool(const std::string& type, const std::string& name, 
 		  const IInterface* parent);
 
-  virtual ~CaloBadChanTool();
+  virtual ~CaloBadChanTool() override;
 					  
-  virtual StatusCode initialize();
-
-  virtual CaloBadChannel caloStatus( Identifier id) const;
+  virtual StatusCode initialize() override;
 
+  using ICaloBadChanTool::caloStatus;
+  virtual CaloBadChannel caloStatus(const EventContext& ctx,
+                                    Identifier id) const override;
 
 private:
-
-  SG::ReadCondHandleKey<LArBadChannelCont> m_larBCKey{this, "LArBadChanKey", "LArBadChannel", "LAr bad channel SG key"};
-  ToolHandle<ICaloBadChanTool> m_tileBCT{this, "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};
+  SG::ReadCondHandleKey<LArBadChannelCont> m_larBCKey{
+    this,
+    "LArBadChanKey",
+    "LArBadChannel",
+    "LAr bad channel SG key"
+  };
+  ToolHandle<ICaloBadChanTool> m_tileBCT{ this,
+                                          "TileBadChanTool",
+                                          "TileBadChanTool",
+                                          "Tile bad channel tool" };
   const CaloCell_ID* m_caloID;
 };
 
diff --git a/Calorimeter/CaloBadChannelTool/src/CaloBadChanTool.cxx b/Calorimeter/CaloBadChannelTool/src/CaloBadChanTool.cxx
index 9db108c108c3..70d49eb9916b 100644
--- a/Calorimeter/CaloBadChannelTool/src/CaloBadChanTool.cxx
+++ b/Calorimeter/CaloBadChannelTool/src/CaloBadChanTool.cxx
@@ -6,7 +6,7 @@
 
 //#include "GaudiKernel/MsgStream.h"
 
-CaloBadChanTool::CaloBadChanTool(const std::string& type, const std::string& name, 
+CaloBadChanTool::CaloBadChanTool(const std::string& type, const std::string& name,
 				 const IInterface* parent) :
   AthAlgTool( type, name, parent),
   m_caloID(nullptr)
@@ -26,7 +26,7 @@ StatusCode CaloBadChanTool::initialize()
   if (sc.isFailure()) {
     ATH_MSG_WARNING ( "Unable to initialize LAr bad channels key: no LAr bad channel info will be provided " );
   }
-  else 
+  else
     ATH_MSG_DEBUG ( "LAr bad channels key initialized" );
 
 
@@ -34,41 +34,40 @@ StatusCode CaloBadChanTool::initialize()
   if (sc.isFailure()) {
     ATH_MSG_WARNING ( "Unable to get TileBadChannelTool: no Tile bad channel info will be provided " );
   }
-  else 
+  else
     ATH_MSG_DEBUG ( "TileBadChannelTool retrieved" );
 
   ATH_CHECK( detStore()->retrieve(m_caloID, "CaloCell_ID") );
   return StatusCode::SUCCESS;
 }
 
-CaloBadChannel CaloBadChanTool::caloStatus(Identifier id) const{
+CaloBadChannel
+CaloBadChanTool::caloStatus(const EventContext& ctx, Identifier id) const
+{
   if (m_tileBCT && m_caloID->is_tile(id)) {
-    return m_tileBCT->caloStatus(id);
-  }
-  else if(m_caloID->is_lar(id)) {
-     SG::ReadCondHandle<LArBadChannelCont> bch{m_larBCKey};
-     const LArBadChannelCont* bcCont{*bch};
-     if(bcCont) {
-        CaloBadChannel::BitWord res = 0;
-        LArBadChannel lbc = bcCont->offlineStatus(id);
-        
-        if ( lbc.reallyNoisy() || lbc.sporadicBurstNoise()) {
-          CaloBadChannel::setBit( CaloBadChannel::noisyBit, res);
-        }
-        if (lbc.deadReadout() || lbc.deadPhys()) {
-          CaloBadChannel::setBit( CaloBadChannel::deadBit, res);
-        }
-        else if ( ! lbc.good()) {
-          CaloBadChannel::setBit( CaloBadChannel::affectedBit, res);
-        }
-        return CaloBadChannel(res);
-     } else {
-        CaloBadChannel empty;
-        return empty;
-     }
-  }
-  else {
+    return m_tileBCT->caloStatus(ctx,id);
+  } else if (m_caloID->is_lar(id)) {
+    SG::ReadCondHandle<LArBadChannelCont> bch{ m_larBCKey, ctx };
+    const LArBadChannelCont* bcCont{ *bch };
+    if (bcCont) {
+      CaloBadChannel::BitWord res = 0;
+      LArBadChannel lbc = bcCont->offlineStatus(id);
+
+      if (lbc.reallyNoisy() || lbc.sporadicBurstNoise()) {
+        CaloBadChannel::setBit(CaloBadChannel::noisyBit, res);
+      }
+      if (lbc.deadReadout() || lbc.deadPhys()) {
+        CaloBadChannel::setBit(CaloBadChannel::deadBit, res);
+      } else if (!lbc.good()) {
+        CaloBadChannel::setBit(CaloBadChannel::affectedBit, res);
+      }
+      return CaloBadChannel(res);
+    } else {
       CaloBadChannel empty;
       return empty;
+    }
+  } else {
+    CaloBadChannel empty;
+    return empty;
   }
 }
diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx
index c5bda73dddce..920085af0c42 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterBadChannelList.cxx
@@ -35,7 +35,7 @@ StatusCode CaloClusterBadChannelList::initialize()
 }
 
 
-void CaloClusterBadChannelList::makeCorrection (const Context& /*myctx*/,
+void CaloClusterBadChannelList::makeCorrection (const Context& myctx,
                                                 CaloCluster* cluster) const
 {
   xAOD::CaloClusterBadChannelList badChanList;
@@ -44,8 +44,8 @@ void CaloClusterBadChannelList::makeCorrection (const Context& /*myctx*/,
   CaloCluster::cell_iterator cellIterEnd = cluster->cell_end();
   for( ;cellIter!=cellIterEnd;cellIter++) {
       const CaloCell* cell = (*cellIter);
-      const Identifier id = cell->ID(); 
-      CaloBadChannel status = m_badChannelTool->caloStatus(id);
+      const Identifier id = cell->ID();
+      CaloBadChannel status = m_badChannelTool->caloStatus(myctx.ctx(),id);
       bool isBad = cell->badcell();
       if (status.dead() || status.noisy() || isBad )   {
          const float eta = cell->eta();
@@ -56,8 +56,9 @@ void CaloClusterBadChannelList::makeCorrection (const Context& /*myctx*/,
          if (isBad && !status.dead()) {
             CaloBadChannel::setBit(CaloBadChannel::deadBit,myword,true);
          }
-         ATH_MSG_DEBUG(" bad channel found eta,phi,layer,status " << eta << " " << phi << " " << layer << " " << myword);
-	 badChanList.emplace_back(eta,phi,layer,myword);
+         ATH_MSG_DEBUG(" bad channel found eta,phi,layer,status "
+                       << eta << " " << phi << " " << layer << " " << myword);
+         badChanList.emplace_back(eta, phi, layer, myword);
       }
   }  // end loop over cells
   cluster->setBadChannelList(badChanList);
diff --git a/Calorimeter/CaloConditions/CaloConditions/ICaloBadChanTool.h b/Calorimeter/CaloConditions/CaloConditions/ICaloBadChanTool.h
index 4aa9304052af..11d50456c9cf 100644
--- a/Calorimeter/CaloConditions/CaloConditions/ICaloBadChanTool.h
+++ b/Calorimeter/CaloConditions/CaloConditions/ICaloBadChanTool.h
@@ -8,13 +8,22 @@
 #include "Identifier/Identifier.h"
 #include "CaloConditions/CaloBadChannel.h"
 #include "GaudiKernel/IAlgTool.h"
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+
 
 class ICaloBadChanTool : public virtual IAlgTool {
 public:
 					  
   virtual ~ICaloBadChanTool() {}
-  
-  virtual CaloBadChannel caloStatus( Identifier id) const = 0;
+
+  virtual CaloBadChannel caloStatus(const EventContext& ctx,
+                                    Identifier id) const = 0;
+
+  virtual CaloBadChannel caloStatus(Identifier id) const
+  {
+    return caloStatus(Gaudi::Hive::currentContext(), id);
+  }
 
   static const InterfaceID& interfaceID() { 
     static const InterfaceID id("ICaloBadChanTool", 1 , 0);
diff --git a/TileCalorimeter/TileConditions/TileConditions/TileBadChanTool.h b/TileCalorimeter/TileConditions/TileConditions/TileBadChanTool.h
index f7af1ad527f9..52c7df546971 100644
--- a/TileCalorimeter/TileConditions/TileConditions/TileBadChanTool.h
+++ b/TileCalorimeter/TileConditions/TileConditions/TileBadChanTool.h
@@ -51,7 +51,9 @@ class TileBadChanTool: public extends<AthAlgTool, ITileBadChanTool, ICaloBadChan
      * @brief ICaloBadChanTool interface.
      * @param cell_id Calo cell identifier
      */
-    virtual CaloBadChannel caloStatus(Identifier cell_id) const override;
+    using ICaloBadChanTool::caloStatus;
+    virtual CaloBadChannel caloStatus(const EventContext& ctx,
+                                      Identifier cell_id) const override;
 
     //===============================================================
     //=== ITileBadChanTool methods
diff --git a/TileCalorimeter/TileConditions/src/TileBadChanTool.cxx b/TileCalorimeter/TileConditions/src/TileBadChanTool.cxx
index 7417de199984..9b70a2572c63 100644
--- a/TileCalorimeter/TileConditions/src/TileBadChanTool.cxx
+++ b/TileCalorimeter/TileConditions/src/TileBadChanTool.cxx
@@ -81,7 +81,9 @@ StatusCode TileBadChanTool::finalize() {
 
 //
 //____________________________________________________________________
-CaloBadChannel TileBadChanTool::caloStatus(Identifier cell_id) const {
+CaloBadChannel
+TileBadChanTool::caloStatus(const EventContext& ctx, Identifier cell_id) const
+{
 
   CaloBadChannel::BitWord res = 0;
 
@@ -94,7 +96,7 @@ CaloBadChannel TileBadChanTool::caloStatus(Identifier cell_id) const {
     std::abort();
   }
 
-  SG::ReadCondHandle<TileBadChannels> badChannels(m_badChannelsKey);
+  SG::ReadCondHandle<TileBadChannels> badChannels(m_badChannelsKey,ctx);
 
   IdentifierHash hash1_id(elem->onl1());
   IdentifierHash hash2_id(elem->onl2());
-- 
GitLab


From 835817cc924d2c3896131872ca63461105cbb48d Mon Sep 17 00:00:00 2001
From: Peter van Gemmeren <gemmeren@anl.gov>
Date: Thu, 17 Dec 2020 11:53:34 -0600
Subject: [PATCH 092/308] Make test a little more robust, fix Jira: ATEAM-687

---
 .../share/AthenaPoolExample_Concat.ref        |  66 +--
 .../share/AthenaPoolExample_Copy.ref          | 194 ++++----
 .../share/AthenaPoolExample_RCond.ref         | 178 +++----
 .../share/AthenaPoolExample_RMeta.ref         | 168 +++----
 .../share/AthenaPoolExample_ReWrite.ref       | 176 +++----
 .../share/AthenaPoolExample_ReWriteAgain.ref  | 194 ++++----
 .../share/AthenaPoolExample_ReWriteNext.ref   | 176 +++----
 .../share/AthenaPoolExample_Read.ref          | 418 ++++++++---------
 .../share/AthenaPoolExample_ReadAgain.ref     | 436 +++++++++---------
 .../share/AthenaPoolExample_ReadConcat.ref    | 428 ++++++++---------
 .../share/AthenaPoolExample_WCond.ref         | 172 +++----
 .../share/AthenaPoolExample_WMeta.ref         |  48 +-
 .../share/AthenaPoolExample_Write.ref         |  66 +--
 .../test/athenarun_test.sh.in                 |   1 -
 14 files changed, 1360 insertions(+), 1361 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
index d2a9fd62a6d3..56bebd2cf508 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref
@@ -230,7 +230,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:EventInfo_p4
@@ -242,7 +242,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleHitContainer_p1_MyHits'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleHitContainer_p1/MyHits) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:ExampleHitContainer_p1
@@ -254,7 +254,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:DataHeader_p6
@@ -266,7 +266,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:DataHeaderForm_p6
@@ -278,7 +278,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:Token
@@ -290,7 +290,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsSimulation'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsSimulation) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:bool
@@ -300,14 +300,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsCalibration'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsCalibration) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsTestBeam)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsTestBeam'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsTestBeam) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO unsigned int [????]
@@ -316,7 +316,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'McChannel'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(McChannel) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:unsigned int
@@ -326,7 +326,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO unsigned long long [????]
@@ -335,7 +335,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:unsigned long long
@@ -345,35 +345,35 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'LumiBlockN'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(LumiBlockN) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(ConditionsRun)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'ConditionsRun'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(ConditionsRun) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTime)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventTime'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventTime) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTimeNanoSec)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventTimeNanoSec'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventTimeNanoSec) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(BunchId)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'BunchId'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(BunchId) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO float [????]
@@ -382,7 +382,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventWeight'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventWeight) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:float
@@ -438,7 +438,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventInfo_p4
@@ -450,7 +450,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:ExampleTrackContainer_p1
@@ -460,7 +460,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:DataHeader_p6
@@ -470,7 +470,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:DataHeaderForm_p6
@@ -1658,7 +1658,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1670,7 +1670,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[10 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:EventStreamInfo_p3
@@ -1682,7 +1682,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[11 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1694,7 +1694,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[12 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1704,14 +1704,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
@@ -1752,7 +1752,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (7 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1762,7 +1762,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream2'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream2) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream2) [203]  (8 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventStreamInfo_p3
@@ -1772,7 +1772,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1782,7 +1782,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream2'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream2) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (a , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [203]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1792,14 +1792,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (b , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
index 72d5c878fb4d..61744aeb1cf7 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref
@@ -79,33 +79,33 @@ SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 15 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -191,9 +191,9 @@ AthenaPoolCnvSvc    DEBUG setAttribute TREE_CACHE to -1 for db: SimplePoolFile1.
 Stream1.FileMet...   INFO Invalid "/TagInfo" handle
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -270,7 +270,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:EventInfo_p4
@@ -280,7 +280,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleHitContainer_p1_MyHits'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleHitContainer_p1/MyHits) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:ExampleHitContainer_p1
@@ -290,7 +290,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:DataHeader_p6
@@ -300,7 +300,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:DataHeaderForm_p6
@@ -310,7 +310,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:Token
@@ -322,7 +322,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsSimulation'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsSimulation) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:bool
@@ -332,21 +332,21 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsCalibration'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsCalibration) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsTestBeam)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsTestBeam'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsTestBeam) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(McChannel)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'McChannel'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(McChannel) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:unsigned int
@@ -356,7 +356,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO unsigned long long [????]
@@ -365,7 +365,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:unsigned long long
@@ -375,35 +375,35 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'LumiBlockN'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(LumiBlockN) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(ConditionsRun)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'ConditionsRun'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(ConditionsRun) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTime)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventTime'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventTime) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTimeNanoSec)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventTimeNanoSec'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventTimeNanoSec) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(BunchId)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'BunchId'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(BunchId) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO float [????]
@@ -412,7 +412,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventWeight'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventWeight) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:float
@@ -424,9 +424,9 @@ Stream1.FileMet...  DEBUG set xAOD::FileMetaData::dataType to Stream1
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -448,9 +448,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -472,9 +472,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -496,9 +496,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -520,9 +520,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -544,9 +544,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -568,9 +568,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -592,9 +592,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -616,9 +616,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -640,9 +640,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -664,9 +664,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -688,9 +688,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -712,9 +712,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -736,9 +736,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -760,9 +760,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -784,9 +784,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -808,9 +808,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -832,9 +832,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -856,9 +856,9 @@ Stream1             DEBUG connectOutput done for SimplePoolReplica1.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -918,7 +918,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -930,7 +930,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[10 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:EventStreamInfo_p3
@@ -942,7 +942,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[11 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -954,7 +954,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --->Adding Shape[12 , ????]:  [1 Column(s)] 
 SimplePoolRepli...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -964,14 +964,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 SimplePoolRepli...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolRepli...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
index 6ab064a1bd33..68bd01c5b92c 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref
@@ -92,51 +92,51 @@ SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 24 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -192,11 +192,11 @@ SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile4...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) [20?]  (3 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) [203]  (3 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -227,9 +227,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -273,11 +273,11 @@ SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile4...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) [20?]  (3 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) [203]  (3 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 4 Entries in total.
 SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -341,10 +341,10 @@ ReadData             INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = Dumm
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
 ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -375,9 +375,9 @@ ReadData             INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = Dum
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -408,9 +408,9 @@ ReadData             INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -441,9 +441,9 @@ ReadData             INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -474,9 +474,9 @@ ReadData             INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -507,9 +507,9 @@ ReadData             INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -540,9 +540,9 @@ ReadData             INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -573,9 +573,9 @@ ReadData             INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -606,9 +606,9 @@ ReadData             INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -639,9 +639,9 @@ ReadData             INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -672,9 +672,9 @@ ReadData             INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -705,9 +705,9 @@ ReadData             INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -738,9 +738,9 @@ ReadData             INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -771,9 +771,9 @@ ReadData             INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -804,9 +804,9 @@ ReadData             INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -837,9 +837,9 @@ ReadData             INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -870,9 +870,9 @@ ReadData             INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -903,9 +903,9 @@ ReadData             INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -936,9 +936,9 @@ ReadData             INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
index 4265520c8b57..62d7dbe9ca0f 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref
@@ -89,53 +89,53 @@ SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile5...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [202]  (14 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?]  (15 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [202]  (15 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (16 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [202]  (16 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (17 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [202]  (17 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (18 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [202]  (18 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (19 , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [202]  (19 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
-SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (1a , ffffffff)
+SimplePoolFile5...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [202]  (1a , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 25 Entries in total.
 SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -195,10 +195,10 @@ MetaData(Exampl...  DEBUG Opened container MetaData(ExampleHitContainer_p1/Pedes
 ToolSvc.AthPool...   INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o>
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
 ClassIDSvc           INFO  getRegistryEntries: read 6 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile5...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -249,10 +249,10 @@ ReadData             INFO Hit x = 30.1245 y = -53.4551 z = 43.831 detector = Dum
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
 ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -281,9 +281,9 @@ ReadData             INFO Hit x = 130.125 y = -53.4551 z = -56.169 detector = Du
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #0 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -312,9 +312,9 @@ ReadData             INFO Hit x = 230.125 y = -53.4551 z = -156.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #0 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -343,9 +343,9 @@ ReadData             INFO Hit x = 330.125 y = -53.4551 z = -256.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -374,9 +374,9 @@ ReadData             INFO Hit x = 430.125 y = -53.4551 z = -356.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -405,9 +405,9 @@ ReadData             INFO Hit x = 530.125 y = -53.4551 z = -456.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #0 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -436,9 +436,9 @@ ReadData             INFO Hit x = 630.125 y = -53.4551 z = -556.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #0 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -467,9 +467,9 @@ ReadData             INFO Hit x = 730.125 y = -53.4551 z = -656.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #0 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -498,9 +498,9 @@ ReadData             INFO Hit x = 830.125 y = -53.4551 z = -756.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #0 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -529,9 +529,9 @@ ReadData             INFO Hit x = 930.125 y = -53.4551 z = -856.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #0 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -560,9 +560,9 @@ ReadData             INFO Hit x = 1030.12 y = -53.4551 z = -956.169 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #0 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -591,9 +591,9 @@ ReadData             INFO Hit x = 1130.12 y = -53.4551 z = -1056.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #0 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -622,9 +622,9 @@ ReadData             INFO Hit x = 1230.12 y = -53.4551 z = -1156.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #0 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -653,9 +653,9 @@ ReadData             INFO Hit x = 1330.12 y = -53.4551 z = -1256.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #0 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -684,9 +684,9 @@ ReadData             INFO Hit x = 1430.12 y = -53.4551 z = -1356.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #0 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -715,9 +715,9 @@ ReadData             INFO Hit x = 1530.12 y = -53.4551 z = -1456.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #0 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -746,9 +746,9 @@ ReadData             INFO Hit x = 1630.12 y = -53.4551 z = -1556.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #0 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -777,9 +777,9 @@ ReadData             INFO Hit x = 1730.12 y = -53.4551 z = -1656.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #0 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -808,9 +808,9 @@ ReadData             INFO Hit x = 1830.12 y = -53.4551 z = -1756.17 detector = D
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #0 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
index f59c16bcdff4..7dbd1a0dd9f5 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref
@@ -84,33 +84,33 @@ SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 15 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -221,9 +221,9 @@ MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 Stream1.FileMet...   INFO Invalid "/TagInfo" handle
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -357,7 +357,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventInfo_p4
@@ -369,7 +369,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:ExampleTrackContainer_p1
@@ -379,7 +379,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:DataHeader_p6
@@ -389,7 +389,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:DataHeaderForm_p6
@@ -399,7 +399,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:Token
@@ -409,7 +409,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:unsigned int
@@ -419,14 +419,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(MagicNumber)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'MagicNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(MagicNumber) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
@@ -439,9 +439,9 @@ Stream1.FileMet...  DEBUG set xAOD::FileMetaData::dataType to Stream1
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -516,9 +516,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -593,9 +593,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -670,9 +670,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -747,9 +747,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -824,9 +824,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -901,9 +901,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -978,9 +978,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1055,9 +1055,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1132,9 +1132,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1209,9 +1209,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1286,9 +1286,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1363,9 +1363,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1440,9 +1440,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1517,9 +1517,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1594,9 +1594,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1671,9 +1671,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1748,9 +1748,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1825,9 +1825,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1954,7 +1954,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1966,7 +1966,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventStreamInfo_p3
@@ -1978,7 +1978,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1990,7 +1990,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -2000,14 +2000,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
index 69b1edba3e59..4d45eebc078a 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref
@@ -90,51 +90,51 @@ SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolRepli...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 24 Entries in total.
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -245,9 +245,9 @@ MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 Stream1.FileMet...   INFO Invalid "/TagInfo" handle
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -380,7 +380,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventInfo_p4
@@ -392,7 +392,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:ExampleTrackContainer_p1
@@ -402,7 +402,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:DataHeader_p6
@@ -412,7 +412,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:DataHeaderForm_p6
@@ -422,7 +422,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:Token
@@ -432,7 +432,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:unsigned int
@@ -442,14 +442,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(MagicNumber)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'MagicNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(MagicNumber) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
@@ -462,9 +462,9 @@ Stream1.FileMet...  DEBUG set xAOD::FileMetaData::dataType to Stream1
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -539,9 +539,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -616,9 +616,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -693,9 +693,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -770,9 +770,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -847,9 +847,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -924,9 +924,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1001,9 +1001,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1078,9 +1078,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1155,9 +1155,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1232,9 +1232,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1309,9 +1309,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1386,9 +1386,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1463,9 +1463,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1540,9 +1540,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1617,9 +1617,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1694,9 +1694,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1771,9 +1771,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1848,9 +1848,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile3.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1977,7 +1977,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1989,7 +1989,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:EventStreamInfo_p3
@@ -2001,7 +2001,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -2013,7 +2013,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile3...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -2023,14 +2023,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 SimplePoolFile3...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile3...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
index f3db9bc89576..0947d2390700 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref
@@ -84,33 +84,33 @@ SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile3...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 15 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -221,9 +221,9 @@ MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 Stream1.FileMet...   INFO Invalid "/TagInfo" handle
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -325,7 +325,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:EventInfo_p4
@@ -335,7 +335,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:ExampleTrackContainer_p1
@@ -345,7 +345,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:DataHeader_p6
@@ -355,7 +355,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:DataHeaderForm_p6
@@ -365,7 +365,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:Token
@@ -375,7 +375,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:unsigned int
@@ -385,14 +385,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(MagicNumber)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'MagicNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(MagicNumber) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
 MetaDataSvc         DEBUG MetaDataSvc will handle ClassID 167728019
@@ -405,9 +405,9 @@ Stream1.FileMet...  DEBUG set xAOD::FileMetaData::dataType to Stream1
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -450,9 +450,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -495,9 +495,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -540,9 +540,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -585,9 +585,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -630,9 +630,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -675,9 +675,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -720,9 +720,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -765,9 +765,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -810,9 +810,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -855,9 +855,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -900,9 +900,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -945,9 +945,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -990,9 +990,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1035,9 +1035,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1080,9 +1080,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1125,9 +1125,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1170,9 +1170,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1215,9 +1215,9 @@ Stream1             DEBUG connectOutput done for SimplePoolFile4.root
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1312,7 +1312,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1324,7 +1324,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:EventStreamInfo_p3
@@ -1336,7 +1336,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1348,7 +1348,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1358,14 +1358,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
index 8a75c9f577ca..27f7aeb810c1 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref
@@ -72,17 +72,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -137,33 +137,33 @@ SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 15 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -229,17 +229,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -300,9 +300,9 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -361,10 +361,10 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
 ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -395,9 +395,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -428,9 +428,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -461,9 +461,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -494,9 +494,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -527,9 +527,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -560,9 +560,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -593,9 +593,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -626,9 +626,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -691,17 +691,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -764,31 +764,31 @@ SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile2...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (6 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (6 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (7 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (7 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (8 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (8 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (9 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (9 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (a , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [203]  (b , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (d , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [203]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (e , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (e , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (f , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (f , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 14 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -827,9 +827,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000]
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -869,9 +869,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 11 events processed so far  <<<===
@@ -891,9 +891,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 12 events processed so far  <<<===
@@ -913,9 +913,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 13 events processed so far  <<<===
@@ -935,9 +935,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #1 14 events processed so far  <<<===
@@ -957,9 +957,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #1 15 events processed so far  <<<===
@@ -979,9 +979,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #6, run #1 16 events processed so far  <<<===
@@ -1001,9 +1001,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #7, run #1 17 events processed so far  <<<===
@@ -1023,9 +1023,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #8, run #1 18 events processed so far  <<<===
@@ -1045,9 +1045,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #9, run #1 19 events processed so far  <<<===
@@ -1067,9 +1067,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #10, run #1 20 events processed so far  <<<===
@@ -1089,9 +1089,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #11, run #1 21 events processed so far  <<<===
@@ -1111,9 +1111,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #12, run #1 22 events processed so far  <<<===
@@ -1133,9 +1133,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #13, run #1 23 events processed so far  <<<===
@@ -1155,9 +1155,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #14, run #1 24 events processed so far  <<<===
@@ -1177,9 +1177,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #15, run #1 25 events processed so far  <<<===
@@ -1199,9 +1199,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #16, run #1 26 events processed so far  <<<===
@@ -1221,9 +1221,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #17, run #1 27 events processed so far  <<<===
@@ -1243,9 +1243,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #1 28 events processed so far  <<<===
@@ -1265,9 +1265,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #19, run #1 29 events processed so far  <<<===
@@ -1327,33 +1327,33 @@ SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile3...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 15 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -1392,9 +1392,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -1443,9 +1443,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1469,9 +1469,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1495,9 +1495,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1521,9 +1521,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1547,9 +1547,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1573,9 +1573,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1599,9 +1599,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1625,9 +1625,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1651,9 +1651,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1677,9 +1677,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1703,9 +1703,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1729,9 +1729,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1755,9 +1755,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1781,9 +1781,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1807,9 +1807,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1833,9 +1833,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1859,9 +1859,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1885,9 +1885,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1911,9 +1911,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
index 3b284314ed15..cee43fc01fd9 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref
@@ -73,17 +73,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -144,51 +144,51 @@ SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolRepli...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
-SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolRepli...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolRepli...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 24 Entries in total.
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -259,17 +259,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -330,9 +330,9 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 SimplePoolRepli...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -391,10 +391,10 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
 ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -425,9 +425,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -458,9 +458,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -491,9 +491,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -524,9 +524,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -557,9 +557,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -590,9 +590,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -623,9 +623,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -656,9 +656,9 @@ PoolSvc              INFO Database (SimplePoolReplica1.root) attribute [READ_CAL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -721,17 +721,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -794,31 +794,31 @@ SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile2...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (6 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (6 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (7 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (7 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (8 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (8 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (9 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (9 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (a , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [203]  (b , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (d , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [203]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (e , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (e , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (f , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (f , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 14 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -857,9 +857,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000]
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -899,9 +899,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 11 events processed so far  <<<===
@@ -921,9 +921,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 12 events processed so far  <<<===
@@ -943,9 +943,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 13 events processed so far  <<<===
@@ -965,9 +965,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #1 14 events processed so far  <<<===
@@ -987,9 +987,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #1 15 events processed so far  <<<===
@@ -1009,9 +1009,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #6, run #1 16 events processed so far  <<<===
@@ -1031,9 +1031,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #7, run #1 17 events processed so far  <<<===
@@ -1053,9 +1053,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #8, run #1 18 events processed so far  <<<===
@@ -1075,9 +1075,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #9, run #1 19 events processed so far  <<<===
@@ -1097,9 +1097,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #10, run #1 20 events processed so far  <<<===
@@ -1119,9 +1119,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #11, run #1 21 events processed so far  <<<===
@@ -1141,9 +1141,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #12, run #1 22 events processed so far  <<<===
@@ -1163,9 +1163,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #13, run #1 23 events processed so far  <<<===
@@ -1185,9 +1185,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #14, run #1 24 events processed so far  <<<===
@@ -1207,9 +1207,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #15, run #1 25 events processed so far  <<<===
@@ -1229,9 +1229,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #16, run #1 26 events processed so far  <<<===
@@ -1251,9 +1251,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #17, run #1 27 events processed so far  <<<===
@@ -1273,9 +1273,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #1 28 events processed so far  <<<===
@@ -1295,9 +1295,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #19, run #1 29 events processed so far  <<<===
@@ -1357,33 +1357,33 @@ SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile4...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
-SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile4...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 15 Entries in total.
 SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -1422,9 +1422,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile4...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -1473,9 +1473,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1499,9 +1499,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1525,9 +1525,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1551,9 +1551,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1577,9 +1577,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1603,9 +1603,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1629,9 +1629,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1655,9 +1655,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1681,9 +1681,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1707,9 +1707,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1733,9 +1733,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1759,9 +1759,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1785,9 +1785,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1811,9 +1811,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1837,9 +1837,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1863,9 +1863,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1889,9 +1889,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1915,9 +1915,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1941,9 +1941,9 @@ PoolSvc              INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
index 4e10b02a9623..263b1c53a6c1 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref
@@ -72,17 +72,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -143,51 +143,51 @@ SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 24 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -253,17 +253,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -324,9 +324,9 @@ EventSelector        INFO skipping event 9
 EventSelector        INFO skipping event 10
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -379,10 +379,10 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
 ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -413,9 +413,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -446,9 +446,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -479,9 +479,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -512,9 +512,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -545,9 +545,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -578,9 +578,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -611,9 +611,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -644,9 +644,9 @@ PoolSvc              INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -709,17 +709,17 @@ EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 EmptyPoolFile.root  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
-EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 7 Entries in total.
 EmptyPoolFile.root  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -782,31 +782,31 @@ SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile2...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (6 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (6 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (7 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (7 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (8 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (8 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?]  (9 , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [202]  (9 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (a , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [203]  (b , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (d , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [203]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (e , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (e , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
-SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (f , ffffffff)
+SimplePoolFile2...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (f , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 14 Entries in total.
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -845,9 +845,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000000]
 SimplePoolFile2...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -888,9 +888,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 11 events processed so far  <<<===
@@ -910,9 +910,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 12 events processed so far  <<<===
@@ -932,9 +932,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 13 events processed so far  <<<===
@@ -954,9 +954,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #1 14 events processed so far  <<<===
@@ -976,9 +976,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #1 15 events processed so far  <<<===
@@ -998,9 +998,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #6, run #1 16 events processed so far  <<<===
@@ -1020,9 +1020,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #7, run #1 17 events processed so far  <<<===
@@ -1042,9 +1042,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #8, run #1 18 events processed so far  <<<===
@@ -1064,9 +1064,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #9, run #1 19 events processed so far  <<<===
@@ -1086,9 +1086,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 20 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #10, run #1 20 events processed so far  <<<===
@@ -1108,9 +1108,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 21 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #11, run #1 21 events processed so far  <<<===
@@ -1130,9 +1130,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 22 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #12, run #1 22 events processed so far  <<<===
@@ -1152,9 +1152,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 23 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #13, run #1 23 events processed so far  <<<===
@@ -1174,9 +1174,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 24 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #14, run #1 24 events processed so far  <<<===
@@ -1196,9 +1196,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 25 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #15, run #1 25 events processed so far  <<<===
@@ -1218,9 +1218,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 26 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #16, run #1 26 events processed so far  <<<===
@@ -1240,9 +1240,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 27 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #17, run #1 27 events processed so far  <<<===
@@ -1262,9 +1262,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 28 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #1 28 events processed so far  <<<===
@@ -1284,9 +1284,9 @@ PoolSvc              INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 29 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 3
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000004-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000004-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 2 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #19, run #1 29 events processed so far  <<<===
@@ -1342,25 +1342,25 @@ SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile3...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?]  (4 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [203]  (4 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (7 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (7 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (8 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream2) [203]  (8 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (9 , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (9 , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (a , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [203]  (a , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (b , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (b , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
-SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (c , ffffffff)
+SimplePoolFile3...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (c , ffffffff)
 SimplePoolFile3...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 11 Entries in total.
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -1404,9 +1404,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile3...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainerForm(DataHeaderForm)
 POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
@@ -1450,9 +1450,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 31 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1476,9 +1476,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 32 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1502,9 +1502,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 33 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1528,9 +1528,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 34 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1554,9 +1554,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 35 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1580,9 +1580,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 36 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1606,9 +1606,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 37 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1632,9 +1632,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 38 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1658,9 +1658,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 39 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1684,9 +1684,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 40 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1710,9 +1710,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 41 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1736,9 +1736,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 42 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1762,9 +1762,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 43 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1788,9 +1788,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 44 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1814,9 +1814,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 45 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1840,9 +1840,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 46 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1866,9 +1866,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 47 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1892,9 +1892,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 48 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
@@ -1918,9 +1918,9 @@ PoolSvc              INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 49 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 0
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
index deb12fd3bf51..9d9107bd030c 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref
@@ -91,51 +91,51 @@ SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Links
 ##Links             DEBUG Opened container ##Links of type ROOT_Tree
 SimplePoolFile1...  DEBUG --->Reading Assoc:????/##Params [200]  (2 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (14 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (15 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [203]  (15 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (16 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (16 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (17 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (17 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?]  (18 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [203]  (18 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
-SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?]  (19 , ffffffff)
+SimplePoolFile1...  DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [203]  (19 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ##Links             DEBUG No objects passing selection criteria... Container has 24 Entries in total.
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_All] ##Params
@@ -193,9 +193,9 @@ MetaDataSvc         DEBUG Loaded input meta data store proxies
 MetaDataSvc         DEBUG  calling beginInputFile for ToolSvc.IOVDbMetaDataTool
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000000]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000000]
 SimplePoolFile1...  DEBUG --> Access   DbContainer  READ      [ROOT_Tree] POOLContainer(DataHeader)
 POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
@@ -258,10 +258,10 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #1 1 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001].
 ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000001]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -302,9 +302,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 2 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000002]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -345,9 +345,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 3 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000003]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -388,9 +388,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 4 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000004]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -431,9 +431,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #1 5 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000005]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -474,9 +474,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #1 6 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000006]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -517,9 +517,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #1 7 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000007]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -560,9 +560,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #1 8 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000008]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -603,9 +603,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #1 9 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000009]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -646,9 +646,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #1 10 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000A]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -689,9 +689,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #1 11 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000B]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -732,9 +732,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #1 12 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000C]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -775,9 +775,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #1 13 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000D]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -818,9 +818,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #1 14 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000E]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -861,9 +861,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #1 15 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-0000000F]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -904,9 +904,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #1 16 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000010]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -947,9 +947,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #1 17 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000011]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -990,9 +990,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #1 18 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000012]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1033,9 +1033,9 @@ WriteCond            INFO registered all data
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #18, run #1 19 events processed so far  <<<===
 EventSelector       DEBUG Get AttributeList from the collection
 EventSelector       DEBUG AttributeList size 12
-EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013].
-EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]
+EventSelector       DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013].
+EventSelector       DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=00000203][OID=00000005-00000013]
 AthenaPoolAddre...  DEBUG The current Event contains: 3 objects
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo
 AthenaPoolAddre...  DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits
@@ -1117,7 +1117,7 @@ ConditionsConta...  DEBUG Opening
 ConditionsConta...  DEBUG    attributes# = 1
 ConditionsConta...  DEBUG Branch container 'ExampleHitContainer_p1_PedestalWriteData'
 ConditionsConta...  DEBUG Opened container ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) [20?]  (3 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/ConditionsContainer(ExampleHitContainer_p1/PedestalWriteData) [203]  (3 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:ExampleHitContainer_p1
@@ -1129,7 +1129,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:DataHeader_p6
@@ -1141,7 +1141,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile4...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile4...  DEBUG ---->ClassID:????
 SimplePoolFile4...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile4...  DEBUG ---->Class:DataHeaderForm_p6
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
index a3596372151a..d062ff0f0ce7 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref
@@ -167,7 +167,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:EventInfo_p4
@@ -179,7 +179,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleHitContainer_p1_MyHits'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleHitContainer_p1/MyHits) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:ExampleHitContainer_p1
@@ -191,7 +191,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:DataHeader_p6
@@ -203,7 +203,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:DataHeaderForm_p6
@@ -215,7 +215,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:Token
@@ -227,7 +227,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsSimulation'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsSimulation) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [20?]  (8 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [202]  (8 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:bool
@@ -237,14 +237,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsCalibration'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsCalibration) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [20?]  (9 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [202]  (9 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsTestBeam)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'IsTestBeam'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(IsTestBeam) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [20?]  (a , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [202]  (a , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO unsigned int [????]
@@ -253,7 +253,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'McChannel'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(McChannel) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [20?]  (b , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [202]  (b , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:unsigned int
@@ -263,7 +263,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (c , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (c , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO unsigned long long [????]
@@ -272,7 +272,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (d , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (d , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:unsigned long long
@@ -282,35 +282,35 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'LumiBlockN'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(LumiBlockN) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [20?]  (e , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [202]  (e , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(ConditionsRun)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'ConditionsRun'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(ConditionsRun) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [20?]  (f , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [202]  (f , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTime)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventTime'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventTime) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [20?]  (10 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [202]  (10 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTimeNanoSec)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventTimeNanoSec'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventTimeNanoSec) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [20?]  (11 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [202]  (11 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(BunchId)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'BunchId'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(BunchId) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [20?]  (12 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [202]  (12 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO float [????]
@@ -319,7 +319,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventWeight'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventWeight) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [20?]  (13 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [202]  (13 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:float
@@ -963,7 +963,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (14 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [202]  (14 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -973,7 +973,7 @@ MetaData(Exampl...  DEBUG Opening
 MetaData(Exampl...  DEBUG    attributes# = 1
 MetaData(Exampl...  DEBUG Branch container 'ExampleHitContainer_p1_PedestalWriteData'
 MetaData(Exampl...  DEBUG Opened container MetaData(ExampleHitContainer_p1/PedestalWriteData) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?]  (15 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [202]  (15 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO EventStreamInfo_p3 [????]
@@ -982,7 +982,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (16 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [202]  (16 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[10 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:EventStreamInfo_p3
@@ -994,7 +994,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (17 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [202]  (17 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[11 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1006,7 +1006,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (18 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [202]  (18 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --->Adding Shape[12 , ????]:  [1 Column(s)] 
 SimplePoolFile5...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1016,14 +1016,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (19 , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [202]  (19 , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 SimplePoolFile5...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (1a , ffffffff)
+SimplePoolFile5...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [202]  (1a , ffffffff)
 SimplePoolFile5...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
index e95598dcdbf1..3c365a990859 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref
@@ -215,7 +215,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:EventInfo_p4
@@ -227,7 +227,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'ExampleHitContainer_p1_MyHits'
 CollectionTree(...  DEBUG Opened container CollectionTree(ExampleHitContainer_p1/MyHits) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?]  (4 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/CollectionTree(ExampleHitContainer_p1/MyHits) [203]  (4 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:ExampleHitContainer_p1
@@ -239,7 +239,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (5 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (5 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:DataHeader_p6
@@ -251,7 +251,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (6 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (6 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:DataHeaderForm_p6
@@ -263,7 +263,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (7 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (7 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:Token
@@ -275,7 +275,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (8 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (8 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:unsigned int
@@ -285,14 +285,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (9 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (9 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(MagicNumber)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'MagicNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(MagicNumber) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [20?]  (a , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [202]  (a , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 ClassIDSvc           INFO  getRegistryEntries: read 83 CLIDRegistry entries for module ALL
 Stream1.FileMet...  DEBUG Valid  'EventInfoKey':'EventInfo' handle
@@ -344,7 +344,7 @@ CollectionTree(...  DEBUG Opening
 CollectionTree(...  DEBUG    attributes# = 1
 CollectionTree(...  DEBUG Branch container 'EventInfo_p4_McEventInfo'
 CollectionTree(...  DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?]  (3 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [203]  (3 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:EventInfo_p4
@@ -354,7 +354,7 @@ POOLContainer(D...  DEBUG Opening
 POOLContainer(D...  DEBUG    attributes# = 1
 POOLContainer(D...  DEBUG Branch container 'DataHeader'
 POOLContainer(D...  DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?]  (4 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [203]  (4 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:DataHeader_p6
@@ -364,7 +364,7 @@ POOLContainerFo...  DEBUG Opening
 POOLContainerFo...  DEBUG    attributes# = 1
 POOLContainerFo...  DEBUG Branch container 'DataHeaderForm'
 POOLContainerFo...  DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?]  (5 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [203]  (5 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:DataHeaderForm_p6
@@ -374,7 +374,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'Token'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?]  (6 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [202]  (6 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:Token
@@ -384,7 +384,7 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'RunNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?]  (7 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [202]  (7 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:unsigned int
@@ -394,14 +394,14 @@ POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'EventNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?]  (8 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [202]  (8 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] POOLCollectionTree(MagicNumber)
 POOLCollectionT...  DEBUG Opening
 POOLCollectionT...  DEBUG    attributes# = 1
 POOLCollectionT...  DEBUG Branch container 'MagicNumber'
 POOLCollectionT...  DEBUG Opened container POOLCollectionTree(MagicNumber) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [20?]  (9 , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) [202]  (9 , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 Stream2.FileMet...  DEBUG Valid  'EventInfoKey':'EventInfo' handle
 Stream2.FileMet...  DEBUG setting xAOD::FileMetaData::mcProcID to 0
@@ -1220,7 +1220,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (b , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (b , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1232,7 +1232,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream1'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?]  (c , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [203]  (c , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:EventStreamInfo_p3
@@ -1244,7 +1244,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (d , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (d , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1256,7 +1256,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream1'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream1) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [20?]  (e , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream1) [203]  (e , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --->Adding Shape[9 , ????]:  [1 Column(s)] 
 SimplePoolFile1...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1266,14 +1266,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (f , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (f , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 SimplePoolFile1...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (10 , ffffffff)
+SimplePoolFile1...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (10 , ffffffff)
 SimplePoolFile1...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
@@ -1314,7 +1314,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (a , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (a , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1324,7 +1324,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream2'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream2) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream2) [20?]  (b , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream2) [203]  (b , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[6 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:EventStreamInfo_p3
@@ -1334,7 +1334,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (c , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (c , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[7 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1344,7 +1344,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream2'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream2) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [20?]  (d , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream2) [203]  (d , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --->Adding Shape[8 , ????]:  [1 Column(s)] 
 SimplePoolFile2...  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1354,14 +1354,14 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (e , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (e , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 SimplePoolFile2...  DEBUG --> Access   DbContainer  CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm)
 MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (f , ffffffff)
+SimplePoolFile2...  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (f , ffffffff)
 SimplePoolFile2...  DEBUG ---->ClassID:????
 MetaData(xAOD::...  DEBUG  SG::IAuxStoreIO* detected in xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.
 MetaData(xAOD::...  DEBUG        Attributes= 1
@@ -1402,7 +1402,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaDataAuxInfo_v1_FileMetaDataAux.'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [20?]  (3 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaDataAuxInfo_v1/FileMetaDataAux.) [203]  (3 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[0 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:xAOD::FileMetaDataAuxInfo_v1
@@ -1412,7 +1412,7 @@ MetaData(EventS...  DEBUG Opening
 MetaData(EventS...  DEBUG    attributes# = 1
 MetaData(EventS...  DEBUG Branch container 'EventStreamInfo_p3_Stream3'
 MetaData(EventS...  DEBUG Opened container MetaData(EventStreamInfo_p3/Stream3) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream3) [20?]  (4 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream3) [203]  (4 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[1 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:EventStreamInfo_p3
@@ -1422,7 +1422,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::FileMetaData_v1_FileMetaData'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::FileMetaData_v1/FileMetaData) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [20?]  (5 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::FileMetaData_v1/FileMetaData) [203]  (5 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[2 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:xAOD::FileMetaData_v1
@@ -1432,7 +1432,7 @@ MetaData(xAOD::...  DEBUG Opening
 MetaData(xAOD::...  DEBUG    attributes# = 1
 MetaData(xAOD::...  DEBUG Branch container 'xAOD::EventFormat_v1_EventFormatStream3'
 MetaData(xAOD::...  DEBUG Opened container MetaData(xAOD::EventFormat_v1/EventFormatStream3) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [20?]  (6 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaData(xAOD::EventFormat_v1/EventFormatStream3) [203]  (6 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[3 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:xAOD::EventFormat_v1
@@ -1442,7 +1442,7 @@ MetaDataHdr(Dat...  DEBUG Opening
 MetaDataHdr(Dat...  DEBUG    attributes# = 1
 MetaDataHdr(Dat...  DEBUG Branch container 'DataHeader'
 MetaDataHdr(Dat...  DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?]  (7 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [203]  (7 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[4 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:DataHeader_p6
@@ -1452,7 +1452,7 @@ MetaDataHdrForm...  DEBUG Opening
 MetaDataHdrForm...  DEBUG    attributes# = 1
 MetaDataHdrForm...  DEBUG Branch container 'DataHeaderForm'
 MetaDataHdrForm...  DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree
-EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?]  (8 , ffffffff)
+EmptyPoolFile.root  DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [203]  (8 , ffffffff)
 EmptyPoolFile.root  DEBUG ---->ClassID:????
 EmptyPoolFile.root  DEBUG --->Adding Shape[5 , ????]:  [1 Column(s)] 
 EmptyPoolFile.root  DEBUG ---->Class:DataHeaderForm_p6
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in
index 947680d2cf2d..fb6503e414f0 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in
@@ -20,7 +20,6 @@ s/\\\\[00000000/[/g
 s/-000000000/-0/g
 s/=00000000/=/g
 s/ ffffffff/ /g
-s/20[23]/20?/g
 s/INFO CLID = 222376821, key = Stream[12]/INFO CLID = 222376821, key = StreamX/g
 s/0x[0-9a-f]\\\\{7,12\\\\}/0x????/g
 s/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]00*//g
-- 
GitLab


From c1fc024b5d2e4cf54df0c432d32ee81c0ca9b43d Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Thu, 17 Dec 2020 21:43:56 +0000
Subject: [PATCH 093/308] Fixed saving decorations from SP counts

---
 .../TrigOutputHandling/src/HLTEDMCreator.cxx         | 12 ++----------
 .../TrigEDMConfig/python/TriggerEDMRun3.py           |  2 +-
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
index 1ebbc05f0eff..3ed35a16063f 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
@@ -342,13 +342,7 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
   }
 
 
-#define CREATE_XAOD_NO_MERGE(__TYPE, __STORE_TYPE)      \
-  { \
-    xAODGenerator<xAOD::__TYPE, xAOD::__STORE_TYPE> generator; \
-    ATH_CHECK( createIfMissing<xAOD::__TYPE>( context, ConstHandlesGroup<xAOD::__TYPE>( m_##__TYPE, m_##__TYPE##InViews, m_##__TYPE##Views ), generator, &HLTEDMCreator::noMerge<xAOD::__TYPE> )  ); \
-  }
-  
-  CREATE_XAOD_NO_MERGE( TrigCompositeContainer, TrigCompositeAuxContainer );
+  CREATE_XAOD( TrigCompositeContainer, TrigCompositeAuxContainer );
   CREATE_XAOD( TrigElectronContainer, TrigElectronAuxContainer );
   CREATE_XAOD( ElectronContainer, ElectronAuxContainer );
   CREATE_XAOD( PhotonContainer, PhotonAuxContainer );
@@ -366,18 +360,16 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
   CREATE_XAOD( TauJetContainer, TauJetAuxContainer );
   CREATE_XAOD( TauTrackContainer, TauTrackAuxContainer );
   CREATE_XAOD( CaloClusterContainer, CaloClusterTrigAuxContainer ); // NOTE: Difference in interface and aux
-  // After view collections are merged, need to update collection links
-
   CREATE_XAOD( JetContainer, JetAuxContainer );
   CREATE_XAOD( VertexContainer,VertexAuxContainer );
   CREATE_XAOD( TrigBphysContainer, TrigBphysAuxContainer );
   CREATE_XAOD( BTaggingContainer,BTaggingAuxContainer );
   CREATE_XAOD( BTagVertexContainer,BTagVertexAuxContainer );
 
+  // After view collections are merged, need to update collection links
   ATH_CHECK( fixLinks() );
   
 #undef CREATE_XAOD
-#undef CREATE_XAOD_NO_MERGE
 
   // special cases
   #define CREATE_SHALLOW(__TYPE) \
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index 2b2c6f4cb2d3..c407db4b6584 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -526,7 +526,7 @@ TriggerHLTListRun3 = [
 
     ('ROIB::RoIBResult#*',                         'ESD', 'Misc'),
 
-    ('xAOD::TrigCompositeContainer#HLT_SpacePointCounts',            'BS ESD AODFULL AODSLIM', 'MinBias'),
+    ('xAOD::TrigCompositeContainer#HLT_SpacePointCounts',            'BS ESD AODFULL AODSLIM', 'MinBias', 'inViews:SPView'),
     ('xAOD::TrigCompositeAuxContainer#HLT_SpacePointCountsAux.totNumPixSP.totNumPixCL_1.totNumPixCL_2.totNumPixCLmin3.pixClBarrel.pixClEndcapA.pixClEndcapC.totNumSctSP.SctSpBarrel.SctSpEndcapA.SctSpEndcapC',     'BS ESD AODFULL AODSLIM', 'MinBias'),
 
     ('xAOD::TrigCompositeContainer#HLT_TrackCount',                                             'BS ESD AODFULL AODSLIM', 'MinBias'),
-- 
GitLab


From b0459bf9d8e7713f0aba5bade76e85766d91502e Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 17 Dec 2020 22:59:24 +0100
Subject: [PATCH 094/308] EgammaFourMomBuilder some flake8 fixes. Quite few
 more remain

---
 .../python/create_input.py                    | 71 ++++++++------
 .../python/dump_layer.py                      | 40 +++++---
 .../python/merge_scale_histograms.py          | 93 +++++++++----------
 3 files changed, 114 insertions(+), 90 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/create_input.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/create_input.py
index f1b161dacf85..7114879c3521 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/create_input.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/create_input.py
@@ -2,6 +2,7 @@
 
 # this file do not work out of the box
 
+import shutil
 import ROOT
 from array import array
 import numpy as np
@@ -27,7 +28,8 @@ assert old_ct_sys
 file_christophe = ROOT.TFile("~/ElectronEnergyScaleFactor.root")
 scales_christophe = file_christophe.Get("alpha68")
 ct_christophe = file_christophe.Get("sigma24")
-scales_sys_christophe = file_christophe.Get("systAlpha")  # sum of 8 / 13 TeV diff + 64 / 32 bins diff
+# sum of 8 / 13 TeV diff + 64 / 32 bins diff
+scales_sys_christophe = file_christophe.Get("systAlpha")
 ct_sys_christophe = file_christophe.Get("systSigma")  # 8 / 13 TeV diff
 
 assert scales_christophe
@@ -39,7 +41,7 @@ assert ct_sys_christophe
 def qsum_histograms(histo1, histo2):
     new_histo = histo1.Clone()
     new_histo.Reset()
-    for ibin in xrange(histo1.GetNbinsX() + 2):
+    for ibin in range(histo1.GetNbinsX() + 2):
         value1 = histo1.GetBinContent(ibin)
         central_value = histo1.GetBinCenter(ibin)
         ibin2 = histo2.FindBin(central_value)
@@ -127,23 +129,23 @@ def merge_histograms(old, new, merge_error=True):
     UNDERFLOW = 0
     OVERFLOW = new.GetNbinsX() + 1
 
-    for iold in xrange(1, old.GetNbinsX()):
-        l = old.GetBinLowEdge(iold)
-        r = l + old.GetBinWidth(iold)
+    for iold in range(1, old.GetNbinsX()):
+        low = old.GetBinLowEdge(iold)
+        r = low + old.GetBinWidth(iold)
 
-        il_new = new.FindFixBin(l)
+        il_new = new.FindFixBin(low)
         ir_new = new.FindFixBin(r)
         remainer = None
 
         if il_new == UNDERFLOW and ir_new == UNDERFLOW:
-            new_binning.append((l, r))
+            new_binning.append((low, r))
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
 
         elif il_new == UNDERFLOW and ir_new > UNDERFLOW and ir_new < OVERFLOW:
-            if abs(new.GetBinLowEdge(1) - l) < 1E-100:
+            if abs(new.GetBinLowEdge(1) - low) < 1E-100:
                 continue
-            new_binning.append((l, new.GetBinLowEdge(1)))
+            new_binning.append((low, new.GetBinLowEdge(1)))
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
             if ir_new == OVERFLOW:
@@ -151,27 +153,29 @@ def merge_histograms(old, new, merge_error=True):
             break
     last_old = iold
 
-    for inew in xrange(1, new.GetNbinsX() + 1):
-        l = new.GetBinLowEdge(inew)
-        r = l + new.GetBinWidth(inew)
-        new_binning.append((l, r))
+    for inew in range(1, new.GetNbinsX() + 1):
+        low = new.GetBinLowEdge(inew)
+        r = low + new.GetBinWidth(inew)
+        new_binning.append((low, r))
         new_values.append(new.GetBinContent(inew))
         new_errors.append(new.GetBinError(inew))
 
     if remainer is not None:
-        new_binning.append((new.GetBinLowEdge(new.GetNbinsX()), old.GetBinLowEdge(remainer) + old.GetBinWidth(remainer)))
+        new_binning.append((new.GetBinLowEdge(new.GetNbinsX()),
+                            old.GetBinLowEdge(remainer)
+                            + old.GetBinWidth(remainer)))
         new_values.append(old.GetBinContent(remainer))
         new_errors.append(old.GetBinError(remainer))
 
-    for iold in xrange(last_old, old.GetNbinsX() + 1):
-        l = old.GetBinLowEdge(iold)
-        r = l + old.GetBinWidth(iold)
+    for iold in range(last_old, old.GetNbinsX() + 1):
+        low = old.GetBinLowEdge(iold)
+        r = low + old.GetBinWidth(iold)
 
-        il_new = new.FindFixBin(l)
+        il_new = new.FindFixBin(low)
         ir_new = new.FindFixBin(r)
 
         if il_new == OVERFLOW and ir_new == OVERFLOW:
-            new_binning.append((l, r))
+            new_binning.append((low, r))
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
         elif il_new < OVERFLOW and ir_new == OVERFLOW:
@@ -183,7 +187,8 @@ def merge_histograms(old, new, merge_error=True):
 
     new_edges = array('f', [x[0] for x in new_binning] + [new_binning[-1][1]])
     histo_type = type(new)
-    result = histo_type(new.GetName(), new.GetTitle(), len(new_edges) - 1, new_edges)
+    result = histo_type(new.GetName(), new.GetTitle(),
+                        len(new_edges) - 1, new_edges)
     for i, (v, e) in enumerate(zip(new_values, new_errors), 1):
         result.SetBinContent(i, v)
         if merge_error:
@@ -223,15 +228,16 @@ histo_scale.SetName("alphaZee_errStat")
 histo_ct.SetName("ctZee_errStat")
 
 # this created a file structured as the official one, with empty directories
-#output_file = create_structured_file("calibration_constants_run2.root")
-import shutil
+# output_file = create_structured_file("calibration_constants_run2.root")
 print(old_filename)
 shutil.copy2(old_filename, "xxx.root")
 output_file = ROOT.TFile("xxx.root", "update")
 create_new_directories(output_file)
 
-output_file.GetDirectory("Scales").GetDirectory("es2015PRE").WriteObject(histo_scale, "alphaZee_errStat")
-output_file.GetDirectory("Resolution").GetDirectory("es2015PRE").WriteObject(histo_ct, "ctZee_errStat")
+output_file.GetDirectory("Scales").GetDirectory(
+    "es2015PRE").WriteObject(histo_scale, "alphaZee_errStat")
+output_file.GetDirectory("Resolution").GetDirectory(
+    "es2015PRE").WriteObject(histo_ct, "ctZee_errStat")
 
 # systematics
 
@@ -239,10 +245,13 @@ new_scale_sys = qsum_histograms(scales_sys_christophe, old_scale_sys)
 new_ct_sys = qsum_histograms(ct_sys_christophe, old_ct_sys)
 new_scale_sys = merge_histograms(old_scale_sys, new_scale_sys, False)
 new_ct_sys = merge_histograms(old_ct_sys, new_ct_sys, False)
-new_scale_sys.SetTitle("es2015PRE scales sys = es2012c sys + 7/13 TeV diff + 34/68 bin diff")
+new_scale_sys.SetTitle(
+    "es2015PRE scales sys = es2012c sys + 7/13 TeV diff + 34/68 bin diff")
 new_ct_sys.SetTitle("es2015 ct sys = es2012c sys + 7/13 TeV diff")
-output_file.GetDirectory("Scales").GetDirectory("es2015PRE").WriteObject(new_scale_sys, "alphaZee_errSyst")
-output_file.GetDirectory("Resolution").GetDirectory("es2015PRE").WriteObject(new_ct_sys, "ctZee_errSyst")
+output_file.GetDirectory("Scales").GetDirectory(
+    "es2015PRE").WriteObject(new_scale_sys, "alphaZee_errSyst")
+output_file.GetDirectory("Resolution").GetDirectory(
+    "es2015PRE").WriteObject(new_ct_sys, "ctZee_errSyst")
 
 legend3 = ROOT.TLegend(0.6, 0.7, 0.9, 0.9)
 legend3.SetBorderSize(0)
@@ -277,8 +286,10 @@ legend4.Draw()
 # stefano input for sensitivity
 
 stefano_file = ROOT.TFile("egammaEnergyCorrectionDataMC15.root")
-copy_dir(stefano_file.GetDirectory("PSRecalibration"), output_file.GetDirectory("PSRecalibration").GetDirectory("es2015PRE"))
-copy_dir(stefano_file.GetDirectory("S1Recalibration"), output_file.GetDirectory("S1Recalibration").GetDirectory("es2015PRE"))
+copy_dir(stefano_file.GetDirectory("PSRecalibration"),
+         output_file.GetDirectory("PSRecalibration").GetDirectory("es2015PRE"))
+copy_dir(stefano_file.GetDirectory("S1Recalibration"),
+         output_file.GetDirectory("S1Recalibration").GetDirectory("es2015PRE"))
 
 # correction for uA2MeV first week 2015
 
@@ -286,4 +297,4 @@ f_ua2mev = ROOT.TFile.Open("~/uA2MeV.root")
 histo_ua2mev = f_ua2mev.Get("histo_uA2MeV_week12")
 output_file.Get("Scales").Get("es2015PRE").WriteTObject(histo_ua2mev)
 
-raw_input()
+input("Press Key")
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/dump_layer.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/dump_layer.py
index 42f5aa849b45..53d0d86e2708 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/dump_layer.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/dump_layer.py
@@ -31,26 +31,34 @@ def main(path, particle):
 
     layers = "rawcl_Es0", "rawcl_Es1", "rawcl_Es2", "rawcl_Es3"
     layers = [prefix + "_" + v for v in layers]
-    title = ["ratio_Es0_true_E", "ratio_Es1_true_E", "ratio_Es2_true_E", "ratio_Es3_true_E"]
+    title = ["ratio_Es0_true_E",
+             "ratio_Es1_true_E",
+             "ratio_Es2_true_E",
+             "ratio_Es3_true_E"]
     aetaCalo = "abs(" + prefix + "_" + "cl_etaCalo" + ")"
     truth_E = prefix + "_truth_E"
-    ratio_layers = ["%s / %s" % (l, truth_E) for l in layers]
+    ratio_layers = ["%s / %s" % (layer, truth_E) for layer in layers]
     truth_eta = prefix + "_truth_eta"
     truth_pt = "(%s / cosh(%s))" % (truth_E, truth_eta)
-    matched = "abs(({0}_rawcl_Es0 + {0}_rawcl_Es1 + {0}_rawcl_Es2 + {0}_rawcl_Es3)/{0}_truth_E - 1)<1".format(prefix)
+    matched = ("abs(({0}_rawcl_Es0 + "
+               "{0}_rawcl_Es1 + {0}_rawcl_Es2 + "
+               "{0}_rawcl_Es3)/{0}_truth_E - 1)<1").format(prefix)
     vars_to_plot = ratio_layers
     selection += " && " + "(" + matched + ")"
 
     pt_binning = [0, 5E3, 10E3, 15E3, 20E3,
-                  30E3, 35E3, 40E3, 45E3, 50E3, 55E3, 60E3, 65E3, 70E3, 75E3, 80E3, 85E3, 90E3,
+                  30E3, 35E3, 40E3, 45E3, 50E3, 55E3, 60E3, 65E3,
+                  70E3, 75E3, 80E3, 85E3, 90E3,
                   100E3, 110E3, 120E3, 130E3,
                   140E3, 160E3, 180E3, 200E3, 220E3,
                   250E3, 300E3, 350E3, 400E3, 450E3, 500E3, 550E3, 600E3,
                   700E3, 800E3, 900E3, 1000E3,
                   1200E3, 1400E3, 1600E3, 1800E3, 2000E3,
                   2500E3]
-    aeta_binning = [0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.85, 0.9, 1.0,
-                    1.1, 1.2, 1.3, 1.425, 1.550, 1.6, 1.65, 1.7, 1.75, 1.8, 1.9, 2.0, 2.1,
+    aeta_binning = [0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6,
+                    0.7, 0.75, 0.8, 0.85, 0.9, 1.0,
+                    1.1, 1.2, 1.3, 1.425, 1.550, 1.6,
+                    1.65, 1.7, 1.75, 1.8, 1.9, 2.0, 2.1,
                     2.2, 2.3, 2.35, 2.4, 2.5]
     pt_binning = array('d', pt_binning)
     aeta_binning = array('d', aeta_binning)
@@ -62,7 +70,8 @@ def main(path, particle):
 
     print("plotting counting")
     histo_name = "histo_count_%s" % particle
-    histo_count = ROOT.TH2F(histo_name, "count %s" % particle, len(pt_binning) - 1, pt_binning, len(aeta_binning) - 1, aeta_binning)
+    histo_count = ROOT.TH2F(histo_name, "count %s" % particle, len(
+        pt_binning) - 1, pt_binning, len(aeta_binning) - 1, aeta_binning)
     chain.Draw(aetaCalo + ":" + truth_pt + ">>" + histo_name, selection)
 
     result = []
@@ -73,7 +82,8 @@ def main(path, particle):
             sel = selection + " && abs(ph_zconv) < 5000"
         else:
             sel = selection
-        histo = ROOT.TProfile2D(histo_name, t, len(pt_binning) - 1, pt_binning, len(aeta_binning) - 1, aeta_binning)
+        histo = ROOT.TProfile2D(histo_name, t, len(
+            pt_binning) - 1, pt_binning, len(aeta_binning) - 1, aeta_binning)
         arg = v + ":" + aetaCalo + ":" + truth_pt + ">>" + histo_name
         chain.Draw(arg, sel, "profcolz")
         histo.GetXaxis().SetTitle("true pT [MeV]")
@@ -82,10 +92,18 @@ def main(path, particle):
     result.append(histo_count)
     return result
 
+
 if __name__ == "__main__":
     output_file = ROOT.TFile.Open("average_layers.root", "recreate")
-    result = main("/storage_tmp/atlas/MVA2015/inputs_MC15/photon_grid_v5/data-output/*/*.root", "unconv")
-    result += main("/storage_tmp/atlas/MVA2015/inputs_MC15/photon_grid_v5/data-output/*/*.root", "conv")
-    result += main("/storage_tmp/atlas/MVA2015/inputs_MC15/electron_local_v5.1/data-output/mc15_electron.root", "electron")
+    result = main(
+        "/storage_tmp/atlas/MVA2015/inputs_MC15/"
+        "photon_grid_v5/data-output/*/*.root",
+        "unconv")
+    result += main("/storage_tmp/atlas/MVA2015/inputs_MC15/"
+                   "photon_grid_v5/data-output/*/*.root",
+                   "conv")
+    result += main("/storage_tmp/atlas/MVA2015/inputs_MC15/"
+                   "electron_local_v5.1/data-output/mc15_electron.root",
+                   "electron")
     for r in result:
         r.Write()
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py
index 12548deec608..0e461885105a 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py
@@ -3,21 +3,26 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 
+from array import array
+import logging
+import ROOT
 doc = """
 This is an utility to merge histograms. The common case is when you have
 old scale factors for the whole calorimeter and new scale factor only for
 a subpart.
 """
 
-import ROOT
 ROOT.PyConfig.IgnoreCommandLineOptions = True
-import logging
 logging.basicConfig(level=logging.INFO)
-from array import array
+
 
 def merge_histograms(old, new, merge_error=True):
-    print("old binning: " + ", ".join(("%.3f" % old.GetBinLowEdge(ibin)) for ibin in xrange(1, old.GetNbinsX() + 2)))
-    print("new binning: " + ", ".join(("%.3f" % new.GetBinLowEdge(ibin)) for ibin in xrange(1, new.GetNbinsX() + 2)))
+    print("old binning: " + ", ".join(("%.3f" % old.GetBinLowEdge(ibin))
+                                      for ibin in range(1, old.GetNbinsX()
+                                                        + 2)))
+    print("new binning: " + ", ".join(("%.3f" % new.GetBinLowEdge(ibin))
+                                      for ibin in range(1, new.GetNbinsX()
+                                                        + 2)))
 
     new_binning = []
     new_values = []
@@ -25,24 +30,24 @@ def merge_histograms(old, new, merge_error=True):
     UNDERFLOW = 0
     OVERFLOW = new.GetNbinsX() + 1
 
-    for iold in xrange(1, old.GetNbinsX()):
-        l = old.GetBinLowEdge(iold)
-        r = l + old.GetBinWidth(iold)
+    for iold in range(1, old.GetNbinsX()):
+        low = old.GetBinLowEdge(iold)
+        r = low + old.GetBinWidth(iold)
 
-        il_new = new.FindFixBin(l)
+        il_new = new.FindFixBin(low)
         ir_new = new.FindFixBin(r)
         remainer = None
 
         if il_new == UNDERFLOW and ir_new == UNDERFLOW:
-            print("1. adding %.3f - %.3f from old" % (l, r))
-            new_binning.append((l, r))
+            print("1. adding %.3f - %.3f from old" % (low, r))
+            new_binning.append((low, r))
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
 
         elif il_new == UNDERFLOW and ir_new > UNDERFLOW:
-            if abs(new.GetBinLowEdge(1) - l) < 1E-100:
+            if abs(new.GetBinLowEdge(1) - low) < 1E-100:
                 continue
-            new_binning.append((l, new.GetBinLowEdge(1)))
+            new_binning.append((low, new.GetBinLowEdge(1)))
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
             if ir_new == OVERFLOW:
@@ -51,30 +56,24 @@ def merge_histograms(old, new, merge_error=True):
             break
     last_old = iold
 
-    for inew in xrange(1, new.GetNbinsX() + 1):
-        l = new.GetBinLowEdge(inew)
-        r = l + new.GetBinWidth(inew)
-        print("2. adding %.3f - %.3f from new" % (l, r))
-        new_binning.append((l, r))
+    for inew in range(1, new.GetNbinsX() + 1):
+        low = new.GetBinLowEdge(inew)
+        r = low + new.GetBinWidth(inew)
+        print("2. adding %.3f - %.3f from new" % (low, r))
+        new_binning.append((low, r))
         new_values.append(new.GetBinContent(inew))
         new_errors.append(new.GetBinError(inew))
-    """
-    if remainer is not None:
-        print("3. adding %.3f - %.3f from old" % (new.GetBinLowEdge(new.GetNbinsX()), old.GetBinLowEdge(remainer) + old.GetBinWidth(remainer)))
-        new_binning.append((new.GetBinLowEdge(new.GetNbinsX()), old.GetBinLowEdge(remainer) + old.GetBinWidth(remainer)))
-        new_values.append(old.GetBinContent(remainer))
-        new_errors.append(old.GetBinError(remainer))
-    """
-    for iold in xrange(last_old, old.GetNbinsX() + 1):
-        l = old.GetBinLowEdge(iold)
-        r = l + old.GetBinWidth(iold)
-
-        il_new = new.FindFixBin(l)
+
+    for iold in range(last_old, old.GetNbinsX() + 1):
+        low = old.GetBinLowEdge(iold)
+        r = low + old.GetBinWidth(iold)
+
+        il_new = new.FindFixBin(low)
         ir_new = new.FindFixBin(r)
 
         if il_new == OVERFLOW and ir_new == OVERFLOW:
-            print("4. adding %.3f - %.3f from old" % (l, r))
-            new_binning.append((l, r))
+            print("4. adding %.3f - %.3f from old" % (low, r))
+            new_binning.append((low, r))
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
         elif il_new < OVERFLOW and ir_new == OVERFLOW:
@@ -87,19 +86,20 @@ def merge_histograms(old, new, merge_error=True):
     print(new_binning)
     new_edges = array('f', [x[0] for x in new_binning] + [new_binning[-1][1]])
     histo_type = type(new)
-    result = histo_type(new.GetName(), new.GetTitle(), len(new_edges) - 1, new_edges)
+    result = histo_type(new.GetName(), new.GetTitle(),
+                        len(new_edges) - 1, new_edges)
     for i, (v, e) in enumerate(zip(new_values, new_errors), 1):
         result.SetBinContent(i, v)
         if merge_error:
             result.SetBinError(i, e)
 
-    print("merged binning: " + ", ".join(("%.3f" % result.GetBinLowEdge(ibin)) for ibin in xrange(1, result.GetNbinsX() + 1)))
-
+    print("merged binning: " + ", ".join(("%.3f" % result.GetBinLowEdge(ibin))
+                                         for ibin in range(1, result.GetNbinsX()
+                                         + 1)))
 
     return result
 
 
-
 if __name__ == "__main__":
     try:
         ROOT.gROOT.ProcessLine(".x ~/atlasstyle/AtlasStyle.C")
@@ -110,20 +110,13 @@ if __name__ == "__main__":
     import argparse
 
     parser = argparse.ArgumentParser(description=doc,
-                                     formatter_class=argparse.RawTextHelpFormatter,
-                                     epilog='''example (merge scales 2015PRE + 2015 summer): ./merge_scale_histograms.py ../../RootCoreBin/download/ElectronPhotonFourMomentumCorrection/v7/egammaEnergyCorrectionData.root:Scales/es2015PRE/alphaZee_errStat ~/Scaricati/EnergyScaleFactors.root:centVal_alpha --title="2015 summer" --name alphaZee_errStat
-
-example (merge ct 2015PRE + 2015 summer): ./merge_scale_histograms.py ../../RootCoreBin/download/ElectronPhotonFourMomentumCorrection/v7/egammaEnergyCorrectionData.root:Resolution/es2015PRE/ctZee_errStat ~/Scaricati/EnergyScaleFactors.root:centVal_c --title "2015 summer" --name ctZee_errStat
-
-example (merge scales sys 2015PRE + 2015 summer):  ./merge_scale_histograms.py ../../RootCoreBin/download/ElectronPhotonFourMomentumCorrection/v7/egammaEnergyCorrectionData.root:Scales/es2015PRE/alphaZee_errSyst ~/Scaricati/EnergyScaleFactors.root:totSyst_alpha --title="2015 summer" --name alphaZee_errSyst
-
-example (merge ct sys 2015PRE + 2015 summer): ./merge_scale_histograms.py ../../RootCoreBin/download/ElectronPhotonFourMomentumCorrection/v7/egammaEnergyCorrectionData.root:Resolution/es2015PRE_res_improved/ctZee_errSyst ~/Scaricati/EnergyScaleFactors.root:totSyst_c --title="2015 summer" --name ctZee_errSyst
-''')
+                                     formatter_class=argparse.RawTextHelpFormatter)
     parser.add_argument('histo_old')
     parser.add_argument('histo_new')
     parser.add_argument('--title', help='title of the new histogram')
     parser.add_argument('--name', help='name of the new histogram')
-    parser.add_argument('--recreate', help='create a new file', action='store_true')
+    parser.add_argument(
+        '--recreate', help='create a new file', action='store_true')
     parser.add_argument('--output-filename', default='output.root')
 
     args = parser.parse_args()
@@ -139,7 +132,8 @@ example (merge ct sys 2015PRE + 2015 summer): ./merge_scale_histograms.py ../../
     if not histo_new:
         raise IOError("cannot find histogram %s" % args.histo_new)
 
-    logging.info("going to merge %s with %s", histo_old.GetName(), histo_new.GetName())
+    logging.info("going to merge %s with %s",
+                 histo_old.GetName(), histo_new.GetName())
     histo_merged = merge_histograms(histo_old, histo_new)
 
     canvas = ROOT.TCanvas()
@@ -159,11 +153,12 @@ example (merge ct sys 2015PRE + 2015 summer): ./merge_scale_histograms.py ../../
     legend.SetBorderSize(0)
     legend.Draw()
 
-    fout = ROOT.TFile.Open(args.output_filename, "recreate" if args.recreate else "update")
+    fout = ROOT.TFile.Open(args.output_filename,
+                           "recreate" if args.recreate else "update")
     if args.title is not None:
         histo_merged.SetTitle(args.title)
     name = args.name or histo_old.GetName()
     histo_merged.SetName(name)
     histo_merged.Write()
 
-    raw_input()
+    input("press a key")
-- 
GitLab


From e5067f56d856f4a8960297e865b29f7fed92b902 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 17 Dec 2020 23:30:23 +0100
Subject: [PATCH 095/308] Some more flake8 related tests , for the .py under
 the test folder

---
 .../test/ut_test.py                           | 245 ++++++++++++------
 .../test/ut_test_factory.py                   |  41 +--
 .../test/ut_test_resolution.py                |  68 +++--
 3 files changed, 232 insertions(+), 122 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test.py
index ce598840a5fd..7d51513b54e2 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test.py
@@ -10,6 +10,7 @@ import random
 RUN2016 = 297730l
 RUN2015 = 252604l
 
+
 def arange(xmin, xmax, delta):
     # just to don't inject dep from numpy
     result = []
@@ -35,7 +36,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
     def setUpClass(cls):
         cls.event = ROOT.xAOD.TEvent()
         cls.factory = ROOT.EgammaFactory()
-        cls.tool_es2012c = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2012c")
+        cls.tool_es2012c = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2012c")
 
     def test_initialization(self):
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
@@ -48,14 +50,19 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         self.assertTrue(tool.setProperty("ESModel", "es2010").isSuccess())
         self.assertTrue(tool.initialize().isSuccess())
 
-    def generator_kinematics(self, eta_range=None, e_range=None, phi_range=None):
+    def generator_kinematics(self, eta_range=None,
+                             e_range=None,
+                             phi_range=None):
         eta_range = eta_range or arange(-2.49, 2.49, 0.05)
         e_range = e_range or arange(5E3, 1000E3, 100E3)
         phi_range = phi_range or [0.]
         from itertools import product
         return product(e_range, eta_range, phi_range)
 
-    def generator_photon(self, eta_range=None, e_range=None, phi_range=None):
+    def generator_photon(self,
+                         eta_range=None,
+                         e_range=None,
+                         phi_range=None):
         random.seed(10)
         factory = self.factory
         for e, eta, phi in self.generator_kinematics(eta_range, e_range, phi_range):
@@ -66,21 +73,34 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
                 yield factory.create_unconverted_photon(eta, phi, e)
         factory.clear()
 
-    def generator_converted(self, eta_range=None, e_range=None, phi_range=None):
+    def generator_converted(self, eta_range=None,
+                            e_range=None,
+                            phi_range=None):
         factory = self.factory
-        for e, eta, phi in self.generator_kinematics(eta_range, e_range, phi_range):
+        for e, eta, phi in self.generator_kinematics(eta_range,
+                                                     e_range,
+                                                     phi_range):
             yield factory.create_converted_photon(eta, phi, e)
         factory.clear()
 
-    def generator_unconverted(self, eta_range=None, e_range=None, phi_range=None):
+    def generator_unconverted(self, eta_range=None,
+                              e_range=None,
+                              phi_range=None):
         factory = self.factory
-        for e, eta, phi in self.generator_kinematics(eta_range, e_range, phi_range):
+        for e, eta, phi in self.generator_kinematics(eta_range,
+                                                     e_range,
+                                                     phi_range):
             yield factory.create_unconverted_photon(eta, phi, e)
         factory.clear()
 
-    def generator_electron(self, eta_range=None, e_range=None, phi_range=None):
+    def generator_electron(self,
+                           eta_range=None,
+                           e_range=None,
+                           phi_range=None):
         factory = self.factory
-        for e, eta, phi in self.generator_kinematics(eta_range, e_range, phi_range):
+        for e, eta, phi in self.generator_kinematics(eta_range,
+                                                     e_range,
+                                                     phi_range):
             yield factory.create_electron(eta, phi, e)
         factory.clear()
 
@@ -96,7 +116,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         """
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
         self.assertTrue(tool.setProperty("ESModel", "es2012c").isSuccess())
-        self.assertTrue(tool.setProperty("int")("randomRunNumber", RUN2015).isSuccess())
+        self.assertTrue(tool.setProperty("int")(
+            "randomRunNumber", RUN2015).isSuccess())
         self.assertTrue(tool.setProperty("int")("doSmearing", 0).isSuccess())
         tool.msg().setLevel(ROOT.MSG.WARNING)
 
@@ -118,7 +139,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_2015PRE")
         self.assertTrue(tool.setProperty("ESModel", "es2015PRE").isSuccess())
         self.assertTrue(tool.setProperty("int")("doSmearing", 0).isSuccess())
-        self.assertTrue(tool.setProperty("decorrelationModel", "1NP_v1"). isSuccess())
+        self.assertTrue(tool.setProperty(
+            "decorrelationModel", "1NP_v1"). isSuccess())
         tool.msg().setLevel(ROOT.MSG.WARNING)
         self.assertTrue(tool.initialize().isSuccess())
         ei = self.factory.create_eventinfo(True, 100000)   # simulation
@@ -141,12 +163,15 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         ei = self.factory.create_eventinfo(True, 100000)   # simulation
         for el in self.generator_electron():
             e_before = el.e()
-            e_cluster = el.caloCluster().energyBE(0) + el.caloCluster().energyBE(1) + el.caloCluster().energyBE(2) + el.caloCluster().energyBE(3)
+            e_cluster = el.caloCluster().energyBE(0) + el.caloCluster().energyBE(1) + \
+                el.caloCluster().energyBE(2) + el.caloCluster().energyBE(3)
             tool.applyCorrection(el, ei)
             e_after = el.e()
             if e_before > 7E3:
                 self.assertTrue(abs(e_before / e_after - 1) < 0.5,
-                                msg="energy cluser/calibrated very different at eta = %f: %f/%f, e0=%.2f, e1=%.2f, e2=%.2f, e3=%.2f" % (el.eta(), e_cluster, e_after, el.caloCluster().energyBE(0), el.caloCluster().energyBE(1), el.caloCluster().energyBE(2), el.caloCluster().energyBE(3)))
+                                msg="energy cluser/calibrated very different at eta = %f: %f/%f, e0=%.2f, e1=%.2f, e2=%.2f, e3=%.2f" % (el.eta(),
+                                                                                                                                        e_cluster, e_after, el.caloCluster().energyBE(0), el.caloCluster().energyBE(1),
+                                                                                                                                        el.caloCluster().energyBE(2), el.caloCluster().energyBE(3)))
             self.assertGreater(e_after, 0)
 
     def test_es2012XX(self):
@@ -264,11 +289,14 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         import random
         import csv
         with open("testmva_%s_%s_%s.csv" % (esmodel, particle, "data" if isdata else "fullsim"), 'wb') as csvfile:
-            spamwriter = csv.writer(csvfile, delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL)
+            spamwriter = csv.writer(
+                csvfile, delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL)
             if particle == "photon":
-                spamwriter.writerow(('eta', 'phi', 'e0', 'e1', 'e2', 'e3', 'e', 'rconv', 'zconv', 'output'))
+                spamwriter.writerow(
+                    ('eta', 'phi', 'e0', 'e1', 'e2', 'e3', 'e', 'rconv', 'zconv', 'output'))
             elif particle == "electron":
-                spamwriter.writerow(('eta', 'phi', 'e0', 'e1', 'e2', 'e3', 'e', 'output'))
+                spamwriter.writerow(
+                    ('eta', 'phi', 'e0', 'e1', 'e2', 'e3', 'e', 'output'))
 
             for eta in arange(-3.0, 3.0, 0.05):
                 phi = 0
@@ -321,11 +349,13 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
 
         import os
         basedir = os.path.dirname(os.path.abspath(__file__))
-        filename = os.path.join(basedir, "testmva_%s_%s_%s.csv" % (esmodel, particle, "data" if isdata else "fullsim"))
+        filename = os.path.join(basedir, "testmva_%s_%s_%s.csv" % (
+            esmodel, particle, "data" if isdata else "fullsim"))
 
         import csv
         with open(filename, 'rb') as csvfile:
-            reader = csv.reader(csvfile, delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL)
+            reader = csv.reader(csvfile, delimiter=' ',
+                                quotechar='|', quoting=csv.QUOTE_MINIMAL)
             next(reader, None)  # skip header
             for row in reader:
                 args = map(float, row[:-1])
@@ -333,7 +363,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
                      'photon': self.factory.create_photon}[particle](*args)
                 tool.applyCorrection(p, ei)
                 calibrated_energy = p.e()
-                self.assertAlmostEqual(calibrated_energy, float(row[-1]), delta=0.1)
+                self.assertAlmostEqual(
+                    calibrated_energy, float(row[-1]), delta=0.1)
         self.factory.clear()
 
     def test_list_syst(self):
@@ -347,56 +378,84 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
             """
             tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
             tool.msg().setLevel(ROOT.MSG.WARNING)
-            self.assertTrue(tool.setProperty("int")("useMVACalibration", 0).isSuccess())
+            self.assertTrue(tool.setProperty("int")(
+                "useMVACalibration", 0).isSuccess())
             self.assertTrue(tool.setProperty("ESModel", model).isSuccess())
             if decorrelation is not None:
-                self.assertTrue(tool.setProperty("decorrelationModel", decorrelation).isSuccess())
+                self.assertTrue(tool.setProperty(
+                    "decorrelationModel", decorrelation).isSuccess())
             if decorrelation_scale is not None:
-                self.assertTrue(tool.setProperty("decorrelationModelScale", decorrelation_scale).isSuccess())
+                self.assertTrue(tool.setProperty(
+                    "decorrelationModelScale", decorrelation_scale).isSuccess())
             if decorrelation_resolution is not None:
-                self.assertTrue(tool.setProperty("decorrelationModelResolution", decorrelation_resolution).isSuccess())
+                self.assertTrue(tool.setProperty(
+                    "decorrelationModelResolution", decorrelation_resolution).isSuccess())
 
             tool.msg().setLevel(ROOT.MSG.WARNING)
             if success:
-                self.assertTrue(tool.initialize().isSuccess(), msg='cannot initialize tool with %s' % model)
+                self.assertTrue(tool.initialize().isSuccess(),
+                                msg='cannot initialize tool with %s' % model)
             else:
-                self.assertFalse(tool.initialize().isSuccess(), msg='should not possible to initialize tool with %s' % model)
+                self.assertFalse(tool.initialize().isSuccess(
+                ), msg='should not possible to initialize tool with %s' % model)
                 return
             sys_list = get_names_sys(tool)
             if type(allsyst) is int:
-                self.assertEqual(len(sys_list), allsyst, msg='actual (expected) number of sys %d(%d): %s' % (len(sys_list), allsyst, sys_list))
+                self.assertEqual(len(sys_list), allsyst, msg='actual (expected) number of sys %d(%d): %s' % (
+                    len(sys_list), allsyst, sys_list))
             else:
                 self.assertItemsEqual(sys_list, allsyst)
             return sys_list
 
-
         list_1NP_scale = ['EG_SCALE_ALL__1down', 'EG_SCALE_ALL__1up']
-        list_1NP_resolution = ['EG_RESOLUTION_ALL__1down', 'EG_RESOLUTION_ALL__1up']
-        list_FULL_resolution = ['EG_RESOLUTION_MATERIALCALO__1down', 'EG_RESOLUTION_MATERIALCALO__1up',
-                                'EG_RESOLUTION_MATERIALCRYO__1down', 'EG_RESOLUTION_MATERIALCRYO__1up',
-                                'EG_RESOLUTION_MATERIALGAP__1down', 'EG_RESOLUTION_MATERIALGAP__1up',
-                                'EG_RESOLUTION_MATERIALID__1down', 'EG_RESOLUTION_MATERIALID__1up',
-                                'EG_RESOLUTION_PILEUP__1down', 'EG_RESOLUTION_PILEUP__1up',
-                                'EG_RESOLUTION_SAMPLINGTERM__1down', 'EG_RESOLUTION_SAMPLINGTERM__1up',
-                                'EG_RESOLUTION_ZSMEARING__1down', 'EG_RESOLUTION_ZSMEARING__1up']
-        list_1NPCOR_PLUS_UNCOR_scale = ['EG_SCALE_ALLCORR__1down', 'EG_SCALE_ALLCORR__1up',
-                                        'EG_SCALE_E4SCINTILLATOR__1down', 'EG_SCALE_E4SCINTILLATOR__1up',
-                                        'EG_SCALE_LARCALIB_EXTRA2015PRE__1down', 'EG_SCALE_LARCALIB_EXTRA2015PRE__1up',
-                                        'EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__1down', 'EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__1up',
-                                        'EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__1down', 'EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__1up']
-        _test_list_syst("es2015PRE", "1NP_v1", None, None, list_1NP_scale + list_1NP_resolution)
-        _test_list_syst("es2012c", "1NP_v1", None, None, list_1NP_scale + list_1NP_resolution)
-        _test_list_syst("es2016PRE", None, "1NP_v1", "1NP_v1", list_1NP_scale + list_1NP_resolution)
-        _test_list_syst("es2016PRE", None, "1NP_v1", "FULL_v1", list_1NP_scale + list_FULL_resolution)
-        _test_list_syst("es2015PRE", "1NPCOR_PLUS_UNCOR", None, None, list_1NP_resolution + list_1NPCOR_PLUS_UNCOR_scale)
-        _test_list_syst("es2015PRE", "1NP_v1", "1NPCOR_PLUS_UNCOR", None, list_1NP_resolution + list_1NPCOR_PLUS_UNCOR_scale)
-        _test_list_syst("es2015c_summer", "1NP_v1", None, None, list_1NP_scale + list_1NP_resolution)
+        list_1NP_resolution = [
+            'EG_RESOLUTION_ALL__1down', 'EG_RESOLUTION_ALL__1up']
+        list_FULL_resolution = ['EG_RESOLUTION_MATERIALCALO__1down',
+                                'EG_RESOLUTION_MATERIALCALO__1up',
+                                'EG_RESOLUTION_MATERIALCRYO__1down',
+                                'EG_RESOLUTION_MATERIALCRYO__1up',
+                                'EG_RESOLUTION_MATERIALGAP__1down',
+                                'EG_RESOLUTION_MATERIALGAP__1up',
+                                'EG_RESOLUTION_MATERIALID__1down',
+                                'EG_RESOLUTION_MATERIALID__1up',
+                                'EG_RESOLUTION_PILEUP__1down',
+                                'EG_RESOLUTION_PILEUP__1up',
+                                'EG_RESOLUTION_SAMPLINGTERM__1down',
+                                'EG_RESOLUTION_SAMPLINGTERM__1up',
+                                'EG_RESOLUTION_ZSMEARING__1down',
+                                'EG_RESOLUTION_ZSMEARING__1up']
+        list_1NPCOR_PLUS_UNCOR_scale = ['EG_SCALE_ALLCORR__1down',
+                                        'EG_SCALE_ALLCORR__1up',
+                                        'EG_SCALE_E4SCINTILLATOR__1down',
+                                        'EG_SCALE_E4SCINTILLATOR__1up',
+                                        'EG_SCALE_LARCALIB_EXTRA2015PRE__1down',
+                                        'EG_SCALE_LARCALIB_EXTRA2015PRE__1up',
+                                        'EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__1down',
+                                        'EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__1up',
+                                        'EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__1down',
+                                        'EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__1up']
+        _test_list_syst("es2015PRE", "1NP_v1", None, None,
+                        list_1NP_scale + list_1NP_resolution)
+        _test_list_syst("es2012c", "1NP_v1", None, None,
+                        list_1NP_scale + list_1NP_resolution)
+        _test_list_syst("es2016PRE", None, "1NP_v1", "1NP_v1",
+                        list_1NP_scale + list_1NP_resolution)
+        _test_list_syst("es2016PRE", None, "1NP_v1", "FULL_v1",
+                        list_1NP_scale + list_FULL_resolution)
+        _test_list_syst("es2015PRE", "1NPCOR_PLUS_UNCOR", None,
+                        None, list_1NP_resolution + list_1NPCOR_PLUS_UNCOR_scale)
+        _test_list_syst("es2015PRE", "1NP_v1", "1NPCOR_PLUS_UNCOR",
+                        None, list_1NP_resolution + list_1NPCOR_PLUS_UNCOR_scale)
+        _test_list_syst("es2015c_summer", "1NP_v1", None, None,
+                        list_1NP_scale + list_1NP_resolution)
 
         _test_list_syst("es2015PRE", "FULL_ETACORRELATED_v1", None, None, 58)
         _test_list_syst("es2012c", "FULL_ETACORRELATED_v1", None, None, 54)
         _test_list_syst("es2016PRE", "FULL_ETACORRELATED_v1", None, None, 62)
-        _test_list_syst("es2015c_summer", "FULL_ETACORRELATED_v1", None, None, 60)
-        _test_list_syst("es2016data_mc15c",  "FULL_ETACORRELATED_v1", None, None, 68)
+        _test_list_syst("es2015c_summer",
+                        "FULL_ETACORRELATED_v1", None, None, 60)
+        _test_list_syst("es2016data_mc15c",
+                        "FULL_ETACORRELATED_v1", None, None, 68)
         _test_list_syst("es2012c", "FULL_v1", None, None, 148)
         _test_list_syst("es2012c", None, "FULL_v1", "FULL_v1", 148)
         _test_list_syst("es2015PRE", "FULL_v1", None, None, 158)
@@ -404,9 +463,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         _test_list_syst("es2015PRE", None, None, None, 158)
 
         # these works, but generate FATALS, as expected
-        _test_list_syst("es2016PRE", "1NP_v1", "1NP_v1", "1NP_v1", [], success=False)
-
-
+        _test_list_syst("es2016PRE", "1NP_v1", "1NP_v1",
+                        "1NP_v1", [], success=False)
 
     def test_same_smearing(self):
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
@@ -462,7 +520,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
             tool.applySystematicVariation(sys_set).ignore()
             e_zee_syst = tool.getEnergy(ph, ei)
             sys_set = ROOT.CP.SystematicSet()
-            sys_set.insert(ROOT.CP.SystematicVariation("EG_SCALE_LARCALIB__ETABIN0", 1.))
+            sys_set.insert(ROOT.CP.SystematicVariation(
+                "EG_SCALE_LARCALIB__ETABIN0", 1.))
             tool.applySystematicVariation(sys_set).ignore()
             e_larcalib__bin0 = tool.getEnergy(ph, ei)
             if abs(ph.eta()) < 2.47:
@@ -478,9 +537,11 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
     def test_intermodule_correction_working(self):
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
         self.assertTrue(tool.setProperty("ESModel", "es2012c").isSuccess())
-        tool_no_correction = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_no_correction")
+        tool_no_correction = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_no_correction")
         tool_no_correction.setProperty("ESModel", "es2012c").ignore()
-        tool_no_correction.setProperty("int")("useIntermoduleCorrection", 0).ignore()
+        tool_no_correction.setProperty("int")(
+            "useIntermoduleCorrection", 0).ignore()
 
         self.assertTrue(tool.initialize().isSuccess())
         self.assertTrue(tool_no_correction.initialize().isSuccess())
@@ -493,7 +554,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
             energy.append(tool.getEnergy(ph, ei))
             energy_no_correction.append(tool_no_correction.getEnergy(ph, ei))
 
-        self.assertFalse(all([x == y for x, y in zip(energy, energy_no_correction)]))
+        self.assertFalse(
+            all([x == y for x, y in zip(energy, energy_no_correction)]))
 
     def test_idempotence(self):
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE")
@@ -516,23 +578,26 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
 
     def test_1NP_vs_FULL_es2017(self):
         """ check that the 1NP model is the squared sum of the single systematics """
-        tool_1NP = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2016data_mc15c_1NP")
+        tool_1NP = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2016data_mc15c_1NP")
         tool_1NP.setProperty("ESModel", "es2016data_mc15c").ignore()
         tool_1NP.setProperty("decorrelationModel", "1NP_v1").ignore()
         tool_1NP.setProperty("int")("randomRunNumber", RUN2015).ignore()
-        #tool_1NP.setProperty("int")("doSmearing", 0).ignore()   # remove
-        #tool_1NP.msg().setLevel(ROOT.MSG.DEBUG)
+        # tool_1NP.setProperty("int")("doSmearing", 0).ignore()   # remove
+        # tool_1NP.msg().setLevel(ROOT.MSG.DEBUG)
 
         tool_1NP.initialize().ignore()
 
-        tool_FULL = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2016data_mc15c_FULL")
+        tool_FULL = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2016data_mc15c_FULL")
         tool_FULL.setProperty("ESModel", "es2016data_mc15c").ignore()
         tool_FULL.setProperty("int")("randomRunNumber", RUN2015).ignore()
         # use ETACORRELATED to compare. FULL_v1 will differ (very small difference) since by default
         # FULL_v1 divide the ZEESTAT by the sqrt(#bins)
-        tool_FULL.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1").ignore()
-        #tool_FULL.setProperty("int")("doSmearing", 0).ignore()    # remove
-        #tool_FULL.msg().setLevel(ROOT.MSG.DEBUG)
+        tool_FULL.setProperty("decorrelationModel",
+                              "FULL_ETACORRELATED_v1").ignore()
+        # tool_FULL.setProperty("int")("doSmearing", 0).ignore()    # remove
+        # tool_FULL.msg().setLevel(ROOT.MSG.DEBUG)
         tool_FULL.initialize().ignore()
 
         ei = self.factory.create_eventinfo(True, 100000)  # MC
@@ -550,9 +615,11 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
                 all_syst_FULL = tool_FULL.recommendedSystematics()
                 all_syst_1NP = tool_1NP.recommendedSystematics()
 
-                self.assertTrue('EG_SCALE_ALL__1up' in [s.name() for s in list(all_syst_1NP)])
+                self.assertTrue('EG_SCALE_ALL__1up' in [
+                                s.name() for s in list(all_syst_1NP)])
 
-                all_syst_FULL_scale_up = [s for s in all_syst_FULL if ('SCALE' in s.name() and '__1up' in s.name())]
+                all_syst_FULL_scale_up = [s for s in all_syst_FULL if (
+                    'SCALE' in s.name() and '__1up' in s.name())]
 
                 all_biases = []
                 for sys in all_syst_FULL_scale_up:
@@ -561,12 +628,11 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
                     tool_FULL.applySystematicVariation(sys_set).ignore()
                     e = tool_FULL.getEnergy(particle, ei)
                     bias = e - e_full
-                    #print "{:<40} {:10.5f} {:10.5f}".format(sys.name(), e, bias)
+                    # print "{:<40} {:10.5f} {:10.5f}".format(sys.name(), e, bias)
                     all_biases.append(bias)
 
                 sum_quadrature = math.sqrt(sum([b * b for b in all_biases]))
-                #print "bias sum quadrature: ", sum_quadrature
-
+                # print "bias sum quadrature: ", sum_quadrature
 
                 bias_up, bias_down = None, None
                 for sys in all_syst_1NP:
@@ -581,12 +647,13 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
                         bias_up = bias
                     elif sys.name() == 'EG_SCALE_ALL__1down':
                         bias_down = bias
-                    #print sys.name() + "\t" + str(bias)
-
+                    # print sys.name() + "\t" + str(bias)
 
-                self.assertAlmostEqual(sum_quadrature, bias_up, delta=1, msg="sum of errors not equal to 1NP (up) %.7f!=%.7f" % (sum_quadrature, bias_up))
+                self.assertAlmostEqual(sum_quadrature, bias_up, delta=1,
+                                       msg="sum of errors not equal to 1NP (up) %.7f!=%.7f" % (sum_quadrature, bias_up))
                 # TODO: check why fails
-                #self.assertAlmostEqual(sum_quadrature, -bias_down, delta=1, msg="sum of errors not equal to 1NP (down) %.7f!=%.7f" % (sum_quadrature, bias_down))
+                # self.assertAlmostEqual(sum_quadrature, -bias_down, delta=1, 
+                # msg="sum of errors not equal to 1NP (down) %.7f!=%.7f" % (sum_quadrature, bias_down))
 
     def test_1NP_100GeV_electron_es2015PRE(self):
         """
@@ -595,7 +662,8 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         """
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE")
         self.assertTrue(tool.setProperty("ESModel", "es2015PRE").isSuccess())
-        self.assertTrue(tool.setProperty("decorrelationModel", "1NP_v1").isSuccess())
+        self.assertTrue(tool.setProperty(
+            "decorrelationModel", "1NP_v1").isSuccess())
         tool.msg().setLevel(ROOT.MSG.WARNING)
         tool.initialize().ignore()
         ei = self.factory.create_eventinfo(False, 100000)  # data
@@ -632,13 +700,15 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         check that es2015cPRE == es2015PRE for electron except for crack region [1.4-1.6]
         check that es2015cPRE == es2015PRE for photons
         """
-        tool_es2015PRE = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE")
+        tool_es2015PRE = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2015PRE")
         tool_es2015PRE.setProperty("ESModel", "es2015PRE").ignore()
         tool_es2015PRE.setProperty("decorrelationModel", "1NP_v1").ignore()
         tool_es2015PRE.setProperty("int")("doSmearing", 0).ignore()
         tool_es2015PRE.initialize().ignore()
 
-        tool_es2015cPRE = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015cPRE")
+        tool_es2015cPRE = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2015cPRE")
         tool_es2015cPRE.setProperty("ESModel", "es2015cPRE").ignore()
         tool_es2015cPRE.setProperty("decorrelationModel", "1NP_v1").ignore()
         tool_es2015cPRE.setProperty("int")("doSmearing", 0).ignore()
@@ -651,7 +721,7 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
             e_es2015PRE = tool_es2015PRE.getEnergy(el, ei)
             e_es2015cPRE = tool_es2015cPRE.getEnergy(el, ei)
 
-            #print el.eta(), el.e(), e_es2015PRE, e_es2015cPRE
+            # print el.eta(), el.e(), e_es2015PRE, e_es2015cPRE
             if 1.4 < abs(el.eta()) < 1.6:
                 self.assertNotAlmostEqual(e_es2015PRE, e_es2015cPRE)
             else:
@@ -670,16 +740,20 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
         check that es2015c_summer == es2015cPRE for electrons
                                   !=            for photons
         """
-        tool_es2015c_summer = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015c_summer")
+        tool_es2015c_summer = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2015c_summer")
         tool_es2015c_summer.setProperty("ESModel", "es2015c_summer").ignore()
-        tool_es2015c_summer.setProperty("decorrelationModel", "1NPCOR_PLUS_UNCOR").ignore()
+        tool_es2015c_summer.setProperty(
+            "decorrelationModel", "1NPCOR_PLUS_UNCOR").ignore()
         tool_es2015c_summer.setProperty("int")("doSmearing", 0).ignore()
         tool_es2015c_summer.msg().setLevel(ROOT.MSG.WARNING)
         tool_es2015c_summer.initialize().ignore()
 
-        tool_es2015cPRE = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015cPRE")
+        tool_es2015cPRE = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2015cPRE")
         tool_es2015cPRE.setProperty("ESModel", "es2015cPRE").ignore()
-        tool_es2015cPRE.setProperty("decorrelationModel", "1NPCOR_PLUS_UNCOR").ignore()
+        tool_es2015cPRE.setProperty(
+            "decorrelationModel", "1NPCOR_PLUS_UNCOR").ignore()
         tool_es2015cPRE.setProperty("int")("doSmearing", 0).ignore()
         tool_es2015cPRE.msg().setLevel(ROOT.MSG.WARNING)
         tool_es2015cPRE.initialize().ignore()
@@ -701,15 +775,18 @@ class TestEgammaCalibrationAndSmearingTool(unittest.TestCase):
             e_es2015cPRE = tool_es2015cPRE.getEnergy(ph, ei)
             self.assertGreater(e_es2015cPRE, 0)
             self.assertNotAlmostEqual(e_es2015c_summer, e_es2015cPRE,
-                                      msg="e_es2015c_summer == e_es2015cPRE == %.2f at eta=%.2f for photons" % (e_es2015c_summer, ph.eta()))
+                                      msg="e_es2015c_summer == e_es2015cPRE == %.2f at eta=%.2f for photons" % (e_es2015c_summer, 
+                                      ph.eta()))
 
     def test_es2015c_summer_data(self):
         """
         check that energy > 0
         """
-        tool_es2015c_summer = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015c_summer")
+        tool_es2015c_summer = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2015c_summer")
         tool_es2015c_summer.setProperty("ESModel", "es2015c_summer").ignore()
-        tool_es2015c_summer.setProperty("decorrelationModel", "1NPCOR_PLUS_UNCOR").ignore()
+        tool_es2015c_summer.setProperty(
+            "decorrelationModel", "1NPCOR_PLUS_UNCOR").ignore()
         tool_es2015c_summer.msg().setLevel(ROOT.MSG.WARNING)
         tool_es2015c_summer.initialize().ignore()
 
@@ -728,5 +805,5 @@ if __name__ == '__main__':
     ROOT.gROOT.ProcessLine(".x $ROOTCOREDIR/scripts/load_packages.C")
 #    from ROOT import EgammaCalibPeriodRunNumbersExample
 
-    #ROOT.xAOD.TReturnCode.enableFailure()
+    # ROOT.xAOD.TReturnCode.enableFailure()
     unittest.main()
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_factory.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_factory.py
index ff2ae3998b80..644e69fe4f8c 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_factory.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_factory.py
@@ -8,7 +8,7 @@ import unittest
 class TestEgammaFactory(unittest.TestCase):
 
     def test_eventinfo(self):
-        event = ROOT.xAOD.TEvent()
+        ROOT.xAOD.TEvent()
         factory = ROOT.EgammaFactory()
         ei1 = factory.create_eventinfo(True, 100000)
         self.assertTrue(ei1.eventType(ROOT.xAOD.EventInfo.IS_SIMULATION))
@@ -16,7 +16,7 @@ class TestEgammaFactory(unittest.TestCase):
         self.assertFalse(ei2.eventType(ROOT.xAOD.EventInfo.IS_SIMULATION))
 
     def test_unconverted(self):
-        event = ROOT.xAOD.TEvent()
+        ROOT.xAOD.TEvent()
         factory = ROOT.EgammaFactory()
 
         runnumber = 10000
@@ -32,11 +32,13 @@ class TestEgammaFactory(unittest.TestCase):
         self.assertAlmostEqual(ph.caloCluster().eta(), eta)
         self.assertAlmostEqual(ph.phi(), phi)
         self.assertAlmostEqual(ph.caloCluster().phi(), phi)
-        self.assertAlmostEqual(ph.caloCluster().auxdata("float")("etaCalo"), eta)
-        self.assertAlmostEqual(ph.caloCluster().auxdata("float")("phiCalo"), phi)
+        self.assertAlmostEqual(
+            ph.caloCluster().auxdata("float")("etaCalo"), eta)
+        self.assertAlmostEqual(
+            ph.caloCluster().auxdata("float")("phiCalo"), phi)
         self.assertAlmostEqual(ph.e(), e, delta=0.01)
         self.assertEqual(ph.caloCluster().e(), e)
-        for i in xrange(3):
+        for i in range(3):
             self.assertGreater(ph.caloCluster().energyBE(i), 0)
 
     def test_converted(self):
@@ -56,15 +58,17 @@ class TestEgammaFactory(unittest.TestCase):
         self.assertAlmostEqual(ph.caloCluster().eta(), eta)
         self.assertAlmostEqual(ph.phi(), phi)
         self.assertAlmostEqual(ph.caloCluster().phi(), phi)
-        self.assertAlmostEqual(ph.caloCluster().auxdata("float")("etaCalo"), eta)
-        self.assertAlmostEqual(ph.caloCluster().auxdata("float")("phiCalo"), phi)
+        self.assertAlmostEqual(
+            ph.caloCluster().auxdata("float")("etaCalo"), eta)
+        self.assertAlmostEqual(
+            ph.caloCluster().auxdata("float")("phiCalo"), phi)
         self.assertAlmostEqual(ph.e(), e, delta=0.01)
         self.assertEqual(ph.caloCluster().e(), e)
-        for i in xrange(3):
+        for i in range(3):
             self.assertGreater(ph.caloCluster().energyBE(i), 0)
 
     def test_photon(self):
-        event = ROOT.xAOD.TEvent()
+         ROOT.xAOD.TEvent()
         factory = ROOT.EgammaFactory()
 
         runnumber = 10000
@@ -89,8 +93,10 @@ class TestEgammaFactory(unittest.TestCase):
         self.assertAlmostEqual(ph.caloCluster().eta(), eta)
         self.assertAlmostEqual(ph.phi(), phi)
         self.assertAlmostEqual(ph.caloCluster().phi(), phi)
-        self.assertAlmostEqual(ph.caloCluster().auxdata("float")("etaCalo"), eta)
-        self.assertAlmostEqual(ph.caloCluster().auxdata("float")("phiCalo"), phi)
+        self.assertAlmostEqual(
+            ph.caloCluster().auxdata("float")("etaCalo"), eta)
+        self.assertAlmostEqual(
+            ph.caloCluster().auxdata("float")("phiCalo"), phi)
         self.assertAlmostEqual(ph.e(), e, delta=0.01)
         self.assertEqual(ph.caloCluster().e(), e)
 
@@ -101,7 +107,7 @@ class TestEgammaFactory(unittest.TestCase):
         tool.applyCorrection(ph, ei)
 
     def test_electron(self):
-        event = ROOT.xAOD.TEvent()
+        ROOT.xAOD.TEvent()
         factory = ROOT.EgammaFactory()
 
         runnumber = 10000
@@ -124,14 +130,16 @@ class TestEgammaFactory(unittest.TestCase):
         self.assertAlmostEqual(el.caloCluster().eta(), eta)
         self.assertAlmostEqual(el.phi(), phi)
         self.assertAlmostEqual(el.caloCluster().phi(), phi)
-        self.assertAlmostEqual(el.caloCluster().auxdata("float")("etaCalo"), eta)
-        self.assertAlmostEqual(el.caloCluster().auxdata("float")("phiCalo"), phi)
+        self.assertAlmostEqual(
+            el.caloCluster().auxdata("float")("etaCalo"), eta)
+        self.assertAlmostEqual(
+            el.caloCluster().auxdata("float")("phiCalo"), phi)
         self.assertAlmostEqual(el.e(), e, delta=0.01)
         self.assertEqual(el.caloCluster().e(), e)
         self.assertAlmostEqual(el.trackParticle().eta(), eta, delta=0.00001)
 
     def test_clean(self):
-        event = ROOT.xAOD.TEvent()
+        ROOT.xAOD.TEvent()
 
         factory = ROOT.EgammaFactory()
         runnumber = 10000
@@ -147,7 +155,7 @@ class TestEgammaFactory(unittest.TestCase):
         self.assertAlmostEqual(el.eta(), 1)
 
     def test_decoration(self):
-        event = ROOT.xAOD.TEvent()
+        ROOT.xAOD.TEvent()
 
         factory = ROOT.EgammaFactory()
         runnumber = 10000
@@ -158,7 +166,6 @@ class TestEgammaFactory(unittest.TestCase):
         el.auxdecor("double")("mydeco")
         el.auxdataConst("double")("mydeco")
 
-        #factory.clear()
         el = factory.create_electron(1, 2, 3, 4, 5, 6, 7)
         el.auxdataConst("double")("mydeco")
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_resolution.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_resolution.py
index b4a330f56ace..72b99d4cbf6f 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_resolution.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/test/ut_test_resolution.py
@@ -31,16 +31,16 @@ class TestEgammaResolution(unittest.TestCase):
         cls.factory = ROOT.EgammaFactory()
 
     def loop_combination(self, eta_min=-2.5, eta_max=2.5, eta_step=0.05,
-                              energy_min=0, energy_max=200E3, energy_step=10E3,
-                              ptypes=(0, 1, 2, 3),
-                              resol_types=(0, 1, 2)):
+                         energy_min=0, energy_max=200E3, energy_step=10E3,
+                         ptypes=(0, 1, 2, 3),
+                         resol_types=(0, 1, 2)):
         for ptype in ptypes:
             for resol_type in resol_types:
                 for eta in arange(eta_min, eta_max, eta_step):
                     for energy in arange(energy_min, energy_max, energy_step):
                         yield ptype, energy, eta, resol_type
 
-    #@unittest.expectedFailure  # return nan in the crack (1.37-1.52), inf at >= 2.4
+    # @unittest.expectedFailure  # return nan in the crack (1.37-1.52), inf at >= 2.4
     def test_resolution_positive(self):
         for ptype, energy, eta, resol_type in self.loop_combination():
             for tool in self.tool_run1, self.tool_run2:
@@ -49,7 +49,8 @@ class TestEgammaResolution(unittest.TestCase):
                 if ptype == 3:
                     continue
                 resolution = tool.getResolution(ptype, energy, eta, resol_type)
-                self.assertFalse(math.isnan(resolution), msg="resolution is nan for eta=%f" % eta)
+                self.assertFalse(math.isnan(resolution),
+                                 msg="resolution is nan for eta=%f" % eta)
                 self.assertGreater(resolution, 0)
 
     def create_response_run1(self):
@@ -57,9 +58,13 @@ class TestEgammaResolution(unittest.TestCase):
         this should not be executed, to don't invalidate reference file created
         on 2015-04-27 with ElectronPhotonFourMomentumCorrection-00-01-23
         """
-        fout = ROOT.TFile("$ROOTCOREBIN/data/ElectronPhotonFourMomentumCorrection/test_resolution_nonregression_run1_data.root", "recreate")
-        tree = ROOT.TTree("test_resolution_nonregression_data_run1", "test_resolution_nonregression_data")
-        data_ptype, data_resol_type, data_eta, data_energy, data_resolution = map(lambda t: array(t, [0]), ('i', 'i', 'f', 'f', 'f'))
+        fout = ROOT.TFile(
+            "$ROOTCOREBIN/data/ElectronPhotonFourMomentumCorrection/test_resolution_nonregression_run1_data.root",
+            "recreate")
+        tree = ROOT.TTree("test_resolution_nonregression_data_run1",
+                          "test_resolution_nonregression_data")
+        data_ptype, data_resol_type, data_eta, data_energy, data_resolution = map(
+            lambda t: array(t, [0]), ('i', 'i', 'f', 'f', 'f'))
 
         tree.Branch("ptype", data_ptype, "ptype/I")
         tree.Branch("resol_type", data_resol_type, "resol_type/I")
@@ -68,7 +73,8 @@ class TestEgammaResolution(unittest.TestCase):
         tree.Branch("resolution", data_resolution, "resolution/F")
 
         for ptype, energy, eta, resol_type in self.loop_combination_run1():
-            resolution = self.tool_run1.getResolution(ptype, energy, eta, resol_type)
+            resolution = self.tool_run1.getResolution(
+                ptype, energy, eta, resol_type)
             data_ptype[0] = ptype
             data_energy[0] = energy
             data_eta[0] = eta
@@ -86,18 +92,23 @@ class TestEgammaResolution(unittest.TestCase):
             for eta in arange(0, 1.37, 0.1):
                 for e in arange(10E3, 1000E3, 100E3):
                     for t in 0, 1, 2:
-                        resolution_run1 = self.tool_run1.getResolution(ptype, e, eta, t)
-                        resolution_run2 = tool_run2.getResolution(ptype, e, eta, t)
-                        self.assertNotAlmostEqual(resolution_run1, resolution_run2,
-                                                  msg="resolution should be different for particle=%d, eta=%f, e=%d, rtype=%d" % (ptype, eta, e, t))
+                        resolution_run1 = self.tool_run1.getResolution(
+                            ptype, e, eta, t)
+                        resolution_run2 = tool_run2.getResolution(
+                            ptype, e, eta, t)
+                        self.assertNotAlmostEqual(resolution_run1,
+                                                  resolution_run2,
+                                                  msg="resolution should be different for particle=%d, eta=%f, e=%d, rtype=%d" % (ptype,
+                                                                                                                                  eta, e, t))
 
     def test_nonregression_run1(self):
         from PathResolver import PathResolver
-        rootfile = PathResolver.FindCalibFile("ElectronPhotonFourMomentumCorrection/v8/test_resolution_nonregression_run1_data.root")
+        rootfile = PathResolver.FindCalibFile(
+            "ElectronPhotonFourMomentumCorrection/v8/test_resolution_nonregression_run1_data.root")
         f = ROOT.TFile(rootfile)
         tree = f.Get("test_resolution_nonregression_data_run1")
 
-        for ievent in xrange(tree.GetEntries()):
+        for ievent in range(tree.GetEntries()):
 
             tree.GetEntry(ievent)
             resolution = self.tool_run1.getResolution(tree.ptype,
@@ -105,12 +116,20 @@ class TestEgammaResolution(unittest.TestCase):
                                                       tree.resol_type)
             expected_response = tree.resolution
             if math.isnan(resolution):
-                self.assertTrue(math.isnan(expected_response), msg="resolution is nan, but expected resonse is %f" % expected_response)
+                self.assertTrue(math.isnan(
+                    expected_response), msg="resolution is nan, but expected resonse is %f" % expected_response)
             elif math.isnan(expected_response):
-                self.assertTrue(math.isnan(resolution), msg="expected response is nan, but resolution is %f" % resolution)
+                self.assertTrue(math.isnan(
+                    resolution), msg="expected response is nan, but resolution is %f" % resolution)
             else:
                 self.assertAlmostEqual(resolution, expected_response,
-                                       msg="resolution mismatch %f != %f at eta=%f, energy=%f, ptype=%d, resol_type=%d" % (resolution, expected_response, tree.eta, tree.energy, tree.ptype, tree.resol_type))
+                                       msg="resolution mismatch %f != %f at eta=%f, energy=%f, ptype=%d, resol_type=%d" % (
+                                           resolution,
+                                           expected_response,
+                                           tree.eta,
+                                           tree.energy,
+                                           tree.ptype,
+                                           tree.resol_type))
 
     @unittest.skip("CHECK")
     def test_resolution_interface(self):
@@ -125,22 +144,29 @@ class TestEgammaResolution(unittest.TestCase):
             for energy in energies:
                 if particle == 'unconverted':
                     p = self.factory.create_photon(0., 0.1, energy, 0)
-                    r1 = tool.resolution(energy, 0., 0., ROOT.PATCore.ParticleType.UnconvertedPhoton)
+                    r1 = tool.resolution(
+                        energy, 0., 0.,
+                        ROOT.PATCore.ParticleType.UnconvertedPhoton)
                     r2 = tool.getResolution(p)
                     self.assertAlmostEqual(r1, r2)
                 elif particle == 'converted':
                     p = self.factory.create_photon(0., 0.1, energy, 100)
-                    r1 = tool.resolution(energy, 0., 0., ROOT.PATCore.ParticleType.ConvertedPhoton)
+                    r1 = tool.resolution(
+                        energy, 0., 0.,
+                        ROOT.PATCore.ParticleType.ConvertedPhoton)
                     r2 = tool.getResolution(p)
                     self.assertAlmostEqual(r1, r2)
                 elif particle == 'electron':
                     p = self.factory.create_electron(0., 0.1, energy)
-                    r1 = tool.resolution(energy, 0., 0., ROOT.PATCore.ParticleType.Electron)
+                    r1 = tool.resolution(
+                        energy, 0., 0.,
+                        ROOT.PATCore.ParticleType.Electron)
                     r2 = tool.getResolution(p)
                     self.assertAlmostEqual(r1, r2)
                 else:
                     raise ValueError()
 
+
 if __name__ == '__main__':
     ROOT.gROOT.ProcessLine(".x $ROOTCOREDIR/scripts/load_packages.C")
     unittest.main()
-- 
GitLab


From a4685992ea47743fdd231f6a2e7c187a30cf3771 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Thu, 17 Dec 2020 23:57:06 +0100
Subject: [PATCH 096/308] vec.h use prefix increment for fallback type

---
 Control/CxxUtils/CxxUtils/vec.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/Control/CxxUtils/CxxUtils/vec.h b/Control/CxxUtils/CxxUtils/vec.h
index 3ab1c057ea22..1b072d809881 100644
--- a/Control/CxxUtils/CxxUtils/vec.h
+++ b/Control/CxxUtils/CxxUtils/vec.h
@@ -166,7 +166,7 @@ using ivec = vec_fb<typename boost::int_t<sizeof(T)*8>::exact, N>;
   vec_fb<T, N> operator op (const vec_fb<T, N>& a, const vec_fb<T, N>& b) \
   {                                                                       \
     vec_fb<T, N> c;                                                       \
-    for (size_t i = 0; i < N; i++)                                        \
+    for (size_t i = 0; i < N; ++i)                                        \
       c.m_arr[i] = a.m_arr[i] op b.m_arr[i];                              \
     return c;                                                             \
   }                                                                       \
@@ -175,7 +175,7 @@ using ivec = vec_fb<typename boost::int_t<sizeof(T)*8>::exact, N>;
   vec_fb<T, N> operator op (const vec_fb<T, N>& a, U b)                   \
   {                                                                       \
     vec_fb<T, N> c;                                                       \
-    for (size_t i = 0; i < N; i++)                                        \
+    for (size_t i = 0; i < N; ++i)                                        \
       c.m_arr[i] = a.m_arr[i] op b;                                       \
     return c;                                                             \
   }                                                                       \
@@ -184,7 +184,7 @@ using ivec = vec_fb<typename boost::int_t<sizeof(T)*8>::exact, N>;
   vec_fb<T, N> operator op (U a, const vec_fb<T, N>& b)                   \
   {                                                                       \
     vec_fb<T, N> c;                                                       \
-    for (size_t i = 0; i < N; i++)                                        \
+    for (size_t i = 0; i < N; ++i)                                        \
       c.m_arr[i] = a op b.m_arr[i];                                       \
     return c;                                                             \
   }                                                                       \
@@ -192,7 +192,7 @@ using ivec = vec_fb<typename boost::int_t<sizeof(T)*8>::exact, N>;
   inline                                                                  \
   vec_fb<T, N>& operator op ## = (vec_fb<T, N>& a, const vec_fb<T, N>& b) \
   {                                                                       \
-     for (size_t i = 0; i < N; i++)                                       \
+     for (size_t i = 0; i < N; ++i)                                       \
       a.m_arr[i] op ## = b.m_arr[i];                                      \
     return a;                                                             \
   }                                                                       \
@@ -200,7 +200,7 @@ using ivec = vec_fb<typename boost::int_t<sizeof(T)*8>::exact, N>;
   inline                                                                  \
   vec_fb<T, N>& operator op ## = (vec_fb<T, N>& a, U b)                   \
   {                                                                       \
-    for (size_t i = 0; i < N; i++)                                        \
+    for (size_t i = 0; i < N; ++i)                                        \
       a.m_arr[i] op ## = b;                                               \
     return a;                                                             \
   }
@@ -229,7 +229,7 @@ BINOP(<<)
   vec_fb<T, N> operator op (const vec_fb<T, N>& a)                      \
   {                                                                     \
     vec_fb<T, N> c;                                                     \
-    for (size_t i = 0; i < N; i++)                                      \
+    for (size_t i = 0; i < N; ++i)                                      \
       c.m_arr[i] = op a.m_arr[i];                                       \
     return c;                                                           \
   }                                                                     \
@@ -251,7 +251,7 @@ UNOP(~)
   ivec<T, N> operator op (const vec_fb<T, N>& a, const vec_fb<T, N>& b) \
   {                                                                     \
     ivec<T, N> c;                                                       \
-    for (size_t i = 0; i < N; i++)                                      \
+    for (size_t i = 0; i < N; ++i)                                      \
       c.m_arr[i] = a.m_arr[i] op b.m_arr[i];                            \
     return c;                                                           \
   }
@@ -273,7 +273,7 @@ inline
 ivec<T, N> operator! (const vec_fb<T, N>& a)
 {
   ivec<T, N> c;
-  for (size_t i = 0; i < N; i++)
+  for (size_t i = 0; i < N; ++i)
     c.m_arr[i] = a.m_arr[i] == 0;
   return c;
 }
@@ -285,7 +285,7 @@ inline
 ivec<T, N> operator&& (const vec_fb<T, N>& a, const vec_fb<T, N>& b)
 {
   ivec<T, N> c;
-  for (size_t i = 0; i < N; i++)
+  for (size_t i = 0; i < N; ++i)
     c.m_arr[i] = (a.m_arr[i]!=0) & (b.m_arr[i]!=0);
   return c;
 }
@@ -297,7 +297,7 @@ inline
 ivec<T, N> operator&& (U a, const vec_fb<T, N>& b)
 {
   ivec<T, N> c;
-  for (size_t i = 0; i < N; i++)
+  for (size_t i = 0; i < N; ++i)
     c.m_arr[i] = a ? b.m_arr[i] != 0 : 0;
   return c;
 }
@@ -309,7 +309,7 @@ inline
 ivec<T, N> operator&& (const vec_fb<T, N>& a, U b)
 {
   ivec<T, N> c;
-  for (size_t i = 0; i < N; i++)
+  for (size_t i = 0; i < N; ++i)
     c.m_arr[i] = (a.m_arr[i]!=0) & (b ? -1 : 0);
   return c;
 }
@@ -321,7 +321,7 @@ inline
 ivec<T, N> operator|| (const vec_fb<T, N>& a, const vec_fb<T, N>& b)
 {
   ivec<T, N> c;
-  for (size_t i = 0; i < N; i++)
+  for (size_t i = 0; i < N; ++i)
     c.m_arr[i] = (a.m_arr[i]!=0) | (b.m_arr[i]!=0);
   return c;
 }
@@ -416,7 +416,7 @@ vbroadcast(VEC& v, T x)
   // This may look inefficient, but the loop goes away when we
   // compile with optimization.
   constexpr size_t N = CxxUtils::vec_size<VEC>();
-  for (size_t i = 0; i < N; i++) {
+  for (size_t i = 0; i < N; ++i) {
     v[i] = x;
   }
 #else
@@ -461,7 +461,7 @@ vselect(VEC& dst, const VEC& a, const VEC& b, const mask_type_t<VEC>& mask)
 {
 #if !HAVE_VECTOR_TERNARY_OPERATOR || WANT_VECTOR_FALLBACK
   constexpr size_t N = vec_size<VEC>();
-  for (size_t i = 0; i < N; i++) {
+  for (size_t i = 0; i < N; ++i) {
     dst[i] = mask[i] ? a[i] : b[i];
   }
 #else
@@ -479,7 +479,7 @@ vmin(VEC& dst, const VEC& a, const VEC& b)
 {
 #if !HAVE_VECTOR_TERNARY_OPERATOR || WANT_VECTOR_FALLBACK
   constexpr size_t N = vec_size<VEC>();
-  for (size_t i = 0; i < N; i++) {
+  for (size_t i = 0; i < N; ++i) {
     dst[i] = a[i] < b[i] ? a[i] : b[i];
   }
 #else
@@ -497,7 +497,7 @@ vmax(VEC& dst, const VEC& a, const VEC& b)
 {
 #if !HAVE_VECTOR_TERNARY_OPERATOR || WANT_VECTOR_FALLBACK
   constexpr size_t N = vec_size<VEC>();
-  for (size_t i = 0; i < N; i++) {
+  for (size_t i = 0; i < N; ++i) {
     dst[i] = a[i] > b[i] ? a[i] : b[i];
   }
 #else
-- 
GitLab


From 9e9f084fea025ee2bf7f0a3b3fdbd17fea217013 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 00:45:26 +0100
Subject: [PATCH 097/308] MuonGeoModel: Fix memory leaks.

Fix a couple leaks of GeoModel objects.
---
 MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx b/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx
index 514e8861de3b..aac677b75844 100755
--- a/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx
@@ -321,6 +321,7 @@ GeoFullPhysVol* MultiLayer::build()
   double tL = longWidth/2.0 - (tubePitch/2.)*TrdDwoverL;
   stube = new GeoTube(0.0, tubePitch/2., tL);
   stube = & ( (*stube) << GeoTrf::RotateX3D(90.*Gaudi::Units::deg) );
+  stube->ref();
   const GeoShape* stubewithcut = nullptr;
   if (cutoutNsteps > 1 && !m_nonCutoutXSteps.size()) { // adaption of tube cuts only needed for cutouts along amdb-y
     double toptubelength = cutoutTubeLength[cutoutNsteps-1];
@@ -331,8 +332,6 @@ GeoFullPhysVol* MultiLayer::build()
 
   GeoShape* sbox = new GeoTrd(mdtthickness, mdtthickness, longWidth,
                               longWidth, tubePitch/2.);
-  GeoShape* sboxf = new GeoTrd(mdtthickness, mdtthickness, longWidth,
-                                longWidth, tubePitch/4.+1*Gaudi::Units::mm);
   slay = &(slay->subtract( (*sbox)<<GeoTrf::Translate3D(0.,0.,length/2.)));
 
   for (int i = 0; i < nrOfLayers; i++) {
@@ -371,6 +370,8 @@ GeoFullPhysVol* MultiLayer::build()
     }
   } // Loop over layers
 
+  stube->unref();
+
   const GeoMaterial* mlay = getMaterialManager()->getMaterial("std::Air");
   GeoLogVol* llay = new GeoLogVol(logVolName, slay, mlay);
   GeoFullPhysVol* play = new GeoFullPhysVol(llay);
@@ -389,6 +390,8 @@ GeoFullPhysVol* MultiLayer::build()
       sfoam = new GeoTrd(foamthicknesslow/2.-eps, foamthicknesslow/2.-eps,
                          width/2.-eps, longWidth/2.-eps, length/2.);
     }
+    GeoShape* sboxf = new GeoTrd(mdtthickness, mdtthickness, longWidth,
+                                 longWidth, tubePitch/4.+1*Gaudi::Units::mm);
     sfoam = &(sfoam->subtract( (*sboxf)<<GeoTrf::Translate3D(0.,0.,length/2.-tubePitch/4.)));
     mfoam = getMaterialManager()->getMaterial("muo::Foam");
     lfoam = new GeoLogVol("MultiLayerFoam", sfoam, mfoam);
@@ -401,6 +404,8 @@ GeoFullPhysVol* MultiLayer::build()
       sfoam = new GeoTrd(foamthicknessup/2.-eps, foamthicknessup/2.-eps,
                          width/2.-eps, longWidth/2.-eps, length/2.);
     }
+    GeoShape* sboxf = new GeoTrd(mdtthickness, mdtthickness, longWidth,
+                                 longWidth, tubePitch/4.+1*Gaudi::Units::mm);
     sfoam = &(sfoam->subtract( (*sboxf)<<GeoTrf::Translate3D(0.,0.,length/2.-tubePitch/4.)));
     mfoam = getMaterialManager()->getMaterial("muo::Foam");
     lfoam = new GeoLogVol("MultiLayerFoam", sfoam, mfoam);
-- 
GitLab


From ba2a72b7d5b58065875f89a1ba7c25f925828379 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 03:19:47 +0100
Subject: [PATCH 098/308] CaloRingerTools: Fix memory leak.

Add forgotten call to checkRelease(); needed to free memory.
---
 .../CaloRingerTools/src/CaloRingerElectronsReader.cxx          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/RecoTools/CaloRingerTools/src/CaloRingerElectronsReader.cxx b/Reconstruction/RecoTools/CaloRingerTools/src/CaloRingerElectronsReader.cxx
index 947d70a098b5..fad621635042 100644
--- a/Reconstruction/RecoTools/CaloRingerTools/src/CaloRingerElectronsReader.cxx
+++ b/Reconstruction/RecoTools/CaloRingerTools/src/CaloRingerElectronsReader.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017, 2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2017, 2019, 2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: CaloRingerElectronsReader.cxx 786306 2016-11-24 13:40:42Z wsfreund $
@@ -121,6 +121,7 @@ StatusCode CaloRingerElectronsReader::execute()
       m_clRingsBuilderElectronFctor->operator()( electron );
     }
 
+    m_clRingsBuilderElectronFctor->checkRelease();
   }
 
   StatusCode sc;
-- 
GitLab


From 0125803d4b39b824fa23fda902ad44d2bbd9d837 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 03:22:42 +0100
Subject: [PATCH 099/308] JetRec: Fix memory leak.

PseudoJetContainer needs to delete the objects in m_emptyExtractors.
---
 .../Jet/JetRec/JetRec/PseudoJetContainer.h           |  4 +++-
 .../Jet/JetRec/Root/PseudoJetContainer.cxx           | 12 ++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h b/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
index 94eacde59755..b4b47d1ef4fe 100644
--- a/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
+++ b/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
@@ -6,7 +6,7 @@
 #define PseudoJetContainer_H
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -55,6 +55,8 @@ public:
                      const std::vector<PseudoJet> & vecPJ,
                      bool debug=false);
 
+  ~PseudoJetContainer();
+
   // fill xAOD jet with constit&ghosts extracted from final PSeudoJet
   bool extractConstituents(xAOD::Jet&, const std::vector<PseudoJet>&) const;
   bool extractConstituents(xAOD::Jet& jet, const PseudoJet &finalPJ) const;
diff --git a/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx b/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
index 449796aacf56..104ede8af881 100644
--- a/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
+++ b/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // PseudoJetContainer.cxx
@@ -44,6 +44,14 @@ PseudoJetContainer::PseudoJetContainer(const IConstituentExtractor* c,
 }
 
 
+PseudoJetContainer::~PseudoJetContainer()
+{
+  for (const IConstituentExtractor* e : m_emptyExtractors) {
+    delete e;
+  }
+}
+
+
 bool
 PseudoJetContainer::extractConstituents(xAOD::Jet& jet, 
                                         const std::vector<PseudoJet>& inConstits) const
@@ -137,7 +145,7 @@ void PseudoJetContainer::append(const PseudoJetContainer* other) {
                    pj.set_user_index(pj.user_index() + offset);return pj;}
                  );
 
-  for(auto e : other->m_emptyExtractors){m_emptyExtractors.insert(e);}
+  for(auto e : other->m_emptyExtractors){m_emptyExtractors.insert(e->clone());}
 
   if (m_debug){checkInvariants("append()");}
 }
-- 
GitLab


From a1dba213ab9ac18d2bbbdf46abd1d0842c617c69 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 04:03:06 +0100
Subject: [PATCH 100/308] ByteStreamCnvSvc: Fix memory leak.

Leaked AttributeListSpecification.
---
 Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
index bc20c5f82e7b..a86f46bb8b86 100644
--- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
+++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
@@ -736,9 +736,8 @@ StatusCode EventSelectorByteStream::recordAttributeListImpl(lock_t& lock) const
       }
    }
 
-   // build spec and the new attr list
-   coral::AttributeListSpecification* spec = new coral::AttributeListSpecification(); // the newly created attribute list owns the spec
-   auto attrList = std::make_unique<AthenaAttributeList>(*spec);
+   // build the new attr list
+   auto attrList = std::make_unique<AthenaAttributeList>();
 
    // fill the attr list
    ATH_CHECK(fillAttributeListImpl(attrList.get(), "", false, lock));
-- 
GitLab


From 14e596d38155a88040bc29667e22a62c84228487 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 10:21:51 -0500
Subject: [PATCH 101/308] TrigBphysHypo: Fix gcc11 warning.

Misleading indentation.
---
 .../TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx
index 3e0924144c6d..42d6965921e1 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuHypo.cxx
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**************************************************************************
@@ -232,6 +232,6 @@ HLT::ErrorCode TrigL2BMuMuHypo::hltExecute(const HLT::TriggerElement* outputTE,
   // store result
   if(attachFeature(outputTE, xBits.release(),"passbits") != HLT::OK)
       ATH_MSG_ERROR("Could not store TrigPassBits! ");
-      ATH_MSG_DEBUG("End of hltExecute, passMass, passChi2, pass= " <<  PassedBsMass << "  " << PassedChi2Cut << "  " << pass);
-      return HLT::OK;
+  ATH_MSG_DEBUG("End of hltExecute, passMass, passChi2, pass= " <<  PassedBsMass << "  " << PassedChi2Cut << "  " << pass);
+  return HLT::OK;
 }
-- 
GitLab


From 737878ac37184aa9ded77435c014dc69ae8f9ec3 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 12:41:21 -0500
Subject: [PATCH 102/308] TrigEgammaHypo: Fix gcc11 warning.

Null pointer dereference.  (Looks like missing parentheses.)
---
 .../TrigEgammaHypo/src/TrigL2CaloLayersHypo.cxx               | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloLayersHypo.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloLayersHypo.cxx
index b01143a0c35d..8d918d83bb1a 100755
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloLayersHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloLayersHypo.cxx
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**************************************************************************
@@ -155,7 +155,7 @@ HLT::ErrorCode TrigL2CaloLayersHypo::hltExecute(const HLT::TriggerElement* outpu
   const xAOD::TrigEMCluster* pClus = vectorOfClusters.front();
   m_preSampFrac=m_preSamp=m_monEta=m_monPhi=m_Energy=-9999.0;
 
-  if ( !pClus && (pClus->energy()>0.1) && (fabsf(pClus->eta())<2.1) ) {
+  if ( ! ( pClus && (pClus->energy()>0.1) && (fabsf(pClus->eta())<2.1) ) ) {
     msg() << MSG::WARNING << "No EM cluster in RoI" << endmsg;
     return HLT::OK;
   }
-- 
GitLab


From 753c771c85b4f0a5f8fc95e89425a280195029cf Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 09:57:45 -0500
Subject: [PATCH 103/308] TrigTauHypo: Fix gcc11 warnings.

Comment out unused variable param_at_calo.
(Not removed because it's referenced from existing commented-out code.)
Fixes warnings about null pointer dereferences.
---
 .../TrigTauHypo/src/EFHadCalibHypo.cxx             | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/EFHadCalibHypo.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/EFHadCalibHypo.cxx
index cf9d4cba82b0..fef8a085f172 100644
--- a/Trigger/TrigHypothesis/TrigTauHypo/src/EFHadCalibHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigTauHypo/src/EFHadCalibHypo.cxx
@@ -276,7 +276,7 @@ HLT::ErrorCode EFHadCalibHypo::hltExecute(const HLT::TriggerElement* inputTE, bo
 	  // Count only tracks with a certain pT:
 	  if( fabs( (*trackIter2)->pt()) < m_maxPtInIso ) continue;
 
-	  const Trk::TrackParameters * param_at_calo = 0;
+	  //const Trk::TrackParameters * param_at_calo = 0;
 
 	  if( msgLvl() <= MSG::VERBOSE ){ 
 	    msg() << MSG::VERBOSE << "Extrapolating track to calo." << endmsg;
@@ -339,13 +339,13 @@ HLT::ErrorCode EFHadCalibHypo::hltExecute(const HLT::TriggerElement* inputTE, bo
 	      countTracksOnDeltaR++;
 	    }
 
-	  if( msgLvl() <= MSG::VERBOSE )
-	    msg() << MSG::VERBOSE << "Extrapolated "
-		  << "eta = " << param_at_calo->position().eta() << " and "
-		  << "phi = " << param_at_calo->position().phi() 
-		  << ", dR = " << dr << endmsg;
+	  //if( msgLvl() <= MSG::VERBOSE )
+	  //  msg() << MSG::VERBOSE << "Extrapolated "
+	  //	  << "eta = " << param_at_calo->position().eta() << " and "
+	  //	  << "phi = " << param_at_calo->position().phi() 
+	  //	  << ", dR = " << dr << endmsg;
 
-	  delete param_at_calo;
+	  //delete param_at_calo;
 	}
 
       if( msgLvl() <= MSG::INFO )
-- 
GitLab


From bfa8f3fbbfa32c2f0f5623b0b9f1da7749e5986e Mon Sep 17 00:00:00 2001
From: yoyamagu <yohei.yamaguchi@cern.ch>
Date: Fri, 18 Dec 2020 14:10:34 +0900
Subject: [PATCH 104/308] remove dynamic variables from L2StandAloneMuon

---
 Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun2.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun2.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun2.py
index 49fc8d4055ec..06dcff8641de 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun2.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun2.py
@@ -137,7 +137,7 @@ RemoveEgammaIsoVariables = ".-"+identifier.join(UnusedEgammaIsoVariables)
 
 # Add Dynamic Var
 identifierAdd = "."
-l2saVariableToAdd = ['mdtHitId','cscHitResolution']
+l2saVariableToAdd = []
 addL2saVars = "." + identifierAdd.join(l2saVariableToAdd)
 
 # temporary functionality to discover version of EDM
-- 
GitLab


From 1e384168661b58e27e2b13aa7800570608c94d4a Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Fri, 18 Dec 2020 07:18:06 +0100
Subject: [PATCH 105/308] update

---
 .../python/PixelConditionsConfig.py           |   6 +-
 .../src/PixelConfigCondAlg.h                  |   6 +-
 .../python/PixelDigitizationConfig.py         |   6 +-
 .../PROCTools/data/master_q221_AOD_digest.ref |  20 +-
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 178 +++++++++---------
 5 files changed, 108 insertions(+), 108 deletions(-)

diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
index 036eb81c32a6..12c245e32090 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
@@ -61,7 +61,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             FEI3BarrelHitDuplication2016 = [  False,  False,  False,  False],
             FEI3BarrelSmallHitToT2016    = [     -1,     -1,     -1,     -1],
             FEI3BarrelTimingSimTune2016  = [     -1,   2015,   2015,   2015],
-            BarrelCrossTalk2016          = [   0.30,   0.06,   0.06,   0.06],
+            BarrelCrossTalk2016          = [   0.30,   0.12,   0.12,   0.12],
             BarrelNoiseOccupancy2016     = [   5e-8,   5e-8,   5e-8,   5e-8],
             BarrelDisableProbability2016 = [   9e-3,   9e-3,   9e-3,   9e-3],
             BarrelLorentzAngleCorr2016   = [    1.0,    1.0,    1.0,    1.0],
@@ -102,7 +102,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             FEI3BarrelHitDuplication2017 = [  False,  False,  False,  False],
             FEI3BarrelSmallHitToT2017    = [     -1,     -1,     -1,     -1],
             FEI3BarrelTimingSimTune2017  = [     -1,   2018,   2018,   2018],
-            BarrelCrossTalk2017          = [   0.30,   0.06,   0.06,   0.06],
+            BarrelCrossTalk2017          = [   0.30,   0.12,   0.12,   0.12],
             BarrelNoiseOccupancy2017     = [   5e-8,   5e-8,   5e-8,   5e-8],
             BarrelDisableProbability2017 = [   9e-3,   9e-3,   9e-3,   9e-3],
             BarrelLorentzAngleCorr2017   = [    1.0,    1.0,    1.0,    1.0],
@@ -138,7 +138,7 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             FEI3BarrelHitDuplication2018 = [  False,  False,  False,  False],
             FEI3BarrelSmallHitToT2018    = [     -1,     -1,     -1,     -1],
             FEI3BarrelTimingSimTune2018  = [     -1,   2018,   2018,   2018],
-            BarrelCrossTalk2018          = [   0.30,   0.06,   0.06,   0.06],
+            BarrelCrossTalk2018          = [   0.30,   0.12,   0.12,   0.12],
             BarrelNoiseOccupancy2018     = [   5e-8,   5e-8,   5e-8,   5e-8],
             BarrelDisableProbability2018 = [   9e-3,   9e-3,   9e-3,   9e-3],
             BarrelLorentzAngleCorr2018   = [    1.0,    1.0,    1.0,    1.0],
diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h
index 55f4df946d9a..9dca7e04393b 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelConfigCondAlg.h
@@ -186,7 +186,7 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     {this, "FEI3BarrelTimingSimTune2016", {-1,2015,2015,2015}, "FEI3 timing tuning set of barrel pixel layers in 2015/2016"};
 
     Gaudi::Property<std::vector<double>> m_BarrelCrossTalk2016
-    {this, "BarrelCrossTalk2016", {0.30,0.06,0.06,0.06}, "Cross-talk fraction of barrel pixel layers in 2015/2016"};
+    {this, "BarrelCrossTalk2016", {0.30,0.12,0.12,0.12}, "Cross-talk fraction of barrel pixel layers in 2015/2016"};
 
     Gaudi::Property<std::vector<double>> m_BarrelNoiseOccupancy2016
     {this, "BarrelNoiseOccupancy2016", {5e-8,5e-8,5e-8,5e-8}, "Noise occupancy of barrel pixel layers in 2015/2016"};
@@ -289,7 +289,7 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     {this, "FEI3BarrelTimingSimTune2017", {-1,2018,2018,2018}, "FEI3 timing tuning set of barrel pixel layers in 2017"};
 
     Gaudi::Property<std::vector<double>> m_BarrelCrossTalk2017
-    {this, "BarrelCrossTalk2017", {0.30,0.06,0.06,0.06}, "Cross-talk fraction of barrel pixel layers in 2017"};
+    {this, "BarrelCrossTalk2017", {0.30,0.12,0.12,0.12}, "Cross-talk fraction of barrel pixel layers in 2017"};
 
     Gaudi::Property<std::vector<double>> m_BarrelNoiseOccupancy2017
     {this, "BarrelNoiseOccupancy2017", {5e-8,5e-8,5e-8,5e-8}, "Noise occupancy of barrel pixel layers in 2017"};
@@ -388,7 +388,7 @@ class PixelConfigCondAlg : public AthReentrantAlgorithm {
     {this, "FEI3BarrelTimingSimTune2018", {-1,2018,2018,2018}, "FEI3 timing tuning set of barrel pixel layers in 2018"};
 
     Gaudi::Property<std::vector<double>> m_BarrelCrossTalk2018
-    {this, "BarrelCrossTalk2018", {0.30,0.06,0.06,0.06}, "Cross-talk fraction of barrel pixel layers in 2018"};
+    {this, "BarrelCrossTalk2018", {0.30,0.12,0.12,0.12}, "Cross-talk fraction of barrel pixel layers in 2018"};
 
     Gaudi::Property<std::vector<double>> m_BarrelNoiseOccupancy2018
     {this, "BarrelNoiseOccupancy2018", {5e-8,5e-8,5e-8,5e-8}, "Noise occupancy of barrel pixel layers in 2018"};
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
index c84d3df26698..926160070e0a 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
@@ -202,7 +202,7 @@ def PixelConfigCondAlg_MC():
     alg.FEI3BarrelHitDuplication2016 = [  False,  False,  False,  False]
     alg.FEI3BarrelSmallHitToT2016    = [     -1,     -1,     -1,     -1]
     alg.FEI3BarrelTimingSimTune2016  = [     -1,   2015,   2015,   2015]
-    alg.BarrelCrossTalk2016          = [   0.30,   0.06,   0.06,   0.06]
+    alg.BarrelCrossTalk2016          = [   0.30,   0.12,   0.12,   0.12]
     alg.BarrelNoiseOccupancy2016     = [   5e-8,   5e-8,   5e-8,   5e-8]
     alg.BarrelDisableProbability2016 = [   9e-3,   9e-3,   9e-3,   9e-3]
     alg.BarrelLorentzAngleCorr2016   = [    1.0,    1.0,    1.0,    1.0]
@@ -249,7 +249,7 @@ def PixelConfigCondAlg_MC():
     alg.FEI3BarrelHitDuplication2017 = [  False,  False,  False,  False]
     alg.FEI3BarrelSmallHitToT2017    = [     -1,     -1,     -1,     -1]
     alg.FEI3BarrelTimingSimTune2017  = [     -1,   2018,   2018,   2018]
-    alg.BarrelCrossTalk2017          = [   0.30,   0.06,   0.06,   0.06]
+    alg.BarrelCrossTalk2017          = [   0.30,   0.12,   0.12,   0.12]
     alg.BarrelNoiseOccupancy2017     = [   5e-8,   5e-8,   5e-8,   5e-8]
     alg.BarrelDisableProbability2017 = [   9e-3,   9e-3,   9e-3,   9e-3]
     alg.BarrelLorentzAngleCorr2017   = [    1.0,    1.0,    1.0,    1.0]
@@ -290,7 +290,7 @@ def PixelConfigCondAlg_MC():
     alg.FEI3BarrelHitDuplication2018 = [  False,  False,  False,  False]
     alg.FEI3BarrelSmallHitToT2018    = [     -1,     -1,     -1,     -1]
     alg.FEI3BarrelTimingSimTune2018  = [     -1,   2018,   2018,   2018]
-    alg.BarrelCrossTalk2018          = [   0.30,   0.06,   0.06,   0.06]
+    alg.BarrelCrossTalk2018          = [   0.30,   0.12,   0.12,   0.12]
     alg.BarrelNoiseOccupancy2018     = [   5e-8,   5e-8,   5e-8,   5e-8]
     alg.BarrelDisableProbability2018 = [   9e-3,   9e-3,   9e-3,   9e-3]
     alg.BarrelLorentzAngleCorr2018   = [    1.0,    1.0,    1.0,    1.0]
diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index 3da3e871698f..3be71b3829dd 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -1,26 +1,26 @@
          run       event       nTopo   nIdTracks       nJets      nMuons       nElec   nTrueElec   nFakeElec       nPhot   nTruePhot   nFakePhot
-      284500    87473001         122         130           4           1           8           2           6           7           4           3
+      284500    87473001         122         129           4           1           8           2           6           7           4           3
       284500    87473014          83          80           6           0          10           1           9           7           5           2
       284500    87473022          38          30           4           0           4           2           2           4           3           1
       284500    87473032          30          33           4           1          10           4           6           5           2           3
-      284500    87473037          62          38           7           0          12           2          10           6           4           2
-      284500    87473040         107          96          10           1          17           1          16          10           5           5
+      284500    87473037          62          39           7           0          13           2          11           5           3           2
+      284500    87473040         107          95          10           1          17           1          16          10           5           5
       284500    87473051         140         111          11           1          16           1          15          23          16           7
       284500    87473063          62          76           5           2           7           1           6           6           4           2
-      284500    87473068          25          33           1           1           0           0           0           0           0           0
+      284500    87473068          25          34           1           1           0           0           0           0           0           0
       284500    87473075          60          87           6           0           5           0           5           6           5           1
-      284500    87473084          78          86           7           2          14           1          13           9           3           6
+      284500    87473084          78          87           7           2          14           1          13           9           3           6
       284500    87473091          41          49           3           0           4           2           2           4           2           2
       284500    87473096          66          75           3           2           3           0           3           4           3           1
       284500    87473104          64          63           6           0           6           2           4           4           3           1
-      284500    87473114          89          81           7           2          12           1          11           9           6           3
-      284500    87473121          93         100           6           3          15           4          11           9           6           3
+      284500    87473114          89          80           7           2          12           1          11           9           6           3
+      284500    87473121          93         100           6           3          15           4          11           8           6           2
       284500    87473132          84          56           9           1          12           0          12           3           3           0
       284500    87473137          94          71           8           3          15           0          15           9           9           0
       284500    87473144          78          66           7           1           8           2           6           8           6           2
-      284500    87473154          86          88           7           0          13           3          10          10           4           6
-      284500    87473162          53          52           4           0           6           0           6           3           2           1
+      284500    87473154          86          88           7           0          14           3          11           9           4           5
+      284500    87473162          53          51           4           0           7           0           7           3           2           1
       284500    87473167          77          54           6           3          14           2          12          13           8           5
       284500    87473171          77          69           8           3           4           2           2           5           4           1
-      284500    87473184          75          88           5           2           8           1           7           5           3           2
+      284500    87473184          75          87           5           2           8           1           7           5           3           2
       284500    87473192          55          52           4           1           7           4           3           5           4           1
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index dfa272a87c61..40d01fee50f0 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -71,7 +71,7 @@ HLT_2g10_loose_mu20_L1MU20:
   stepFeatures:
     0: 3
     1: 3
-    2: 5
+    2: 4
 HLT_2g15_tight_dPhi15_L1DPHI-M70-2EM12I:
   eventCount: 0
 HLT_2g20_tight_L12EM15VH:
@@ -585,7 +585,7 @@ HLT_e17_lhloose_mu14_L1EM15VH_MU10:
   stepFeatures:
     0: 4
     1: 5
-    2: 6
+    2: 4
     3: 4
     4: 4
     5: 4
@@ -603,7 +603,7 @@ HLT_e17_lhvloose_nod0_L1EM15VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 7
+    2: 5
     3: 5
     4: 5
 HLT_e17_lhvloose_nod0_L1EM15VHI:
@@ -617,7 +617,7 @@ HLT_e17_lhvloose_nod0_L1EM15VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
@@ -649,7 +649,7 @@ HLT_e24_lhvloose_L1EM20VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 7
+    2: 5
     3: 5
     4: 5
 HLT_e26_etcut_L1EM22VHI:
@@ -675,7 +675,7 @@ HLT_e26_lhloose_L1EM15VH:
   stepFeatures:
     0: 6
     1: 7
-    2: 7
+    2: 5
     3: 5
     4: 5
 HLT_e26_lhloose_L1EM22VHI:
@@ -689,7 +689,7 @@ HLT_e26_lhloose_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhmedium_L1EM15VH:
@@ -703,7 +703,7 @@ HLT_e26_lhmedium_L1EM15VH:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhmedium_L1EM22VHI:
@@ -717,7 +717,7 @@ HLT_e26_lhmedium_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhmedium_mu8noL1_L1EM22VHI:
@@ -733,7 +733,7 @@ HLT_e26_lhmedium_mu8noL1_L1EM22VHI:
   stepFeatures:
     0: 10
     1: 10
-    2: 10
+    2: 8
     3: 8
     4: 8
     5: 4
@@ -749,7 +749,7 @@ HLT_e26_lhtight_L1EM15VH:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_L1EM22VHI:
@@ -763,7 +763,7 @@ HLT_e26_lhtight_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_gsf_L1EM22VHI:
@@ -777,7 +777,7 @@ HLT_e26_lhtight_gsf_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_ivarloose_L1EM22VHI:
@@ -791,7 +791,7 @@ HLT_e26_lhtight_ivarloose_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 3
 HLT_e26_lhtight_ivarmedium_L1EM22VHI:
@@ -805,7 +805,7 @@ HLT_e26_lhtight_ivarmedium_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 3
 HLT_e26_lhtight_ivartight_L1EM22VHI:
@@ -819,7 +819,7 @@ HLT_e26_lhtight_ivartight_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 3
 HLT_e26_lhtight_nod0_L1EM22VHI:
@@ -833,7 +833,7 @@ HLT_e26_lhtight_nod0_L1EM22VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e26_lhtight_nod0_L1EM24VHI:
@@ -847,7 +847,7 @@ HLT_e26_lhtight_nod0_L1EM24VHI:
   stepFeatures:
     0: 5
     1: 6
-    2: 6
+    2: 4
     3: 4
     4: 4
 HLT_e300_etcut_L1EM22VHI:
@@ -897,8 +897,8 @@ HLT_e5_lhloose_L1EM3:
   stepFeatures:
     0: 60
     1: 146
-    2: 78
-    3: 44
+    2: 81
+    3: 46
     4: 7
 HLT_e5_lhloose_noringer_L1EM3:
   eventCount: 6
@@ -911,7 +911,7 @@ HLT_e5_lhloose_noringer_L1EM3:
   stepFeatures:
     0: 56
     1: 130
-    2: 88
+    2: 84
     3: 46
     4: 7
 HLT_e5_lhmedium_L1EM3:
@@ -926,7 +926,7 @@ HLT_e5_lhmedium_L1EM3:
     0: 58
     1: 132
     2: 76
-    3: 42
+    3: 44
     4: 5
 HLT_e5_lhmedium_noringer_L1EM3:
   eventCount: 4
@@ -954,7 +954,7 @@ HLT_e5_lhtight_L1EM3:
     0: 57
     1: 129
     2: 74
-    3: 41
+    3: 43
     4: 5
 HLT_e5_lhtight_nod0_L1EM3:
   eventCount: 4
@@ -968,7 +968,7 @@ HLT_e5_lhtight_nod0_L1EM3:
     0: 57
     1: 129
     2: 74
-    3: 41
+    3: 43
     4: 5
 HLT_e5_lhtight_noringer_L1EM3:
   eventCount: 4
@@ -981,7 +981,7 @@ HLT_e5_lhtight_noringer_L1EM3:
   stepFeatures:
     0: 45
     1: 94
-    2: 60
+    2: 61
     3: 36
     4: 5
 HLT_e5_lhtight_noringer_nod0_L1EM3:
@@ -995,7 +995,7 @@ HLT_e5_lhtight_noringer_nod0_L1EM3:
   stepFeatures:
     0: 45
     1: 94
-    2: 60
+    2: 61
     3: 36
     4: 5
 HLT_e60_lhmedium_L1EM22VHI:
@@ -1009,7 +1009,7 @@ HLT_e60_lhmedium_L1EM22VHI:
   stepFeatures:
     0: 2
     1: 2
-    2: 4
+    2: 2
     3: 2
     4: 2
 HLT_e60_lhmedium_nod0_L1EM22VHI:
@@ -1023,7 +1023,7 @@ HLT_e60_lhmedium_nod0_L1EM22VHI:
   stepFeatures:
     0: 2
     1: 2
-    2: 4
+    2: 2
     3: 2
     4: 2
 HLT_e7_etcut_L1EM3:
@@ -1053,7 +1053,7 @@ HLT_e7_lhmedium_mu24_L1MU20:
   stepFeatures:
     0: 18
     1: 17
-    2: 17
+    2: 15
     3: 14
     4: 4
     5: 4
@@ -1085,7 +1085,7 @@ HLT_g12_loose_LArPEB_L1EM10VH:
   stepFeatures:
     0: 11
     1: 11
-    2: 24
+    2: 22
     3: 6
     4: 6
 HLT_g140_etcut_L1EM22VHI:
@@ -1104,7 +1104,7 @@ HLT_g20_loose_L1EM15VH:
   stepFeatures:
     0: 9
     1: 9
-    2: 17
+    2: 15
     3: 6
 HLT_g20_loose_L1EM15VHI:
   eventCount: 5
@@ -1116,7 +1116,7 @@ HLT_g20_loose_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_loose_LArPEB_L1EM15:
   eventCount: 6
@@ -1129,7 +1129,7 @@ HLT_g20_loose_LArPEB_L1EM15:
   stepFeatures:
     0: 9
     1: 9
-    2: 17
+    2: 15
     3: 6
     4: 6
 HLT_g20_medium_L1EM15VH:
@@ -1142,7 +1142,7 @@ HLT_g20_medium_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 6
 HLT_g20_medium_L1EM15VHI:
   eventCount: 5
@@ -1154,7 +1154,7 @@ HLT_g20_medium_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_L1EM15VH:
   eventCount: 5
@@ -1166,7 +1166,7 @@ HLT_g20_tight_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 5
 HLT_g20_tight_L1EM15VHI:
   eventCount: 5
@@ -1178,7 +1178,7 @@ HLT_g20_tight_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_icaloloose_L1EM15VH:
   eventCount: 5
@@ -1190,7 +1190,7 @@ HLT_g20_tight_icaloloose_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 5
 HLT_g20_tight_icaloloose_L1EM15VHI:
   eventCount: 5
@@ -1202,7 +1202,7 @@ HLT_g20_tight_icaloloose_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_icalomedium_L1EM15VH:
   eventCount: 5
@@ -1214,7 +1214,7 @@ HLT_g20_tight_icalomedium_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
     3: 5
 HLT_g20_tight_icalomedium_L1EM15VHI:
   eventCount: 5
@@ -1226,7 +1226,7 @@ HLT_g20_tight_icalomedium_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
     3: 5
 HLT_g20_tight_icalotight_L1EM15VH:
   eventCount: 0
@@ -1237,7 +1237,7 @@ HLT_g20_tight_icalotight_L1EM15VH:
   stepFeatures:
     0: 8
     1: 8
-    2: 15
+    2: 14
 HLT_g20_tight_icalotight_L1EM15VHI:
   eventCount: 0
   stepCounts:
@@ -1247,7 +1247,7 @@ HLT_g20_tight_icalotight_L1EM15VHI:
   stepFeatures:
     0: 6
     1: 6
-    2: 11
+    2: 9
 HLT_g22_tight_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -1258,7 +1258,7 @@ HLT_g22_tight_L1EM15VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 12
+    2: 11
     3: 5
 HLT_g25_etcut_L1EM20VH:
   eventCount: 7
@@ -1280,7 +1280,7 @@ HLT_g25_loose_L1EM20VH:
   stepFeatures:
     0: 9
     1: 9
-    2: 17
+    2: 15
     3: 7
 HLT_g25_medium_L1EM20VH:
   eventCount: 6
@@ -1292,7 +1292,7 @@ HLT_g25_medium_L1EM20VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 12
+    2: 11
     3: 6
 HLT_g25_medium_mu24_ivarmedium_L1MU20:
   eventCount: 0
@@ -1308,7 +1308,7 @@ HLT_g25_medium_mu24_ivarmedium_L1MU20:
   stepFeatures:
     0: 4
     1: 4
-    2: 6
+    2: 4
     3: 4
     4: 4
     5: 2
@@ -1324,7 +1324,7 @@ HLT_g25_tight_L1EM20VH:
   stepFeatures:
     0: 7
     1: 7
-    2: 12
+    2: 11
     3: 5
 HLT_g300_etcut_L1EM22VHI:
   eventCount: 0
@@ -1342,7 +1342,7 @@ HLT_g35_loose_mu18_L1EM24VHI:
   stepFeatures:
     0: 4
     1: 4
-    2: 6
+    2: 4
     3: 4
     4: 4
     5: 2
@@ -1359,7 +1359,7 @@ HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
   stepFeatures:
     0: 10
     1: 10
-    2: 13
+    2: 11
 HLT_g3_loose_LArPEB_L1EM3:
   eventCount: 9
   stepCounts:
@@ -1385,7 +1385,7 @@ HLT_g40_loose_LArPEB_L1EM20VHI:
   stepFeatures:
     0: 5
     1: 5
-    2: 10
+    2: 8
     3: 5
     4: 5
 HLT_g5_etcut_L1EM3:
@@ -1408,7 +1408,7 @@ HLT_g5_loose_L1EM3:
   stepFeatures:
     0: 56
     1: 56
-    2: 103
+    2: 101
     3: 14
 HLT_g5_medium_L1EM3:
   eventCount: 9
@@ -1420,7 +1420,7 @@ HLT_g5_medium_L1EM3:
   stepFeatures:
     0: 48
     1: 48
-    2: 81
+    2: 83
     3: 12
 HLT_g5_tight_L1EM3:
   eventCount: 8
@@ -1432,7 +1432,7 @@ HLT_g5_tight_L1EM3:
   stepFeatures:
     0: 45
     1: 45
-    2: 73
+    2: 76
     3: 8
 HLT_g60_loose_LArPEB_L1EM20VHI:
   eventCount: 3
@@ -1445,7 +1445,7 @@ HLT_g60_loose_LArPEB_L1EM20VHI:
   stepFeatures:
     0: 3
     1: 3
-    2: 7
+    2: 5
     3: 3
     4: 3
 HLT_g80_loose_LArPEB_L1EM20VHI:
@@ -1570,15 +1570,15 @@ HLT_j420_subresjesgscIS_ftf_L1J100:
     0: 3
 HLT_j45_L1J15:
   eventCount: 0
-HLT_j45_csskpf_nojcalib_ftf_L1J20:
+HLT_j45_csskpf_nojcalib_ftf_L1J15:
   eventCount: 17
   stepCounts:
-    0: 19
+    0: 20
     1: 17
   stepFeatures:
-    0: 19
+    0: 20
     1: 37
-HLT_j45_cssktc_nojcalib_L1J20:
+HLT_j45_cssktc_nojcalib_L1J15:
   eventCount: 15
   stepCounts:
     0: 15
@@ -1592,75 +1592,75 @@ HLT_j45_ftf_L1J15:
   stepFeatures:
     0: 20
     1: 55
-HLT_j45_ftf_preselj20_L1J20:
+HLT_j45_ftf_preselj20_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 55
-HLT_j45_nojcalib_L1J20:
+HLT_j45_nojcalib_L1J15:
   eventCount: 17
   stepCounts:
     0: 17
   stepFeatures:
     0: 39
-HLT_j45_pf_ftf_010jvt_L1J20:
+HLT_j45_pf_ftf_010jvt_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 55
-HLT_j45_pf_ftf_020jvt_L1J20:
+HLT_j45_pf_ftf_020jvt_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 54
-HLT_j45_pf_ftf_050jvt_L1J20:
+HLT_j45_pf_ftf_050jvt_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 54
-HLT_j45_pf_ftf_L1J20:
+HLT_j45_pf_ftf_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 56
-HLT_j45_pf_ftf_preselj20_L1J20:
+HLT_j45_pf_ftf_preselj20_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 56
-HLT_j45_pf_nojcalib_ftf_L1J20:
+HLT_j45_pf_nojcalib_ftf_L1J15:
   eventCount: 18
   stepCounts:
-    0: 19
+    0: 20
     1: 18
   stepFeatures:
-    0: 19
+    0: 20
     1: 49
-HLT_j45_pf_subjesgscIS_ftf_L1J20:
+HLT_j45_pf_subjesgscIS_ftf_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 52
 HLT_j45_pf_subjesgscIS_ftf_bdl1r70_split_L1J20:
   eventCount: 14
@@ -1682,19 +1682,19 @@ HLT_j45_pf_subjesgscIS_ftf_boffperf_split_L1J20:
     0: 19
     1: 49
     2: 49
-HLT_j45_sktc_nojcalib_L1J20:
+HLT_j45_sktc_nojcalib_L1J15:
   eventCount: 15
   stepCounts:
     0: 15
   stepFeatures:
     0: 26
-HLT_j45_subjesIS_ftf_preselj20_L1J20:
+HLT_j45_subjesIS_ftf_preselj20_L1J15:
   eventCount: 19
   stepCounts:
-    0: 19
+    0: 20
     1: 19
   stepFeatures:
-    0: 19
+    0: 20
     1: 50
 HLT_j45_subjesgscIS_ftf_011jvt_L1J15:
   eventCount: 18
@@ -2222,7 +2222,7 @@ HLT_mu6_L1MU6:
     1: 12
     2: 13
     3: 13
-HLT_mu6_idperfLRT_l2lrt_L1MU6:
+HLT_mu6_LRT_idperf_l2lrt_L1MU6:
   eventCount: 10
   stepCounts:
     0: 10
-- 
GitLab


From 6eea7eb77df080f8092303a83d10fcae39247567 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <attila.krasznahorkay@cern.ch>
Date: Fri, 18 Dec 2020 08:30:27 +0000
Subject: [PATCH 106/308] Updated AthAnalysis/version.txt

---
 Projects/AthAnalysis/version.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Projects/AthAnalysis/version.txt b/Projects/AthAnalysis/version.txt
index d4b369b4e5d8..16085fbb4e04 100644
--- a/Projects/AthAnalysis/version.txt
+++ b/Projects/AthAnalysis/version.txt
@@ -1 +1 @@
-22.2.4
+22.2.6
-- 
GitLab


From d3c331d96df96302c6f6536b7c40cae76ee46903 Mon Sep 17 00:00:00 2001
From: Aaron James Armbruster <aaron.james.armbruster@cern.ch>
Date: Fri, 18 Dec 2020 11:24:58 +0000
Subject: [PATCH 107/308] migrate EDM changes from 21.3

---
 Event/xAOD/xAODTrigger/CMakeLists.txt         |   2 +-
 Event/xAOD/xAODTrigger/Root/MuonRoI_v1.cxx    |  83 +++--
 .../xAODTrigger/versions/MuonRoI_v1.h         |   2 +
 Projects/AnalysisBase/package_filters.txt     |   1 +
 Projects/AthAnalysis/package_filters.txt      |   1 +
 .../Digitization/share/LVL1Digitization.py    |   9 +-
 .../TrigConfMuctpi/CMakeLists.txt             |   1 +
 .../share/TrigT1CTMonitoringJobOptions.py     |   9 +-
 ...MonitoringJobOptions_forRecExCommission.py |   9 +-
 .../TrigT1CTMonitoring/src/BSMonitoring.cxx   |  23 +-
 Trigger/TrigT1/TrigT1CTP/src/CTPUtil.cxx      |   7 +
 Trigger/TrigT1/TrigT1CTP/src/CTPUtil.h        |   1 +
 .../TrigT1/TrigT1Interfaces/CMakeLists.txt    |   4 +-
 .../TrigT1Interfaces}/ITrigT1MuonRecRoiTool.h |   2 +-
 .../TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h  |  13 +-
 .../Lvl1MuSectorLogicDataPhase1.h             |   3 +
 .../TrigT1Interfaces/MuCTPICTP.h              |   9 +-
 .../TrigT1Interfaces}/TrigT1MuonRecRoiData.h  |   0
 .../src/ITrigT1MuonRecRoiTool.cxx             |   2 +-
 .../src/Lvl1MuCTPIInputPhase1.cxx             |  20 +-
 .../src/Lvl1MuSectorLogicDataPhase1.cxx       |   4 +
 .../TrigT1/TrigT1Interfaces/src/MuCTPICTP.cxx |   9 +-
 .../src/TrigT1MuonRecRoiData.cxx              |   2 +-
 .../TrigT1/TrigT1MuctpiBits/CMakeLists.txt    |  10 +
 .../TrigT1MuctpiBits/MuCTPI_Bits.h            | 133 +++++++
 .../TrigT1/TrigT1MuctpiPhase1/CMakeLists.txt  |   7 +-
 .../TrigT1MuctpiPhase1/MUCTPI_AthTool.h       |  27 +-
 .../TrigT1MuctpiPhase1/MuonSectorProcessor.h  |  11 +-
 .../TrigT1MuctpiPhase1/SimController.h        |   9 +-
 .../TrigT1MuctpiPhase1/TriggerProcessor.h     |  19 +-
 .../python/TrigT1MuctpiPhase1Config.py        |  45 +--
 .../TrigT1MuctpiPhase1/src/MUCTPI_AthTool.cxx |  82 +++--
 .../src/MuonSectorProcessor.cxx               | 270 ++++++++++++++-
 .../TrigT1MuctpiPhase1/src/SimController.cxx  |  37 +-
 .../src/TriggerProcessor.cxx                  | 326 ++++++++++++------
 .../TrigT1MuonRecRoiTool/CMakeLists.txt       |  11 +-
 .../python/TrigT1MuonRecRoiToolConfig.py      |  16 +
 .../src/TrigT1RPCRecRoiTool.h                 |   2 +-
 .../src/TrigT1TGCRecRoiTool.h                 |   2 +-
 Trigger/TrigT1/TrigT1Result/CMakeLists.txt    |   2 +-
 .../TrigT1Result/TrigT1Result/MuCTPI_RDO.h    |  89 +----
 .../TrigT1Result/TrigT1Result/selection.xml   |   2 +-
 .../TrigT1/TrigT1Result/src/MuCTPIResult.cxx  |   8 +-
 Trigger/TrigT1/TrigT1Result/src/MuCTPIRoI.cxx |   2 +-
 .../src/MuCTPI_DataWord_Decoder.cxx           |   5 +-
 .../TriggerJobOpts/python/HLTTriggerGetter.py |  10 +-
 .../python/Lvl1SimulationConfig.py            |  14 +-
 .../python/Lvl1TriggerGetter.py               |  19 +-
 .../TriggerJobOpts/python/Modifiers.py        |  17 +-
 49 files changed, 960 insertions(+), 431 deletions(-)
 rename Trigger/TrigT1/{TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool => TrigT1Interfaces/TrigT1Interfaces}/ITrigT1MuonRecRoiTool.h (98%)
 rename Trigger/TrigT1/{TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool => TrigT1Interfaces/TrigT1Interfaces}/TrigT1MuonRecRoiData.h (100%)
 rename Trigger/TrigT1/{TrigT1MuonRecRoiTool => TrigT1Interfaces}/src/ITrigT1MuonRecRoiTool.cxx (98%)
 rename Trigger/TrigT1/{TrigT1MuonRecRoiTool => TrigT1Interfaces}/src/TrigT1MuonRecRoiData.cxx (96%)
 create mode 100644 Trigger/TrigT1/TrigT1MuctpiBits/CMakeLists.txt
 create mode 100755 Trigger/TrigT1/TrigT1MuctpiBits/TrigT1MuctpiBits/MuCTPI_Bits.h
 create mode 100644 Trigger/TrigT1/TrigT1MuonRecRoiTool/python/TrigT1MuonRecRoiToolConfig.py

diff --git a/Event/xAOD/xAODTrigger/CMakeLists.txt b/Event/xAOD/xAODTrigger/CMakeLists.txt
index d17cde620896..65c91c4d1c95 100644
--- a/Event/xAOD/xAODTrigger/CMakeLists.txt
+++ b/Event/xAOD/xAODTrigger/CMakeLists.txt
@@ -17,7 +17,7 @@ atlas_add_library( xAODTrigger
    xAODTrigger/*.h xAODTrigger/versions/*.h xAODTrigger/versions/*.icc
    Root/*.cxx
    PUBLIC_HEADERS xAODTrigger
-   LINK_LIBRARIES AthContainers AthLinks xAODCore xAODBase TrigNavStructure CxxUtils
+   LINK_LIBRARIES AthContainers AthLinks xAODCore xAODBase TrigNavStructure CxxUtils TrigT1MuctpiBits
    ${extra_libs} )
 
 atlas_add_xaod_smart_pointer_dicts(
diff --git a/Event/xAOD/xAODTrigger/Root/MuonRoI_v1.cxx b/Event/xAOD/xAODTrigger/Root/MuonRoI_v1.cxx
index 6982f6fa6e07..604203161879 100644
--- a/Event/xAOD/xAODTrigger/Root/MuonRoI_v1.cxx
+++ b/Event/xAOD/xAODTrigger/Root/MuonRoI_v1.cxx
@@ -10,6 +10,9 @@
 // Local include(s):
 #include "xAODTrigger/versions/MuonRoI_v1.h"
 
+// get bitsmasks from common definition source:
+#include "TrigT1MuctpiBits/MuCTPI_Bits.h"
+
 namespace xAOD{
 
    MuonRoI_v1::MuonRoI_v1()
@@ -70,7 +73,8 @@ namespace xAOD{
    ///
    int MuonRoI_v1::getThrNumber() const {
 
-      return ( ( roiWord() >> 11 ) & 0x7 );
+     if (isRun3()) return ( ( roiWord() >> RUN3_CAND_PT_SHIFT ) & RUN3_CAND_PT_MASK );
+     else return ( ( roiWord() >> CAND_PT_SHIFT ) & CAND_PT_MASK );
    }
 
    /// A muon's spacial location is identified from the sector number and the
@@ -82,15 +86,26 @@ namespace xAOD{
    ///
    int MuonRoI_v1::getRoI() const {
 
-      if( this->getSource() == Forward ) {
-         return ( ( roiWord() >> 2 ) & 0x3f );
-      } else if( this->getSource() == Endcap ) {
-         return ( ( roiWord() >> 2 ) & 0xff );
-      } else if( this->getSource() == Barrel ) {
-         return ( ( roiWord() >> 2 ) & 0x1f );
-      }
-
-      return 0;
+     if (isRun3()) {
+       if( this->getSource() == Forward ) {
+	 return ( ( roiWord() >> RUN3_ROI_SHIFT ) & FORWARD_ROI_MASK );
+       } else if( this->getSource() == Endcap ) {
+	 return ( ( roiWord() >> RUN3_ROI_SHIFT ) & ENDCAP_ROI_MASK );
+       } else if( this->getSource() == Barrel ) {
+	 return ( ( roiWord() >> RUN3_ROI_SHIFT ) & BARREL_ROI_MASK );
+       }
+     }
+     else
+     {
+       if( this->getSource() == Forward ) {
+	 return ( ( roiWord() >> ROI_SHIFT ) & FORWARD_ROI_MASK );
+       } else if( this->getSource() == Endcap ) {
+	 return ( ( roiWord() >> ROI_SHIFT ) & ENDCAP_ROI_MASK );
+       } else if( this->getSource() == Barrel ) {
+	 return ( ( roiWord() >> ROI_SHIFT ) & BARREL_ROI_MASK );
+       }
+     }
+     return 0;
    }
 
    /// The sector address is an 8-bit identifier of the sector. For its detailed
@@ -105,7 +120,8 @@ namespace xAOD{
    ///
    int MuonRoI_v1::getSectorAddress() const {
 
-      return ( ( roiWord() >> 14 ) & 0xff );
+     if (isRun3()) return ( ( roiWord() >> RUN3_CAND_SECTOR_ADDRESS_SHIFT ) & CAND_SECTOR_ADDRESS_MASK );
+     else return ( ( roiWord() >> CAND_SECTOR_ADDRESS_SHIFT ) & CAND_SECTOR_ADDRESS_MASK );
    }
 
    /// Each muon trigger sector can only send information about a maximum of
@@ -114,9 +130,11 @@ namespace xAOD{
    /// assigned to it in its sector. If it's <code>false</code>, it was the
    /// <i>second candidate</i> in its sector.
    ///
+   /// actually v1 only ... 
    bool MuonRoI_v1::isFirstCandidate() const {
 
-      return ( ( roiWord() >> 22 ) & 0x1 );
+     if (isRun3()) return true; // undefined in run3, return default true
+     else return ( ( roiWord() >> CAND_HIGHEST_PT_SHIFT ) & CAND_HIGHEST_PT_MASK );
    }
 
    /// One RoI (one part of the trigger sector) can only send information about
@@ -126,7 +144,10 @@ namespace xAOD{
    ///
    bool MuonRoI_v1::isMoreCandInRoI() const {
 
-      return ( ( roiWord() >> 1 ) & 0x1 );
+     if (isRun3()) {
+       if (getSource() == Barrel) return ( ( roiWord() >> RUN3_ROI_OVERFLOW_SHIFT ) & ROI_OVERFLOW_MASK );
+       else return false; // Endcap + Fwd have no flag for this
+     } else return ( ( roiWord() >> ROI_OVERFLOW_SHIFT ) & ROI_OVERFLOW_MASK );
    }
 
    /// This flag is set to <code>true</code> if the sector that this muon
@@ -136,7 +157,8 @@ namespace xAOD{
    ///
    bool MuonRoI_v1::isMoreCandInSector() const {
 
-      return ( roiWord() & 0x1 );
+     if (isRun3()) return ( ( roiWord() >> RUN3_CAND_OVERFLOW_SHIFT ) & CAND_OVERFLOW_MASK );
+     else return ( ( roiWord() >> CAND_OVERFLOW_SHIFT ) & CAND_OVERFLOW_MASK );
    }
 
    /// The function decodes the sector type encoded in the 8-bit sector address
@@ -147,9 +169,10 @@ namespace xAOD{
    ///
    MuonRoI_v1::RoISource MuonRoI_v1::getSource() const {
 
-      if( this->getSectorAddress() & 0x80 ) {
+     //same mask for run2 and run3
+     if( this->getSectorAddress() & ENDCAP_ADDRESS_MASK ) {
          return Endcap;
-      } else if( this->getSectorAddress() & 0x40 ) {
+     } else if( this->getSectorAddress() & FORWARD_ADDRESS_MASK ) {
          return Forward;
       } else {
          return Barrel;
@@ -164,7 +187,8 @@ namespace xAOD{
    ///
    MuonRoI_v1::Hemisphere MuonRoI_v1::getHemisphere() const {
 
-      if( this->getSectorAddress() & 0x1 ) {
+     //same mask for run2 and run3
+     if( this->getSectorAddress() & SECTOR_HEMISPHERE_MASK ) {
          return Positive;
       } else {
          return Negative;
@@ -181,10 +205,18 @@ namespace xAOD{
 
       if( getSource() == Barrel ) return Undef;
 
-      if( roiWord() & 0x8000000 ) {
-         return Pos;
+      if (isRun3()) {
+	if( ( roiWord() >> RUN3_CAND_TGC_CHARGE_SIGN_SHIFT) & 0x1 ) {
+	  return Pos;
+	} else {
+	  return Neg;
+	}
       } else {
-         return Neg;
+	if( ( roiWord() >> CAND_TGC_CHARGE_SIGN_SHIFT) & 0x1 ) {
+	  return Pos;
+	} else {
+	  return Neg;
+	}
       }
    }
 
@@ -194,7 +226,16 @@ namespace xAOD{
    ///
    bool MuonRoI_v1::isVetoed() const {
 
-      return ( roiWord() & 0x10000000 );
+     if (isRun3()) return ( ( roiWord() >> RUN3_CAND_VETO_SHIFT) & 0x1 );
+     else return ( ( roiWord() >> CAND_VETO_SHIFT) & 0x1 );
+   }
+
+   /// An extra bit is added at the end of the RoI word for run3 candidates
+   /// in the EDM for technical purposes to distinguish whether we want to use
+   /// the run2 or run3 bitmasks in decoding the word
+   bool MuonRoI_v1::isRun3() const {
+
+      return ( roiWord() >> 31 & 0x1 );
    }
 
    //
diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/MuonRoI_v1.h b/Event/xAOD/xAODTrigger/xAODTrigger/versions/MuonRoI_v1.h
index 0976fec9c85f..d017a9ec9230 100644
--- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/MuonRoI_v1.h
+++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/MuonRoI_v1.h
@@ -111,6 +111,8 @@ namespace xAOD {
       Charge getCharge() const;
       /// Returns the veto flag for the candidate
       bool isVetoed() const;
+      /// Returns extra flag at end of RoI word indicating that it's in Run3 format
+      bool isRun3() const;
 
       /// @}
 
diff --git a/Projects/AnalysisBase/package_filters.txt b/Projects/AnalysisBase/package_filters.txt
index b83b59bc01c3..042da7766479 100644
--- a/Projects/AnalysisBase/package_filters.txt
+++ b/Projects/AnalysisBase/package_filters.txt
@@ -125,6 +125,7 @@
 + Trigger/TrigEvent/TrigRoiConversion
 + Trigger/TrigEvent/TrigSteeringEvent
 + Trigger/TrigSteer/TrigCompositeUtils
++ Trigger/TrigT1/TrigT1MuctpiBits
 #+ Trigger/TrigValidation/TrigAnalysisTest
 
 #
diff --git a/Projects/AthAnalysis/package_filters.txt b/Projects/AthAnalysis/package_filters.txt
index dee4753b679e..ec30b4691749 100644
--- a/Projects/AthAnalysis/package_filters.txt
+++ b/Projects/AthAnalysis/package_filters.txt
@@ -128,6 +128,7 @@
 + Trigger/TrigEvent/TrigRoiConversion
 + Trigger/TrigEvent/TrigSteeringEvent
 + Trigger/TrigSteer/TrigCompositeUtils
++ Trigger/TrigT1/TrigT1MuctpiBits
 + Trigger/TrigValidation/TrigAnalysisTest
 #+ Trigger/TriggerSimulation/TrigBtagEmulationTool
 #+ Reconstruction/RecoTools/IsolationTool
diff --git a/Simulation/Digitization/share/LVL1Digitization.py b/Simulation/Digitization/share/LVL1Digitization.py
index 08b7003db7c4..92f0ce869753 100755
--- a/Simulation/Digitization/share/LVL1Digitization.py
+++ b/Simulation/Digitization/share/LVL1Digitization.py
@@ -114,8 +114,13 @@ if DetFlags.digitize.LVL1_on():
     # TrigT1Muctpi Algos
     #--------------------------------------------------------------
     if DetFlags.simulateLVL1.RPC_on() or DetFlags.simulateLVL1.TGC_on():
-        from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
-        topSequence += L1Muctpi()
+        from AthenaConfiguration.AllConfigFlags import ConfigFlags
+        if ConfigFlags.Trigger.enableL1Phase1:
+            from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1
+            topSequence += L1MuctpiPhase1()
+        else:
+            from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
+            topSequence += L1Muctpi()
 
     #-------------------------------------------------------
     # TrigT1CaloSim Algos
diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfMuctpi/CMakeLists.txt
index 9fb13604754f..c45939b247f5 100644
--- a/Trigger/TrigConfiguration/TrigConfMuctpi/CMakeLists.txt
+++ b/Trigger/TrigConfiguration/TrigConfMuctpi/CMakeLists.txt
@@ -23,3 +23,4 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( scripts/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_xmls( data/*.dtd )
 
+
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
index 00ff054f95a8..db46dee51cd8 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions.py
@@ -200,8 +200,13 @@ elif RunSimOnData:
     #rederive MuCTPI inputs to CTP from muon RDO
     #writes this to the usual MuCTPICTP storegate location
 
-    from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_Data
-    topSequence += L1Muctpi_on_Data()
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    if ConfigFlags.Trigger.enableL1Phase1:
+        from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1
+        topSequence += L1MuctpiPhase1_on_Data()
+    else:
+        from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
+        topSequence += L1Muctpi_on_Data()
     
     from TrigT1CTMonitoring.TrigT1CTMonitoringConf import TrigT1CTMonitoring__DeriveSimulationInputs as DeriveSimulationInputs
  
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
index c5ad2d9d3969..cebacd448a39 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py
@@ -184,8 +184,13 @@ if not athenaCommonFlags.isOnline() and jp.ConcurrencyFlags.NumThreads() == 0:
         #svcMgr.DSConfigSvc.readLVL1Thr=True
         #svcMgr.DSConfigSvc.readLVL1BG=True
 
-        from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_Data
-        topSequence += L1Muctpi_on_Data()
+        from AthenaConfiguration.AllConfigFlags import ConfigFlags
+        if ConfigFlags.Trigger.enableL1Phase1:
+            from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1_on_Data
+            topSequence += L1MuctpiPhase1_on_Data()
+        else:
+            from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_Data
+            topSequence += L1Muctpi_on_Data()
 
         from TrigT1CTMonitoring.TrigT1CTMonitoringConf import TrigT1CTMonitoring__DeriveSimulationInputs as DeriveSimulationInputs
         topSequence += DeriveSimulationInputs(do_MuCTPI_input=True,
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/src/BSMonitoring.cxx b/Trigger/TrigT1/TrigT1CTMonitoring/src/BSMonitoring.cxx
index 8fa5384ec267..2cc5dc070c64 100644
--- a/Trigger/TrigT1/TrigT1CTMonitoring/src/BSMonitoring.cxx
+++ b/Trigger/TrigT1/TrigT1CTMonitoring/src/BSMonitoring.cxx
@@ -802,11 +802,11 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
 		<< "-Pt" << dataWord.getPt();
     } 
 
-    
+    /*
     if (dataWord.getBCID() == multWord.getBCID()) {
       // Fill the muctpi map for later comparision to RPC and TGC
       muctpiCandidates.insert ( std::pair<std::string,MuCTPI_DataWord_Decoder>(keystring.str(),dataWord) );
- 
+    
      //Use only candidates from the same BCID for overlap histograms
       if (dataWord.getOverlapBits()) {
 	if (dataWord.getSectorLocation() == MuCTPI_RDO::ENDCAP) {
@@ -825,6 +825,7 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
 	}
       }
     }
+*/
   }
 
   for ( int y = 0; y < 96; y++ ) {
@@ -866,7 +867,7 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
    * BCIDs 
    */
   uint16_t mictpBcid = multWord.getBCID();
-  uint16_t candidateBcid = 0;
+  //uint16_t candidateBcid = 0;
   uint16_t headerBcid =
     (theMuCTPI_RIO) ? theMuCTPI_RIO->getHeaderBCID() : 0;
   bcidMictpHeader->Fill(mictpBcid - (headerBcid & 7));
@@ -896,7 +897,7 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
       forwardRoiSectorIDAll->Fill(dataWord.getSectorID()+24*dataWord.getHemisphere(), dataWord.getRoiNumber());
     }
 
-    candidateBcid = dataWord.getBCID();
+/*    candidateBcid = dataWord.getBCID();
 
     int candbcdiff = candidateBcid - mictpBcid;	
     if (candbcdiff > 3) candbcdiff -= 8; 
@@ -911,9 +912,10 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
       errorPerLumiBlock->Fill(m_currentLumiBlock);
     }
     else errorSummary->Fill(8,0);
-    
+*/  
     //Use only non-vetoed candidates from the same BCID for multiplicity calculation
-    if ( (dataWord.getBCID() == multWord.getBCID()) && !dataWord.getVetoed() ) {
+    if ( //(dataWord.getBCID() == multWord.getBCID()) && 
+	 !dataWord.getVetoed() ) {
       uint16_t candPt = dataWord.getPt();
       pt->Fill(candPt);
       if (0 < candPt && candPt <= MuCTPI_RDO::MULT_THRESH_NUM) {
@@ -1066,7 +1068,7 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
     int rpcnum = rpcCandidates.count(it_mui->first); 
     if (tgcnum > 0 || rpcnum > 0 ) {
       ATH_MSG(DEBUG) << "MuCTPI to RPC/TGC match found: MuCTPI key/ MuCTPI BCID / #TGC matches / #RPC matches: "
-		     << it_mui->first << " / " << it_mui->second.getBCID() << " / " 
+		     << it_mui->first << " / " << /*it_mui->second.getBCID() <<*/ " / " 
 		     << tgcnum << " / " << rpcnum << endmsg;
     } else {
       if ( (it_mui->first).substr(0,2) == "BA" )  { 
@@ -1089,7 +1091,7 @@ doMuctpi(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO, const DataHandle<MuCTPI_RIO
 			 << (it_mui->first).substr(0,2) << endmsg;
       }
       ATH_MSG(WARNING) << "No Muctpi to RPC/TGC match found: MuCTPI key / MuCTPI BCID: " 
-		       << it_mui->first  << " / " << it_mui->second.getBCID() << endmsg;
+		       << it_mui->first  << " / " << /*it_mui->second.getBCID() <<*/ endmsg;
     }
   }
 
@@ -1707,8 +1709,9 @@ doMuonRoI(const DataHandle<MuCTPI_RDO> theMuCTPI_RDO,
 	    if (dataWord.getSectorLocation() == MuCTPI_RDO::BARREL)
 	      sectorID=dataWord.getSectorID(1);
 	    
-	    if ((dataWord.getBCID() == theMuCTPI_RIO->getBCID())
-		&& (sectorID == secID)
+	    if (//(dataWord.getBCID() == theMuCTPI_RIO->getBCID())
+		//&& 
+		(sectorID == secID)
 		&& (dataWord.getRoiNumber() == roInum)
 		&& (dataWord.getSectorLocation() == sysID)
 		&& (dataWord.getHemisphere() == hemisphere)) {
diff --git a/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.cxx b/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.cxx
index 8ccdae03b793..4f2f93bd06e3 100644
--- a/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.cxx
+++ b/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.cxx
@@ -67,6 +67,13 @@ namespace LVL1CTP {
 
    }
 
+   int CTPUtil::getMult( const std::vector<unsigned int>& words, unsigned int startbit, unsigned int endbit ) {
+      std::bitset<256> bits = convertToBitset(words);
+      std::bitset<256> mask = pow( 2, endbit - startbit + 1 ) - 1;
+      bits >>= startbit;
+      return static_cast<int>((bits&mask).to_ulong());
+   }
+
    unsigned int CTPUtil::getMultTopo( uint64_t word, unsigned int cableStart, unsigned int cableEnd, unsigned int clock ) {
 
       unsigned int mult = 0;
diff --git a/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.h b/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.h
index c666b2db66cb..14495854268c 100644
--- a/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.h
+++ b/Trigger/TrigT1/TrigT1CTP/src/CTPUtil.h
@@ -50,6 +50,7 @@ namespace LVL1CTP {
 
       //! extract multiplicities using new trigger configuration interface
       static int getMult( uint64_t word, unsigned int startbit, unsigned int endbit );
+      static int getMult( const std::vector<unsigned int>& words, unsigned int startbit, unsigned int endbit );
 
       //! extract multiplicities from Topo words, were the encoding is different
       static unsigned int getMultTopo( uint64_t word, unsigned int startbit, unsigned int endbit, unsigned int clock );
diff --git a/Trigger/TrigT1/TrigT1Interfaces/CMakeLists.txt b/Trigger/TrigT1/TrigT1Interfaces/CMakeLists.txt
index e7b9dd1baab4..a2c9c39cb23c 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1Interfaces/CMakeLists.txt
@@ -12,8 +12,8 @@ atlas_add_library( TrigT1Interfaces
                    src/*.cxx
                    PUBLIC_HEADERS TrigT1Interfaces
                    INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${XERCESC_LIBRARIES} AthContainers AthenaBaseComps AthenaKernel GaudiKernel
-                   PRIVATE_LINK_LIBRARIES TrigConfL1Data )
+                   LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${XERCESC_LIBRARIES} AthContainers AthenaBaseComps AthenaKernel GaudiKernel TrigT1MuctpiBits
+                   PRIVATE_LINK_LIBRARIES TrigConfL1Data)
 
 atlas_add_dictionary( TrigT1InterfacesDict
                       TrigT1Interfaces/TrigT1InterfacesDict.h
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool/ITrigT1MuonRecRoiTool.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ITrigT1MuonRecRoiTool.h
similarity index 98%
rename from Trigger/TrigT1/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool/ITrigT1MuonRecRoiTool.h
rename to Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ITrigT1MuonRecRoiTool.h
index b706f35fe18e..e2c9ddd1a280 100644
--- a/Trigger/TrigT1/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool/ITrigT1MuonRecRoiTool.h
+++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ITrigT1MuonRecRoiTool.h
@@ -6,7 +6,7 @@
 #define ITRIGT1MUONRECROITOOL_H
 
 #include "GaudiKernel/IAlgTool.h"
-#include "TrigT1MuonRecRoiTool/TrigT1MuonRecRoiData.h"
+#include "TrigT1MuonRecRoiData.h"
 
 namespace LVL1 {
 
diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h
index d67fce5fd8a5..b25aa0904ffb 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h
+++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h
@@ -68,10 +68,14 @@ namespace LVL1MUONIF {
 
 
       const Lvl1MuSectorLogicDataPhase1& getSectorLogicData( size_t systemAddress,
-                                                       size_t subSystemAddress,
-                                                       size_t sectorAddress,
-						       int    bcid=0        ) const;
-
+							     size_t subSystemAddress,
+							     size_t sectorAddress,
+							     int    bcid=0        ) const;
+      std::shared_ptr<Lvl1MuSectorLogicDataPhase1> getSectorLogicDataPtr( size_t systemAddress,
+									  size_t subSystemAddress,
+									  size_t sectorAddress,
+									  int    bcid=0        );
+      
       void setSectorLogicData( const Lvl1MuSectorLogicDataPhase1& data,
                                size_t systemAddress,
                                size_t subSystemAddress,
@@ -126,7 +130,6 @@ namespace LVL1MUONIF {
      typedef std::vector<std::shared_ptr <Lvl1MuSectorLogicDataPhase1> > Lvl1MuVect;
      typedef std::pair<int, Lvl1MuVect>  Lvl1MuVectWithBC; 
      std::vector<Lvl1MuVectWithBC> m_data[ NumberOfMuonSystem ];
-
    }; // class Lvl1MuCTPIInputPhase1
    
    inline size_t Lvl1MuCTPIInputPhase1::idBarrelSystem() { return Barrel; }
diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuSectorLogicDataPhase1.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuSectorLogicDataPhase1.h
index 4e1b7ed66eba..7e0299962235 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuSectorLogicDataPhase1.h
+++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Lvl1MuSectorLogicDataPhase1.h
@@ -54,6 +54,7 @@ namespace LVL1MUONIF {
       int goodmf( size_t id) const { return m_goodmf[ id ]; }
       int innercoin( size_t id) const { return m_innercoin[ id ]; }
       int bw2or3( size_t id) const { return m_bw2or3[ id ]; }
+      int veto( size_t id) const {return m_veto[ id ]; } // veto candidate for multiplicity counting due to overlap removal
 
       void set2candidatesInSector() { m_2candidatesInSector = true; }
       void clear2candidatesInSector() { m_2candidatesInSector = false;}
@@ -67,6 +68,7 @@ namespace LVL1MUONIF {
       void goodmf( size_t id, int value) {m_goodmf[ id ] = value; }
       void innercoin( size_t id, int value) {m_innercoin[ id ] = value; }
       void bw2or3( size_t id, int value) {m_bw2or3[ id ] = value; }
+      void veto( size_t id, int value) {m_veto[ id ] = value; }
 
       void clear();
 
@@ -95,6 +97,7 @@ namespace LVL1MUONIF {
       std::vector<int> m_goodmf; //[m_ncand]
       std::vector<int> m_innercoin; //[m_ncand]
       std::vector<int> m_bw2or3; //[m_ncand]
+      std::vector<int> m_veto; //[m_ncand]
 
    }; // class Lvl1MuSectorLogicDataPhase1
 
diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/MuCTPICTP.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/MuCTPICTP.h
index a1e82a74728a..46314d5ae2a3 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/MuCTPICTP.h
+++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/MuCTPICTP.h
@@ -1,10 +1,12 @@
 // Dear emacs, this is -*- c++ -*-
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 #ifndef TRIGT1INTERFACES_MUCTPICTP_H
 #define TRIGT1INTERFACES_MUCTPICTP_H
 
+#include <vector>
+
 namespace LVL1 {
 
    /**
@@ -23,16 +25,17 @@ namespace LVL1 {
    public:
       /* constructor and destructor */
       MuCTPICTP( unsigned int word = 0 );
+      MuCTPICTP( std::vector<unsigned int> word);
       ~MuCTPICTP();
 
       /**
        * Return the muon data i.e. <code>(xxxxx|thr6|thr5|thr4|thr3|thr2|thr1)</code>
        */
-      unsigned int muCTPIWord() const;
+      std::vector<unsigned int> muCTPIWord() const;
 
    private:
       /// The only data member
-      const unsigned int m_MuCTPICTPWord;
+     std::vector<unsigned int> m_MuCTPICTPWord;
 
    }; // class MuCTPICTP
 
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiData.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TrigT1MuonRecRoiData.h
similarity index 100%
rename from Trigger/TrigT1/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiTool/TrigT1MuonRecRoiData.h
rename to Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TrigT1MuonRecRoiData.h
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/ITrigT1MuonRecRoiTool.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/ITrigT1MuonRecRoiTool.cxx
similarity index 98%
rename from Trigger/TrigT1/TrigT1MuonRecRoiTool/src/ITrigT1MuonRecRoiTool.cxx
rename to Trigger/TrigT1/TrigT1Interfaces/src/ITrigT1MuonRecRoiTool.cxx
index a5e4762ec7ed..3d22cf0b28ce 100644
--- a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/ITrigT1MuonRecRoiTool.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/ITrigT1MuonRecRoiTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1MuonRecRoiTool/ITrigT1MuonRecRoiTool.h"
+#include "TrigT1Interfaces/ITrigT1MuonRecRoiTool.h"
 
 namespace LVL1{
 
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx
index b93409ace6c4..2ae2ab1eba79 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx
@@ -44,10 +44,9 @@ namespace LVL1MUONIF {
 
   /////////////
   const Lvl1MuSectorLogicDataPhase1& Lvl1MuCTPIInputPhase1::getSectorLogicData( size_t systemAddress,
-								    size_t subSystemAddress,
-								    size_t sectorAddress,
-								    int    bcid             ) const {
-
+										size_t subSystemAddress,
+										size_t sectorAddress,
+										int    bcid             ) const {
     static const Lvl1MuBarrelSectorLogicDataPhase1 dummy;
     for( size_t ip=0; ip<m_data[systemAddress].size(); ip++){
       int bc=((m_data[systemAddress]).at(ip)).first;
@@ -58,6 +57,19 @@ namespace LVL1MUONIF {
     return dummy;
   }
 
+  /////////////
+  std::shared_ptr<Lvl1MuSectorLogicDataPhase1> Lvl1MuCTPIInputPhase1::getSectorLogicDataPtr( size_t systemAddress,
+											     size_t subSystemAddress,
+											     size_t sectorAddress,
+											     int    bcid             ) {
+    for( size_t ip=0; ip<m_data[systemAddress].size(); ip++){
+      int bc=((m_data[systemAddress]).at(ip)).first;
+      if (bc != bcid) continue;
+      return m_data[systemAddress].at(ip).second.at(getSystemIndex(systemAddress,subSystemAddress,sectorAddress));
+    }
+    return nullptr;
+  }
+
   /////////////
   void Lvl1MuCTPIInputPhase1::setSectorLogicData( const Lvl1MuSectorLogicDataPhase1& data,
 					    size_t systemAddress,
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuSectorLogicDataPhase1.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuSectorLogicDataPhase1.cxx
index c9d982207685..58a1078fbde7 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuSectorLogicDataPhase1.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuSectorLogicDataPhase1.cxx
@@ -28,6 +28,7 @@ namespace LVL1MUONIF {
     m_goodmf.clear();
     m_innercoin.clear();
     m_bw2or3.clear();
+    m_veto.clear();
   }
 
   void Lvl1MuSectorLogicDataPhase1::initialize()
@@ -44,6 +45,7 @@ namespace LVL1MUONIF {
       m_goodmf.push_back(-1);
       m_innercoin.push_back(-1);
       m_bw2or3.push_back(-1);
+      m_veto.push_back(0);
     }
   }
 
@@ -66,6 +68,7 @@ namespace LVL1MUONIF {
         m_goodmf[ i ] = right.m_goodmf[ i ];
         m_innercoin[ i ] = right.m_innercoin[ i ];
         m_bw2or3[ i ] = right.m_bw2or3[ i ];
+        m_veto[ i ] = right.m_veto[ i ];
       }
     }
     return *this;
@@ -90,6 +93,7 @@ namespace LVL1MUONIF {
       m_goodmf[ i ] = -1;
       m_innercoin[ i ] = -1;
       m_bw2or3[ i ] = -1;
+      m_veto[ i ] = 0;
     }
   }
 
diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/MuCTPICTP.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/MuCTPICTP.cxx
index 094f9e987e87..5731aaf03438 100644
--- a/Trigger/TrigT1/TrigT1Interfaces/src/MuCTPICTP.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/MuCTPICTP.cxx
@@ -7,15 +7,20 @@
 namespace LVL1 {
 
   MuCTPICTP::MuCTPICTP( unsigned int word )
-    : m_MuCTPICTPWord( word ) {
+  {
+    m_MuCTPICTPWord.push_back(word);
+  }
 
+  MuCTPICTP::MuCTPICTP( std::vector<unsigned int> word )
+    : m_MuCTPICTPWord(word)
+  {
   }
 
   MuCTPICTP::~MuCTPICTP() {
 
   }
 
-  unsigned int MuCTPICTP::muCTPIWord() const {
+  std::vector<unsigned int> MuCTPICTP::muCTPIWord() const {
     return m_MuCTPICTPWord;
   }
 
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1MuonRecRoiData.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/TrigT1MuonRecRoiData.cxx
similarity index 96%
rename from Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1MuonRecRoiData.cxx
rename to Trigger/TrigT1/TrigT1Interfaces/src/TrigT1MuonRecRoiData.cxx
index 9e701535b27c..2db017756b02 100644
--- a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1MuonRecRoiData.cxx
+++ b/Trigger/TrigT1/TrigT1Interfaces/src/TrigT1MuonRecRoiData.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TrigT1MuonRecRoiTool/TrigT1MuonRecRoiData.h"
+#include "TrigT1Interfaces/TrigT1MuonRecRoiData.h"
 #include <math.h>  /* M_PI */
 
 namespace LVL1{
diff --git a/Trigger/TrigT1/TrigT1MuctpiBits/CMakeLists.txt b/Trigger/TrigT1/TrigT1MuctpiBits/CMakeLists.txt
new file mode 100644
index 000000000000..6203d37d5397
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1MuctpiBits/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+# Declare the package name.
+atlas_subdir( TrigT1MuctpiBits )
+
+# Component(s) in the package.
+atlas_add_library( TrigT1MuctpiBits
+                   TrigT1MuctpiBits/*.h
+		   INTERFACE
+		   PUBLIC_HEADERS TrigT1MuctpiBits )
diff --git a/Trigger/TrigT1/TrigT1MuctpiBits/TrigT1MuctpiBits/MuCTPI_Bits.h b/Trigger/TrigT1/TrigT1MuctpiBits/TrigT1MuctpiBits/MuCTPI_Bits.h
new file mode 100755
index 000000000000..c5cb9436a02f
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1MuctpiBits/TrigT1MuctpiBits/MuCTPI_Bits.h
@@ -0,0 +1,133 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGT1RESULT_MUCTPI_BITS_H
+#define TRIGT1RESULT_MUCTPI_BITS_H
+
+  /// Binary 111 representing the maximal multiplicity value for a given threshold
+   static constexpr uint32_t MULT_VAL = 7;
+  /// Number of multiplicity bits reserved per threshold
+   static constexpr uint32_t MULT_BITS = 3;
+  /// Defining the number of p<sub>T</sub> thresholds in the system
+   static constexpr uint32_t RUN3_MULT_THRESH_NUM = 32;
+   static constexpr uint32_t MULT_THRESH_NUM = 6;
+  /// Telling that the 3-bit BCID comes at "position 7" in the multiplicity word
+   static constexpr uint32_t RUN3_MULT_BCID_POS = 26;
+   static constexpr uint32_t MULT_BCID_POS = 7;
+
+  /// Mask for the bit showing if more than two muon candidates were in the trigger sector
+   static constexpr uint32_t CAND_OVERFLOW_MASK = 0x1;
+  /// Position of the candidate overflow mask
+   static constexpr uint32_t RUN3_CAND_OVERFLOW_SHIFT = 17;
+   static constexpr uint32_t CAND_OVERFLOW_SHIFT = 0;
+
+  /// Mask for the bit showing if more than one muon candidates were in the sector RoI
+   static constexpr uint32_t ROI_OVERFLOW_MASK = 0x1;
+  /// Position of the RoI overflow mask
+   static constexpr uint32_t RUN3_ROI_OVERFLOW_SHIFT = 13;
+   static constexpr uint32_t ROI_OVERFLOW_SHIFT = 1;
+
+  /// Mask for the full potential ROI word from the data words
+   static constexpr uint32_t ROI_MASK = 0xff; /// new in v2
+  /// Mask for extracting the RoI for barrel candidates from the data words
+   static constexpr uint32_t BARREL_ROI_MASK = 0x1f;
+  /// Mask for extracting the RoI for endcap candidates from the data words
+   static constexpr uint32_t ENDCAP_ROI_MASK = 0xff;
+  /// Mask for extracting the RoI for forward candidates from the data words
+   static constexpr uint32_t FORWARD_ROI_MASK = 0x3f;
+  /// Position of the RoI bits in the data word
+   static constexpr uint32_t RUN3_ROI_SHIFT = 0;
+   static constexpr uint32_t ROI_SHIFT = 2;
+
+//===== Need to double check that the run3 positions are correct for the OL flags=====
+  /// Mask for extracting the overlap bits for barrel candidates from the data words
+   static constexpr uint32_t RUN3_BARREL_OL_MASK = 0x1; // only the phi ovl is used in the run3 format
+   static constexpr uint32_t BARREL_OL_MASK = 0x3;
+  /// Position of the overlap bits in barrel data words
+   static constexpr uint32_t RUN3_BARREL_OL_SHIFT = 12; // this is now part of the 4 "candidate flags" bits
+   static constexpr uint32_t BARREL_OL_SHIFT = 9;
+  /// Mask for extracting the overlap bits for endcap candidates from the data words
+   static constexpr uint32_t ENDCAP_OL_MASK = 0x1;
+  /// Position of the overlap bits in endcap data words
+   //static constexpr uint32_t RUN3_ENDCAP_OL_SHIFT = 8; // 10-2 = 8 // not used in run3 format
+   static constexpr uint32_t ENDCAP_OL_SHIFT = 10;
+
+  /// Mask for extracting the p<sub>T</sub> threshold passed by the candidate from the data word
+   static constexpr uint32_t RUN3_CAND_PT_MASK = 0xf;
+   static constexpr uint32_t CAND_PT_MASK = 0x7;
+  /// Position of the p<sub>T</sub> threshold bits in the data words
+   static constexpr uint32_t RUN3_CAND_PT_SHIFT = 8;
+   static constexpr uint32_t CAND_PT_SHIFT = 11;
+
+/// gone in v2
+//These aren't part of the LVL2 word in run 2, but part of the DAQ word
+  /// Mask for extracting the last 3 bits of the BCID of the muon candidate from the data word
+   static constexpr uint32_t CAND_BCID_MASK = 0x7;
+  /// Position of the BCID bits in the data words
+   static constexpr uint32_t CAND_BCID_SHIFT = 14;
+
+  /// Mask for extracting the address of the muon candidate from the data word
+  /// This is the mask and shift for the full sector address, including the hemisphere as the least significant bit
+   static constexpr uint32_t CAND_SECTOR_ADDRESS_MASK = 0xff;
+  /// Mask for the bit showing which hemisphere the candidate came from.(1: positive; 0: negative)
+   static constexpr uint32_t SECTOR_HEMISPHERE_MASK = 0x1;
+  /// Position of the muon candidate's address in the data word
+   static constexpr uint32_t RUN3_CAND_SECTOR_ADDRESS_SHIFT = 21;
+   static constexpr uint32_t CAND_SECTOR_ADDRESS_SHIFT = 14;//17; 17 is for the DAQ word, not LVL2
+
+//====The shift doesn't correspond to the mask here (the mask corresponds to the SECTOR_ADDRESS_SHIFT above) === 
+  /// Bit in the candidate's address turned on for endcap candidates
+   static constexpr uint32_t ENDCAP_ADDRESS_MASK = 0x80;
+  /// Bit in the candidate's address turned on for forward candidates
+   static constexpr uint32_t FORWARD_ADDRESS_MASK = 0x40;
+   /// Mask for both forward and endcap bits
+   static constexpr uint32_t SUBSYS_ADDRESS_MASK = 0xc0;
+/// Position in the data word of the subsystem bits
+   static constexpr uint32_t RUN3_SUBSYS_ADDRESS_SHIFT = 27;
+   static constexpr uint32_t SUBSYS_ADDRESS_SHIFT = 20;
+
+  /// Mask for extracting the sector ID for endcap candidates from the data word
+   static constexpr uint32_t ENDCAP_SECTORID_MASK = 0x3f;
+  /// Mask for extracting the sector ID for forward candidates from the data word
+   static constexpr uint32_t FORWARD_SECTORID_MASK = 0x1f;
+  /// Mask for extracting the sector ID for barrel candidates from the data word
+   static constexpr uint32_t BARREL_SECTORID_MASK = 0x1f;
+  /// Position of the sector ID itself, which is one bit left of the full sector address
+   static constexpr uint32_t RUN3_CAND_SECTORID_SHIFT = 22;
+   static constexpr uint32_t CAND_SECTORID_SHIFT = 15;
+
+/// gone in v2
+  /// Mask for extracting the bit from the data word showing whether the candidate had the highest p<sub>T</sub> in the sector
+   static constexpr uint32_t CAND_HIGHEST_PT_MASK = 0x1;
+  /// Position of the "highest p<sub>T</sub>" bit
+   static constexpr uint32_t CAND_HIGHEST_PT_SHIFT = 22;
+
+/// gone in v2
+//These aren't part of the LVL2 word in run 2, but part of the DAQ word
+  /// Mask for extracting the bit from the data word showing if the muon candidate was sent to the RoIB
+   static constexpr uint32_t CAND_SENT_ROI_MASK = 0x1;
+  /// Position of the "candidate sent to RoIB" bit.
+   static constexpr uint32_t CAND_SENT_ROI_SHIFT = 26;
+
+  /// Position of the bit turned on for the multiplicity words that distinguishes them from the data words
+   static constexpr uint32_t RUN3_MULT_WORD_FLAG_SHIFT = 31; // is 31 correct? - check with Stefan
+   static constexpr uint32_t MULT_WORD_FLAG_SHIFT = 29;
+
+  /// Position of the bit specifying the candidate's sign
+   static constexpr uint32_t RUN3_CAND_TGC_CHARGE_SIGN_SHIFT = 12;
+   static constexpr uint32_t CAND_TGC_CHARGE_SIGN_SHIFT = 27;
+  /// Position of the bit specifying 3-station coincidence from the big wheel
+   static constexpr uint32_t RUN3_CAND_TGC_BW2OR3_SHIFT = 13;
+  /// Position of the bit specifying coincidence with inner detectors
+   static constexpr uint32_t RUN3_CAND_TGC_INNERCOIN_SHIFT = 14;
+  /// Position of the bit specifying if RoI is in a good b-field region (1=good, 0=bad)
+   static constexpr uint32_t RUN3_CAND_TGC_GOODMF_SHIFT = 15;
+
+  /// Position of the bit specifying if a candidate was vetoed in the multiplicity sum
+   static constexpr uint32_t RUN3_CAND_VETO_SHIFT = 16;
+   static constexpr uint32_t CAND_VETO_SHIFT = 28;
+
+#endif 
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/CMakeLists.txt b/Trigger/TrigT1/TrigT1MuctpiPhase1/CMakeLists.txt
index b6d5d0e6957b..02d2d0637b34 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/CMakeLists.txt
@@ -11,7 +11,12 @@ atlas_add_component( TrigT1MuctpiPhase1
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                     LINK_LIBRARIES AnalysisTriggerEvent AthenaBaseComps CxxUtils GaudiKernel PathResolver StoreGateLib TrigConfInterfaces TrigConfL1Data TrigConfMuctpi TrigT1Interfaces TrigT1Result xAODTrigger )
+                     LINK_LIBRARIES AnalysisTriggerEvent 
+		     AthenaBaseComps CxxUtils GaudiKernel 
+		     PathResolver StoreGateLib TrigConfInterfaces 
+		     TrigConfData TrigConfL1Data TrigConfMuctpi 
+		     TrigT1Interfaces TrigT1Result
+		     xAODTrigger )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MUCTPI_AthTool.h b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MUCTPI_AthTool.h
index 37cd244926c5..2135de4d7ff0 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MUCTPI_AthTool.h
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MUCTPI_AthTool.h
@@ -16,26 +16,15 @@ class description
 #include "TrigT1Interfaces/MuCTPICTP.h"
 #include "TrigT1Interfaces/MuCTPIL1Topo.h"
 
-#include "TrigT1Result/MuCTPI_RDO.h"
 #include "xAODTrigger/MuonRoIContainer.h"
 
-#include "TrigT1MuctpiPhase1/Configuration.h"
-
-#include "TrigConfInterfaces/ILVL1ConfigSvc.h"
-
-//#include "TrigConfL1Data/Run3MuonTriggerThreshold.h"
-#include "TrigConfL1Data/TriggerThresholdValue.h"
-#include "TrigConfL1Data/L1DataDef.h"
-#include "TrigConfL1Data/L1DataBaseclass.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/IIncidentListener.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "StoreGate/DataHandle.h"
 
-namespace TrigConf {
-   class ILVL1ConfigSvc;
-   class TriggerThreshold;
+namespace LVL1 {
+  class ITrigT1MuonRecRoiTool;
 }
 
 namespace LVL1MUCTPIPHASE1 {
@@ -54,6 +43,7 @@ namespace LVL1MUCTPIPHASE1 {
 
     virtual void handle(const Incident&) override;
     virtual StatusCode initialize() override;
+    virtual StatusCode start() override;
     virtual StatusCode execute() override;
 
     virtual StatusCode fillMuCTPIL1Topo(LVL1::MuCTPIL1Topo& l1topoCandidates, int bcidOffset) const override;
@@ -85,8 +75,7 @@ namespace LVL1MUCTPIPHASE1 {
 
     SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyRPC{this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"};
     SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyTGC{this, "MuctpiPhase1LocationTGC", "L1MuctpiStoreTGC", "Location of muctpiPhase1 for Tgc"};
-    SG::ReadHandleKey<MuCTPI_RDO> m_MuCTPI_RDOReadKey{this, "MUCTPI_RDOReadKey", "MUCTPI_RDO", "Location of MuCTPI_RDO"};
-    SG::WriteHandleKey<MuCTPI_RDO> m_MuCTPI_RDOWriteKey{this, "MUCTPI_RDOWriteKey", "MUCTPI_RDO", "Location of MuCTPI_RDO"};
+    SG::WriteHandleKey<LVL1::MuCTPICTP> m_MuCTPICTPWriteKey{this, "MuCTPICTPLocation", "MuCTPICTP", "Location of MuCTPICTP"};
     SG::WriteHandleKey<xAOD::MuonRoIContainer> m_MuCTPI_xAODWriteKey{this, "MUCTPI_xAODLocation", "LVL1MuonRoIs", "Location of xAOD::MuonRoIContainer"};
     SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey;
     SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_m2;
@@ -94,6 +83,8 @@ namespace LVL1MUCTPIPHASE1 {
     SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_p1;
     SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_p2;
 
+
+
     // These properties control how the multiplicity summation happens:
     std::string m_multiplicityStrategyName;
     std::string m_multiplicityXMLFile;
@@ -116,8 +107,12 @@ namespace LVL1MUCTPIPHASE1 {
     static const std::string m_DEFAULT_roibLocation;
     static const std::string m_DEFAULT_geometryXMLFile;
     
-    ServiceHandle< TrigConf::ILVL1ConfigSvc > m_configSvc;
+    ServiceHandle<StoreGateSvc> m_detStore { this, "DetectorStore", "StoreGateSvc/DetectorStore", "Detector store to get the menu" };
+
     SimController* m_theMuctpi;
+    ToolHandle<LVL1::ITrigT1MuonRecRoiTool> m_rpcTool;
+    ToolHandle<LVL1::ITrigT1MuonRecRoiTool> m_tgcTool;
+
 
     /// Function pointer to the execute function we want to use:
     StatusCode ( LVL1MUCTPIPHASE1::MUCTPI_AthTool::*m_executeFunction )( void );
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MuonSectorProcessor.h b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MuonSectorProcessor.h
index 97f675dba836..6090650ae489 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MuonSectorProcessor.h
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/MuonSectorProcessor.h
@@ -20,6 +20,8 @@ namespace LVL1 {
 }
 
 namespace LVL1MUCTPIPHASE1 {
+  class OverlapHelper;
+
   class ROIObject
   {
   public:
@@ -38,12 +40,13 @@ namespace LVL1MUCTPIPHASE1 {
     
   public:
     
-    MuonSectorProcessor(int subSystem);
+    MuonSectorProcessor(bool side /*1=A,0=C*/);
     ~MuonSectorProcessor();
     
-    void configure(const std::string& xmlName);
+    void configureTopo(const std::string& xmlName);
+    void configureOverlapRemoval(const std::string& lutFile);
     void setInput(LVL1MUONIF::Lvl1MuCTPIInputPhase1* input);
-    void removeOverlap();
+    void runOverlapRemoval();
     void makeTriggerObjectSelections();
     void makeL1TopoData();
     LVL1::MuCTPIL1Topo getL1TopoData(int bcidOffset);
@@ -54,6 +57,8 @@ namespace LVL1MUCTPIPHASE1 {
     LVL1MUONIF::Lvl1MuCTPIInputPhase1* m_muctpiInput;
     LVL1::MuCTPIL1Topo* m_l1topo;
     std::map<std::string, std::map<unsigned int, ROIObject> > m_roiConfig;
+    OverlapHelper* m_overlapHelper;
+    bool m_side;
   };
 }
 
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/SimController.h b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/SimController.h
index fb2628291302..aedc20152c2b 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/SimController.h
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/SimController.h
@@ -34,18 +34,13 @@ namespace LVL1MUCTPIPHASE1 {
     SimController();
     ~SimController();
 
-    void configureMSP(const std::string& xmlName);
+    void configureTopo(const std::string& geoFile);
+    void configureOverlapRemoval(const std::string& lutFile);
 
     void processData(LVL1MUONIF::Lvl1MuCTPIInputPhase1* input, int bcid=0);
     void setConfiguration( const Configuration& conf );
 
-    const std::vector<unsigned int>& getCTPData();
     LVL1::MuCTPIL1Topo getL1TopoData(int bcidOffset);
-    const std::vector<unsigned int>& getDAQData();
-    std::list< unsigned int > getRoIBData();
-
-    bool hasBarrelCandidate();
-    bool hasEndcapCandidate();
 
     TriggerProcessor* getTriggerProcessor();
 
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/TriggerProcessor.h b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/TriggerProcessor.h
index 984f9acea26e..3a440d57e7eb 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/TriggerProcessor.h
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/TriggerProcessor.h
@@ -8,9 +8,12 @@
 
 #include <vector>
 #include <list>
+#include <map>
+#include <string>
+#include <utility>
 
 namespace TrigConf {
-  class TriggerThreshold;
+  class L1Menu;
 }
 
 namespace LVL1MUONIF {
@@ -27,20 +30,26 @@ namespace LVL1MUCTPIPHASE1 {
     TriggerProcessor();
     ~TriggerProcessor();
 
-    void setThresholds(const std::vector<TrigConf::TriggerThreshold*>& thresholds);
+    void setMenu(const TrigConf::L1Menu* l1menu);
     void mergeInputs(std::vector<LVL1MUONIF::Lvl1MuCTPIInputPhase1*> inputs);
     void computeMultiplicities(int bcid);
     void makeTopoSelections();
     const std::vector<unsigned int>& getCTPData();
-    const std::vector<unsigned int>& getDAQData();
+
+    //subsystem - daq word pairs
+    const std::vector<std::pair<int, unsigned int> >& getDAQData();
 
   private:
 
+    std::vector<std::string> parseString(std::string str, std::string sep);
+
     std::vector<unsigned int> m_ctp_words;
-    std::vector<unsigned int> m_daq_data;
+    std::vector<std::pair<int, unsigned int> > m_daq_data;
 
     LVL1MUONIF::Lvl1MuCTPIInputPhase1* m_mergedInputs;
-    std::vector<TrigConf::TriggerThreshold*> m_thresholds;
+    const TrigConf::L1Menu* m_l1menu;
+
+    std::map<std::string, std::vector<std::vector<std::string> > > m_parsed_tgcFlags;
   };
 }
 
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/python/TrigT1MuctpiPhase1Config.py b/Trigger/TrigT1/TrigT1MuctpiPhase1/python/TrigT1MuctpiPhase1Config.py
index b83cd57f1113..f7e450941308 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/python/TrigT1MuctpiPhase1Config.py
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/python/TrigT1MuctpiPhase1Config.py
@@ -62,7 +62,7 @@ class L1MuctpiPhase1_on_Data( DefaultL1MuctpiPhase1 ):
     self.RoIOutputLocID = "not_used_1"
     self.CTPOutputLocID = "/Run/L1MuCTPItoCTPLocation"
     self.OverlapStrategyName = "LUT"
-    self.LUTXMLFile = "TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002_modifiedBB_crc_3385316356.xml"
+    self.LUTXMLFile = "TrigConfMuctpi/overlapRun3_20201214.xml"
     self.IsData=1
     self.FlaggingMode = False
 
@@ -106,45 +106,18 @@ class DefaultL1MuctpiPhase1Tool( LVL1MUCTPIPHASE1__MUCTPI_AthTool ):
     # Set properties of the LUT overlap handling:
     self.OverlapStrategyName = "LUT"
     self.DumpLUT = False
-    self.LUTXMLFile = "UNDEFINED"
-    self.RunPeriod = "UNDEFINED"
     self.FlaggingMode = False
     self.MultiplicityStrategyName = "INCLUSIVE"
     self.GeometryXMLFile = "TrigConfMuctpi/L1MuonGeometry_20200629.xml"
 
     # Decide which LUT to use, based on which run we are simulating:
-    from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags
-    from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags
-    if ( commonGeoFlags.Run() == "RUN1" ) or ( ( commonGeoFlags.Run() == "UNDEFINED" ) and
-                                               ( geoFlags.isIBL() is False ) ):
-      self.LUTXMLFile = "TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002.xml"
-      self.RunPeriod = "RUN1"
-      logger.info( "Configuring MuCTPI simulation with Run 1 configuration file:" )
-      logger.info( "  TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002.xml" )
-      logger.info( "  with a RunPeriod=RUN1" )
-    elif ( commonGeoFlags.Run() == "RUN2" ) or ( ( commonGeoFlags.Run() == "UNDEFINED" ) and
-                                                 ( geoFlags.isIBL() is True ) ):
-      self.LUTXMLFile = "TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002_modifiedBB.xml"
-      self.RunPeriod = "RUN2"
-      logger.info( "Configuring MuCTPI simulation with Run 2 configuration file:" )
-      logger.info( "  TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002_modifiedBB.xml" )
-      logger.info( "  with a RunPeriod=RUN2" )
-    else:
-      self.LUTXMLFile = "TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002_modifiedBB.xml"
-      self.RunPeriod = "RUN2"
-      logger.warning( "Couldn't determine which run to simulate, using Run 2 configuration file:" )
-      logger.warning( "  TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002_modifiedBB.xml" )
-      logger.warning( "  with a RunPeriod=RUN2" )
-
-      pass
-
-
-    # Turn on the NIM output creation by default:
-    self.DoNIMOutput = True
-    # The bit settings were extracted from here:
-    #   https://savannah.cern.ch/bugs/?90300#comment14
-    self.NIMBarrelBit = 29
-    self.NIMEndcapBit = 30
+    #from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags
+    #from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags
+    self.LUTXMLFile = "TrigConfMuctpi/overlapRun3_20201214.xml"
+    self.RunPeriod  = "RUN3"
+    logger.info( "Configuring MuCTPI simulation with " + self.RunPeriod +" configuration file:" )
+    logger.info( "  "+self.LUTXMLFile )
+    logger.info( "  with a RunPeriod=" + self.RunPeriod )
 
 
 class L1MuctpiPhase1Tool( DefaultL1MuctpiPhase1Tool ):
@@ -194,7 +167,7 @@ class L1MuctpiPhase1Tool_on_Data( DefaultL1MuctpiPhase1Tool ):
     self.RoIOutputLocID = "not_used_1"
     self.CTPOutputLocID = "/Run/L1MuCTPItoCTPLocation"
     self.OverlapStrategyName = "LUT"
-    self.LUTXMLFile = "TrigConfMuctpi/data10_7TeV.periodI.physics_Muons.MuCTPI_LUT.NoBEOverlaps_composedEF.v002_modifiedBB_crc_3385316356.xml"
+    self.LUTXMLFile = "TrigConfMuctpi/overlapRun3_20201214.xml"
     self.IsData=1
     self.FlaggingMode = False
 
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MUCTPI_AthTool.cxx b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MUCTPI_AthTool.cxx
index 569cfea8c2ff..b29da504279b 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MUCTPI_AthTool.cxx
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MUCTPI_AthTool.cxx
@@ -14,11 +14,7 @@
 // Headers from external packages.
 
 // The new trigger configuration
-#include "TrigConfInterfaces/ILVL1ConfigSvc.h"
-#include "TrigConfL1Data/Muctpi.h"
-#include "TrigConfL1Data/ThresholdConfig.h"
-#include "TrigConfL1Data/TriggerThreshold.h"
-#include "TrigConfL1Data/L1DataDef.h"
+#include "TrigConfData/L1Menu.h"
 
 // Interfaces used by the simulation
 #include "TrigT1Interfaces/MuCTPICTP.h"
@@ -28,10 +24,10 @@
 #include "TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h"
 #include "TrigT1Interfaces/MuCTPIL1Topo.h"
 
-#include "TrigT1Result/MuCTPI_RDO.h"
 #include "TrigT1Result/MuCTPIRoI.h"
 #include "xAODTrigger/MuonRoI.h"
 #include "xAODTrigger/MuonRoIAuxContainer.h"
+#include "TrigT1Interfaces/ITrigT1MuonRecRoiTool.h"
 
 #include "AnalysisTriggerEvent/LVL1_ROI.h"
 
@@ -54,9 +50,9 @@ namespace LVL1MUCTPIPHASE1 {
     :
     base_class(type, name, parent),
     m_MuCTPIL1TopoKey(LVL1MUCTPI::DEFAULT_MuonL1TopoLocation),
-    m_MuCTPIL1TopoKey_p1(""),
-    m_configSvc( "TrigConf::TrigConfigSvc/TrigConfigSvc", name ),
-    m_theMuctpi(new SimController())
+    m_theMuctpi(new SimController()),
+    m_rpcTool("LVL1::TrigT1RPCRecRoiTool/LVL1__TrigT1RPCRecRoiTool"),
+    m_tgcTool("LVL1::TrigT1TGCRecRoiTool/LVL1__TrigT1TGCRecRoiTool")
   {
     
     // Init message
@@ -64,9 +60,6 @@ namespace LVL1MUCTPIPHASE1 {
     ATH_MSG_INFO( "Constructor for Phase1 MUCTPI_AthTool."  );
     ATH_MSG_INFO( "=======================================" );
 
-    // Declare the service handles as properties:
-    declareProperty( "LVL1ConfigSvc", m_configSvc, "LVL1 Config Service" );
-
     // Declare the properties of the overlap treatment:
     declareProperty( "OverlapStrategyName", m_overlapStrategyName = "NULL" );
     declareProperty( "LUTXMLFile", m_lutXMLFile = "" );
@@ -91,6 +84,9 @@ namespace LVL1MUCTPIPHASE1 {
     declareProperty( "TGCLocID", m_tgcLocId = m_DEFAULT_L1MuctpiStoreLocationTGC );
     declareProperty( "RPCLocID", m_rpcLocId = m_DEFAULT_L1MuctpiStoreLocationRPC );
    
+    // Declare the MuonRecRoiTools
+    declareProperty( "RPCRecRoiTool", m_rpcTool, "Tool to get the eta/phi coordinates in the RPC");
+    declareProperty( "TGCRecRoiTool", m_tgcTool, "Tool to get the eta/phi coordinates in the TGC");
   }
   
   MUCTPI_AthTool::~MUCTPI_AthTool()
@@ -140,15 +136,10 @@ namespace LVL1MUCTPIPHASE1 {
       return StatusCode::FAILURE;
 
     }
-    ATH_MSG_INFO( "Retrieving trigger config service" << m_configSvc );
-    CHECK(m_configSvc.retrieve());
 
     //initialize MSP ROI configuration
     const std::string fullFileName = PathResolverFindCalibFile( m_geometryXMLFile );
-    m_theMuctpi->configureMSP(fullFileName);
-
-    m_theMuctpi->getTriggerProcessor()->setThresholds(m_configSvc->thresholdConfig()->getThresholdVector(TrigConf::L1DataDef::MUON));
-    //m_theMuctpi->getTriggerProcessor()->setThresholds(m_configSvc->muctpiConfig()->thresholds()); // maybe better to switch to this once new config is implemented
+    m_theMuctpi->configureTopo(fullFileName);
 
     //                                                                                                                                                                                        
     // Set up the overlap handling of the simulation:                                                                                                                                         
@@ -157,12 +148,10 @@ namespace LVL1MUCTPIPHASE1 {
     if( m_overlapStrategyName == "NULL" ) {
 
       ATH_MSG_DEBUG( "Setting overlap strategy: \"NULL\"" );
-      //m_theMuctpi->setOverlapStrategy( NO_OVERLAP ); // overlap removal to be implemented later
 
     } else if( m_overlapStrategyName == "LUT" ) {
 
       ATH_MSG_DEBUG( "Setting overlap strategy: \"LUT\"" );
-      //m_theMuctpi->setOverlapStrategy( LUT_OVERLAP ); // overlap removal to be implemented later
 
       if( m_flagMode ) {
 	ATH_MSG_INFO( "Using 'flagging mode' in the overlap handling" );
@@ -171,8 +160,8 @@ namespace LVL1MUCTPIPHASE1 {
       ATH_MSG_INFO( "XML LUT file defined in jobO: " << m_lutXMLFile << " with a RunPeriod=" << m_runPeriod );
       const std::string fullFileName = PathResolverFindCalibFile( m_lutXMLFile );
       ATH_MSG_DEBUG( "Full path to XML LUT file: " << fullFileName );
-      //CHECK( m_theMuctpi->initializeLUTOverlapStrategy( fullFileName, m_flagMode,
-      //                                                        m_dumpLut, m_runPeriod ) ); // overlap removal to be implemented later
+
+      m_theMuctpi->configureOverlapRemoval(fullFileName);
 
     } else {
 
@@ -188,8 +177,7 @@ namespace LVL1MUCTPIPHASE1 {
     //Initialize Read/WriteHandleKeys
     ATH_CHECK(m_muctpiPhase1KeyRPC.initialize());
     ATH_CHECK(m_muctpiPhase1KeyTGC.initialize());
-    ATH_CHECK(m_MuCTPI_RDOReadKey.initialize(m_inputSource == "RDO"));
-    ATH_CHECK(m_MuCTPI_RDOWriteKey.initialize(m_inputSource != "RDO"));
+    ATH_CHECK(m_MuCTPICTPWriteKey.initialize());
     ATH_CHECK(m_MuCTPI_xAODWriteKey.initialize());
     ATH_CHECK(m_MuCTPIL1TopoKey.initialize());
 
@@ -202,11 +190,26 @@ namespace LVL1MUCTPIPHASE1 {
     m_MuCTPIL1TopoKey_p2 = m_MuCTPIL1TopoKey.key()+std::to_string(2);
     ATH_CHECK(m_MuCTPIL1TopoKey_p2.initialize());
 
+    CHECK( m_rpcTool.retrieve() );
+    CHECK( m_tgcTool.retrieve() );
 
     return StatusCode::SUCCESS;
   }
 
+  StatusCode MUCTPI_AthTool::start()
+  {
+    ATH_MSG_INFO( "=======================================" );
+    ATH_MSG_INFO( "Start for Phase1 MUCTPI_AthTool"  );
+    ATH_MSG_INFO( "=======================================" );
+
 
+    ATH_MSG_INFO( "initialize(): use L1 trigger menu from detector store" );
+    const TrigConf::L1Menu * l1menu = nullptr;
+    ATH_CHECK( m_detStore->retrieve(l1menu) ); 
+    m_theMuctpi->getTriggerProcessor()->setMenu(l1menu);
+
+    return StatusCode::SUCCESS;
+  }
 
   //----------------------------------------------
   // execute() method called once per event
@@ -394,15 +397,12 @@ namespace LVL1MUCTPIPHASE1 {
     /// the standart processing is done for the central slice, with no Bcid offset
     if (bcidOffset == 0 ) {
       // store CTP result in interface object and put to StoreGate
-      std::vector<unsigned int> ctpData = m_theMuctpi->getCTPData();
-    //TEMPORARILY REMOVED UNTIL MUCTPICTP UPDATED TO VECTOR!
-      //LVL1::MuCTPICTP* theCTPResult = new LVL1::MuCTPICTP( ctpData );
-      //CHECK( evtStore()->record( theCTPResult, m_ctpOutputLocId ) );
-      //ATH_MSG_DEBUG( "CTP word recorded to StoreGate with key: "
-      //               << m_ctpOutputLocId );
+      const std::vector<unsigned int>& ctpData = m_theMuctpi->getTriggerProcessor()->getCTPData();
 
-      // create MuCTPI RDO
-      const std::vector<unsigned int>& daqData = m_theMuctpi->getDAQData();
+      LVL1::MuCTPICTP* theCTPResult = new LVL1::MuCTPICTP( ctpData );
+      SG::WriteHandle<LVL1::MuCTPICTP> wh_muctpi_ctp(m_MuCTPICTPWriteKey);
+      ATH_CHECK(wh_muctpi_ctp.record(std::make_unique<LVL1::MuCTPICTP>(*theCTPResult)));
+      ATH_MSG_DEBUG( "CTP word recorded to StoreGate" );
 
       // size check
       // check that the multiplicity was properly filled
@@ -413,23 +413,21 @@ namespace LVL1MUCTPIPHASE1 {
 	return StatusCode::FAILURE;
       }
 
-      // data word
-      std::vector<unsigned int> dataWords= daqData;
-
       // create MuCTPI RDO
-      auto muCTPI_RDO = std::make_unique< MuCTPI_RDO >( std::move(ctpData), std::move(dataWords) );
-      SG::WriteHandle<MuCTPI_RDO> wh_muctpi_rdo(m_MuCTPI_RDOWriteKey);
-      ATH_CHECK(wh_muctpi_rdo.record(std::move(muCTPI_RDO)));
-      ATH_MSG_DEBUG( "MuCTPI_RDO object recorded to StoreGate");
+      const std::vector<std::pair<int, unsigned int> >& daqData = m_theMuctpi->getTriggerProcessor()->getDAQData();
 
       // create MuCTPI xAOD
       auto xAODRoIs = SG::makeHandle(m_MuCTPI_xAODWriteKey);
       ATH_CHECK(xAODRoIs.record(std::make_unique<xAOD::MuonRoIContainer>(), std::make_unique<xAOD::MuonRoIAuxContainer>()));
       ATH_MSG_DEBUG("Recorded MuonRoIContainer with key " << m_MuCTPI_xAODWriteKey.key());
-      for (const unsigned int word : daqData) {
+      for (std::pair<int, unsigned int> word : daqData) {
         xAODRoIs->push_back(new xAOD::MuonRoI);
-        // RB: dummy values just to have the objects for downstream code development
-        xAODRoIs->back()->initialize(word, 99, 99, "DummyThreshold", 99);
+
+	LVL1::TrigT1MuonRecRoiData roiData;
+	if (word.first == 0) roiData = m_rpcTool->roiData(word.second); // barrel
+	else roiData = m_tgcTool->roiData(word.second); // endcap/forward
+
+        xAODRoIs->back()->initialize(word.second, roiData.eta(), roiData.phi(), "DummyThreshold", 99);
       }
 
       // get outputs for L1Topo and store into Storegate
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx
index 09342a8a8103..d1e9ee101cd5 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/MuonSectorProcessor.cxx
@@ -5,7 +5,6 @@
 // First the corresponding header.
 #include "TrigT1MuctpiPhase1/MuonSectorProcessor.h"
 
-
 // The headers from other ATLAS packages,
 // from most to least dependent.
 #include "TrigT1Interfaces/Lvl1MuCTPIInputPhase1.h"
@@ -20,24 +19,222 @@
 // System headers.
 #include <string>
 #include <sstream>
+#include <iostream>
+#include <map>
+#include <set>
+#include <array>
+#include <vector>
+
 
 using boost::property_tree::ptree;
 
-namespace LVL1MUCTPIPHASE1 {
-  MuonSectorProcessor::MuonSectorProcessor(int /*subSystem*/)
+namespace LVL1MUCTPIPHASE1 { 
+  struct SectorNumberConverter {
+    
+    std::pair<int,int> barrel_global2local(int sector){
+      auto inoct_sector = ((sector + 2) % 4);
+      auto mioct_number = ((sector + 2) / 4) % 8;
+      return std::make_pair(inoct_sector,mioct_number);
+    }
+    
+    int barrel_local2global(int number,int mioct){
+      return ((30 + 4 * mioct)  + number) % 32;
+    }
+    
+    std::pair<int,int>  endcap_global2local(int sector){
+      auto inoct_sector = ((sector + 1) % 6);
+      auto mioct_number = ((sector + 1) / 6) % 8;
+      return std::make_pair(inoct_sector,mioct_number);
+      
+    }
+    
+    int endcap_local2global(int number,int mioct){
+      return ((47 + 6 * mioct)  + number) % 48;
+    }
+    std::pair<int,int> forward_global2local(int sector){
+      auto inoct_sector = (sector % 3);
+      auto mioct_number = (sector / 3) % 8;
+      return std::make_pair(inoct_sector,mioct_number);
+      
+    }
+    
+    int forward_local2global(int number,int mioct){
+      return ((0 + 3 * mioct)  + number) % 24;
+    }
+  };
+
+  struct OverlapHelper
+  {
+    int active_side = -1;
+    std::string sub_left="";
+    std::string sub_right="";
+    int sec_left = -1;
+    int sec_right = -1;
+    std::map<int,std::set<std::string> > global_pairs;
+    
+    std::array<std::map<std::string,std::vector<std::string>>,2> lhs_index;
+    std::array<std::map<std::string,std::vector<std::string>>,2> rhs_index;
+    
+    std::string make_key(std::string prefix, int global_sec, int roi){
+      prefix += std::to_string(global_sec) + "_" + std::to_string(roi);
+      return prefix;
+    }
+    
+    std::string make_pair(std::string lhs, std::string rhs){
+      return lhs + ":" + rhs;
+    }
+
+
+    void create_indices(){
+      for(auto side_regions : global_pairs ){
+	for(auto region : side_regions.second){
+	  auto split = region.find(':');
+	  auto left = region.substr(0,split);
+	  auto right = region.substr(split+1,std::string::npos);
+	  lhs_index[side_regions.first][left].push_back(right);
+	  rhs_index[side_regions.first][right].push_back(left);
+	}
+      }
+    }
+    
+    std::vector<std::string> get_lhs_keys(std::string dettype, int roi, int sector){
+      std::vector<std::string>  r;
+      r.push_back(dettype + std::to_string(sector) + "_" + std::to_string(roi));
+      return r;   
+    }
+    
+    std::vector<std::string> get_rhs_keys(std::string dettype, int roi, int sector){
+      std::vector<std::string>  r;
+      r.push_back(dettype + std::to_string(sector) + "_" + std::to_string(roi));
+      return r;   
+    }
+    
+    std::vector<std::string> relevant_regions(int side, const std::string& dettype, int roi, int sector){
+      std::vector<std::string>  r;
+      for(auto key : get_lhs_keys(dettype,roi,sector)){
+	auto x = lhs_index[side].find(key);
+	if(x != lhs_index[side].end()){
+	  for(auto rr : lhs_index[side][key]){
+	    r.push_back(make_pair(key,rr));
+	  }
+	}
+      }
+      for(auto key : get_rhs_keys(dettype,roi,sector)){
+	auto x = rhs_index[side].find(key);
+	if(x != rhs_index[side].end()){
+	  for(auto rr : rhs_index[side][key]){
+	    r.push_back(make_pair(rr,key));
+	  }
+	}
+      }
+      return r;
+    }
+
+    void configure(const std::string& lutFile)
+    {
+      ptree inputTree;
+      read_xml(lutFile, inputTree);
+      
+      boost::property_tree::ptree topEle = inputTree.get_child("MUCTPI_LUT");
+      
+      // iterate through elements of the XML
+      for(const boost::property_tree::ptree::value_type &x: topEle) {
+	
+	std::string topElementName = x.first;
+	ptree lut = x.second;
+	
+	
+	if (topElementName != "LUT") continue;
+
+	std::string SectorId1 = MuctpiXMLHelper::getAttribute(lut,"SectorId1");
+	std::string SectorId2 = MuctpiXMLHelper::getAttribute(lut,"SectorId2");
+	
+	unsigned left_mod = 32;
+	unsigned right_mod = 32;
+	if (SectorId1[0] == 'E') left_mod = 48;
+	if (SectorId1[0] == 'F') left_mod = 24;
+	if (SectorId2[0] == 'E') right_mod = 48;
+	if (SectorId2[0] == 'F') right_mod = 24;
+	
+	std::string snum_left = std::string(1,SectorId1[1])+std::string(1,SectorId1[2]);
+	sub_left = std::string(1,SectorId1[0]);
+	sec_left = std::stoi(snum_left) % left_mod;
+	
+	std::string snum_right = std::string(1,SectorId2[1])+std::string(1,SectorId2[2]);
+	sub_right = std::string(1,SectorId2[0]);
+	sec_right = std::stoi(snum_right) % right_mod;
+	
+	std::string side = MuctpiXMLHelper::getAttribute(lut,"Side");
+	if (side == "C") active_side = 0;
+	else active_side = 1;
+	
+	for(const boost::property_tree::ptree::value_type &z: lut) {
+	  std::string menuElementName = z.first;
+	  ptree ele = z.second;
+	  
+	  if (std::string("BBElement").compare(menuElementName) == 0){
+	    auto roi1 = MuctpiXMLHelper::getIntAttribute(ele, "RoI1");
+	    auto roi2 = MuctpiXMLHelper::getIntAttribute(ele, "RoI2");
+	    auto lhs_key = make_key("B",sec_left,roi1);
+	    auto rhs_key = make_key("B",sec_right,roi2);
+	    auto region = make_pair(lhs_key,rhs_key);
+	    global_pairs[active_side].insert(region);
+	  }
+	  else if (std::string("BEElement").compare(menuElementName) == 0){
+	    auto roi1 = MuctpiXMLHelper::getIntAttribute(ele, "BRoI");
+	    auto roi2 = MuctpiXMLHelper::getIntAttribute(ele, "ERoI");
+	    auto lhs_key = make_key("B",sec_left,roi1);
+	    auto rhs_key = make_key("E",sec_right,roi2);
+	    auto region = make_pair(lhs_key,rhs_key);
+	    global_pairs[active_side].insert(region);
+	  }
+	  else if (std::string("EEElement").compare(menuElementName) == 0){
+	    auto roi1 = MuctpiXMLHelper::getIntAttribute(ele, "RoI1");
+	    auto roi2 = MuctpiXMLHelper::getIntAttribute(ele, "RoI2");
+	    auto lhs_key = make_key("E",sec_left,roi1);
+	    auto rhs_key = make_key("E",sec_right,roi2);
+	    auto region = make_pair(lhs_key,rhs_key);
+	    global_pairs[active_side].insert(region);
+	  }
+	  else if (std::string("EFElement").compare(menuElementName) == 0){
+	    auto roi1 = MuctpiXMLHelper::getIntAttribute(ele, "ERoI");
+	    auto roi2 = MuctpiXMLHelper::getIntAttribute(ele, "FRoI");
+	    auto lhs_key = make_key("E",sec_left,roi1);
+	    auto rhs_key = make_key("F",sec_right,roi2);
+	    auto region = make_pair(lhs_key,rhs_key);
+	    global_pairs[active_side].insert(region);
+	  }
+	  else if (std::string("FFElement").compare(menuElementName) == 0){
+	    auto roi1 = MuctpiXMLHelper::getIntAttribute(ele, "RoI1");
+	    auto roi2 = MuctpiXMLHelper::getIntAttribute(ele, "RoI2");
+	    auto lhs_key = make_key("F",sec_left,roi1);
+	    auto rhs_key = make_key("F",sec_right,roi2);
+	    auto region = make_pair(lhs_key,rhs_key);
+	    global_pairs[active_side].insert(region);
+	  }
+	}
+      }
+      create_indices();
+    }
+  };
+  
+
+  MuonSectorProcessor::MuonSectorProcessor(bool side)
     :
     m_muctpiInput(nullptr),
-    m_l1topo(nullptr)
+    m_l1topo(nullptr),
+    m_overlapHelper(new OverlapHelper),
+    m_side(side)
   {
     
   }
   
   MuonSectorProcessor::~MuonSectorProcessor()
   {
-    
+    delete m_overlapHelper;
   }
 
-  void MuonSectorProcessor::configure(const std::string& xmlName)
+  void MuonSectorProcessor::configureTopo(const std::string& xmlName)
   {
     ptree inputTree;
     read_xml(xmlName, inputTree);
@@ -79,15 +276,66 @@ namespace LVL1MUCTPIPHASE1 {
       }
     }
   }
+
+  void MuonSectorProcessor::configureOverlapRemoval(const std::string& lutFile)
+  {
+    m_overlapHelper->configure(lutFile);
+  }
   
   void MuonSectorProcessor::setInput(LVL1MUONIF::Lvl1MuCTPIInputPhase1* input)
   {
     m_muctpiInput=input;
   }
   
-  void MuonSectorProcessor::removeOverlap()
+  void MuonSectorProcessor::runOverlapRemoval()
   {
+    std::map<std::string,std::vector<std::pair<std::shared_ptr<LVL1MUONIF::Lvl1MuSectorLogicDataPhase1>, unsigned> > > buckets;
+
+    for (size_t isys=0;isys<LVL1MUONIF::Lvl1MuCTPIInputPhase1::numberOfSystems();isys++)
+    {
+      // Sectors per system
+      LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSystem system = static_cast<LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSystem>(isys);
+      for (size_t isec=0;isec<LVL1MUONIF::Lvl1MuCTPIInputPhase1::numberOfSector(system);isec++)
+      {
+	// A+C sides
+	for (size_t isub=0;isub<2;isub++)
+	{
+	  if (isub != size_t(m_side)) continue;
+	  unsigned int bcid=0;//temporary
+
+	  //get a pointer to this since we'll need to modify the 'veto' flag of the SL data
+	  std::shared_ptr<LVL1MUONIF::Lvl1MuSectorLogicDataPhase1> sectorData = m_muctpiInput->getSectorLogicDataPtr(isys, isub, isec, bcid);
+	  if (!sectorData) continue;
+	  
+	  for (unsigned int icand=0;icand<LVL1MUONIF::NCAND[isys];icand++)
+	  {
+	    //build the sector name
+	    std::string sectorName="";
+	    if (isys == 0) sectorName="B";
+	    else if (isys == 1) sectorName="E";
+	    else if (isys == 2) sectorName="F";
+	    
+	    int roiID = sectorData->roi(icand);
+	    if (roiID < 0) continue;
+	    int ptword = sectorData->pt(icand);
+	    if (ptword < 0) continue;
+
+	    for(auto rr : m_overlapHelper->relevant_regions(m_side,sectorName,roiID,isec))
+	    {
+	      buckets[rr].push_back(std::make_pair(sectorData, icand));
+	    }
+	  }
+	}
+      }
+    }
 
+    for(auto candidate_vector : buckets){ // loop over candidates in OL region pair
+      //for each candidate above the first, mark them as overlapping
+      for (unsigned i=1;i<candidate_vector.second.size();i++)
+      {
+	candidate_vector.second[i].first->veto(candidate_vector.second[i].second, 1);
+      }
+    }
   }
   
   void MuonSectorProcessor::makeTriggerObjectSelections()
@@ -109,6 +357,7 @@ namespace LVL1MUCTPIPHASE1 {
 	// A+C sides
 	for (size_t isub=0;isub<2;isub++)
 	{
+	  if (isub != size_t(m_side)) continue;
 	  unsigned int bcid=0;//temporary
 	  const LVL1MUONIF::Lvl1MuSectorLogicDataPhase1* sectorData = &m_muctpiInput->getSectorLogicData(isys, isub, isec, bcid);
 	  if (!sectorData)
@@ -124,7 +373,7 @@ namespace LVL1MUCTPIPHASE1 {
 	    else if (isys == 1) sectorName<<"E";
 	    else if (isys == 2) sectorName<<"F";
 	    
-	    LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem side = static_cast<LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem>(isec);
+	    LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem side = static_cast<LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem>(isub);
 	    if (isys == 0)
 	    {
 	      int sectorNumber=isec;
@@ -149,6 +398,8 @@ namespace LVL1MUCTPIPHASE1 {
 
 	    int roiID = sectorData->roi(icand);
 	    if (roiID < 0) continue;
+	    int ptword = sectorData->pt(icand);
+	    if (ptword < 0) continue;
 
 	    //find the ROI object
 	    std::map<unsigned int, ROIObject>::iterator roiItr = secItr->second.find(roiID);
@@ -159,7 +410,6 @@ namespace LVL1MUCTPIPHASE1 {
 
 	    
 
-	    //unsigned int bcid=0;
 	    unsigned int ptThresholdID=0;
 	    unsigned int ptL1TopoCode=0;
 	    unsigned int ptValue=0;
@@ -203,6 +453,6 @@ namespace LVL1MUCTPIPHASE1 {
   LVL1::MuCTPIL1Topo MuonSectorProcessor::getL1TopoData(int bcidOffset)
   {
     if (bcidOffset > -5 && bcidOffset < 5) return *m_l1topo;
-    return LVL1::MuCTPIL1Topo(); // return junk for now but fix this when we have an established procedure for handling bcid offsets
+    return LVL1::MuCTPIL1Topo();
   }
 }
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/SimController.cxx b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/SimController.cxx
index 8695dcfd3b45..506eeff9aaac 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/SimController.cxx
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/SimController.cxx
@@ -35,9 +35,14 @@ namespace LVL1MUCTPIPHASE1 {
     delete m_triggerProcessor;
   }
 
-  void SimController::configureMSP(const std::string& xmlFile)
+  void SimController::configureTopo(const std::string& geoFile)
   {
-    for (int i=0;i<(int)m_muonSectorProcessors.size();i++) m_muonSectorProcessors[i]->configure(xmlFile);
+    for (int i=0;i<(int)m_muonSectorProcessors.size();i++) m_muonSectorProcessors[i]->configureTopo(geoFile);
+  }
+
+  void SimController::configureOverlapRemoval(const std::string& lutFile)
+  {
+    for (int i=0;i<(int)m_muonSectorProcessors.size();i++) m_muonSectorProcessors[i]->configureOverlapRemoval(lutFile);
   }
 
   // set Configuration                                                                                                                                      
@@ -65,7 +70,7 @@ namespace LVL1MUCTPIPHASE1 {
     for (int i=0;i<nMSP;i++)
     {
       m_muonSectorProcessors[i]->setInput(input);
-      m_muonSectorProcessors[i]->removeOverlap();
+      m_muonSectorProcessors[i]->runOverlapRemoval();
       m_muonSectorProcessors[i]->makeTriggerObjectSelections();
       m_muonSectorProcessors[i]->makeL1TopoData();
       processedInputs.push_back(m_muonSectorProcessors[i]->getOutput());
@@ -78,11 +83,6 @@ namespace LVL1MUCTPIPHASE1 {
     m_triggerProcessor->makeTopoSelections();
   }
 
-  const std::vector<uint32_t>& SimController::getCTPData()
-  {
-    return m_triggerProcessor->getCTPData();
-  }
-  
   LVL1::MuCTPIL1Topo SimController::getL1TopoData(int bcidOffset)
   {
     LVL1::MuCTPIL1Topo l1topo;
@@ -94,27 +94,6 @@ namespace LVL1MUCTPIPHASE1 {
     return l1topo;
   }
 
-  const std::vector<unsigned int>& SimController::getDAQData()
-  {
-    return m_triggerProcessor->getDAQData();
-  }
-
-  std::list<unsigned int> SimController::getRoIBData()
-  {
-    std::list<unsigned int> dummy;
-    return dummy;
-  }
-
-  bool SimController::hasBarrelCandidate()
-  {
-    return false;
-  }
-
-  bool SimController::hasEndcapCandidate()
-  {
-    return false;
-  }
-
   TriggerProcessor* SimController::getTriggerProcessor()
   {
     return m_triggerProcessor;
diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TriggerProcessor.cxx b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TriggerProcessor.cxx
index 648d7ee90886..3aa3a4c5cd7c 100644
--- a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TriggerProcessor.cxx
+++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TriggerProcessor.cxx
@@ -1,5 +1,5 @@
-/*                                                                                                                      
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration                                               
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // First the corresponding header.
@@ -12,17 +12,22 @@
 #include "TrigT1Interfaces/Lvl1MuSectorLogicConstantsPhase1.h"
 #include "TrigT1Result/MuCTPI_RDO.h"
 #include "TrigT1MuctpiPhase1/Configuration.h"
-#include "TrigConfL1Data/TriggerThreshold.h"
+#include "TrigConfData/L1ThrExtraInfo.h"
+#include "TrigConfData/L1Threshold.h"
+#include "TrigConfData/L1Menu.h"
 
 // Headers from external packages.
 #include <math.h>
+#include <bitset>
+#include <sstream>
 
 // System headers.
 
 namespace LVL1MUCTPIPHASE1 {
   TriggerProcessor::TriggerProcessor()
     :
-    m_mergedInputs(new LVL1MUONIF::Lvl1MuCTPIInputPhase1())
+    m_mergedInputs(new LVL1MUONIF::Lvl1MuCTPIInputPhase1()),
+    m_l1menu(nullptr)
   {
     
   }
@@ -33,9 +38,9 @@ namespace LVL1MUCTPIPHASE1 {
   }
 
 
-  void TriggerProcessor::setThresholds(const std::vector<TrigConf::TriggerThreshold*>& thresholds)
+  void TriggerProcessor::setMenu(const TrigConf::L1Menu* l1menu)
   {
-    m_thresholds = thresholds;
+    m_l1menu = l1menu;
   }
   
   void TriggerProcessor::mergeInputs(std::vector<LVL1MUONIF::Lvl1MuCTPIInputPhase1*> inputs)
@@ -51,8 +56,9 @@ namespace LVL1MUCTPIPHASE1 {
     m_daq_data.clear();
 
     //initialize the vector to hold the threshold multiplicities
-    int nThresholds = m_thresholds.size();
-    std::vector<int> multiplicities(nThresholds, 0);
+    const std::vector<std::shared_ptr<TrigConf::L1Threshold> >* thresholds = &m_l1menu->thresholds("MU");
+    int nThresholds = thresholds->size();
+    std::vector<int> multiplicities(nThresholds,0);
 
 
     // Barrel + EC + Fwd
@@ -73,48 +79,25 @@ namespace LVL1MUCTPIPHASE1 {
 	  {
 	    int thresh = sectorData->pt(icand);
 	    if (thresh == -1) continue; // no candidate
+	    int roiID = sectorData->roi(icand);
+	    if (roiID < 0) continue;
 
-	    //loop over each muon threshold and see if this candidate satisfies it
-/*This will be migrated later along with the changes needed in the TrigConfL1Data package
-	    for (int ithresh=0;ithresh<nThresholds;ithresh++)
-	    {
-	      const TrigConf::TriggerThreshold* thr = m_thresholds[ithresh];
-	      const TrigConf::Run3MuonTriggerThreshold* muthr = thr->run3MuonTriggerThreshold();
-	      bool passed=false;
-	      if (isys == LVL1MUONIF::Lvl1MuCTPIInputPhase1::idBarrelSystem())
-	      {
-		if ((int)muthr->rpcThr()+1 >= thresh) passed=true;
-	      }
-	      else
-	      {
-		if ((int)muthr->tgcThr()+1 >= thresh) passed=true;
-	      }
-	      if (passed) multiplicities[ithresh]++;
-	    }
-*/
-
-	    //build the daq word here
+	    // Build the DAQ word
 	    uint32_t daq_word=0;
+
+	    // Some definitions that are different between subsystems
 	    uint32_t ROI_MASK=0;
-	    uint32_t OL_MASK=0;
-	    uint32_t OL_SHIFT=0;
 	    uint32_t SECTOR_MASK = 0;
-	    uint32_t SECTORID_SHIFT = MuCTPI_RDO::CAND_SECTOR_ADDRESS_SHIFT+1;
-	    uint32_t SUBSYS_SHIFT = MuCTPI_RDO::CAND_SECTOR_ADDRESS_SHIFT+6;
 	    uint32_t SUBSYS_MASK = 0x3;
 	    uint32_t SUBSYS_ID = 0; // default for barrel
 	    if (isys == 0) 
 	    {
 	      ROI_MASK = MuCTPI_RDO::BARREL_ROI_MASK;
-	      OL_MASK = MuCTPI_RDO::BARREL_OL_MASK;
-	      OL_SHIFT = MuCTPI_RDO::BARREL_OL_SHIFT;
 	      SECTOR_MASK = MuCTPI_RDO::BARREL_SECTORID_MASK;
 	    }
 	    else if (isys == 1) 
 	    {
 	      ROI_MASK = MuCTPI_RDO::ENDCAP_ROI_MASK;
-	      OL_MASK = MuCTPI_RDO::ENDCAP_OL_MASK;
-	      OL_SHIFT = MuCTPI_RDO::ENDCAP_OL_SHIFT;
 	      SECTOR_MASK = MuCTPI_RDO::ENDCAP_SECTORID_MASK;
 	      SUBSYS_ID = 2; // not a typo!
 	    }
@@ -124,89 +107,183 @@ namespace LVL1MUCTPIPHASE1 {
 	      SECTOR_MASK = MuCTPI_RDO::FORWARD_SECTORID_MASK;
 	      SUBSYS_ID = 1; // not a typo!
 	    }
+
 	    //General formula for each subword:
 	    //daq_word |= (subword & MuCTPI_RDO::MASK) << MuCTPI_RDO::SHIFT
-	    daq_word |= (sectorData->is2candidatesInSector() & MuCTPI_RDO::CAND_OVERFLOW_MASK) << MuCTPI_RDO::CAND_OVERFLOW_SHIFT;
-	    daq_word |= (sectorData->is2candidates(icand)    & MuCTPI_RDO::ROI_OVERFLOW_MASK)  << MuCTPI_RDO::ROI_OVERFLOW_SHIFT;
-	    daq_word |= (sectorData->roi(icand)              & ROI_MASK)                       << MuCTPI_RDO::ROI_SHIFT;
-	    daq_word |= (sectorData->ovl(icand)              & OL_MASK)                        << OL_SHIFT;
-	    daq_word |= (thresh                              & MuCTPI_RDO::CAND_PT_MASK)       << MuCTPI_RDO::CAND_PT_SHIFT;
-	    //	    daq_word |= (sectorData->bcid()                  & MuCTPI_RDO::CAND_BCID_MASK)     << MuCTPI_RDO::CAND_BCID_SHIFT; // bcid not included in this word (yet?)
-
-	    //set the address information
-	    daq_word |= (isub      & MuCTPI_RDO::SECTOR_HEMISPHERE_MASK) << MuCTPI_RDO::CAND_SECTOR_ADDRESS_SHIFT;
-	    daq_word |= (isec      & SECTOR_MASK)                        << SECTORID_SHIFT;
-	    daq_word |= (SUBSYS_ID & SUBSYS_MASK)                        << SUBSYS_SHIFT;
 	    
-	    //there are other items that are less important. let's ignore them for the moment
-	    m_daq_data.push_back(daq_word);
+	    //ROI word
+	    daq_word |= (sectorData->roi(icand)              & ROI_MASK)                       << MuCTPI_RDO::RUN3_ROI_SHIFT;
+
+	    //PT word
+	    daq_word |= (thresh                              & MuCTPI_RDO::CAND_PT_MASK)       << MuCTPI_RDO::RUN3_CAND_PT_SHIFT;
+
+	    //CANDIDIATE FLAGS
+	    if (isys == 0) 
+	    {
+	      daq_word |= (sectorData->ovl(icand)              & MuCTPI_RDO::RUN3_BARREL_OL_MASK) << MuCTPI_RDO::RUN3_BARREL_OL_SHIFT;
+	      daq_word |= (sectorData->is2candidates(icand)    & MuCTPI_RDO::ROI_OVERFLOW_MASK)   << MuCTPI_RDO::RUN3_ROI_OVERFLOW_SHIFT;
+	    }
+	    else
+	    {
+	      daq_word |= (sectorData->charge(icand)           & 0x1) << MuCTPI_RDO::RUN3_CAND_TGC_CHARGE_SIGN_SHIFT;
+	      daq_word |= (sectorData->bw2or3(icand)           & 0x1) << MuCTPI_RDO::RUN3_CAND_TGC_BW2OR3_SHIFT;
+	      daq_word |= (sectorData->innercoin(icand)        & 0x1) << MuCTPI_RDO::RUN3_CAND_TGC_INNERCOIN_SHIFT;
+	      daq_word |= (sectorData->goodmf(icand)           & 0x1) << MuCTPI_RDO::RUN3_CAND_TGC_GOODMF_SHIFT;
+	    }
+
+	    //CANDIDATE VETO FLAG
+	    daq_word |= (sectorData->veto(icand)             & 0x1)                            << MuCTPI_RDO::RUN3_CAND_VETO_SHIFT;
+
+	    //SECTOR FLAGS
+	    daq_word |= (sectorData->is2candidatesInSector() & MuCTPI_RDO::CAND_OVERFLOW_MASK) << MuCTPI_RDO::RUN3_CAND_OVERFLOW_SHIFT;
+
+	    //SECTOR ADDRESS
+	    daq_word |= (isub      & MuCTPI_RDO::SECTOR_HEMISPHERE_MASK)   << MuCTPI_RDO::RUN3_CAND_SECTOR_ADDRESS_SHIFT;
+	    daq_word |= (isec      & SECTOR_MASK)                          << MuCTPI_RDO::RUN3_CAND_SECTORID_SHIFT;
+	    daq_word |= (SUBSYS_ID & SUBSYS_MASK)                          << MuCTPI_RDO::RUN3_SUBSYS_ADDRESS_SHIFT;
+
+
+	    // Add extra bit in front to flag that this is a RUN3 RoI
+	    daq_word |= 0x1 << 31;
+
+	    m_daq_data.push_back(std::make_pair(SUBSYS_ID, daq_word));
+
+
+	    //
+	    // Perform multiplicity counting
+	    //
+
+	    //if this candidate has been flagged as overlapping, stop here and don't count it in the multiplicity
+	    if (sectorData->veto(icand)) continue;
+
+	    //loop over each muon threshold and see if this candidate satisfies it.
+	    //if so, increment the multiplicity of this threshold
+	    for (int ithresh=0;ithresh<nThresholds;ithresh++)
+	    {
+	      const TrigConf::L1Threshold_MU* thr = (const TrigConf::L1Threshold_MU*)(*thresholds)[ithresh].get();
+	      bool passed=false;
+	      if (isys == LVL1MUONIF::Lvl1MuCTPIInputPhase1::idBarrelSystem())
+	      {
+		if (thr->region().find("ALL") == std::string::npos &&
+		    thr->region().find("BA") == std::string::npos) continue;
+		
+		//veto this candidate from this multiplicity if it's part of the excluded ROI list
+		std::string rpcExclROIList = thr->rpcExclROIList();
+		if (rpcExclROIList != "")
+		{
+		  const std::map<std::string, std::vector<unsigned int> >* exclList = &m_l1menu->thrExtraInfo().MU().exclusionList(rpcExclROIList);
+		  if (exclList->size() != 0)
+		  {
+		    std::stringstream sectorName;
+		    sectorName<<"B";
+		    int sectorNumber=isec;
+		    LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem side = static_cast<LVL1MUONIF::Lvl1MuCTPIInputPhase1::MuonSubSystem>(isec);
+		    if (side == LVL1MUONIF::Lvl1MuCTPIInputPhase1::idSideC()) sectorNumber += 32;
+		    if (sectorNumber < 10) sectorName << "0";
+		    sectorName << sectorNumber;
+		    
+		    auto exclROIs = exclList->find(sectorName.str());
+		    if (exclROIs != exclList->end())
+		    {
+		      bool found = false;
+		      for (auto roi_itr=exclROIs->second.begin();roi_itr!=exclROIs->second.end();roi_itr++)
+		      {
+			if (int(*roi_itr) == sectorData->roi(icand))
+			{
+			  found=true;
+			  break;
+			}
+		      }
+		      if (found) continue;
+		    }
+		  }
+		}
+
+		if ((int)thr->idxBarrel()+1 >= thresh) passed=true;
+	      }
+	      else 
+	      {
+		if (isys == LVL1MUONIF::Lvl1MuCTPIInputPhase1::idEndcapSystem())
+		{
+		  if (thr->region().find("ALL") == std::string::npos &&
+		      thr->region().find("EC") == std::string::npos) continue;
+		  if ((int)thr->idxEndcap()+1 >= thresh) passed=true;
+		}
+		else
+		{
+		  if (thr->region().find("ALL") == std::string::npos &&
+		      thr->region().find("FW") == std::string::npos) continue;
+		  if ((int)thr->idxForward()+1 >= thresh) passed=true;
+		}
+
+		//check tgc quality flags
+		bool F = sectorData->bw2or3(icand);
+		bool C = sectorData->innercoin(icand);
+		bool H = sectorData->goodmf(icand);
+
+		//parse the logic of the quality flag into a 2D vector, where outer layer contains the logic |'s and inner layer contains the logical &'s.
+		//save the 2D vector in a map so we don't have to parse it each time we want to check the flags.
+		std::string tgcFlags = thr->tgcFlags();
+		if (m_parsed_tgcFlags.find(tgcFlags) == m_parsed_tgcFlags.end())
+		{
+		  std::vector<std::string> vec_ors = parseString(tgcFlags, "|");
+		  std::vector<std::vector<std::string> > vec_flags;
+		  for (unsigned ior=0;ior<vec_ors.size();ior++)
+		  {
+		    vec_flags.push_back(parseString(vec_ors[ior],"&"));
+		  }
+		  m_parsed_tgcFlags[tgcFlags] = vec_flags;
+		}
+	      
+		//check the quality based on the flags.
+		//loop over outer layer of "ors" and 'or' the results
+		bool passedFlags = false;
+		const std::vector<std::vector<std::string> >* vec_flags = &m_parsed_tgcFlags[tgcFlags];
+		for (auto or_itr = vec_flags->begin();or_itr!=vec_flags->end();or_itr++)
+		{
+		  //loop over the inner layer of "ands" and 'and' the results
+		  bool passedAnd = true;
+		  for (auto and_itr = or_itr->begin();and_itr!=or_itr->end();and_itr++)
+		  {
+		    if (*and_itr == "F") passedAnd = passedAnd && F;
+		    else if (*and_itr == "C") passedAnd = passedAnd && C;
+		    else if (*and_itr == "H") passedAnd = passedAnd && H;
+		  }
+		  passedFlags = passedFlags || passedAnd;
+		}
+	      
+		if (!passedFlags) continue;
+	      }
+	      
+	      if (passed) multiplicities[ithresh]++;
+	    }
 	  }
 	}
       }
     }
-  
-    //build the CTP words
-    unsigned int current_ctp_word=0;
-    int pos=0;
-    int word_size = sizeof(current_ctp_word)*8;
+
+    //build the CTP words with bitset:
+    //first build the bitset that contains the full word
+    std::bitset<256> full_ctp_word = 0;
+    unsigned pos = 0;
     for (int i=0;i<nThresholds;i++)
     {
-      //buffer to add at the word at the end of the block, if necessary
-      unsigned int word_to_add=0;
-      bool add_word=false; // need this in case the word needs to be added but its empty
-
-      //truncate the thresholds if they're over the number of specified bits
-      int nbits = m_thresholds[i]->bitnum();
-      int maxsize = std::pow(2,nbits)-1;
-      if (multiplicities[i] > maxsize) multiplicities[i] = maxsize; 
-
-      //assign the individual multiplicity word to the CTP word
-      if (pos+nbits <= word_size) 
-      {
-	//assign the word
-	current_ctp_word |= multiplicities[i] << pos;
-
-	//add it to the word list if its full (or we're at the end of the threshold list) and reset
-	if (pos+nbits == word_size || i == nThresholds-1)
-	{
-	  word_to_add=current_ctp_word;
-	  add_word=true;
-	  pos=0;
-	}
-	else
-	{
-	  //increment the position
-	  pos += nbits;
-	}
-      }
-      else
-      {//handle cases where the individual multiplicity word is split between two 32-bit words
-	//truncate the multiplicity by the remaining length
-	int remaining_length = word_size-pos;
-	int mask = 0;
-	for (int j=0;j<remaining_length;j++) mask |= 0x1 << j;
-	int mult_trunc = multiplicities[i] & mask;
-
-	//add this to the current word
-	current_ctp_word |= mult_trunc << pos;
-
-	//add the current word to the CTP word list
-	word_to_add=current_ctp_word;
-	add_word=true;
-
-	//reset the current word and add the remainder to the new word
-	current_ctp_word = multiplicities[i] >> remaining_length;
-
-	//recalculate the position
-	pos += nbits;
-	pos -= word_size;
-      }
+      auto & triggerline = m_l1menu->connector("MuCTPiOpt0").triggerLine((*thresholds)[i]->name());
+      unsigned nbits = triggerline.endbit() - triggerline.startbit() + 1;
+      std::bitset<256> mult = (multiplicities[i] << pos);
+      full_ctp_word |= mult;
+      pos += nbits;
+    }
 
-      //add the word if its not empty, or if we're at the end of the loop;
-      if (add_word || i == nThresholds-1) 
-      {
-	m_ctp_words.push_back(word_to_add);
-      }
+    //divide up into a vector of 32-bit unsigned ints
+    std::bitset<256> u32i_mask = 0xffffffff;
+    unsigned n32_ints = pos/32;
+    if (pos % 32 != 0) n32_ints += 1;
+    for (unsigned i=0;i<n32_ints;i++)
+    {
+      unsigned int word = static_cast<unsigned int>((full_ctp_word & u32i_mask).to_ulong());
+      m_ctp_words.push_back(word);
+      full_ctp_word >>= 32;
     }
   }
   
@@ -222,8 +299,37 @@ namespace LVL1MUCTPIPHASE1 {
   }
 
 
-  const std::vector<unsigned int>& TriggerProcessor::getDAQData()
+  const std::vector<std::pair<int, unsigned int> >& TriggerProcessor::getDAQData()
   {
     return m_daq_data;
   }
+
+  std::vector<std::string> TriggerProcessor::parseString(std::string str, std::string sep)
+  {
+    std::vector<std::string> parsed;
+    int pos = 0;
+    bool first = true;
+    if (str.size() == 0) return parsed;
+    if (str.find(sep) == std::string::npos)
+    {
+      parsed.push_back(str);
+      return parsed;
+    }
+    while (true)
+    {
+      int newPos = str.find(sep, pos);
+      if (str.find(sep, pos) == std::string::npos)
+      {
+	if (!first) parsed.push_back(str.substr(pos, newPos-pos));
+	break;
+      }
+      std::string sub = str.substr(pos, newPos-pos);
+      parsed.push_back(sub);
+      pos = newPos+1;
+      first = false;
+    }
+    return parsed;
+  }
+
 }
+
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/CMakeLists.txt b/Trigger/TrigT1/TrigT1MuonRecRoiTool/CMakeLists.txt
index 169d388e76c6..27558362b041 100644
--- a/Trigger/TrigT1/TrigT1MuonRecRoiTool/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1MuonRecRoiTool/CMakeLists.txt
@@ -3,13 +3,10 @@
 # Declare the package name:
 atlas_subdir( TrigT1MuonRecRoiTool )
 
-# Component(s) in the package:
-atlas_add_library( TrigT1MuonRecRoiToolLib
-                   src/*.cxx
-                   PUBLIC_HEADERS TrigT1MuonRecRoiTool
-                   LINK_LIBRARIES AthenaKernel GaudiKernel MuonIdHelpersLib MuonReadoutGeometry TGCcablingInterfaceLib RPCcablingInterfaceLib RPC_CondCablingLib )
-
 atlas_add_component( TrigT1MuonRecRoiTool
+                     src/*.cxx 
                      src/components/*.cxx
-                     LINK_LIBRARIES TrigT1MuonRecRoiToolLib )
+                     LINK_LIBRARIES AthenaKernel GaudiKernel TrigT1Interfaces MuonIdHelpersLib MuonReadoutGeometry TGCcablingInterfaceLib RPCcablingInterfaceLib RPC_CondCablingLib )
 
+# Install files from the package:
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/python/TrigT1MuonRecRoiToolConfig.py b/Trigger/TrigT1/TrigT1MuonRecRoiTool/python/TrigT1MuonRecRoiToolConfig.py
new file mode 100644
index 000000000000..80696cbaa960
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1MuonRecRoiTool/python/TrigT1MuonRecRoiToolConfig.py
@@ -0,0 +1,16 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+
+# Local (generated) configurable(s):
+from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConf import LVL1__TrigT1RPCRecRoiTool
+from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConf import LVL1__TrigT1TGCRecRoiTool
+
+def getRun3RPCRecRoiTool(name = "RPCRecRoiTool"):
+    tool = LVL1__TrigT1RPCRecRoiTool(name)
+    tool.UseRun3Config=True
+    return tool
+
+def getRun3TGCRecRoiTool(name = "TGCRecRoiTool"):
+    tool = LVL1__TrigT1TGCRecRoiTool(name)
+    tool.UseRun3Config=True
+    return tool
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1RPCRecRoiTool.h b/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1RPCRecRoiTool.h
index 0becbc352a4b..aa128bddcef1 100644
--- a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1RPCRecRoiTool.h
+++ b/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1RPCRecRoiTool.h
@@ -5,7 +5,7 @@
 #ifndef TRIGT1RPCRECROITOOL_H
 #define TRIGT1RPCRECROITOOL_H
 
-#include "TrigT1MuonRecRoiTool/ITrigT1MuonRecRoiTool.h"
+#include "TrigT1Interfaces/ITrigT1MuonRecRoiTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
 namespace Muon{
diff --git a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1TGCRecRoiTool.h b/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1TGCRecRoiTool.h
index 7a30990d09c5..6cf6077fb54b 100644
--- a/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1TGCRecRoiTool.h
+++ b/Trigger/TrigT1/TrigT1MuonRecRoiTool/src/TrigT1TGCRecRoiTool.h
@@ -5,7 +5,7 @@
 #ifndef TRIGT1TGCRECROITOOL_H
 #define TRIGT1TGCRECROITOOL_H
 
-#include "TrigT1MuonRecRoiTool/ITrigT1MuonRecRoiTool.h"
+#include "TrigT1Interfaces/ITrigT1MuonRecRoiTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
 class TGCIdBase;
diff --git a/Trigger/TrigT1/TrigT1Result/CMakeLists.txt b/Trigger/TrigT1/TrigT1Result/CMakeLists.txt
index 971d822fa801..e538f9a9105d 100644
--- a/Trigger/TrigT1/TrigT1Result/CMakeLists.txt
+++ b/Trigger/TrigT1/TrigT1Result/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_add_library( TrigT1Result
                    src/*.cxx
                    PUBLIC_HEADERS TrigT1Result
                    INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaKernel L1TopoRDO TrigT1Interfaces
+                   LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaKernel L1TopoRDO TrigT1Interfaces TrigT1MuctpiBits
                    PRIVATE_LINK_LIBRARIES GaudiKernel )
 
 atlas_add_dictionary( TrigT1ResultDict
diff --git a/Trigger/TrigT1/TrigT1Result/TrigT1Result/MuCTPI_RDO.h b/Trigger/TrigT1/TrigT1Result/TrigT1Result/MuCTPI_RDO.h
index d671081166fa..25ee090f678b 100755
--- a/Trigger/TrigT1/TrigT1Result/TrigT1Result/MuCTPI_RDO.h
+++ b/Trigger/TrigT1/TrigT1Result/TrigT1Result/MuCTPI_RDO.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGT1RESULT_MUCTPI_RDO_H
@@ -44,6 +44,7 @@ public:
   /// Enumeration defining the different sources for the muon candidates
   enum SectorLocation { BARREL = 0, ENDCAP = 1, FORWARD = 2 };
 
+
   /// "Intermediate" constructor
   /**
    * This constructor is tipically used for filling the object with information
@@ -140,90 +141,8 @@ public:
   const std::vector< uint32_t >& dataWord() const {
     return m_dataWord;
   }
-
-  /// Binary 111 representing the maximal multiplicity value for a given threshold
-  static constexpr uint32_t MULT_VAL = 7;
-  /// Number of multiplicity bits reserved per threshold
-  static constexpr uint32_t MULT_BITS = 3;
-  /// Defining the number of p<sub>T</sub> thresholds in the system
-  static constexpr uint32_t MULT_THRESH_NUM = 6;
-  /// Telling that the 3-bit BCID comes at "position 7" in the multiplicity word
-  static constexpr uint32_t MULT_BCID_POS = 7;
-
-  /// Weird mask for the bit showing if more than two muon candidates were in the trigger sector
-  static constexpr uint32_t CAND_OVERFLOW_MASK = 0x1;
-  /// Position of the candidate overflow mask
-  static constexpr uint32_t CAND_OVERFLOW_SHIFT = 0;
-  /// Weird mask for the bit showing if more than one muon candidates were in the sector RoI
-  static constexpr uint32_t ROI_OVERFLOW_MASK = 0x1;
-  /// Position of the RoI overflow mask
-  static constexpr uint32_t ROI_OVERFLOW_SHIFT = 1;
-
-  /// Bit in the candidate's address turned on for endcap candidates
-  static constexpr uint32_t ENDCAP_ADDRESS_MASK = 0x80;
-  /// Bit in the candidate's address turned on for forward candidates
-  static constexpr uint32_t FORWARD_ADDRESS_MASK = 0x40;
-
-  /// Mask for extracting the sector ID for endcap candidates from the data word
-  static constexpr uint32_t ENDCAP_SECTORID_MASK = 0x3f;
-  /// Mask for extracting the sector ID for forward candidates from the data word
-  static constexpr uint32_t FORWARD_SECTORID_MASK = 0x1f;
-  /// Mask for extracting the sector ID for barrel candidates from the data word
-  static constexpr uint32_t BARREL_SECTORID_MASK = 0x1f;
-  /// Mask for the bit showing which hemisphere the candidate came from.(1: positive; 0: negative)
-  static constexpr uint32_t SECTOR_HEMISPHERE_MASK = 0x1;
-
-  /// Mask for extracting the RoI for barrel candidates from the data words
-  static constexpr uint32_t BARREL_ROI_MASK = 0x1f;
-  /// Mask for extracting the RoI for endcap candidates from the data words
-  static constexpr uint32_t ENDCAP_ROI_MASK = 0xff;
-  /// Mask for extracting the RoI for forward candidates from the data words
-  static constexpr uint32_t FORWARD_ROI_MASK = 0x3f;
-  /// Position of the RoI bits in the data word
-  static constexpr uint32_t ROI_SHIFT = 2;
-
-  /// Mask for extracting the overlap bits for barrel candidates from the data words
-  static constexpr uint32_t BARREL_OL_MASK = 0x3;
-  /// Position of the overlap bits in barrel data words
-  static constexpr uint32_t BARREL_OL_SHIFT = 9;
-  /// Mask for extracting the overlap bits for endcap candidates from the data words
-  static constexpr uint32_t ENDCAP_OL_MASK = 0x1;
-  /// Position of the overlap bits in endcap data words
-  static constexpr uint32_t ENDCAP_OL_SHIFT = 10;
-
-  /// Mask for extracting the p<sub>T</sub> threshold passed by the candidate from the data word
-  static constexpr uint32_t CAND_PT_MASK = 0x7;
-  /// Position of the p<sub>T</sub> threshold bits in the data words
-  static constexpr uint32_t CAND_PT_SHIFT = 11;
-
-  /// Mask for extracting the last 3 bits of the BCID of the muon candidate from the data word
-  static constexpr uint32_t CAND_BCID_MASK = 0x7;
-  /// Position of the BCID bits in the data words
-  static constexpr uint32_t CAND_BCID_SHIFT = 14;
-
-  /// Mask for extracting the address of the muon candidate from the data word
-  static constexpr uint32_t CAND_SECTOR_ADDRESS_MASK = 0xff;
-  /// Position of the muon candidate's address in the data word
-  static constexpr uint32_t CAND_SECTOR_ADDRESS_SHIFT = 17;
-
-  /// Mask for extracting the bit from the data word showing whether the candidate had the highest p<sub>T</sub> in the sector
-  static constexpr uint32_t CAND_HIGHEST_PT_MASK = 0x1;
-  /// Position of the "highest p<sub>T</sub>" bit
-  static constexpr uint32_t CAND_HIGHEST_PT_SHIFT = 25;
-
-  /// Mask for extracting the bit from the data word showing if the muon candidate was sent to the RoIB
-  static constexpr uint32_t CAND_SENT_ROI_MASK = 0x1;
-  /// Position of the "candidate sent to RoIB" bit.
-  static constexpr uint32_t CAND_SENT_ROI_SHIFT = 26;
-
-  /// Position of the bit turned on for the multiplicity words that distinguishes them from the data words
-  static constexpr uint32_t MULT_WORD_FLAG_SHIFT = 29;
-
-  /// Position of the bit specifying the candidate's sign
-  static constexpr uint32_t CAND_TGC_CHARGE_SIGN_SHIFT = 27;
-
-  /// Position of the bit specifying if a candidate was vetoed in the multiplicity sum
-  static constexpr uint32_t CAND_VETO_SHIFT = 28;
+  
+#include<TrigT1MuctpiBits/MuCTPI_Bits.h>
 
 private:
   /// Variable storing the multiplicity word(s) sent to the CTP
diff --git a/Trigger/TrigT1/TrigT1Result/TrigT1Result/selection.xml b/Trigger/TrigT1/TrigT1Result/TrigT1Result/selection.xml
index ea78cd901842..7245c3e8a686 100755
--- a/Trigger/TrigT1/TrigT1Result/TrigT1Result/selection.xml
+++ b/Trigger/TrigT1/TrigT1Result/TrigT1Result/selection.xml
@@ -1,7 +1,7 @@
 <lcgdict>
 
   <!-- MuCTPI RDO -->
-  <class name="MuCTPI_RDO" id="5BE3FA7E-CC70-4842-A095-CA046164764D" />
+  <!--class name="MuCTPI_RDO" id="5BE3FA7E-CC70-4842-A095-CA046164764D" /-->
 
   <!-- CTP RDO -->
   <class name="CTP_RDO" id="56C714CC-DC17-4927-B413-9151C82792BB" />
diff --git a/Trigger/TrigT1/TrigT1Result/src/MuCTPIResult.cxx b/Trigger/TrigT1/TrigT1Result/src/MuCTPIResult.cxx
index 2b4e380dffab..4d6669d2677d 100755
--- a/Trigger/TrigT1/TrigT1Result/src/MuCTPIResult.cxx
+++ b/Trigger/TrigT1/TrigT1Result/src/MuCTPIResult.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -121,8 +121,8 @@ namespace ROIB {
       s << " " << roIVec()[i].getRoiOverflow();
       if (longFormat) s << std::setw(12) << "\n RoI number:";
       s << " " << roIVec()[i].getRoiNumber();
-      if (longFormat) s << std::setw(12) << "\n IsHighestPt:";
-      s << " " << roIVec()[i].getCandidateIsHighestPt();
+      //if (longFormat) s << std::setw(12) << "\n IsHighestPt:";
+      //s << " " << roIVec()[i].getCandidateIsHighestPt();
       if (longFormat) s << std::setw(12) << "\n Overlap:";
       s << " " << roIVec()[i].getOverlapBits();
       s << "] ";
@@ -185,7 +185,7 @@ namespace ROIB {
       log << MSG::DEBUG << "Sector overflow         :  " << it->getSectorOverflow() << endmsg;
       log << MSG::DEBUG << "RoI overflow            :  " << it->getRoiOverflow() << endmsg;
       log << MSG::DEBUG << "RoI number              :  " << it->getRoiNumber() << endmsg;
-      log << MSG::DEBUG << "IsHighestPt             :  " << it->getCandidateIsHighestPt() << endmsg;
+      //log << MSG::DEBUG << "IsHighestPt             :  " << it->getCandidateIsHighestPt() << endmsg;
       log << MSG::DEBUG << "Overlap                 :  " << it->getOverlapBits() << endmsg;
 
     }
diff --git a/Trigger/TrigT1/TrigT1Result/src/MuCTPIRoI.cxx b/Trigger/TrigT1/TrigT1Result/src/MuCTPIRoI.cxx
index 4a68f823a2b5..2ccfb817977f 100755
--- a/Trigger/TrigT1/TrigT1Result/src/MuCTPIRoI.cxx
+++ b/Trigger/TrigT1/TrigT1Result/src/MuCTPIRoI.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
diff --git a/Trigger/TrigT1/TrigT1Result/src/MuCTPI_DataWord_Decoder.cxx b/Trigger/TrigT1/TrigT1Result/src/MuCTPI_DataWord_Decoder.cxx
index 751d959aef58..a795fd3b5b61 100755
--- a/Trigger/TrigT1/TrigT1Result/src/MuCTPI_DataWord_Decoder.cxx
+++ b/Trigger/TrigT1/TrigT1Result/src/MuCTPI_DataWord_Decoder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -150,6 +150,7 @@ uint16_t MuCTPI_DataWord_Decoder::getPt() const {
 /**
  * @return 3-bit BCID fragment saved with the candidate
  */
+
 uint16_t MuCTPI_DataWord_Decoder::getBCID() const {
   return ((m_dataWord >> MuCTPI_RDO::CAND_BCID_SHIFT) &
 	  MuCTPI_RDO::CAND_BCID_MASK);
@@ -158,6 +159,7 @@ uint16_t MuCTPI_DataWord_Decoder::getBCID() const {
 /**
  * @return flag showing whether the candidate had the highest p<sub>T</sub> in its sector
  */
+
 uint16_t MuCTPI_DataWord_Decoder::getCandidateIsHighestPt() const {
   return ((m_dataWord >> MuCTPI_RDO::CAND_HIGHEST_PT_SHIFT) &
 	  MuCTPI_RDO::CAND_HIGHEST_PT_MASK);
@@ -166,6 +168,7 @@ uint16_t MuCTPI_DataWord_Decoder::getCandidateIsHighestPt() const {
 /**
  * @return flag showing whether the candidate was sent to the RoIB
  */
+
 uint16_t MuCTPI_DataWord_Decoder::getSentRoi() const {
   return ((m_dataWord >> MuCTPI_RDO::CAND_SENT_ROI_SHIFT) &
 	  MuCTPI_RDO::CAND_SENT_ROI_MASK);
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py
index 3ff97c437a6b..991c6be2ca25 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerGetter.py
@@ -195,10 +195,14 @@ class HLTSimulationGetter(Configured):
             if hasattr(TrigSteer_HLT.LvlTopoConverter, 'MuonInputProvider'):
 
                 try: # this is temporary until TrigT1Muctpi-00-06-29 is in the release
-                    from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
+                    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+                    if ConfigFlags.Trigger.enableL1Phase1:
+                        from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1Tool as l1MuctpiTool
+                    else:
+                        from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool as l1MuctpiTool
                     from AthenaCommon.AppMgr import ToolSvc
-                    ToolSvc += L1MuctpiTool()
-                    TrigSteer_HLT.LvlTopoConverter.MuonInputProvider.MuctpiSimTool = L1MuctpiTool()
+                    ToolSvc += l1MuctpiTool()
+                    TrigSteer_HLT.LvlTopoConverter.MuonInputProvider.MuctpiSimTool = l1MuctpiTool()
                 except ImportError:
                     pass
 
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py
index 614fc8765886..7c7902129052 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1SimulationConfig.py
@@ -130,6 +130,16 @@ def Lvl1SimulationSequence( flags = None ):
         ToolSvc += L1MuctpiPhase1Tool("MUCTPI_AthTool")
         ToolSvc.MUCTPI_AthTool.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
 
+        #Add the RecRoiTools
+        from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig import getRun3RPCRecRoiTool
+        from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig import getRun3TGCRecRoiTool
+        ToolSvc += getRun3RPCRecRoiTool("RPCRecRoiTool")
+        ToolSvc += getRun3TGCRecRoiTool("TGCRecRoiTool")
+
+        ToolSvc.MUCTPI_AthTool.RPCRecRoiTool = ToolSvc.RPCRecRoiTool
+        ToolSvc.MUCTPI_AthTool.TGCRecRoiTool = ToolSvc.TGCRecRoiTool
+
+        #Add the LVL1 config service to the MUCTPI algorithm
         muctpi = L1MuctpiPhase1()
         muctpi.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
 
@@ -148,7 +158,7 @@ def Lvl1SimulationSequence( flags = None ):
     from MuonRecExample import MuonAlignConfig # noqa: F401
 
     l1MuonSim = seqAND("l1MuonSim", [
-        
+
         MuonRdoToMuonDigit( "MuonRdoToMuonDigit",
                             MuonRdoToMuonDigitTool = ToolSvc.MuonRdoToMuonDigitTool),
 
@@ -158,7 +168,7 @@ def Lvl1SimulationSequence( flags = None ):
                   RPCbytestream     = False,
                   RPCbytestreamFile = "",
                   RPCDigitContainer = "RPC_DIGITS_L1"),
-        
+
         # based on Trigger/TrigT1/TrigT1TGC/python/TrigT1TGCConfig.py
         # interesting is that this JO sets inexisting properties, commented out below
         LVL1TGCTrigger__LVL1TGCTrigger("LVL1TGCTrigger",
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py
index 5f5e2a9bf884..217100317d65 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Lvl1TriggerGetter.py
@@ -100,8 +100,13 @@ class Lvl1SimulationGetter (Configured):
                 import TrigT1TGCRecRoiSvc.TrigT1TGCRecRoiConfig   # noqa: F401
                 import TrigT1RPCsteering.TrigT1RPCsteeringConfig  # noqa: F401
                 import TrigT1TGC.TrigT1TGCConfig                  # noqa: F401
-                from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi                
-                topSequence += L1Muctpi()
+                from AthenaConfiguration.AllConfigFlags import ConfigFlags
+                if ConfigFlags.Trigger.enableL1Phase1:
+                    from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1
+                    topSequence += L1MuctpiPhase1()
+                else:
+                    from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
+                    topSequence += L1Muctpi()
 
             if TriggerFlags.doBcm():
                 from TrigT1BCM.TrigT1BCMConf import LVL1__TrigT1BCM
@@ -167,10 +172,14 @@ class Lvl1SimulationGetter (Configured):
                 topSequence += L1TopoSimulation()
 
                 try: # this is temporary until TrigT1Muctpi-00-06-29 is in the release
-                    from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
+                    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+                    if ConfigFlags.Trigger.enableL1Phase1:
+                        from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1Tool as l1MuctpiTool
+                    else:
+                        from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool as l1MuctpiTool
                     from AthenaCommon.AppMgr import ToolSvc
-                    ToolSvc += L1MuctpiTool()
-                    topSequence.L1TopoSimulation.MuonInputProvider.MuctpiSimTool = L1MuctpiTool()
+                    ToolSvc += l1MuctpiTool()
+                    topSequence.L1TopoSimulation.MuonInputProvider.MuctpiSimTool = l1MuctpiTool()
                 except ImportError:
                     pass
 
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py
index 5727d0bb3bcd..3c5cc3f12863 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py
@@ -658,7 +658,11 @@ class rerunLVL1(_modifier):
 
         #rederive MuCTPI inputs to CTP from muon RDO
         #writes this to the usual MuCTPICTP storegate location
-        from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_RDO
+        from AthenaConfiguration.AllConfigFlags import ConfigFlags
+        if ConfigFlags.Trigger.enableL1Phase1:
+            from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1_on_RDO as L1Muctpi_on_RDO
+        else:
+            from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_RDO
         topSequence += L1Muctpi_on_RDO()
         topSequence.L1Muctpi_on_RDO.CTPOutputLocID = "L1MuCTPItoCTPLocation"
         topSequence.L1Muctpi_on_RDO.RoIOutputLocID = "L1MuCTPItoRoIBLocation"
@@ -670,7 +674,10 @@ class rerunLVL1(_modifier):
             topSequence += L1TopoSimulation()
             log.info( "adding L1TopoSimulation() to topSequence" )
 
-            from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
+            if ConfigFlags.Trigger.enableL1Phase1:
+                from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1Tool as L1MuctpiTool
+            else:
+                from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
             from AthenaCommon.AppMgr import ToolSvc
             ToolSvc += L1MuctpiTool()
             topSequence.L1TopoSimulation.MuonInputProvider.MuctpiSimTool = L1MuctpiTool()
@@ -754,7 +761,11 @@ class rerunDMLVL1(_modifier):
          #Run MuCTPI simulation (before or after importing DeriveSim??)
          #rederive MuCTPI inputs to CTP from muon RDO
          #writes this to the usual MuCTPICTP storegate location
-         from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_RDO
+         from AthenaConfiguration.AllConfigFlags import ConfigFlags
+         if ConfigFlags.Trigger.enableL1Phase1:
+             from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1_on_RDO as L1Muctpi_on_RDO
+         else:
+             from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiPhase1_on_RDO as L1Muctpi_on_RDO
          topSequence += L1Muctpi_on_RDO()
          topSequence.L1Muctpi_on_RDO.CTPOutputLocID = "L1MuCTPItoCTPLocation"
          topSequence.L1Muctpi_on_RDO.RoIOutputLocID = "L1MuCTPItoRoIBLocation"
-- 
GitLab


From 5826b639940b2ec3c552476deb63ea615ea89f57 Mon Sep 17 00:00:00 2001
From: Christina Nelson <christina.nelson@cern.ch>
Date: Fri, 18 Dec 2020 11:43:50 +0000
Subject: [PATCH 108/308] Nightly art jetrec

---
 .../Jet/JetValidation/test/test_jet.sh        | 22 +++++++-
 .../JetValidation/test/test_jet_noPtCut.sh    | 50 +++++++++++++++++++
 .../Jet/JetValidation/test/test_met.sh        | 50 +++++++++++++++++++
 3 files changed, 120 insertions(+), 2 deletions(-)
 create mode 100755 Reconstruction/Jet/JetValidation/test/test_jet_noPtCut.sh
 create mode 100755 Reconstruction/Jet/JetValidation/test/test_met.sh

diff --git a/Reconstruction/Jet/JetValidation/test/test_jet.sh b/Reconstruction/Jet/JetValidation/test/test_jet.sh
index e564d623c95f..9df2eb1d6820 100755
--- a/Reconstruction/Jet/JetValidation/test/test_jet.sh
+++ b/Reconstruction/Jet/JetValidation/test/test_jet.sh
@@ -2,7 +2,10 @@
 # art-description: ART test job HITS to AOD
 # art-type: grid
 # art-include: master/Athena
+# art-memory: 4096
 # art-output: *.root
+# art-output: dcube
+# art-html: dcube
 
 ART_PATH="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/"
 ART_FILE="mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.simul.HITS.e6337_s3126/HITS.12860054._032508.pool.root.1"
@@ -25,8 +28,23 @@ Reco_tf.py \
     --inputHITSFile=${HITSFile} \
     --outputAODFile=${ART_AOD} \
     --outputNTUP_PHYSVALFile ${ART_Validation} \
-    --validationFlags noExample \
+    --valid=True \
+    --validationFlags 'doInDet,doJet' \
     --autoConfiguration everything \
     --preExec 'from RecExConfig.RecFlags import rec;rec.doTrigger=False'
 
-echo "art-result: $? Reco"
+rc=$?
+echo "art-result: $rc Reco"
+
+rc2=-9999
+if [ ${rc} -eq 0 ]
+then
+  # Histogram comparison with DCube
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+     -p -x dcube \
+     -c /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/JetValidation/DCUBE/jet.xml \
+     -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/JetValidation/reference/nightly_jet.PHYSVAL.root \
+     nightly_jet.PHYSVAL.root
+  rc2=$?
+fi
+echo "art-result: ${rc2} plot"
diff --git a/Reconstruction/Jet/JetValidation/test/test_jet_noPtCut.sh b/Reconstruction/Jet/JetValidation/test/test_jet_noPtCut.sh
new file mode 100755
index 000000000000..9be572f487cd
--- /dev/null
+++ b/Reconstruction/Jet/JetValidation/test/test_jet_noPtCut.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+# art-description: ART test job HITS to AOD
+# art-type: grid
+# art-include: master/Athena
+# art-memory: 4096
+# art-output: *.root
+# art-output: dcube
+# art-html: dcube
+
+ART_PATH="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/"
+ART_FILE="mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.simul.HITS.e6337_s3126/HITS.12860054._032508.pool.root.1"
+HITSFile="${ART_PATH}${ART_FILE}"
+echo "Input HITS file for    : ${HITSFile}"
+
+Nevents=3000
+echo "Number of test events  : ${Nevents}"
+
+ART_AOD="nightly_jet_noPtCut.AOD.pool.root"
+echo "Output AOD file        : ${ART_AOD}"
+
+ART_Validation="nightly_jet_noPtCut.PHYSVAL.root"
+echo "Output Validation file : ${ART_Validation}"
+
+echo "Submitting Reconstruction ..."
+
+Reco_tf.py \
+    --maxEvents -1 \
+    --inputHITSFile=${HITSFile} \
+    --outputAODFile=${ART_AOD} \
+    --outputNTUP_PHYSVALFile ${ART_Validation} \
+    --valid=True \
+    --validationFlags 'doInDet,doJet' \
+    --autoConfiguration everything \
+    --preExec 'from RecExConfig.RecFlags import rec;rec.doTrigger=False; from JetRec.JetRecFlags import jetFlags; jetFlags.useCalibJetThreshold.set_Value_and_Lock(False)'
+
+rc=$?
+echo "art-result: $rc Reco"
+
+rc2=-9999
+if [ ${rc} -eq 0 ]
+then
+  # Histogram comparison with DCube
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+      -p -x dcube \
+      -c /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/JetValidation/DCUBE/jet.xml \
+      -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/JetValidation/reference/nightly_jet_noPtCut.PHYSVAL.root \
+      nightly_jet_noPtCut.PHYSVAL.root
+  rc2=$?
+fi
+echo "art-result: ${rc2} plot"
diff --git a/Reconstruction/Jet/JetValidation/test/test_met.sh b/Reconstruction/Jet/JetValidation/test/test_met.sh
new file mode 100755
index 000000000000..d6b768fe9e18
--- /dev/null
+++ b/Reconstruction/Jet/JetValidation/test/test_met.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+# art-description: ART test job HITS to AOD
+# art-type: grid
+# art-include: master/Athena
+# art-memory: 4096
+# art-output: *.root
+# art-output: dcube
+# art-html: dcube
+
+ART_PATH="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/"
+ART_FILE="mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.simul.HITS.e6337_s3126/HITS.12860054._032508.pool.root.1"
+HITSFile="${ART_PATH}${ART_FILE}"
+echo "Input HITS file for    : ${HITSFile}"
+
+Nevents=3000
+echo "Number of test events  : ${Nevents}"
+
+ART_AOD="nightly_met.AOD.pool.root"
+echo "Output AOD file        : ${ART_AOD}"
+
+ART_Validation="nightly_met.PHYSVAL.root"
+echo "Output Validation file : ${ART_Validation}"
+
+echo "Submitting Reconstruction ..."
+
+Reco_tf.py \
+    --maxEvents -1 \
+    --inputHITSFile=${HITSFile} \
+    --outputAODFile=${ART_AOD} \
+    --outputNTUP_PHYSVALFile ${ART_Validation} \
+    --valid=True \
+    --validationFlags 'doInDet,doMET' \
+    --autoConfiguration everything \
+    --preExec 'from RecExConfig.RecFlags import rec;rec.doTrigger=False'
+
+rc=$?
+echo "art-result: $rc Reco"
+
+rc2=-9999
+if [ ${rc} -eq 0 ]
+then
+  # Histogram comparison with DCube
+  $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \
+     -p -x dcube \
+     -c /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/JetValidation/DCUBE/met.xml \
+     -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/JetValidation/reference/nightly_met.PHYSVAL.root \
+     nightly_met.PHYSVAL.root
+  rc2=$?
+fi
+echo "art-result: ${rc2} plot"
-- 
GitLab


From e55a202652301309452e65207b1bc5563b0d903e Mon Sep 17 00:00:00 2001
From: Matthew Thomas Anthony <matthew.thomas.anthony@cern.ch>
Date: Fri, 18 Dec 2020 11:44:17 +0000
Subject: [PATCH 109/308] Add Flow Elements to Run 3 PFlow configuration

---
 Reconstruction/eflowRec/python/PFCfg.py       | 75 ++++++++++++-------
 .../eflowRec/python/PFRun3Config.py           |  4 +
 2 files changed, 53 insertions(+), 26 deletions(-)

diff --git a/Reconstruction/eflowRec/python/PFCfg.py b/Reconstruction/eflowRec/python/PFCfg.py
index 38fa939422b5..626bc28f946f 100644
--- a/Reconstruction/eflowRec/python/PFCfg.py
+++ b/Reconstruction/eflowRec/python/PFCfg.py
@@ -2,23 +2,23 @@
 from AthenaConfiguration.ComponentFactory import CompFactory
 
 def PFTrackSelectorAlgCfg(inputFlags,algName,useCaching=True):
-    PFTrackSelector=CompFactory.PFTrackSelector
-    PFTrackSelector=PFTrackSelector(algName)
+    PFTrackSelectorFactory=CompFactory.PFTrackSelector
+    PFTrackSelector=PFTrackSelectorFactory(algName)
 
     from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg    
-    Trk__ParticleCaloExtensionTool=CompFactory.Trk.ParticleCaloExtensionTool
+    Trk__ParticleCaloExtensionToolFactory=CompFactory.Trk.ParticleCaloExtensionTool
     result = AtlasExtrapolatorCfg(inputFlags)
-    pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = result.popPrivateTools())
+    pcExtensionTool = Trk__ParticleCaloExtensionToolFactory(Extrapolator = result.popPrivateTools())
 
     eflowTrackCaloExtensionTool=CompFactory.eflowTrackCaloExtensionTool
     TrackCaloExtensionTool=eflowTrackCaloExtensionTool(TrackCaloExtensionTool=pcExtensionTool)
-    if False is useCaching:
+    if (not useCaching):
       TrackCaloExtensionTool.PFParticleCache = ""
 
     PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
 
-    InDet__InDetTrackSelectionTool=CompFactory.InDet.InDetTrackSelectionTool
-    TrackSelectionTool = InDet__InDetTrackSelectionTool("PFTrackSelectionTool")
+    InDet__InDetTrackSelectionToolFactory=CompFactory.InDet.InDetTrackSelectionTool
+    TrackSelectionTool = InDet__InDetTrackSelectionToolFactory("PFTrackSelectionTool")
 
     TrackSelectionTool.CutLevel = "TightPrimary"
     TrackSelectionTool.minPt = 500.0 
@@ -31,8 +31,8 @@ def PFTrackSelectorAlgCfg(inputFlags,algName,useCaching=True):
 
 def getPFClusterSelectorTool(clustersin,calclustersin,algName):
 
-    PFClusterSelectorTool = CompFactory.PFClusterSelectorTool
-    PFClusterSelectorTool = PFClusterSelectorTool(algName)
+    PFClusterSelectorToolFactory = CompFactory.PFClusterSelectorTool
+    PFClusterSelectorTool = PFClusterSelectorToolFactory(algName)
     if clustersin:
         PFClusterSelectorTool.clustersName = clustersin
     if calclustersin:
@@ -50,19 +50,19 @@ def getPFTrackClusterMatchingTool(inputFlags,matchCut,distanceType,clusterPositi
 
 
 def getPFCellLevelSubtractionTool(inputFlags,toolName):
-    PFCellLevelSubtractionTool = CompFactory.PFCellLevelSubtractionTool
-    PFCellLevelSubtractionTool = PFCellLevelSubtractionTool(toolName)
+    PFCellLevelSubtractionToolFactory = CompFactory.PFCellLevelSubtractionTool
+    PFCellLevelSubtractionTool = PFCellLevelSubtractionToolFactory(toolName)
     
     eflowCellEOverPTool_mc12_JetETMiss = CompFactory.eflowCellEOverPTool_mc12_JetETMiss
     PFCellLevelSubtractionTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_JetETMiss()
 
-    if(True is inputFlags.PF.EOverPMode):
+    if(inputFlags.PF.EOverPMode):
         PFCellLevelSubtractionTool.CalcEOverP = True
         PFCellLevelSubtractionTool.nMatchesInCellLevelSubtraction = -1
     else:
         PFCellLevelSubtractionTool.nMatchesInCellLevelSubtraction = 1
 
-    if(True is inputFlags.PF.EOverPMode):
+    if(inputFlags.PF.EOverPMode):
         PFCellLevelSubtractionTool.PFTrackClusterMatchingTool = getPFTrackClusterMatchingTool(inputFlags,0.2,"EtaPhiSquareDistance","PlainEtaPhi","CalObjBldMatchingTool")
     else:
         PFCellLevelSubtractionTool.PFTrackClusterMatchingTool = getPFTrackClusterMatchingTool(inputFlags,1.64,"EtaPhiSquareSignificance","GeomCenterEtaPhi","CalObjBldMatchingTool")
@@ -72,8 +72,8 @@ def getPFCellLevelSubtractionTool(inputFlags,toolName):
     return PFCellLevelSubtractionTool
 
 def getPFRecoverSplitShowersTool(inputFlags,toolName):
-    PFRecoverSplitShowersTool = CompFactory.PFRecoverSplitShowersTool
-    PFRecoverSplitShowersTool = PFRecoverSplitShowersTool(toolName)
+    PFRecoverSplitShowersToolFactory = CompFactory.PFRecoverSplitShowersTool
+    PFRecoverSplitShowersTool = PFRecoverSplitShowersToolFactory(toolName)
 
     eflowCellEOverPTool_mc12_JetETMiss = CompFactory.eflowCellEOverPTool_mc12_JetETMiss
     PFRecoverSplitShowersTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_JetETMiss("eflowCellEOverPTool_mc12_JetETMiss_Recover")
@@ -85,8 +85,8 @@ def getPFRecoverSplitShowersTool(inputFlags,toolName):
     return PFRecoverSplitShowersTool
 
 def getPFMomentCalculatorTool(inputFlags, momentsToCalculateList):
-    PFMomentCalculatorTool = CompFactory.PFMomentCalculatorTool
-    PFMomentCalculatorTool = PFMomentCalculatorTool("PFMomentCalculatorTool")
+    PFMomentCalculatorToolFactory = CompFactory.PFMomentCalculatorTool
+    PFMomentCalculatorTool = PFMomentCalculatorToolFactory("PFMomentCalculatorTool")
 
     from CaloRec.CaloTopoClusterConfig import getTopoMoments
     PFClusterMomentsMaker = getTopoMoments(inputFlags)
@@ -97,7 +97,7 @@ def getPFMomentCalculatorTool(inputFlags, momentsToCalculateList):
     PFClusterCollectionTool = CompFactory.PFClusterCollectionTool
     PFMomentCalculatorTool.PFClusterCollectionTool = PFClusterCollectionTool("PFClusterCollectionTool")
 
-    if(True is inputFlags.PF.useCalibHitTruthClusterMoments):
+    if(inputFlags.PF.useCalibHitTruthClusterMoments):
         PFMomentCalculatorTool.UseCalibHitTruth=True
         from CaloRec.CaloTopoClusterConfig import getTopoCalibMoments
         PFMomentCalculatorTool.CaloCalibClusterMomentsMaker2 = getTopoCalibMoments(inputFlags)
@@ -123,26 +123,49 @@ def getPFLCCalibTool(inputFlags):
     return PFLCCalibTool
 
 def getChargedPFOCreatorAlgorithm(inputFlags,chargedPFOOutputName):
-    PFOChargedCreatorAlgorithm = CompFactory.PFOChargedCreatorAlgorithm
-    PFOChargedCreatorAlgorithm = PFOChargedCreatorAlgorithm("PFOChargedCreatorAlgorithm")
+    PFOChargedCreatorAlgorithmFactory = CompFactory.PFOChargedCreatorAlgorithm
+    PFOChargedCreatorAlgorithm = PFOChargedCreatorAlgorithmFactory("PFOChargedCreatorAlgorithm")
     if chargedPFOOutputName:
         PFOChargedCreatorAlgorithm.PFOOutputName = chargedPFOOutputName
-    if(True is inputFlags.PF.EOverPMode):
+    if(inputFlags.PF.EOverPMode):
         PFOChargedCreatorAlgorithm.PFOOutputName="EOverPChargedParticleFlowObjects"
 
     return PFOChargedCreatorAlgorithm
 
 def getNeutralPFOCreatorAlgorithm(inputFlags,neutralPFOOutputName):
-
-    PFONeutralCreatorAlgorithm = CompFactory.PFONeutralCreatorAlgorithm
-    PFONeutralCreatorAlgorithm =  PFONeutralCreatorAlgorithm("PFONeutralCreatorAlgorithm")
+    PFONeutralCreatorAlgorithmFactory = CompFactory.PFONeutralCreatorAlgorithm
+    PFONeutralCreatorAlgorithm =  PFONeutralCreatorAlgorithmFactory("PFONeutralCreatorAlgorithm")
     if neutralPFOOutputName:
         PFONeutralCreatorAlgorithm.PFOOutputName = neutralPFOOutputName
-    if(True is inputFlags.PF.EOverPMode):
+    if(inputFlags.PF.EOverPMode):
         PFONeutralCreatorAlgorithm.PFOOutputName="EOverPNeutralParticleFlowObjects"
-    if(True is inputFlags.PF.useCalibHitTruthClusterMoments and True is inputFlags.PF.addClusterMoments):
+    if(inputFlags.PF.useCalibHitTruthClusterMoments and inputFlags.PF.addClusterMoments):
         PFONeutralCreatorAlgorithm.UseCalibHitTruth=True
 
     PFONeutralCreatorAlgorithm.DoClusterMoments=inputFlags.PF.addClusterMoments
         
     return PFONeutralCreatorAlgorithm
+
+def getChargedFlowElementCreatorAlgorithm(inputFlags,chargedFlowElementOutputName):    
+    FlowElementChargedCreatorAlgorithmFactory = CompFactory.PFChargedFlowElementCreatorAlgorithm
+    FlowElementChargedCreatorAlgorithm = FlowElementChargedCreatorAlgorithmFactory("PFChargedFlowElementCreatorAlgorithm")
+    if chargedFlowElementOutputName:
+        FlowElementChargedCreatorAlgorithm.FlowElementOutputName=chargedFlowElementOutputName
+    if(inputFlags.PF.EOverPMode):
+        FlowElementChargedCreatorAlgorithm.FlowElementOutputName="EOverPChargedFlowElements"
+
+    return FlowElementChargedCreatorAlgorithm
+
+def getNeutralFlowElementCreatorAlgorithm(inputFlags,neutralFlowElementOutputName):
+    FlowElementNeutralCreatorAlgorithmFactory = CompFactory.PFNeutralFlowElementCreatorAlgorithm
+    FlowElementNeutralCreatorAlgorithm = FlowElementNeutralCreatorAlgorithmFactory("PFNeutralFlowElementCreatorAlgorithm")
+    if neutralFlowElementOutputName:
+        FlowElementNeutralCreatorAlgorithm.FlowElementOutputName=neutralFlowElementOutputName
+    if(inputFlags.PF.EOverPMode):
+        FlowElementNeutralCreatorAlgorithm.FlowElementOutputName="EOverPNeutralFlowElements"
+    if(inputFlags.PF.useCalibHitTruthClusterMoments and inputFlags.PF.addClusterMoments):
+        FlowElementNeutralCreatorAlgorithm.useCalibHitTruth=True
+
+
+    return FlowElementNeutralCreatorAlgorithm
+            
diff --git a/Reconstruction/eflowRec/python/PFRun3Config.py b/Reconstruction/eflowRec/python/PFRun3Config.py
index 3c08b024c150..f6202fe273c6 100644
--- a/Reconstruction/eflowRec/python/PFRun3Config.py
+++ b/Reconstruction/eflowRec/python/PFRun3Config.py
@@ -128,6 +128,10 @@ def PFCfg(inputFlags,**kwargs):
     result.addEventAlgo(getChargedPFOCreatorAlgorithm(inputFlags,""))
     result.addEventAlgo(getNeutralPFOCreatorAlgorithm(inputFlags,""))
 
+    from eflowRec.PFCfg import getChargedFlowElementCreatorAlgorithm,getNeutralFlowElementCreatorAlgorithm
+    result.addEventAlgo(getChargedFlowElementCreatorAlgorithm(inputFlags,""))
+    result.addEventAlgo(getNeutralFlowElementCreatorAlgorithm(inputFlags,""))
+
     return result
 
 if __name__=="__main__":
-- 
GitLab


From dccda59ddba590d6a307f1f0b52831fd32f5a246 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Fri, 18 Dec 2020 12:02:55 +0000
Subject: [PATCH 110/308] HepMC3 nightlies branch fixes 16122020 part 1

---
 Generators/AtlasHepMC/AtlasHepMC/GenVertex.h  |  1 +
 .../HitAnalysis/src/TruthHitAnalysis.cxx      | 39 ++++++++++--------
 .../src/DecayInFlyTruthTrajectoryBuilder.cxx  | 36 +++++++++--------
 .../src/ElasticTruthTrajectoryBuilder.cxx     | 40 ++++++++++---------
 4 files changed, 64 insertions(+), 52 deletions(-)

diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
index 02220ccc846d..78c21f3fddf9 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenVertex.h
@@ -55,6 +55,7 @@ inline void line(std::ostream& os,const GenVertex& v) {v.print(os);}
 inline void line(std::ostream& os,const GenVertex* v) {v->print(os);}
 }
 inline int barcode(ConstGenVertexPtr p) { return p->barcode();}
+inline int barcode(const GenVertex p) { return p.barcode();}
 inline void* raw_pointer(GenVertexPtr p) { return p;}
 inline const void* raw_pointer(ConstGenVertexPtr p) { return p;}
 inline std::ostream& operator<<( std::ostream& os, const GenVertex* v ) { if (v) return os<<(*v); else return os;}
diff --git a/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx
index 278d1b99adbf..350c9c07ac0f 100755
--- a/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx
@@ -249,11 +249,16 @@ StatusCode TruthHitAnalysis::execute() {
     if (currentGenEventIter != mcCollection->end()) {
       int nvtx = 0;
       int nvtx_sec=0;
-      for (HepMC::GenEvent::vertex_const_iterator vtx=(*currentGenEventIter)->vertices_begin(); vtx!=(*currentGenEventIter)->vertices_end(); ++vtx) {
-	double x = (*vtx)->position().x();
-	double y = (*vtx)->position().y();
-	double z = (*vtx)->position().z();
-	double r = sqrt(x*x+y*y);
+#ifdef HEPMC3
+    for (auto vtx: (*currentGenEventIter)->vertices()) {
+#else
+    for (HepMC::GenEvent::vertex_const_iterator vtxit=(*currentGenEventIter)->vertices_begin(); vtxit!=(*currentGenEventIter)->vertices_end(); ++vtxit) {
+    auto vtx=*vtxit;
+#endif
+	double x = vtx->position().x();
+	double y = vtx->position().y();
+	double z = vtx->position().z();
+	double r = std::sqrt(x*x+y*y);
 	m_h_vtx_x->Fill(x);
 	m_h_vtx_y->Fill(y);
 	m_h_vtx_r->Fill(r);
@@ -284,9 +289,9 @@ StatusCode TruthHitAnalysis::execute() {
 
       int npart_prim=0; 
       int npart_sec=0;
-      HepMC::GenEvent::particle_const_iterator currentGenParticleIter;
-      for (currentGenParticleIter=(*currentGenEventIter)->particles_begin(); currentGenParticleIter!=(*currentGenEventIter)->particles_end(); ++currentGenParticleIter) {
-	const HepMC::FourVector mom = (*currentGenParticleIter)->momentum();
+
+      for (auto currentGenParticle: *(*currentGenEventIter)) {
+	const HepMC::FourVector mom = currentGenParticle->momentum();
 
 	m_h_truth_px->Fill(mom.x());
 	m_h_truth_py->Fill(mom.y());
@@ -294,27 +299,27 @@ StatusCode TruthHitAnalysis::execute() {
 	m_h_truth_pt->Fill(mom.perp());
 	m_h_truth_eta->Fill(mom.eta());
 	m_h_truth_phi->Fill(mom.phi());
-	m_h_barcode->Fill((*currentGenParticleIter)->barcode());
-	m_h_part_status->Fill((*currentGenParticleIter)->status());
+	m_h_barcode->Fill(HepMC::barcode(currentGenParticle));
+	m_h_part_status->Fill(currentGenParticle->status());
 	m_truth_px->push_back(mom.x());
 	m_truth_py->push_back(mom.y());
 	m_truth_pz->push_back(mom.z());
 	m_truth_pt->push_back(mom.perp());
 	m_truth_eta->push_back(mom.eta());
 	m_truth_phi->push_back(mom.phi());
-	m_barcode->push_back((*currentGenParticleIter)->barcode());		
-	m_status->push_back((*currentGenParticleIter)->status());
+	m_barcode->push_back(HepMC::barcode(currentGenParticle));		
+	m_status->push_back(currentGenParticle->status());
 	
-	int pdg = (*currentGenParticleIter)->pdg_id();
+	int pdg = currentGenParticle->pdg_id();
 	m_pdgid->push_back(pdg);
 	
-	if ((*currentGenParticleIter)->barcode() < 200000) {
+	if (HepMC::barcode(currentGenParticle) < 200000) {
 	  m_h_part_pdgid->Fill(pdg);
-	  m_h_part_p->Fill(mom.rho());
+	  m_h_part_p->Fill(std::sqrt(mom.x()*mom.x()+mom.y()*mom.y()+mom.z()*mom.z()));
 	  m_h_part_eta->Fill(mom.eta());
 	  m_h_part_phi->Fill(mom.phi());
 	  ++npart_prim; 
-	  if ((*currentGenParticleIter)->barcode() < 10000) {
+	  if (HepMC::barcode(currentGenParticle) < 10000) {
 	    m_h_n_generations->Fill(0);
 	  }
 	  else {
@@ -324,7 +329,7 @@ StatusCode TruthHitAnalysis::execute() {
 	else {
 	  m_h_part_pdgid_sec->Fill(pdg);
 	  ++npart_sec;
-	  const int gen = (*currentGenParticleIter)->barcode()/1000000 + 2;
+	  const int gen = HepMC::barcode(currentGenParticle)/1000000 + 2;
 	  m_h_n_generations->Fill(gen);    
 	}
       } // End iteration over particles
diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
index 1a77376c8404..9e25de02879f 100644
--- a/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
@@ -36,17 +36,17 @@ StatusCode DecayInFlyTruthTrajectoryBuilder::initialize() {
 
 //================================================================
 void DecayInFlyTruthTrajectoryBuilder::
-buildTruthTrajectory(TruthTrajectory *result, const HepMC::GenParticle *input) const
+buildTruthTrajectory(TruthTrajectory *result, HepMC::ConstGenParticlePtr input) const
 {
   result->clear();
   if(input) {
-    const HepMC::GenParticle *next(nullptr);
-    const HepMC::GenParticle *current = input;
+    HepMC::ConstGenParticlePtr  next{nullptr};
+    HepMC::ConstGenParticlePtr  current = input;
 
     // Extend trajectory outwards.  The last particle should go at [0]
     // in the TruthTrajectory, so we need to use a tmp storage while
     // traversing the structure.
-    std::stack<const HepMC::GenParticle*> tmp;
+    std::stack<HepMC::ConstGenParticlePtr> tmp;
     while( (next = getDaughter(current)) ) {
       tmp.push(current = next);
     }
@@ -69,15 +69,20 @@ buildTruthTrajectory(TruthTrajectory *result, const HepMC::GenParticle *input) c
 
 //================================================================
 DecayInFlyTruthTrajectoryBuilder::MotherDaughter
-DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(const HepMC::GenVertex *vtx) const
+DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(HepMC::ConstGenVertexPtr vtx) const
 {
-  const HepMC::GenParticle *mother(nullptr);
-  const HepMC::GenParticle *daughter(nullptr);
-  
+  HepMC::GenParticlePtr mother{nullptr};
+  HepMC::GenParticlePtr daughter{nullptr};
   // only truth vertices with 1 incoming particle
+#ifdef HEPMC3
+  if(vtx && (vtx->particles_in().size() == 1)) {
+
+    mother = vtx->particles_in().front();
+#else 
   if(vtx && (vtx->particles_in_size() == 1)) {
 
     mother = *vtx->particles_in_const_begin();
+#endif    
     // Allow status code 1 and 2.  E.g. a pion that produced a long track can decay  outside of InDet and have status==2.
     if( mother && (mother->status() < 3) ) {
     
@@ -92,11 +97,8 @@ DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(const HepMC::GenVertex *vt
       if (vtx->particles_out_size() <= 2) {
 
 	int num_passed_cuts = 0;
-	const HepMC::GenParticle *passed_cuts(nullptr);
-	for(HepMC::GenVertex::particles_in_const_iterator it = vtx->particles_out_const_begin();
-	    it != vtx->particles_out_const_end(); ++it) {
-	
-	  const HepMC::GenParticle *candidate = *it;
+	HepMC::GenParticlePtr passed_cuts{nullptr};
+	for(HepMC::GenParticlePtr candidate: *vtx){
 	  if(candidate->pdg_id() == mother->pdg_id()) {
 
 	    if(passed_cuts && (mother->pdg_id() == 11)) { // second negative electron is a special case
@@ -128,9 +130,9 @@ DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(const HepMC::GenVertex *vt
 }
 
 //================================================================
-const HepMC::GenParticle* DecayInFlyTruthTrajectoryBuilder::getDaughter(const HepMC::GenParticle* mother) const {
+HepMC::ConstGenParticlePtr DecayInFlyTruthTrajectoryBuilder::getDaughter(HepMC::ConstGenParticlePtr mother) const {
 
-  const HepMC::GenParticle *daughter = nullptr;
+  HepMC::ConstGenParticlePtr daughter{nullptr};
   
   if(mother) {
 
@@ -145,9 +147,9 @@ const HepMC::GenParticle* DecayInFlyTruthTrajectoryBuilder::getDaughter(const He
 }
 
 //================================================================
-const HepMC::GenParticle* DecayInFlyTruthTrajectoryBuilder::getMother(const HepMC::GenParticle* daughter) const {
+HepMC::ConstGenParticlePtr DecayInFlyTruthTrajectoryBuilder::getMother(HepMC::ConstGenParticlePtr daughter) const {
 
-  const HepMC::GenParticle *mother = nullptr;
+  HepMC::ConstGenParticlePtr mother{nullptr};
 
   if(daughter) {
 
diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/ElasticTruthTrajectoryBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/ElasticTruthTrajectoryBuilder.cxx
index be2b26513633..5a76927964de 100644
--- a/Tracking/TrkTools/TrkTruthCreatorTools/src/ElasticTruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/ElasticTruthTrajectoryBuilder.cxx
@@ -36,17 +36,17 @@ StatusCode ElasticTruthTrajectoryBuilder::initialize() {
 
 //================================================================
 void ElasticTruthTrajectoryBuilder::
-buildTruthTrajectory(TruthTrajectory *result, const HepMC::GenParticle *input) const
+buildTruthTrajectory(TruthTrajectory *result, HepMC::ConstGenParticlePtr input) const
 {
 	result->clear();
 	if(input) {
-		const HepMC::GenParticle *next(nullptr);
-		const HepMC::GenParticle *current = input;
+		HepMC::ConstGenParticlePtr next(nullptr);
+		HepMC::ConstGenParticlePtr current = input;
 
 		// Extend trajectory outwards.  The last particle should go at [0]
 		// in the TruthTrajectory, so we need to use a tmp storage while
 		// traversing the structure.
-		std::stack<const HepMC::GenParticle*> tmp;
+		std::stack<HepMC::ConstGenParticlePtr> tmp;
 		while( (next = getDaughter(current)) ) {
 			tmp.push(current = next);
 		}
@@ -69,15 +69,19 @@ buildTruthTrajectory(TruthTrajectory *result, const HepMC::GenParticle *input) c
 
 //================================================================
 ElasticTruthTrajectoryBuilder::MotherDaughter
-	ElasticTruthTrajectoryBuilder::truthTrajectoryCuts(const HepMC::GenVertex *vtx) const
+	ElasticTruthTrajectoryBuilder::truthTrajectoryCuts(HepMC::ConstGenVertexPtr vtx) const
 {
-	const HepMC::GenParticle *mother(nullptr);
-	const HepMC::GenParticle *daughter(nullptr);
-
+	HepMC::ConstGenParticlePtr mother{nullptr};
+	HepMC::ConstGenParticlePtr daughter{nullptr};
 	// only truth vertices with 1 incoming particle
+#ifdef HEPMC3
+	if(vtx && (vtx->particles_in().size() == 1)) {
+		mother = vtx->particles_in().front();
+#else
 	if(vtx && (vtx->particles_in_size() == 1)) {
 
 		mother = *vtx->particles_in_const_begin();
+#endif
 		// Allow status code 1 and 2.  E.g. a pion that produced a long track can decay  outside of InDet and have status==2.
 		if( mother && (mother->status() < 3) ) {
 
@@ -89,14 +93,14 @@ ElasticTruthTrajectoryBuilder::MotherDaughter
 			// is that with the higher energy (NOT pt).
 			// 
 			// allow 1 outgoing to cover possible vertexes from interaction in detector material
+#ifdef HEPMC3
+			if (vtx->particles_out().size() <= 2) {
+#else
 			if (vtx->particles_out_size() <= 2) {
-
+#endif
 				int num_passed_cuts = 0;
-				const HepMC::GenParticle *passed_cuts(nullptr);
-				for(HepMC::GenVertex::particles_in_const_iterator it = vtx->particles_out_const_begin();
-				it != vtx->particles_out_const_end(); ++it) {
-
-					const HepMC::GenParticle *candidate = *it;
+				HepMC::ConstGenParticlePtr passed_cuts{nullptr};
+				for(auto candidate: *vtx) {
 					if(candidate->pdg_id() == mother->pdg_id()) {
 
 						if(passed_cuts && (mother->pdg_id() == 11)) { // second negative electron is a special case
@@ -122,9 +126,9 @@ ElasticTruthTrajectoryBuilder::MotherDaughter
 }
 
 //================================================================
-const HepMC::GenParticle* ElasticTruthTrajectoryBuilder::getDaughter(const HepMC::GenParticle* mother) const {
+HepMC::ConstGenParticlePtr ElasticTruthTrajectoryBuilder::getDaughter(HepMC::ConstGenParticlePtr mother) const {
 
-	const HepMC::GenParticle *daughter = nullptr;
+	HepMC::ConstGenParticlePtr daughter{nullptr};
 
 	if(mother) {
 
@@ -139,9 +143,9 @@ const HepMC::GenParticle* ElasticTruthTrajectoryBuilder::getDaughter(const HepMC
 }
 
 //================================================================
-const HepMC::GenParticle* ElasticTruthTrajectoryBuilder::getMother(const HepMC::GenParticle* daughter) const {
+HepMC::ConstGenParticlePtr ElasticTruthTrajectoryBuilder::getMother(HepMC::ConstGenParticlePtr daughter) const {
 
-	const HepMC::GenParticle *mother = nullptr;
+	HepMC::ConstGenParticlePtr mother{nullptr};
 
 	if(daughter) {
 
-- 
GitLab


From ca2760e6264419179a458f66e94b37df83296958 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Fri, 18 Dec 2020 12:32:02 +0000
Subject: [PATCH 111/308] Small fixes and renaming in min bias algs & config

---
 .../python/TrackCountMonitoringMT.py          |   8 +-
 .../TrigMinBias/src/TrackCountHypoAlgMT.cxx   | 114 ++++++-----
 .../TrigMinBias/src/TrackCountHypoAlgMT.h     |  14 +-
 .../TrigMinBias/src/TrackCountHypoTool.cxx    |  66 ++++---
 .../TrigMinBias/src/TrackCountHypoTool.h      |  10 +-
 .../MinBias/MinBiasMenuSequences.py           | 187 +++++++-----------
 6 files changed, 190 insertions(+), 209 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigMinBias/python/TrackCountMonitoringMT.py b/Trigger/TrigAlgorithms/TrigMinBias/python/TrackCountMonitoringMT.py
index 9972a81fb3f8..207b77f89780 100644
--- a/Trigger/TrigAlgorithms/TrigMinBias/python/TrackCountMonitoringMT.py
+++ b/Trigger/TrigAlgorithms/TrigMinBias/python/TrackCountMonitoringMT.py
@@ -2,9 +2,11 @@
 def TrackCountMonitoring():
     from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
     monTool = GenericMonitoringTool('MonTool')
-    monTool.defineHistogram('ntrks', path='EXPERT', type='TH1I', title='ntrks',xbins=100, xmin=-0.5, xmax=4999.5)
+    monTool.defineHistogram('ntrks', path='EXPERT', type='TH1I', title='ntrks', xbins=100, xmin=-0.5, xmax=4999.5)
     from TrigMinBias.TrigMinBiasConf import TrackCountHypoAlgMT
     alg=TrackCountHypoAlgMT()
-    for i in range(len(alg.min_pt)):
-        monTool.defineHistogram('counts_minpTcutIndex_{}_maxZ0cutIndex_{}'.format(i,i), path='EXPERT', type='TH1I', title='counts for min pT and max z0 cut',xbins=100, xmin=-0.5, xmax=4999.5)
+    for i in range(len(alg.minPt)):
+        monTool.defineHistogram('countsForSelection{}'.format(i),
+                                path='EXPERT', type='TH1I', title='counts for min pT and max z0 cut',
+                                xbins=100, xmin=-0.5, xmax=4999.5)
     return monTool
diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.cxx b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.cxx
index 171a55ba8dd8..1cebee7f19e3 100644
--- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.cxx
@@ -8,19 +8,18 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #include "AthViews/ViewHelper.h"
 
 using TrigCompositeUtils::createAndStore;
-using TrigCompositeUtils::DecisionContainer;
 using TrigCompositeUtils::DecisionAuxContainer;
+using TrigCompositeUtils::DecisionContainer;
 using TrigCompositeUtils::DecisionIDContainer;
 using TrigCompositeUtils::decisionIDs;
-using TrigCompositeUtils::newDecisionIn;
-using TrigCompositeUtils::linkToPrevious;
-using TrigCompositeUtils::viewString;
 using TrigCompositeUtils::featureString;
 using TrigCompositeUtils::findLink;
 using TrigCompositeUtils::LinkInfo;
+using TrigCompositeUtils::linkToPrevious;
+using TrigCompositeUtils::newDecisionIn;
+using TrigCompositeUtils::viewString;
 
-TrackCountHypoAlgMT::TrackCountHypoAlgMT(const std::string& name, ISvcLocator* pSvcLocator) :
-::HypoBase(name, pSvcLocator)
+TrackCountHypoAlgMT::TrackCountHypoAlgMT(const std::string &name, ISvcLocator *pSvcLocator) : ::HypoBase(name, pSvcLocator)
 {
 }
 
@@ -29,103 +28,114 @@ StatusCode TrackCountHypoAlgMT::initialize()
   ATH_CHECK(m_tracksKey.initialize());
   ATH_CHECK(m_trackCountKey.initialize());
   renounce(m_tracksKey);
-  ATH_CHECK(m_min_pt.size()==m_max_z0.size());
+  ATH_CHECK(m_minPt.size() == m_maxZ0.size());
 
-  if (m_tracksKey.key() == "Undefined" || m_trackCountKey.key() == "Undefined") {
-    ATH_MSG_ERROR("either track Key name or track count key name is undefined " );
+  if (m_tracksKey.key() == "Undefined" || m_trackCountKey.key() == "Undefined")
+  {
+    ATH_MSG_ERROR("either track Key name or track count key name is undefined ");
     return StatusCode::FAILURE;
   }
 
   ATH_CHECK(m_hypoTools.retrieve());
-  if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
+  if (!m_monTool.empty())
+    ATH_CHECK(m_monTool.retrieve());
 
   return StatusCode::SUCCESS;
 }
 
-StatusCode TrackCountHypoAlgMT::execute(const EventContext& context) const
+StatusCode TrackCountHypoAlgMT::execute(const EventContext &context) const
 {
-  ATH_MSG_DEBUG ( "Executing " << name() << "..." );
-  auto previousDecisionsHandle = SG::makeHandle( decisionInput(), context );
+  ATH_MSG_DEBUG("Executing " << name() << "...");
+  auto previousDecisionsHandle = SG::makeHandle(decisionInput(), context);
 
-  if( not previousDecisionsHandle.isValid() ) {//implicit
-    ATH_MSG_DEBUG( "No implicit RH for previous decisions "<<  decisionInput().key()<<": is this expected?" );
+  if (not previousDecisionsHandle.isValid())
+  { //implicit
+    ATH_MSG_DEBUG("No implicit RH for previous decisions " << decisionInput().key() << ": is this expected?");
     return StatusCode::SUCCESS;
   }
 
-  if (previousDecisionsHandle->size() == 0) {
-    ATH_MSG_DEBUG( "No previous decision, nothing to do.");
+  if (previousDecisionsHandle->size() == 0)
+  {
+    ATH_MSG_DEBUG("No previous decision, nothing to do.");
     return StatusCode::SUCCESS;
-  } else if (previousDecisionsHandle->size() > 1) {
-    ATH_MSG_ERROR("Found " << previousDecisionsHandle->size() <<" previous decisions.");
+  }
+  else if (previousDecisionsHandle->size() > 1)
+  {
+    ATH_MSG_ERROR("Found " << previousDecisionsHandle->size() << " previous decisions.");
     return StatusCode::FAILURE;
   }
 
-  ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() <<" implicit ReadHandles for previous decisions");
+  ATH_MSG_DEBUG("Running with " << previousDecisionsHandle->size() << " implicit ReadHandles for previous decisions");
 
+  const auto viewTrk = (previousDecisionsHandle->at(0))->objectLink<ViewContainer>(viewString());
+  ATH_CHECK(viewTrk.isValid());
+  auto tracksHandle = ViewHelper::makeHandle(*viewTrk, m_tracksKey, context);
+  ATH_CHECK(tracksHandle.isValid());
+  ATH_MSG_DEBUG("spacepoint handle size: " << tracksHandle->size() << "...");
 
-  const auto viewTrk = (previousDecisionsHandle->at(0))->objectLink<ViewContainer>( viewString() );
-  ATH_CHECK( viewTrk.isValid() );
-  auto tracksHandle = ViewHelper::makeHandle( *viewTrk, m_tracksKey, context );
-  ATH_CHECK( tracksHandle.isValid() );
-  ATH_MSG_DEBUG ( "spacepoint handle size: " << tracksHandle->size() << "..." );
+  int ntrks = tracksHandle->size();
+  ATH_MSG_DEBUG("Successfully retrieved track container of size" << ntrks);
 
-  int ntrks=tracksHandle->size();
-  ATH_MSG_DEBUG ("Successfully retrieved track container of size" <<ntrks);
-
-  std::vector<int> counts(m_min_pt.size());
-  for (const auto  trackPtr: *tracksHandle){
-    const Trk::Perigee& aMeasPer = trackPtr->perigeeParameters();
+  std::vector<int> counts(m_minPt.size());
+  for (const auto trackPtr : *tracksHandle)
+  {
+    const Trk::Perigee &aMeasPer = trackPtr->perigeeParameters();
     const double pT = aMeasPer.pT();
     const double z0 = aMeasPer.parameters()[Trk::z0];
 
-    for (long unsigned int i=0;i<m_min_pt.size();i++){
-      if(pT >= m_min_pt[i] && std::fabs(z0) < m_max_z0[i]) counts[i]++;
+    for (long unsigned int i = 0; i < m_minPt.size(); i++)
+    {
+      if (pT >= m_minPt[i] && std::fabs(z0) < m_maxZ0[i])
+        counts[i]++;
     }
   }
-  for (long unsigned int i=0;i<m_min_pt.size();i++){
-    ATH_MSG_DEBUG( "Number of tracks found with pT cut= "<<m_min_pt[i] << " MeV =" <<"and z0 cut= "<<m_max_z0[i] <<  counts[i] );
+  for (long unsigned int i = 0; i < m_minPt.size(); i++)
+  {
+    ATH_MSG_DEBUG("Number of tracks found with pT cut= " << m_minPt[i] << " MeV ="
+                                                         << "and z0 cut= " << m_maxZ0[i] << counts[i]);
   }
 
   // Recording Data
-  auto trackCountContainer = std::make_unique< xAOD::TrigCompositeContainer>();
-  auto trackCountContainerAux = std::make_unique< xAOD::TrigCompositeAuxContainer>();
+  auto trackCountContainer = std::make_unique<xAOD::TrigCompositeContainer>();
+  auto trackCountContainerAux = std::make_unique<xAOD::TrigCompositeAuxContainer>();
   trackCountContainer->setStore(trackCountContainerAux.get());
 
-  xAOD::TrigComposite * trackCount = new xAOD::TrigComposite();
+  xAOD::TrigComposite *trackCount = new xAOD::TrigComposite();
   trackCountContainer->push_back(trackCount);
   trackCount->setDetail("ntrks", ntrks);
-  trackCount->setDetail("pTcuts", static_cast<std::vector<float>>(m_min_pt));
-  trackCount->setDetail("z0cuts", static_cast<std::vector<float>>(m_max_z0));
+  trackCount->setDetail("pTcuts", static_cast<std::vector<float>>(m_minPt));
+  trackCount->setDetail("z0cuts", static_cast<std::vector<float>>(m_maxZ0));
   trackCount->setDetail("counts", counts);
 
   // TODO revisit
 
-  auto mon_ntrks = Monitored::Scalar<int>("ntrks",ntrks);
-  Monitored::Group(m_monTool,mon_ntrks);
-  for(long unsigned int i=0;i<counts.size();i++){
-    auto mon_counts = Monitored::Scalar<int>("counts"+std::to_string(i),counts[i]);
-    Monitored::Group(m_monTool,mon_counts);
+  auto mon_ntrks = Monitored::Scalar<int>("ntrks", ntrks);
+  Monitored::Group(m_monTool, mon_ntrks);
+  for (long unsigned int i = 0; i < counts.size(); i++)
+  {
+    auto mon_counts = Monitored::Scalar<int>("counts" + std::to_string(i), counts[i]);
+    Monitored::Group(m_monTool, mon_counts);
   }
 
-  SG::WriteHandle<DecisionContainer> outputHandle = createAndStore(decisionOutput(), context );
+  SG::WriteHandle<DecisionContainer> outputHandle = createAndStore(decisionOutput(), context);
   auto decisions = outputHandle.ptr();
 
-  auto d = newDecisionIn( decisions);
-  linkToPrevious( d, decisionInput().key(), 0 );
+  auto d = newDecisionIn(decisions);
+  linkToPrevious(d, decisionInput().key(), 0);
 
   TrigCompositeUtils::DecisionIDContainer prev;
-  TrigCompositeUtils::decisionIDs( previousDecisionsHandle->at(0), prev );
+  TrigCompositeUtils::decisionIDs(previousDecisionsHandle->at(0), prev);
 
   TrackCountHypoTool::TrkCountsInfo trkinfo{d, trackCount, prev};
 
-  for(auto &tool:m_hypoTools)
+  for (auto &tool : m_hypoTools)
   {
     ATH_CHECK(tool->decide(trkinfo));
   }
 
   SG::WriteHandle<xAOD::TrigCompositeContainer> trackCountHandle(m_trackCountKey, context);
-  ATH_CHECK(trackCountHandle.record( std::move( trackCountContainer ), std::move( trackCountContainerAux ) ) );
-  d->setObjectLink( featureString(), ElementLink<xAOD::TrigCompositeContainer>( m_trackCountKey.key(), 0) );
+  ATH_CHECK(trackCountHandle.record(std::move(trackCountContainer), std::move(trackCountContainerAux)));
+  d->setObjectLink(featureString(), ElementLink<xAOD::TrigCompositeContainer>(m_trackCountKey.key(), 0));
   //ATH_CHECK( hypoBaseOutputProcessing(outputHandle) );
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.h b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.h
index 715c4de3e655..6c1c91eba2b1 100644
--- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.h
+++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoAlgMT.h
@@ -27,12 +27,12 @@ public:
 
 private:
   TrackCountHypoAlgMT();
-  ToolHandleArray< TrackCountHypoTool > m_hypoTools {this, "HypoTools", {},"Tools that perform actual selection"};
-  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_tracksKey{this,"tracksKey","Undefined",""};
-  SG::WriteHandleKey<xAOD::TrigCompositeContainer> m_trackCountKey{this,"trackCountKey","Undefined",""};
-  Gaudi::Property<std::vector<float>> m_min_pt{this, "min_pt",{0.1,0.2,4.0,5.0}, "Accept events with momentum higher than this limit"};
-  Gaudi::Property<std::vector<float>> m_max_z0{this, "max_z0",{100,401,200,300}, "Accept events with absolute value of vertex position lower \
-  than this limit in mm; this vector has to be of the same size as min_pT vector, repetition of cut values are allowed if that makes the number of elements the same"};
-  ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
+  ToolHandleArray< TrackCountHypoTool > m_hypoTools {this, "HypoTools", {}, "Tools that perform actual selection"};
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_tracksKey{this, "tracksKey", "Undefined", ""};
+  SG::WriteHandleKey<xAOD::TrigCompositeContainer> m_trackCountKey{this, "trackCountKey", "Undefined", ""};
+  Gaudi::Property<std::vector<float>> m_minPt{this, "minPt", {0.1,0.2,4.0,5.0}, "Accept events with momentum higher than this limit"};
+  Gaudi::Property<std::vector<float>> m_maxZ0{this, "maxZ0", {100,401,200,300}, "Accept events with absolute value of vertex position lower \
+      than this limit in mm; this vector has to be of the same size as minPt vector, repetition of cut values are allowed if that makes the number of elements the same"};
+  ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool", "", "Monitoring tool"};
 };
 #endif // TRIGT2MINBIAS_TRACKCOUNTHYPOALGMT_H
diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.cxx b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.cxx
index 7b1616eb9278..83c4fa7f761b 100644
--- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.cxx
@@ -3,7 +3,6 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-
 #include "TrigCompositeUtils/HLTIdentifier.h"
 #include "AthenaMonitoringKernel/Monitored.h"
 
@@ -11,19 +10,26 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 using namespace TrigCompositeUtils;
 
-TrackCountHypoTool::TrackCountHypoTool( const std::string& type,const std::string& name,const IInterface* parent )
-: AthAlgTool( type, name, parent ),
-m_decisionId( HLT::Identifier::fromToolName( name ) ) {}
+TrackCountHypoTool::TrackCountHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
+	: AthAlgTool(type, name, parent),
+	  m_decisionId(HLT::Identifier::fromToolName(name)) {}
 
-StatusCode TrackCountHypoTool::initialize()  {
+StatusCode TrackCountHypoTool::initialize()
+{
 	return StatusCode::SUCCESS;
 }
 
-StatusCode TrackCountHypoTool::decide(  TrkCountsInfo& trkinfo )  const {
-	if ( trkinfo.previousDecisionIDs.count( m_decisionId.numeric() ) == 0 ) {
+StatusCode TrackCountHypoTool::decide(TrkCountsInfo &trkinfo) const
+{
+	if (trkinfo.previousDecisionIDs.count(m_decisionId.numeric()) == 0)
+	{
 		ATH_MSG_DEBUG("Already rejected");
 		return StatusCode::SUCCESS;
 	}
+	if ( m_acceptAll ) {		
+		addDecisionID(m_decisionId.numeric(), trkinfo.decision);
+		ATH_MSG_DEBUG("REGTEST event accepted because of acceptAll");
+	}
 
 	std::vector<int> counts;
 
@@ -34,35 +40,35 @@ StatusCode TrackCountHypoTool::decide(  TrkCountsInfo& trkinfo )  const {
 	trkinfo.counts->getDetail<std::vector<float>>("z0cuts", z0cuts);
 	float countForConfiguredPtThreshold{};
 	bool found{false};
-	for ( size_t i = 0; i < counts.size(); ++i ) {
-		 if ( std::abs( pTcuts[i] - m_min_pt ) < 0.001 && std::abs( z0cuts[i] - m_max_z0 ) < 0.001 ) {
+	for (size_t i = 0; i < counts.size(); ++i)
+	{
+		if (std::abs(pTcuts[i] - m_minPt) < 0.001 && std::abs(z0cuts[i] - m_maxZ0) < 0.001)
+		{
 			found = true;
 			countForConfiguredPtThreshold = counts[i];
-		 }
+		}
 	}
-	if (!found ) {
-		ATH_MSG_ERROR ("Unable to find tracks count for requested pT threshold " << m_min_pt << " need to fix hypo tool configuratio or add new threshold in tracks counting");
-	  for ( size_t i = 0; i < counts.size(); ++i ) {
-	    ATH_MSG_ERROR( "Count of tracks of pT above " << pTcuts[i]  << " is available");
-	  }
-	  return StatusCode::FAILURE;
+
+	if (!found)
+	{
+		ATH_MSG_ERROR("Unable to find tracks count for requested pT threshold " << m_minPt << " need to fix hypo tool configuration or add new threshold in tracks counting");
+		for (size_t i = 0; i < counts.size(); ++i)
+		{
+			ATH_MSG_ERROR("Count of tracks of pT above " << pTcuts[i] << " and z0 requirement "  << z0cuts[i] << " that are available");
+		}
+		return StatusCode::FAILURE;
 	}
-	else{
-		ATH_MSG_DEBUG ("REGTEST found "<<countForConfiguredPtThreshold <<" tracks for "<<m_min_pt);
+	else
+	{
+		ATH_MSG_DEBUG("REGTEST found " << countForConfiguredPtThreshold << " tracks for " << m_minPt);
 	}
-	std::vector<bool> decisionCuts({
-		(m_required_ntrks != -1 ? m_required_ntrks <= countForConfiguredPtThreshold  :  (bool)m_logicAnd),
-		(m_max_required_ntrks != -1 ? m_max_required_ntrks > countForConfiguredPtThreshold : (bool)m_logicAnd)
-	});
+	
+	const bool minTrkPassed = (m_minNtrks == -1) or (countForConfiguredPtThreshold > m_minNtrks);
+	const bool maxTrkPassed = (m_maxNtrks == -1) or (countForConfiguredPtThreshold < m_maxNtrks);
 
-	if(m_logicAnd && !std::all_of(decisionCuts.begin(),decisionCuts.end(),[](bool k ){return k; }) ){
-
-		return StatusCode::SUCCESS;
-	}else if(m_logicAnd==false && !std::any_of(decisionCuts.begin(),decisionCuts.end(),[](bool k ){return k; }) ){
-		return StatusCode::SUCCESS;
-	}else{
-		addDecisionID( m_decisionId.numeric(), trkinfo.decision );
-		ATH_MSG_DEBUG ("REGTEST event accepted");
+	if ( minTrkPassed and maxTrkPassed ) {		
+		addDecisionID(m_decisionId.numeric(), trkinfo.decision);
+		ATH_MSG_DEBUG("REGTEST event accepted");
 	}
 	return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.h b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.h
index 4c0347dca06f..f62a1800900b 100644
--- a/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.h
+++ b/Trigger/TrigAlgorithms/TrigMinBias/src/TrackCountHypoTool.h
@@ -31,13 +31,11 @@ public:
   private:
 
     HLT::Identifier m_decisionId;
-    Gaudi::Property<float> m_min_pt{this, "min_pt",0.1, "Accept events with momentum higher than this limit in MeV"};
-    Gaudi::Property<float> m_max_z0{this, "max_z0",100, "Accept events with absolute value of vertex lower than this limit in mm"};
-    Gaudi::Property<float> m_required_ntrks{this, "required_ntrks", 1, "Accept events with minimum of this number of tracks"};
-    Gaudi::Property<float> m_max_required_ntrks{this, "max_required_ntrks", -1, "Accept events with maximum of this number of tracks"};
+    Gaudi::Property<float> m_minPt{this, "minPt",0.1, "Accept events with momentum higher than this limit in MeV"};
+    Gaudi::Property<float> m_maxZ0{this, "maxZ0",100, "Accept events with absolute value of vertex lower than this limit in mm"};
+    Gaudi::Property<float> m_minNtrks{this, "minNtrks", 1, "Accept events with minimum of this number of tracks, -1 means this cut is disabled"};
+    Gaudi::Property<float> m_maxNtrks{this, "maxNtrks", -1, "Accept events with maximum of this number of tracks, -1 means this cut is disabled"};
     Gaudi::Property<bool> m_acceptAll{this, "acceptAll", false, "Accept all events"};
-    Gaudi::Property<bool> m_cutMinAndMax{this, "cutMinAndMax", false, "take events within the given higher and lower limt/cut"};
-    Gaudi::Property<bool> m_logicAnd{this, "TriggerTypeAnd", true, "And/Or Logic"};
   };
 
   #endif //> !TRIGT2MINBIAS_TRACKCOUNTHYPOTOOL_H
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py
index 1f3adb4398ed..a23cf16951fa 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py
@@ -15,156 +15,121 @@ from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
 ########
 # to move into TrigMinBiasHypoConfigMT?
 
-def SPCountHypoToolGen(chainDict):        
+def SPCountHypoToolGen(chainDict):
     from TrigT2MinBias.TrigT2MinBiasConf import SPCountHypoTool
     hypo = SPCountHypoTool(chainDict["chainName"])
     if "hmt" in chainDict["chainName"]:
-        hypo.totNumSctSP = int( chainDict["chainParts"][0]["hypoL2Info"].strip("sp") )
+        hypo.totNumSctSP = int(chainDict["chainParts"][0]["hypoL2Info"].strip("sp"))
     if "mb_sptrk" in chainDict["chainName"]:
-        hypo.totNumPixSP  = 2
-        hypo.totNumSctSP  = 3
+        hypo.totNumPixSP = 2
+        hypo.totNumSctSP = 3
             # will set here thresholds
     return hypo
 
 
 
 def TrackCountHypoToolGen(chainDict):
-    from TrigMinBias.TrigMinBiasConf import  TrackCountHypoTool
+    from TrigMinBias.TrigMinBiasConf import TrackCountHypoTool
     hypo = TrackCountHypoTool(chainDict["chainName"])
     if "hmt" in chainDict["chainName"]:
-        hypo.required_ntrks = int( chainDict["chainParts"][0]["hypoEFInfo"].strip("trk") )
+        hypo.minNtrks = int(chainDict["chainParts"][0]["hypoEFInfo"].strip("trk"))
     if "mb_sptrk" in chainDict["chainName"]:
-        hypo.min_pt  = 0.2
-        hypo.max_z0  = 401
+        hypo.minPt = 0.2
+        hypo.maxZ0 = 401
         # will set here cuts
     return hypo
 
 
 ### Now the sequences
 
-# These are obsoletee and can probably be deleted. Leeft here commented as need feedback fomr experts
-
-## def minbiasSpacePointMenuSequence():
-##     # menu components
-##     # retrieve the reco seuqnece
-##     from TriggerMenuMT.HLTMenuConfig.MinBias.MinBiasSPRecoSequences import minbiasSpacePointAthSequence
-##     ( minbiasSpacePointSequence, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(minbiasSpacePointAthSequence,ConfigFlags)
+def MinBiasSPSequence():
+    spAlgsList = []
+    from TrigT2MinBias.TrigT2MinBiasConf import TrigCountSpacePointsMT, SPCountHypoAlgMT
 
-##     #hypo
-##     mbHypoAlg = MbCountHypoAlgMT("MinBiasHypoAlg_sp")
-##     mbHypoAlg.MinBiasContainerKey=sequenceOut
+    spInputMakerAlg = EventViewCreatorAlgorithm("IM_SPEventViewCreator")
+    spInputMakerAlg.ViewFallThrough = True
+    spInputMakerAlg.RoITool = ViewCreatorInitialROITool()
+    spInputMakerAlg.InViewRoIs = "InputRoI"
+    spInputMakerAlg.Views = "SPView"
+
+    idTrigConfig = getInDetTrigConfig('minBias')
+    idAlgs, verifier = makeInDetAlgs(config=idTrigConfig, 
+                                     rois=spInputMakerAlg.InViewRoIs, 
+                                     viewVerifier='SPViewDataVerifier')
+    verifier.DataObjects += [('TrigRoiDescriptorCollection', 'StoreGateSvc+InputRoI'),
+                             ('SCT_ID', 'DetectorStore+SCT_ID'),
+                             ('PixelID', 'DetectorStore+PixelID'),
+                             ('TagInfo', 'DetectorStore+ProcessingTags')]
 
-##     return  MenuSequence( Sequence    = minbiasSpacePointSequence,
-##                           Maker       = InputMakerAlg,
-##                           Hypo        = mbHypoAlg,
-##                           HypoToolGen = TrigMinBiasHypoToolFromDict )
+    # Make sure required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [('SCT_ID', 'DetectorStore+SCT_ID'),
+                                       ('PixelID', 'DetectorStore+PixelID'),
+                                       ('TagInfo', 'DetectorStore+ProcessingTags')]
 
+    spAlgsList = idAlgs[:-2]
 
-## #obsolete?
-## def minbiasTrackMenuSequence():
-##     # menu components
-##     # retrieve the reco seuqnece
-##     from TriggerMenuMT.HLTMenuConfig.MinBias.MinBiasTrkRecoSequences import minbiasTrackAthSequence
-##     (minbiasTrackSequence, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(minbiasTrackAthSequence,ConfigFlags)
+    spCount = TrigCountSpacePointsMT()
+    spCount.SpacePointsKey = recordable("HLT_SpacePointCounts")
 
-##     #hypo
-##     mbHypoAlg = MbCountHypoAlgMT("MinBiasHypoAlg_trk")
-##     mbHypoAlg.MinBiasContainerKey=sequenceOut
+    from TrigT2MinBias.TrigT2MinBiasMonitoringMT import SpCountMonitoring
+    spCount.MonTool = SpCountMonitoring()
 
-##     return  MenuSequence( Sequence    = minbiasTrackSequence,
-##                           Maker       = InputMakerAlg,
-##                           Hypo        = mbHypoAlg,
-##                           HypoToolGen = TrigMinBiasHypoToolFromDict )
+    spRecoSeq = parOR("spRecoSeq", spAlgsList + [spCount])
+    spSequence = seqAND("spSequence", [spInputMakerAlg, spRecoSeq])
+    spInputMakerAlg.ViewNodeName = spRecoSeq.name()
 
 
-# NEW:
-def MinBiasSPSequence():
-    SpList = []
-    from TrigT2MinBias.TrigT2MinBiasConf import TrigCountSpacePointsMT, SPCountHypoAlgMT
+    spCountHypo =SPCountHypoAlgMT()
+    spCountHypo.SpacePointsKey=recordable("HLT_SpacePointCounts")
 
-    SPInputMakerAlg = EventViewCreatorAlgorithm("IM_SPEventViewCreator")
-    SPInputMakerAlg.ViewFallThrough = True
-    SPInputMakerAlg.RoITool = ViewCreatorInitialROITool()
-    SPInputMakerAlg.InViewRoIs = "InputRoI"
-    SPInputMakerAlg.Views = "SPView"
-
-    IDTrigConfig = getInDetTrigConfig( 'minBias' )
-    idAlgs, verifier = makeInDetAlgs(  config = IDTrigConfig, rois=SPInputMakerAlg.InViewRoIs, viewVerifier='SPViewDataVerifier' )
-    verifier.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+InputRoI' ),
-                                 ( 'SCT_ID' , 'DetectorStore+SCT_ID' ),
-                                 ( 'PixelID' , 'DetectorStore+PixelID' ),
-                                 ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
-
-    # Make sure required objects are still available at whole-event level
-    from AthenaCommon.AlgSequence import AlgSequence
-    topSequence = AlgSequence()
-    topSequence.SGInputLoader.Load += [( 'SCT_ID' , 'DetectorStore+SCT_ID' ),
-                                           ( 'PixelID' , 'DetectorStore+PixelID' ),
-                                           ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
-    
-    SpList = idAlgs[:-2]
-    
-    SpCount=TrigCountSpacePointsMT()
-    SpCount.SpacePointsKey=recordable("HLT_SpacePointCounts")
-    
-    from TrigT2MinBias.TrigT2MinBiasMonitoringMT import SpCountMonitoring
-    SpCount.MonTool = SpCountMonitoring()
-    
-    SPrecoSeq = parOR("SPrecoSeq", SpList + [ SpCount ])
-    SPSequence = seqAND("SPSequence", [SPInputMakerAlg, SPrecoSeq])
-    SPInputMakerAlg.ViewNodeName = SPrecoSeq.name()
-    
-    
-    SpCountHypo =SPCountHypoAlgMT()
-    SpCountHypo.SpacePointsKey=recordable("HLT_SpacePointCounts")
-    
-    return MenuSequence( Sequence   = SPSequence,
-                        Maker       = SPInputMakerAlg,
-                        Hypo        = SpCountHypo,
+    return MenuSequence(Sequence    = spSequence,
+                        Maker       = spInputMakerAlg,
+                        Hypo        = spCountHypo,
                         HypoToolGen = SPCountHypoToolGen )
 
 
 def MinBiasTrkSequence():
         from TrigMinBias.TrigMinBiasConf import TrackCountHypoAlgMT
 
-        TrkInputMakerAlg = EventViewCreatorAlgorithm("IM_TrkEventViewCreator")
-        TrkInputMakerAlg.ViewFallThrough = True
-        TrkInputMakerAlg.RoITool = ViewCreatorInitialROITool()
-        TrkInputMakerAlg.InViewRoIs = "InputRoI" # contract with the consumer
-        TrkInputMakerAlg.Views = "TrkView"
-        TrkInputMakerAlg.RequireParentView = True
-        TrkInputMakerAlg.ViewNodeName = "TrkCountHypoAlgMTNode"
-
-        # prepare algorithms to run in views, first, inform scheduler that input data is available in parent view (has to be done by hand)
-        IDTrigConfig = getInDetTrigConfig( 'minBias' )
-        idAlgs, verifier = makeInDetAlgs( config = IDTrigConfig, rois=TrkInputMakerAlg.InViewRoIs, viewVerifier='TrkrecoSeqDataVerifier')
-        verifier.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+InputRoI' ),
-                                 ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
-                                 ( 'InDet::SCT_ClusterContainer' , 'StoreGateSvc+SCT_TrigClusters' ),
-                                 ( 'SpacePointContainer' , 'StoreGateSvc+SCT_TrigSpacePoints' ),
-                                 ( 'InDet::PixelClusterContainer' , 'StoreGateSvc+PixelTrigClusters' ),
-                                 ( 'SpacePointContainer' , 'StoreGateSvc+PixelTrigSpacePoints' )]
+        trkInputMakerAlg = EventViewCreatorAlgorithm("IM_TrkEventViewCreator")
+        trkInputMakerAlg.ViewFallThrough = True
+        trkInputMakerAlg.RoITool = ViewCreatorInitialROITool()
+        trkInputMakerAlg.InViewRoIs = "InputRoI" # contract with the consumer
+        trkInputMakerAlg.Views = "TrkView"
+        trkInputMakerAlg.RequireParentView = True
+        trkInputMakerAlg.ViewNodeName = "TrkCountHypoAlgMTNode"
+
+        # prepare algorithms to run in views, first,
+        # inform scheduler that input data is available in parent view (has to be done by hand)
+        idTrigConfig = getInDetTrigConfig('minBias')
+        idAlgs, verifier = makeInDetAlgs(config=idTrigConfig, rois=trkInputMakerAlg.InViewRoIs, viewVerifier='TrkrecoSeqDataVerifier')
+        verifier.DataObjects += [('TrigRoiDescriptorCollection', 'StoreGateSvc+InputRoI'),
+                                 ('IDCInDetBSErrContainer', 'StoreGateSvc+SCT_FlaggedCondData_TRIG'),
+                                 ('InDet::SCT_ClusterContainer', 'StoreGateSvc+SCT_TrigClusters'),
+                                 ('SpacePointContainer', 'StoreGateSvc+SCT_TrigSpacePoints'),
+                                 ('InDet::PixelClusterContainer', 'StoreGateSvc+PixelTrigClusters'),
+                                 ('SpacePointContainer', 'StoreGateSvc+PixelTrigSpacePoints')]
 
         if globalflags.InputFormat.is_bytestream():
-          verifier.DataObjects += [( 'IDCInDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
-                                   ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
+          verifier.DataObjects += [('IDCInDetBSErrContainer', 'StoreGateSvc+PixelByteStreamErrs'),
+                                   ('IDCInDetBSErrContainer', 'StoreGateSvc+SCT_ByteStreamErrs')]
 
 
-        TrkList = idAlgs[-2:] # FTF and Track to xAOD::TrackParticle conversion alg
-        TrackCountHypo=TrackCountHypoAlgMT()
-        TrackCountHypo.trackCountKey=recordable("HLT_TrackCount")
-        TrackCountHypo.tracksKey=recordable("HLT_IDTrack_MinBias_FTF")
+        trkList = idAlgs[-2:] # FTF and Track to xAOD::TrackParticle conversion alg
+        trackCountHypo = TrackCountHypoAlgMT()
+        trackCountHypo.trackCountKey = recordable("HLT_TrackCount")
+        trackCountHypo.tracksKey = recordable("HLT_IDTrack_MinBias_FTF")
 
         from TrigMinBias.TrackCountMonitoringMT import TrackCountMonitoring
-        TrackCountHypo.MonTool = TrackCountMonitoring()
-
-        TrkrecoSeq = parOR("TrkrecoSeq", [verifier]+TrkList)
-        TrkSequence = seqAND("TrkSequence", [TrkInputMakerAlg, TrkrecoSeq])
-        TrkInputMakerAlg.ViewNodeName = TrkrecoSeq.name()
-
-        return MenuSequence( Sequence   = TrkSequence,
-                            Maker       = TrkInputMakerAlg,
-                            Hypo        = TrackCountHypo,
-                            HypoToolGen = TrackCountHypoToolGen )
+        trackCountHypo.MonTool = TrackCountMonitoring()
 
+        trkRecoSeq = parOR("TrkrecoSeq", [verifier]+trkList)
+        trkSequence = seqAND("TrkSequence", [trkInputMakerAlg, trkRecoSeq])
+        trkInputMakerAlg.ViewNodeName = trkRecoSeq.name()
 
+        return MenuSequence(Sequence    = trkSequence,
+                            Maker       = trkInputMakerAlg,
+                            Hypo        = trackCountHypo,
+                            HypoToolGen = TrackCountHypoToolGen)
-- 
GitLab


From 85e4929d32ff7ee86380b7767ab3f7078fafe920 Mon Sep 17 00:00:00 2001
From: Tim Adye <tim.adye@cern.ch>
Date: Fri, 18 Dec 2020 12:52:24 +0000
Subject: [PATCH 112/308] TrigValSteering: improve dry_run logging

---
 .../TrigValTools/python/TrigValSteering/CheckSteps.py           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
index f65e1d943e70..1ebe02cdf9ac 100644
--- a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
+++ b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py
@@ -107,7 +107,7 @@ class InputDependentStep(Step):
                 self.report_result()
             return self.result, '# (internal) {} -> failed'.format(self.name)
 
-        if not os.path.isfile(self.input_file):
+        if not dry_run and not os.path.isfile(self.input_file):
             self.log.debug('Skipping %s because %s does not exist',
                            self.name, self.input_file)
             self.result = 0
-- 
GitLab


From 465fdf7ef80f9ae0e7d53a29e3316373c7fb6e6a Mon Sep 17 00:00:00 2001
From: Tim Adye <tim.adye@cern.ch>
Date: Fri, 18 Dec 2020 12:52:47 +0000
Subject: [PATCH 113/308] rename old ART steering files to _old, and new ones
 to replace them. Only 3 tests have new steering, so the rest still need to be
 added

---
 .../share/TIDAdata-run3-larged0-el.dat        |  27 ++++
 .../share/TIDAdata-run3-larged0.dat           |  27 ++++
 .../TIDAdata-run3-offline-larged0-el.dat      |  27 ++++
 .../share/TIDAdata-run3-offline-larged0.dat   |  27 ++++
 .../TrigInDetValidation/CMakeLists.txt        |   2 +-
 .../python/TrigInDetArtSteps.py               | 153 +++++++++---------
 ...NewArtSteps.py => TrigInDetOldArtSteps.py} | 148 +++++++++--------
 .../share/TrigInDetValidation_Base.py         | 104 ++++--------
 ...Base.py => TrigInDetValidation_OldBase.py} |  87 +++++++---
 .../test/test_trigID_all_ttbar_pu40.py        |  20 ++-
 .../test/test_trigID_all_ttbar_pu40_new.py    |  53 ------
 .../test/test_trigID_all_ttbar_pu40_old.py    |   2 +-
 .../test/test_trigID_all_ttbar_pu80.py        | 117 +++-----------
 .../test/test_trigID_all_ttbar_pu80_old.py    | 127 +++++++++++++++
 .../test/test_trigID_all_ttbar_pu80_short.py  | 117 +++-----------
 .../test_trigID_all_ttbar_pu80_short_old.py   | 127 +++++++++++++++
 .../test/test_trigID_all_ttbar_pu80_st.py     | 118 +++-----------
 .../test/test_trigID_all_ttbar_pu80_st_old.py | 128 +++++++++++++++
 .../test/test_trigID_bjet_nopps_pu40.py       |   9 +-
 .../test/test_trigID_bjet_nopps_pu40_old.py   |  45 ++++++
 .../test/test_trigID_bjet_pu40.py             |   9 +-
 .../test/test_trigID_bjet_pu40_old.py         |  40 +++++
 .../test/test_trigID_el_jpsiee_pu40.py        | 112 +++----------
 .../test/test_trigID_el_jpsiee_pu40_old.py    | 125 ++++++++++++++
 .../test/test_trigID_el_singlee_7-80.py       | 118 +++-----------
 .../test_trigID_el_singlee_7-80_larged0.py    | 118 +++-----------
 ...test_trigID_el_singlee_7-80_larged0_old.py | 125 ++++++++++++++
 .../test_trigID_el_singlee_7-80_larged0_pu.py | 118 +++-----------
 ...t_trigID_el_singlee_7-80_larged0_pu_old.py | 125 ++++++++++++++
 .../test/test_trigID_el_singlee_7-80_old.py   | 125 ++++++++++++++
 .../test/test_trigID_el_singlee_7-80_pu40.py  | 118 +++-----------
 .../test_trigID_el_singlee_7-80_pu40_old.py   | 125 ++++++++++++++
 .../test/test_trigID_el_zee_pu40.py           | 118 +++-----------
 .../test/test_trigID_el_zee_pu40_old.py       | 125 ++++++++++++++
 .../test/test_trigID_el_zee_pu40_short.py     | 118 +++-----------
 .../test/test_trigID_el_zee_pu40_short_old.py | 125 ++++++++++++++
 .../test/test_trigID_el_zee_pu40_st.py        | 118 +++-----------
 .../test/test_trigID_el_zee_pu40_st_old.py    | 125 ++++++++++++++
 .../test/test_trigID_fsjet_ml_pu40.py         |  10 +-
 .../test/test_trigID_fsjet_ml_pu40_old.py     |  45 ++++++
 .../test/test_trigID_fsjet_nopps_pu40.py      |  11 +-
 .../test/test_trigID_fsjet_pu40.py            |  11 +-
 .../test/test_trigID_fsjet_pu40_new.py        |  51 ------
 .../test/test_trigID_fsjet_pu40_old.py        |  43 +++++
 .../test/test_trigID_fsjet_pu40_st.py         |  10 +-
 .../test/test_trigID_fsjet_pu40_st_old.py     |  43 +++++
 .../test/test_trigID_minbias.py               |   7 +-
 .../test/test_trigID_minbias_old.py           |  44 +++++
 .../test/test_trigID_mu_bphys.py              | 101 ++----------
 ..._mt-old.py => test_trigID_mu_bphys_old.py} |  37 ++---
 .../test/test_trigID_mu_singlemu_larged0.py   | 111 +++----------
 .../test_trigID_mu_singlemu_larged0_old.py    | 125 ++++++++++++++
 .../test_trigID_mu_singlemu_larged0_pu.py     | 109 +++----------
 .../test_trigID_mu_singlemu_larged0_pu_old.py | 125 ++++++++++++++
 .../test/test_trigID_mu_zmumu_pu40.py         |  16 +-
 .../test/test_trigID_mu_zmumu_pu40_build.py   |  67 ++------
 .../test_trigID_mu_zmumu_pu40_build_old.py    |  70 ++++++++
 .../test/test_trigID_mu_zmumu_pu40_old.py     |  46 ++++++
 .../test/test_trigID_mu_zmumu_pu40_short.py   |  16 +-
 .../test_trigID_mu_zmumu_pu40_short_old.py    |  46 ++++++
 .../test/test_trigID_mu_zmumu_pu40_st.py      |  16 +-
 .../test/test_trigID_mu_zmumu_pu40_st_old.py  |  46 ++++++
 .../test/test_trigID_tau_ztautau_pu46.py      |  79 ++-------
 .../test/test_trigID_tau_ztautau_pu46_new.py  |  45 ------
 .../test/test_trigID_tau_ztautau_pu46_old.py  |  94 +++++++++++
 .../test/test_trigID_tau_ztautau_pu46_st.py   |  79 ++-------
 .../test_trigID_tau_ztautau_pu46_st_old.py    |  94 +++++++++++
 67 files changed, 3094 insertions(+), 1955 deletions(-)
 create mode 100755 Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0-el.dat
 create mode 100755 Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0.dat
 create mode 100755 Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0-el.dat
 create mode 100755 Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0.dat
 rename Trigger/TrigValidation/TrigInDetValidation/python/{TrigInDetNewArtSteps.py => TrigInDetOldArtSteps.py} (70%)
 mode change 100755 => 100644 Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_Base.py
 rename Trigger/TrigValidation/TrigInDetValidation/share/{TrigInDetValidation_NewBase.py => TrigInDetValidation_OldBase.py} (53%)
 mode change 100755 => 100644
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_new.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_new.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py
 rename Trigger/TrigValidation/TrigInDetValidation/test/{test_trigID_mu_zmumu_pu40_mt-old.py => test_trigID_mu_bphys_old.py} (74%)
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_new.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py
 create mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py

diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0-el.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0-el.dat
new file mode 100755
index 000000000000..c74433b5c089
--- /dev/null
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0-el.dat
@@ -0,0 +1,27 @@
+// emacs: this is -*- c++ -*-
+
+#define LARGED0_EL
+
+#include "TIDAdata_cuts.dat"
+
+refChain = "Truth";
+//refChain = "Offline";
+//refChain = "Electrons";
+//refChain = "Muons";
+//refChain = "Taus";
+
+
+MinVertices = 0;
+
+
+#include "TIDAdata-chains-run3.dat"
+
+
+InitialiseFirstEvent = 1;
+
+outputFile = "data-output.root";
+DataFiles = { "TrkNtuple-0000.root"};
+//DataSets = {"./"}
+
+
+#include "TIDAbeam.dat"
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0.dat
new file mode 100755
index 000000000000..73a3c6bf8fa1
--- /dev/null
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-larged0.dat
@@ -0,0 +1,27 @@
+// emacs: this is -*- c++ -*-
+
+#define LARGED0
+
+#include "TIDAdata_cuts.dat"
+
+refChain = "Truth";
+//refChain = "Offline";
+//refChain = "Electrons";
+//refChain = "Muons";
+//refChain = "Taus";
+
+
+MinVertices = 0;
+
+
+#include "TIDAdata-chains-run3.dat"
+
+
+InitialiseFirstEvent = 1;
+
+outputFile = "data-output.root";
+DataFiles = { "TrkNtuple-0000.root"};
+//DataSets = {"./"}
+
+
+#include "TIDAbeam.dat"
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0-el.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0-el.dat
new file mode 100755
index 000000000000..a9ea6505453b
--- /dev/null
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0-el.dat
@@ -0,0 +1,27 @@
+// emacs: this is -*- c++ -*-
+
+#define LARGED0_EL
+
+#include "TIDAdata_cuts-offline.dat"
+
+//refChain = "Truth";
+refChain = "Offline";
+//refChain = "Electrons";
+//refChain = "Muons";
+//refChain = "Taus";
+
+
+MinVertices = 0;
+
+
+#include "TIDAdata-chains-run3.dat"
+
+
+InitialiseFirstEvent = 1;
+
+outputFile = "data-output.root";
+DataFiles = { "TrkNtuple-0000.root"};
+//DataSets = {"./"}
+
+
+#include "TIDAbeam.dat"
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0.dat
new file mode 100755
index 000000000000..2669ca8c7e8b
--- /dev/null
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-larged0.dat
@@ -0,0 +1,27 @@
+// emacs: this is -*- c++ -*-
+
+#define LARGED0
+
+#include "TIDAdata_cuts-offline.dat"
+
+//refChain = "Truth";
+refChain = "Offline";
+//refChain = "Electrons";
+//refChain = "Muons";
+//refChain = "Taus";
+
+
+MinVertices = 0;
+
+
+#include "TIDAdata-chains-run3.dat"
+
+
+InitialiseFirstEvent = 1;
+
+outputFile = "data-output.root";
+DataFiles = { "TrkNtuple-0000.root"};
+//DataSets = {"./"}
+
+
+#include "TIDAbeam.dat"
diff --git a/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt b/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt
index 0afca4f193c9..5fa71b2c2ec4 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt
@@ -17,5 +17,5 @@ atlas_install_scripts( scripts/TIDA*.py test/test*.py POST_BUILD_CMD ${ATLAS_FLA
 # Unit test for python test scripts:
 atlas_add_test( TrigValSteeringUT
                 SCRIPT trigvalsteering-unit-tester.py ${CMAKE_CURRENT_SOURCE_DIR}/test
-                PROPERTIES TIMEOUT 300
+                PROPERTIES TIMEOUT 1200
                 POST_EXEC_SCRIPT nopost.sh )
diff --git a/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py b/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
index ac024978f592..ab13d80eba21 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetArtSteps.py
@@ -35,6 +35,7 @@ class TrigInDetReco(ExecStep):
         self.slices = []
         self.preexec_trig = ' '
         self.postinclude_trig = postinclude_file
+        self.release = 'latest'
         self.preexec_reco =  ';'.join([
             'from RecExConfig.RecFlags import rec',
             'rec.doForwardDet=False',
@@ -59,8 +60,9 @@ class TrigInDetReco(ExecStep):
         ])
         self.postexec_trig = "from AthenaCommon.AppMgr import ServiceMgr; ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes=['tmp.RDO_TRIG=100000000000']"
 
+
         self.postexec_reco = "from AthenaCommon.AppMgr import ServiceMgr; ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes=['tmp.ESD=100000000000']"
-        self.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG" --asetup "RAWtoESD:Athena,22.0.20" "ESDtoAOD:Athena,22.0.20" '
+        self.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG"'
 
 
     def configure(self, test):
@@ -100,6 +102,25 @@ class TrigInDetReco(ExecStep):
         chains += ']'
         self.preexec_trig = 'doEmptyMenu=True;'+flags+'selectChains='+chains
 
+        if (self.release == 'current'):
+            print( "Using current release for offline Reco steps  " )
+        else:
+            # get the current atlas base release, and the previous base release
+            import os
+            DVERSION=os.getenv('Athena_VERSION')
+            if (self.release == 'latest'):
+                if ( DVERSION is None ) :
+                    AVERSION = "22.0.20"
+                else:
+                    BASE=DVERSION[:5]
+                    SUB=int(DVERSION[5:])
+                    SUB -= 1
+                    AVERSION=BASE+str(SUB)
+            else:
+                AVERSION = self.release
+            self.args += ' --asetup "RAWtoESD:Athena,'+AVERSION+'" "ESDtoAOD:Athena,'+AVERSION+'" '
+            print( "remapping athena base release version for offline Reco steps: ", DVERSION, " -> ", AVERSION )
+
 
         self.args += ' --preExec "RDOtoRDOTrigger:{:s};" "all:{:s};" "RAWtoESD:{:s};" "ESDtoAOD:{:s};"'.format(
             self.preexec_trig, self.preexec_all, self.preexec_reco, self.preexec_aod)
@@ -126,31 +147,52 @@ class TrigInDetAna(AthenaCheckerStep):
 # Additional post-processing steps
 ##################################################
 
-class TrigInDetdictStep(Step):
+class TrigInDetRdictStep(Step):
     '''
     Execute TIDArdict for TrkNtuple files.
     '''
-    def __init__(self, name='TrigInDetdict', reference='Truth' ):
-        super(TrigInDetdictStep, self).__init__(name)
-        self.args=' '
+    def __init__(self, name='TrigInDetdict', args=None, testbin='Test_bin.dat'):
+        super(TrigInDetRdictStep, self).__init__(name)
+        self.args=args + "  -b " + testbin + " "
         self.auto_report_result = True
         self.required = True
-        self.reference = reference
         self.executable = 'TIDArdict'
 
     def configure(self, test):
-        os.system( 'get_files -data TIDAbeam.dat' )
-        os.system( 'get_files -data Test_bin.dat' )
-        os.system( 'get_files -data TIDAdata-chains-run3.dat' )
-        os.system( 'get_files -data TIDAhisto-panel.dat' )
-        os.system( 'get_files -data TIDAdata-run3.dat' )
-        os.system( 'get_files -data TIDAdata_cuts.dat' )
-        os.system( 'get_files -data TIDAdata-run3-offline.dat' )
-        os.system( 'get_files -data TIDAdata_cuts-offline.dat' )
-        os.system( 'get_files -jo   TIDAml_extensions.py' ) 
-        super(TrigInDetdictStep, self).configure(test)
-
-
+        os.system( 'get_files -data TIDAbeam.dat &> /dev/null' )
+        os.system( 'get_files -data Test_bin.dat &> /dev/null' )
+        os.system( 'get_files -data Test_bin_larged0.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-chains-run3.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAhisto-panel.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAhisto-panel-vtx.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAhistos-vtx.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3-larged0.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3-larged0-el.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata_cuts.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3-offline.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3-offline-larged0.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3-offline-larged0-el.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata-run3-offline-vtx.dat &> /dev/null' )
+        os.system( 'get_files -data TIDAdata_cuts-offline.dat &> /dev/null' )
+        os.system( 'get_files -jo   TIDAml_extensions.py &> /dev/null' )
+        super(TrigInDetRdictStep, self).configure(test)
+
+
+def json_chains( slice ) : 
+    json_file     = 'TrigInDetValidation/comparitor.json'
+    json_fullpath = FindFile(json_file, os.environ['DATAPATH'].split(os.pathsep), os.R_OK)
+
+    if not json_fullpath:
+        print('Failed to determine full path for input JSON %s', json_file)
+        return None
+        
+    with open(json_fullpath) as f:
+        data = json.load(f)
+       
+    chainmap = data[slice]
+
+    return chainmap['chains']
 
 
 
@@ -158,76 +200,25 @@ class TrigInDetCompStep(RefComparisonStep):
     '''
     Execute TIDAcomparitor for data.root files.
     '''
-    def __init__( self, name='TrigInDetComp', level='', slice='', input_file='data-hists.root', type='truth', lowpt=False ):
+    def __init__( self, name='TrigInDetComp', slice=None, args=None, file=None, reference=None ):
         super(TrigInDetCompStep, self).__init__(name)
-
-        self.input_file = input_file
-        # self.output_dir = 'HLT-plots'
-        self.output_dir = ''
-
-        if level == '' : 
-            raise Exception( 'no level specified' )
-
-        if slice == '' : 
-            raise Exception( 'no slice specified' )
-
-        self.level  = level
-        self.slice  = slice
-        self.lowpt  = lowpt
-        self.type   = type
-        self.chains = ' '
-        self.args   = ' --oldrms -c TIDAhisto-panel.dat '
-        self.test   = ' '
+        if reference is None :
+            self.reference  = file # do we need this any more ??? 
+            self.args  = args + " " + file + "  " + file + " --noref --oldrms "
+        else:
+            self.reference = reference
+            self.args  = args + " " + file + "  " + reference + " --oldrms "
+        self.slice = slice 
         self.auto_report_result = True
         self.required   = True
+
         self.executable = 'TIDAcomparitor'
     
 
     def configure(self, test):
-
-        json_file     = 'TrigInDetValidation/comparitor.json'
-        json_fullpath = FindFile(json_file, os.environ['DATAPATH'].split(os.pathsep), os.R_OK)
-
-        if not json_fullpath:
-            print('Failed to determine full path for input JSON %s', json_file)
-            return None
-
-        with open(json_fullpath) as f:
-            data = json.load(f)
-
-        self.output_dir = 'HLT'+self.level+'-plots'
-
-        flag = self.level+self.slice
-
-        if (self.lowpt):
-            self.output_dir = self.output_dir+'-lowpt'    
-            flag = flag+'Lowpt'
-            
-        data_object = data[flag]
-
-        self.chains = data_object['chains']
-
-        # what is all this doing ? does it need to be so complicated ?
-
-        if (self.test=='ttbar'):
-            self.output_dir = self.output_dir+"-"+self.slice
-
-        if (self.type == 'offline'):
-            self.output_dir = self.output_dir+'-offline'    
-            self.input_file = 'data-hists-offline.root'
-
-        self.args += self.input_file + ' ' 
-
-        if (self.reference is None):
-            # if no reference found, use input file as reference - athout it doesn't matter - could use --noref
-            self.args += self.input_file + ' ' 
-        else:
-            self.args += self.ref_file + ' ' 
-
-        self.args += self.chains + ' -d ' + self.output_dir
-
-        print( "TIDAComparitor " + self.args ) 
-
+        self.chains = json_chains( self.slice )
+        self.args += " " + self.chains
+        print( "\033[0;32mTIDAcomparitor "+self.args+" \033[0m" )
         super(TrigInDetCompStep, self).configure(test)
 
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetNewArtSteps.py b/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetOldArtSteps.py
similarity index 70%
rename from Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetNewArtSteps.py
rename to Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetOldArtSteps.py
index 9be14b5c66a8..ac024978f592 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetNewArtSteps.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/python/TrigInDetOldArtSteps.py
@@ -35,7 +35,6 @@ class TrigInDetReco(ExecStep):
         self.slices = []
         self.preexec_trig = ' '
         self.postinclude_trig = postinclude_file
-        self.release = 'latest'
         self.preexec_reco =  ';'.join([
             'from RecExConfig.RecFlags import rec',
             'rec.doForwardDet=False',
@@ -60,9 +59,8 @@ class TrigInDetReco(ExecStep):
         ])
         self.postexec_trig = "from AthenaCommon.AppMgr import ServiceMgr; ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes=['tmp.RDO_TRIG=100000000000']"
 
-
         self.postexec_reco = "from AthenaCommon.AppMgr import ServiceMgr; ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes=['tmp.ESD=100000000000']"
-        self.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG"'
+        self.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG" --asetup "RAWtoESD:Athena,22.0.20" "ESDtoAOD:Athena,22.0.20" '
 
 
     def configure(self, test):
@@ -102,25 +100,6 @@ class TrigInDetReco(ExecStep):
         chains += ']'
         self.preexec_trig = 'doEmptyMenu=True;'+flags+'selectChains='+chains
 
-        if (self.release == 'current'):
-            print( "Using current release for offline Reco steps  " )
-        else:
-            # get the current atlas base release, and the previous base release
-            import os
-            DVERSION=os.getenv('Athena_VERSION')
-            if (self.release == 'latest'):
-                if ( DVERSION is None ) :
-                    AVERSION = "22.0.20"
-                else:
-                    BASE=DVERSION[:5]
-                    SUB=int(DVERSION[5:])
-                    SUB -= 1
-                    AVERSION=BASE+str(SUB)
-            else:
-                AVERSION = self.release
-            self.args += ' --asetup "RAWtoESD:Athena,'+AVERSION+'" "ESDtoAOD:Athena,'+AVERSION+'" '
-            print( "remapping athena base release version for offline Reco steps: ", DVERSION, " -> ", AVERSION )
-
 
         self.args += ' --preExec "RDOtoRDOTrigger:{:s};" "all:{:s};" "RAWtoESD:{:s};" "ESDtoAOD:{:s};"'.format(
             self.preexec_trig, self.preexec_all, self.preexec_reco, self.preexec_aod)
@@ -147,47 +126,31 @@ class TrigInDetAna(AthenaCheckerStep):
 # Additional post-processing steps
 ##################################################
 
-class TrigInDetRdictStep(Step):
+class TrigInDetdictStep(Step):
     '''
     Execute TIDArdict for TrkNtuple files.
     '''
-    def __init__(self, name='TrigInDetdict', args=None ):
-        super(TrigInDetRdictStep, self).__init__(name)
-        self.args=args + "  -b Test_bin.dat "
+    def __init__(self, name='TrigInDetdict', reference='Truth' ):
+        super(TrigInDetdictStep, self).__init__(name)
+        self.args=' '
         self.auto_report_result = True
         self.required = True
+        self.reference = reference
         self.executable = 'TIDArdict'
 
     def configure(self, test):
-        os.system( 'get_files -data TIDAbeam.dat &> /dev/null' )
-        os.system( 'get_files -data Test_bin.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAdata-chains-run3.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAhisto-panel.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAhisto-panel-vtx.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAhistos-vtx.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAdata-run3.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAdata_cuts.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAdata-run3-offline.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAdata-run3-offline-vtx.dat &> /dev/null' )
-        os.system( 'get_files -data TIDAdata_cuts-offline.dat &> /dev/null' )
-        os.system( 'get_files -jo   TIDAml_extensions.py &> /dev/null' )
-        super(TrigInDetRdictStep, self).configure(test)
-
-
-def json_chains( slice ) : 
-    json_file     = 'TrigInDetValidation/comparitor.json'
-    json_fullpath = FindFile(json_file, os.environ['DATAPATH'].split(os.pathsep), os.R_OK)
-
-    if not json_fullpath:
-        print('Failed to determine full path for input JSON %s', json_file)
-        return None
-        
-    with open(json_fullpath) as f:
-        data = json.load(f)
-       
-    chainmap = data[slice]
-
-    return chainmap['chains']
+        os.system( 'get_files -data TIDAbeam.dat' )
+        os.system( 'get_files -data Test_bin.dat' )
+        os.system( 'get_files -data TIDAdata-chains-run3.dat' )
+        os.system( 'get_files -data TIDAhisto-panel.dat' )
+        os.system( 'get_files -data TIDAdata-run3.dat' )
+        os.system( 'get_files -data TIDAdata_cuts.dat' )
+        os.system( 'get_files -data TIDAdata-run3-offline.dat' )
+        os.system( 'get_files -data TIDAdata_cuts-offline.dat' )
+        os.system( 'get_files -jo   TIDAml_extensions.py' ) 
+        super(TrigInDetdictStep, self).configure(test)
+
+
 
 
 
@@ -195,25 +158,76 @@ class TrigInDetCompStep(RefComparisonStep):
     '''
     Execute TIDAcomparitor for data.root files.
     '''
-    def __init__( self, name='TrigInDetComp', slice=None, args=None, file=None, reference=None ):
+    def __init__( self, name='TrigInDetComp', level='', slice='', input_file='data-hists.root', type='truth', lowpt=False ):
         super(TrigInDetCompStep, self).__init__(name)
-        if reference is None :
-            self.reference  = file # do we need this any more ??? 
-            self.args  = args + " " + file + "  " + file + " --noref --oldrms "
-        else:
-            self.reference = reference
-            self.args  = args + " " + file + "  " + reference + " --oldrms "
-        self.slice = slice 
+
+        self.input_file = input_file
+        # self.output_dir = 'HLT-plots'
+        self.output_dir = ''
+
+        if level == '' : 
+            raise Exception( 'no level specified' )
+
+        if slice == '' : 
+            raise Exception( 'no slice specified' )
+
+        self.level  = level
+        self.slice  = slice
+        self.lowpt  = lowpt
+        self.type   = type
+        self.chains = ' '
+        self.args   = ' --oldrms -c TIDAhisto-panel.dat '
+        self.test   = ' '
         self.auto_report_result = True
         self.required   = True
-
         self.executable = 'TIDAcomparitor'
     
 
     def configure(self, test):
-        self.chains = json_chains( self.slice )
-        self.args += " " + self.chains
-        print( "\033[0;32mTIDAcomparitor "+self.args+" \033[0m" )
+
+        json_file     = 'TrigInDetValidation/comparitor.json'
+        json_fullpath = FindFile(json_file, os.environ['DATAPATH'].split(os.pathsep), os.R_OK)
+
+        if not json_fullpath:
+            print('Failed to determine full path for input JSON %s', json_file)
+            return None
+
+        with open(json_fullpath) as f:
+            data = json.load(f)
+
+        self.output_dir = 'HLT'+self.level+'-plots'
+
+        flag = self.level+self.slice
+
+        if (self.lowpt):
+            self.output_dir = self.output_dir+'-lowpt'    
+            flag = flag+'Lowpt'
+            
+        data_object = data[flag]
+
+        self.chains = data_object['chains']
+
+        # what is all this doing ? does it need to be so complicated ?
+
+        if (self.test=='ttbar'):
+            self.output_dir = self.output_dir+"-"+self.slice
+
+        if (self.type == 'offline'):
+            self.output_dir = self.output_dir+'-offline'    
+            self.input_file = 'data-hists-offline.root'
+
+        self.args += self.input_file + ' ' 
+
+        if (self.reference is None):
+            # if no reference found, use input file as reference - athout it doesn't matter - could use --noref
+            self.args += self.input_file + ' ' 
+        else:
+            self.args += self.ref_file + ' ' 
+
+        self.args += self.chains + ' -d ' + self.output_dir
+
+        print( "TIDAComparitor " + self.args ) 
+
         super(TrigInDetCompStep, self).configure(test)
 
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_Base.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_Base.py
old mode 100755
new mode 100644
index 77bc6865110a..41efe587db3d
--- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_Base.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_Base.py
@@ -1,9 +1,6 @@
 ###  #!/usr/bin/env python
 
-
-
 # Slices = ['fsjet']
-# RunEF  = False
 # Events = 10
 # Threads = 1
 # Slots = 1
@@ -13,13 +10,13 @@
 import re
 
 from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetRdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
 
 
 import sys,getopt
 
 try:
-    opts, args = getopt.getopt(sys.argv[1:],"lcxpn:",["local","config"])
+    opts, args = getopt.getopt(sys.argv[1:],"lcxptn:",["local","config"])
 except getopt.GetoptError:
     print("Usage:  ")
     print("-l(--local)    run locally with input file from art eos grid-input")
@@ -27,24 +24,20 @@ except getopt.GetoptError:
     print("-p             run post-processing, even if -x is set")
     print("-n  N          run only on N events per job")
     print("-c(--config)   run with config_only and print to a pkl file")
+    print("-t             test steering, dry run for all steps")
     print("")
-
+    sys.exit(1)
 
 Events_local  = 0
 local         = False
 exclude       = False
 postproc      = False
 testconfig    = False
-lowpt_local   = []
-
+dry_run       = False
 
-try: GridFiles
-except NameError: GridFiles=False
 
-if GridFiles==True :
-    use_gridfiles = True
-else:
-    use_gridfiles = False
+if "Art_type"  not in locals(): Art_type = 'grid'
+if "GridFiles" not in locals(): GridFiles=False
 
 for opt,arg in opts:
     if opt in ("-l", "--local"):
@@ -57,6 +50,8 @@ for opt,arg in opts:
         Events_local=arg
     if opt in ("-c", "--config"):
         testconfig = True
+    if opt=="-t":
+        dry_run=True
 
 
 if 'postinclude_file' in dir() :
@@ -70,19 +65,14 @@ rdo2aod.slices            = Slices
 rdo2aod.threads           = Threads
 rdo2aod.concurrent_events = Slots 
 rdo2aod.config_only       = testconfig
-
-if "Lowpt" in locals() : 
-    if isinstance( Lowpt, list ) : 
-        lowpt_local = Lowpt
-    else : 
-        lowpt_local = [ Lowpt ]
-else : 
-    lowpt_local = [ False ]
+if 'Release' in dir():
+    rdo2aod.release           = Release
 
 
 if "Args" not in locals() : 
     Args = " "
 
+
 # allow command line to override programed number of events to process
 
 if Events_local != 0 : 
@@ -95,7 +85,7 @@ rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
 rdo2aod.input   = Input    # defined in TrigValTools/share/TrigValInputs.json  
 
-if use_gridfiles: 
+if GridFiles:
     if local:
 #   rdo2aod.input = 'Single_el_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
        rdo2aod.input = Input   # should match definition in TrigValTools/share/TrigValInputs.json  
@@ -108,7 +98,9 @@ if use_gridfiles:
 # Run athena analysis to produce TrkNtuple
 
 test = Test.Test()
-test.art_type = 'grid'
+test.art_type = Art_type
+if dry_run:
+    test.dry_run = True
 if (not exclude):
     test.exec_steps = [rdo2aod]
     test.exec_steps.append(TrigInDetAna())
@@ -116,62 +108,20 @@ if (not exclude):
 
 # Run TIDArdict
 
-# first make sure that we have a proper list ..
-if isinstance( TrackReference, str ):
-    TrackReference = [ TrackReference ]
-
-for ref in TrackReference : 
-
-    hist_file = 'data-hists.root'
-    ext       = ''
-
-    if   ( ref == 'Truth' ) :
-        args = 'TIDAdata-run3.dat  -b Test_bin.dat -o ' + hist_file + Args
-    elif ( ref == 'Offline' ) :
-        # if more than one reefrence ...
-        if len(TrackReference)>1 : 
-            hist_file = 'data-hists-offline.root'
-            ext       = 'offline'
-        args = 'TIDAdata-run3-offline.dat -r Offline  -b Test_bin.dat -o ' + hist_file
-    else :
-        # here actually we should allow functionality 
-        # to use different pdgid truth or offline as
-        # a reference:
-        # presumably we run offline muons etc as well 
-        # now in the transform
-        raise Exception( 'unknown reference: ', ref )
-
-    if ((not exclude) or postproc ):
-        rdict = TrigInDetdictStep( name=ref, reference=ref )
-        rdict.args = args
-        print( "\033[0;32m TIDArdict "+args+" \033[0m" )
 
+if ((not exclude) or postproc ):
+    for job in Jobs :
+        if len(job) >= 3:
+            rdict = TrigInDetRdictStep( name=job[0], args=job[1], testbin=job[2] )
+        else:
+            rdict = TrigInDetRdictStep( name=job[0], args=job[1] )
+        print( "\n\033[0;32m TIDArdict "+job[1]+" \033[0m" )
         test.check_steps.append(rdict)
        
-    # Now the comparitor steps
-    # here, the compararitor must know the name of the root file to process
-    # we set it in the comparitor job, using the "offline" extension
-    # this isn't ideal, since we set the hist file in this code also 
-    # so really we should pass it in consistently, and the options 
-    # for the directory names should be unrelated 
-    
-    for slice in Slices :
-        for _lowpt in lowpt_local :
-            
-            stagetag = slice+ext
-            if _lowpt :
-                stagetag += "-lowpt"
-                
-            print( "stagetag "+stagetag )
-                
-            comp1=TrigInDetCompStep( 'Comp_L2'+stagetag, 'L2', slice, type=ext, lowpt=_lowpt )
-            test.check_steps.append(comp1)
-            
-            if ( RunEF ) : 
-                comp2=TrigInDetCompStep( 'Comp_EF'+stagetag, 'EF', slice, type=ext, lowpt=_lowpt )
-                test.check_steps.append(comp2)
-
-
+        
+for _slice in Comp :
+    compstep = TrigInDetCompStep( name=_slice[0], slice=_slice[1], file=_slice[2], args=_slice[3] ) 
+    test.check_steps.append(compstep)
 
 # CPU cost steps
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_NewBase.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_OldBase.py
old mode 100755
new mode 100644
similarity index 53%
rename from Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_NewBase.py
rename to Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_OldBase.py
index d2de1c9dfbb7..4353425c43af
--- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_NewBase.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_OldBase.py
@@ -1,5 +1,7 @@
 ###  #!/usr/bin/env python
 
+
+
 # Slices = ['fsjet']
 # RunEF  = False
 # Events = 10
@@ -10,14 +12,8 @@
 
 import re
 
-from TrigValTools.TrigValSteering import Test
-from TrigValTools.TrigValSteering import CheckSteps
-
-from TrigInDetValidation.TrigInDetNewArtSteps import TrigInDetReco
-from TrigInDetValidation.TrigInDetNewArtSteps import TrigInDetAna
-from TrigInDetValidation.TrigInDetNewArtSteps import TrigInDetRdictStep
-from TrigInDetValidation.TrigInDetNewArtSteps import TrigInDetCompStep
-from TrigInDetValidation.TrigInDetNewArtSteps import TrigInDetCpuCostStep
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
 
 
 import sys,getopt
@@ -32,13 +28,14 @@ except getopt.GetoptError:
     print("-n  N          run only on N events per job")
     print("-c(--config)   run with config_only and print to a pkl file")
     print("")
-    sys.exit(1)
+
 
 Events_local  = 0
 local         = False
 exclude       = False
 postproc      = False
 testconfig    = False
+lowpt_local   = []
 
 
 try: GridFiles
@@ -73,14 +70,19 @@ rdo2aod.slices            = Slices
 rdo2aod.threads           = Threads
 rdo2aod.concurrent_events = Slots 
 rdo2aod.config_only       = testconfig
-if 'Release' in dir():
-    rdo2aod.release           = Release
+
+if "Lowpt" in locals() : 
+    if isinstance( Lowpt, list ) : 
+        lowpt_local = Lowpt
+    else : 
+        lowpt_local = [ Lowpt ]
+else : 
+    lowpt_local = [ False ]
 
 
 if "Args" not in locals() : 
     Args = " "
 
-
 # allow command line to override programed number of events to process
 
 if Events_local != 0 : 
@@ -114,17 +116,62 @@ if (not exclude):
 
 # Run TIDArdict
 
+# first make sure that we have a proper list ..
+if isinstance( TrackReference, str ):
+    TrackReference = [ TrackReference ]
+
+for ref in TrackReference : 
+
+    hist_file = 'data-hists.root'
+    ext       = ''
+
+    if   ( ref == 'Truth' ) :
+        args = 'TIDAdata-run3.dat  -b Test_bin.dat -o ' + hist_file + Args
+    elif ( ref == 'Offline' ) :
+        # if more than one reefrence ...
+        if len(TrackReference)>1 : 
+            hist_file = 'data-hists-offline.root'
+            ext       = 'offline'
+        args = 'TIDAdata-run3-offline.dat -r Offline  -b Test_bin.dat -o ' + hist_file
+    else :
+        # here actually we should allow functionality 
+        # to use different pdgid truth or offline as
+        # a reference:
+        # presumably we run offline muons etc as well 
+        # now in the transform
+        raise Exception( 'unknown reference: ', ref )
+
+    if ((not exclude) or postproc ):
+        rdict = TrigInDetdictStep( name=ref, reference=ref )
+        rdict.args = args
+        print( "\033[0;32m TIDArdict "+args+" \033[0m" )
 
-if ((not exclude) or postproc ):
-    for job in Jobs : 
-        rdict = TrigInDetRdictStep( name=job[0], args=job[1] )
-        print( "\n\033[0;32m TIDArdict "+job[1]+" \033[0m" )
         test.check_steps.append(rdict)
        
-        
-for _slice in Comp :
-    compstep = TrigInDetCompStep( name=_slice[0], slice=_slice[1], file=_slice[2], args=_slice[3] ) 
-    test.check_steps.append(compstep)
+    # Now the comparitor steps
+    # here, the compararitor must know the name of the root file to process
+    # we set it in the comparitor job, using the "offline" extension
+    # this isn't ideal, since we set the hist file in this code also 
+    # so really we should pass it in consistently, and the options 
+    # for the directory names should be unrelated 
+    
+    for slice in Slices :
+        for _lowpt in lowpt_local :
+            
+            stagetag = slice+ext
+            if _lowpt :
+                stagetag += "-lowpt"
+                
+            print( "stagetag "+stagetag )
+                
+            comp1=TrigInDetCompStep( 'Comp_L2'+stagetag, 'L2', slice, type=ext, lowpt=_lowpt )
+            test.check_steps.append(comp1)
+            
+            if ( RunEF ) : 
+                comp2=TrigInDetCompStep( 'Comp_EF'+stagetag, 'EF', slice, type=ext, lowpt=_lowpt )
+                test.check_steps.append(comp2)
+
+
 
 # CPU cost steps
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
index a426a5d76046..54421eb0d9fc 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
@@ -25,16 +25,28 @@
 # art-output: *.dat 
 
 
-Slices  = ['muon','electron','tau','bjet']
-RunEF   = False
-Events  = 4000 
+Slices  = ['muon','electron','tau','bjet','fsjet']
+Events  = 4000
 Threads = 8 
 Slots   = 8
 Input   = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
 
-TrackReference = [ 'Offline' ]
+Jobs = [ ( "Offline",     " TIDAdata-run3-offline.dat      -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -r Offline -o data-hists-offline-vtx.root" ) ]
 
+Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-muon " ),
+         ( "L2electron",   "L2electron",  "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-electron " ),
+         ( "L2tau",        "L2tau",       "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-tau " ),
+         ( "L2bjet",       "L2bjet",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-bjet " ),   
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-FS " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ), 
 
+         ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
+         ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
+         ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
+         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+   
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_new.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_new.py
deleted file mode 100755
index a510619a4395..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_new.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for all_ttbar_pu40_new
-# art-type: grid
-# art-include: master/Athena
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['muon','electron','tau','bjet','fsjet']
-RunEF   = False
-Events  = 4000
-Threads = 8 
-Slots   = 8
-Input   = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
-
-Jobs = [ ( "Offline",     " TIDAdata-run3-offline.dat      -o data-hists-offline.root" ),
-         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -o data-hists-offline-vtx.root" ) ]
-
-Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-muon " ),
-         ( "L2electron",   "L2electron",  "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-electron " ),
-         ( "L2tau",        "L2tau",       "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-tau " ),
-         ( "L2bjet",       "L2bjet",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-bjet " ),   
-         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-FS " ),
-         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
-         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ), 
-
-         ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
-         ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
-         ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
-         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
-   
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_NewBase.py")
-
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_old.py
index def488af358b..c35d261d368d 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_old.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40_old.py
@@ -27,7 +27,7 @@
 
 
 from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
 
 
 import sys,getopt
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
index bc4dd8c7eaa0..8a755103d53d 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
@@ -3,7 +3,6 @@
 # art-description: art job for all_ttbar_pu80
 # art-type: grid
 # art-include: master/Athena
-# art-input-nfiles: 3
 # art-athena-mt: 8
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
@@ -26,102 +25,28 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['muon','electron','tau','bjet','fsjet']
+Events  = 4000
+Threads = 8 
+Slots   = 8
+Input   = 'ttbar_pu80'    # defined in TrigValTools/share/TrigValInputs.json  
 
+Jobs = [ ( "Offline",     " TIDAdata-run3-offline.dat      -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -r Offline -o data-hists-offline-vtx.root" ) ]
 
-import sys,getopt
+Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-muon " ),
+         ( "L2electron",   "L2electron",  "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-electron " ),
+         ( "L2tau",        "L2tau",       "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-tau " ),
+         ( "L2bjet",       "L2bjet",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-bjet " ),   
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-FS " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ), 
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+         ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
+         ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
+         ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
+         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+   
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon','electron','tau','bjet']
-rdo2aod.max_events = 4000 
-rdo2aod.threads = 8 
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-comp.test='ttbar'
-test.check_steps.append(comp)
- 
- 
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-comp2.test='ttbar'
-test.check_steps.append(comp2)
-
-
-comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
-comp3.test='ttbar'
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
-comp4.test='ttbar'
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
-comp5.test='ttbar'
-test.check_steps.append(comp5)
-
-comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
-comp6.test='ttbar'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
-comp7.test='ttbar'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
-comp8.test='ttbar'
-test.check_steps.append(comp8)
-
-comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
-comp9.test='ttbar'
-test.check_steps.append(comp9)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py
new file mode 100755
index 000000000000..63ce3daf22f0
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+
+# art-description: art job for all_ttbar_pu80
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['muon','electron','tau','bjet']
+rdo2aod.max_events = 4000 
+rdo2aod.threads = 8 
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
+comp.test='ttbar'
+test.check_steps.append(comp)
+ 
+ 
+comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
+comp2.test='ttbar'
+test.check_steps.append(comp2)
+
+
+comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
+comp3.test='ttbar'
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
+comp4.test='ttbar'
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
+comp5.test='ttbar'
+test.check_steps.append(comp5)
+
+comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
+comp6.test='ttbar'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
+comp7.test='ttbar'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
+comp8.test='ttbar'
+test.check_steps.append(comp8)
+
+comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
+comp9.test='ttbar'
+test.check_steps.append(comp9)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py
index d012c8797220..b1f1181b7bd4 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py
@@ -3,7 +3,6 @@
 # art-description: art job for all_ttbar_pu80_short
 # art-type: grid
 # art-include: master/Athena
-# art-input-nfiles: 3
 # art-athena-mt: 8
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
@@ -26,102 +25,28 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['muon','electron','tau','bjet','fsjet']
+Events  = 1000
+Threads = 8 
+Slots   = 8
+Input   = 'ttbar_pu80'    # defined in TrigValTools/share/TrigValInputs.json  
 
+Jobs = [ ( "Offline",     " TIDAdata-run3-offline.dat      -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -r Offline -o data-hists-offline-vtx.root" ) ]
 
-import sys,getopt
+Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-muon " ),
+         ( "L2electron",   "L2electron",  "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-electron " ),
+         ( "L2tau",        "L2tau",       "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-tau " ),
+         ( "L2bjet",       "L2bjet",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-bjet " ),   
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-FS " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ), 
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+         ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
+         ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
+         ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
+         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+   
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon','electron','tau','bjet']
-rdo2aod.max_events = 1000 
-rdo2aod.threads = 8 
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-comp.test='ttbar'
-test.check_steps.append(comp)
- 
- 
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-comp2.test='ttbar'
-test.check_steps.append(comp2)
-
-
-comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
-comp3.test='ttbar'
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
-comp4.test='ttbar'
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
-comp5.test='ttbar'
-test.check_steps.append(comp5)
-
-comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
-comp6.test='ttbar'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
-comp7.test='ttbar'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
-comp8.test='ttbar'
-test.check_steps.append(comp8)
-
-comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
-comp9.test='ttbar'
-test.check_steps.append(comp9)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py
new file mode 100755
index 000000000000..83941ab6bf6a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+
+# art-description: art job for all_ttbar_pu80_short
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['muon','electron','tau','bjet']
+rdo2aod.max_events = 1000 
+rdo2aod.threads = 8 
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
+comp.test='ttbar'
+test.check_steps.append(comp)
+ 
+ 
+comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
+comp2.test='ttbar'
+test.check_steps.append(comp2)
+
+
+comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
+comp3.test='ttbar'
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
+comp4.test='ttbar'
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
+comp5.test='ttbar'
+test.check_steps.append(comp5)
+
+comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
+comp6.test='ttbar'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
+comp7.test='ttbar'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
+comp8.test='ttbar'
+test.check_steps.append(comp8)
+
+comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
+comp9.test='ttbar'
+test.check_steps.append(comp9)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py
index b54945e9f25f..ad18d67f9c52 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py
@@ -3,7 +3,6 @@
 # art-description: art job for all_ttbar_pu80_st
 # art-type: grid
 # art-include: master/Athena
-# art-input-nfiles: 3
 # art-athena-mt: 4
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
@@ -26,103 +25,28 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['muon','electron','tau','bjet','fsjet']
+Events  = 1000
+Threads = 1
+Slots   = 1
+Input   = 'ttbar_pu80'    # defined in TrigValTools/share/TrigValInputs.json  
 
+Jobs = [ ( "Offline",     " TIDAdata-run3-offline.dat      -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -r Offline -o data-hists-offline-vtx.root" ) ]
 
-import sys,getopt
+Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-muon " ),
+         ( "L2electron",   "L2electron",  "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-electron " ),
+         ( "L2tau",        "L2tau",       "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-tau " ),
+         ( "L2bjet",       "L2bjet",      "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-bjet " ),   
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat  -d HLTL2-plots-FS " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ), 
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+         ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
+         ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
+         ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
+         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+   
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon','electron','tau','bjet']
-rdo2aod.max_events = 1000 
-rdo2aod.threads = 1 
-rdo2aod.concurrent_events = 1 
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-comp.test='ttbar'
-test.check_steps.append(comp)
- 
- 
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-comp2.test='ttbar'
-test.check_steps.append(comp2)
-
-
-comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
-comp3.test='ttbar'
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
-comp4.test='ttbar'
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
-comp5.test='ttbar'
-test.check_steps.append(comp5)
-
-comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
-comp6.test='ttbar'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
-comp7.test='ttbar'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
-comp8.test='ttbar'
-test.check_steps.append(comp8)
-
-comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
-comp9.test='ttbar'
-test.check_steps.append(comp9)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py
new file mode 100755
index 000000000000..357cde750984
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py
@@ -0,0 +1,128 @@
+#!/usr/bin/env python
+
+# art-description: art job for all_ttbar_pu80_st
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['muon','electron','tau','bjet']
+rdo2aod.max_events = 1000 
+rdo2aod.threads = 1 
+rdo2aod.concurrent_events = 1 
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
+comp.test='ttbar'
+test.check_steps.append(comp)
+ 
+ 
+comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
+comp2.test='ttbar'
+test.check_steps.append(comp2)
+
+
+comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
+comp3.test='ttbar'
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
+comp4.test='ttbar'
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
+comp5.test='ttbar'
+test.check_steps.append(comp5)
+
+comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
+comp6.test='ttbar'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
+comp7.test='ttbar'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
+comp8.test='ttbar'
+test.check_steps.append(comp8)
+
+comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
+comp9.test='ttbar'
+test.check_steps.append(comp9)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40.py
index 850c9adf65f4..d881c3ff9b55 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40.py
@@ -30,14 +30,19 @@ os.system("echo 'ftf = findAlgorithm(topSequence, \"TrigFastTrackFinder__jet\")'
 os.system("echo 'ftf.TripletDoPPS=False' >> dopps.py")
 
 Slices = ['bjet']
-RunEF   = True
 Events  = 4000
 Threads = 8 
 Slots   = 8
 postinclude_file = 'dopps.py'
 Input = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
 
-TrackReference = [ 'Truth', 'Offline' ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2bjet",              "L2bjet",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2bjetoffline",       "L2bjet",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "EFbjet",              "EFbjet",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFbjetoffline",       "EFbjet",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ) ]
 
 
 from AthenaCommon.Include import include 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py
new file mode 100755
index 000000000000..f014eae0bec7
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+
+# art-description: art job for bjet_pu40_mt
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+import os
+os.system("echo 'ftf = findAlgorithm(topSequence, \"TrigFastTrackFinder__jet\")' > dopps.py")
+os.system("echo 'ftf.TripletDoPPS=False' >> dopps.py")
+
+Slices = ['bjet']
+RunEF   = True
+Events  = 4000
+Threads = 8 
+Slots   = 8
+postinclude_file = 'dopps.py'
+Input = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
+
+TrackReference = [ 'Truth', 'Offline' ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py
index 3a9b964b4f79..a99b3d6d885f 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40.py
@@ -26,13 +26,18 @@
 # art-output: *.dat 
 
 Slices = ['bjet']
-RunEF   = True
 Events  = 4000
 Threads = 8 
 Slots   = 8
 Input = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
 
-TrackReference = [ 'Truth', 'Offline' ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2bjet",              "L2bjet",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2bjetoffline",       "L2bjet",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "EFbjet",              "EFbjet",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFbjetoffline",       "EFbjet",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ) ]
 
 
 from AthenaCommon.Include import include 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py
new file mode 100755
index 000000000000..3aa3e95ad34f
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+# art-description: art job for bjet_pu40_mt
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+Slices = ['bjet']
+RunEF   = True
+Events  = 4000
+Threads = 8 
+Slots   = 8
+Input = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
+
+TrackReference = [ 'Truth', 'Offline' ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40.py
index bc85b4326011..9c022553168e 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40.py
@@ -5,7 +5,7 @@
 # art-include: master/Athena
 # art-input: mc15_13TeV.129190.Pythia8_AU2CTEQ6L1_ppToJpsie3e3.recon.RDO.e3802_s2608_s2183_r7042
 # art-input-nfiles: 16
-# art-athena-mt: 8
+# art-athena-mt: 4
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
 # art-output: *.txt
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['electron']
+Events  = 8000
+Threads = 8 
+Slots   = 8
+Input   = 'Jpsiee_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
 
-import sys,getopt
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
 
 
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Jpsiee_pu40'     # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py
new file mode 100755
index 000000000000..3995c8d3cec0
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_Jpsiee_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.129190.Pythia8_AU2CTEQ6L1_ppToJpsie3e3.recon.RDO.e3802_s2608_s2183_r7042
+# art-input-nfiles: 16
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 8000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Jpsiee_pu40'     # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80.py
index b29f913f599a..7e39bc2265ad 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el'     # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 20000 
+Threads = 8 
+Slots   = 8
+Input   = 'Single_el'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0.py
index c24833679155..c6b34f1ae1a7 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 20000 
+Threads = 8 
+Slots   = 8
+Input   = 'Single_el_larged0'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3-larged0-el.dat                    -o data-hists.root -p 11",   "Test_bin_larged0.dat" ),
+         ( "Offline",     " TIDAdata-run3-offline-larged0-el.dat -r Offline -o data-hists-offline.root", "Test_bin_larged0.dat" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py
new file mode 100755
index 000000000000..976ed85fa7dc
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_singlee_7-80_larged0
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.159053.ParticleGenerator_e_Et7to80_vertxy20.recon.RDO.e3603_s2726_r7728
+# art-input-nfiles: 10
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 20000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Single_el_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-larged0-el.dat -f data-hists.root -p 11 -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline-larged0-el.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu.py
index 3b730c992d56..4d139d865c7e 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 20000 
+Threads = 8 
+Slots   = 8
+Input   = 'Single_el_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3-larged0-el.dat                    -o data-hists.root -p 11",   "Test_bin_larged0.dat" ),
+         ( "Offline",     " TIDAdata-run3-offline-larged0-el.dat -r Offline -o data-hists-offline.root", "Test_bin_larged0.dat" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py
new file mode 100755
index 000000000000..ed1cd1d3eb80
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_singlee_7-80_larged0_pu
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.159053.ParticleGenerator_e_Et7to80_vertxy20.recon.RDO.e3603_s2726_r7772
+# art-input-nfiles: 10
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 20000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Single_el_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-larged0-el.dat -f data-hists.root -p 11 -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline-larged0-el.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py
new file mode 100755
index 000000000000..50bf73e3b531
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_singlee_7-80
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.159010.ParticleGenerator_e_Et7to80.recon.RDO.e1948_s2726_r7728
+# art-input-nfiles: 10
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 20000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Single_el'     # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40.py
index 6cfc807a53d3..8a942ade8f29 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el_pu'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 20000 
+Threads = 8 
+Slots   = 8
+Input   = 'Single_el_pu'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py
new file mode 100755
index 000000000000..f9da6ad43467
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_singlee_7-80_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.159010.ParticleGenerator_e_Et7to80.recon.RDO.e1948_s2726_r7728
+# art-input-nfiles: 10
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 20000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Single_el_pu'    # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py
index 167ab6ca0a9e..4dadf400dbda 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 16000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 16000
+Threads = 8 
+Slots   = 8
+Input   = 'Zee_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py
new file mode 100755
index 000000000000..82997b99273f
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_zee_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.RDO.e3601_s2665_s2183_r7191
+# art-input-nfiles: 8
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 16000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short.py
index 067583cddad6..a98d8cffc2fd 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 8000
+Threads = 8 
+Slots   = 8
+Input   = 'Zee_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py
new file mode 100755
index 000000000000..b7b997ecba6e
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_zee_pu40_short
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.RDO.e3601_s2665_s2183_r7191
+# art-input-nfiles: 8
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 8000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py
index a219260c5283..829ea474af30 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py
@@ -27,99 +27,25 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 1 # TODO: change to 4
-rdo2aod.concurrent_events = 1 # TODO: change to 4
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
+Slices  = ['electron']
+Events  = 8000
+Threads = 1 
+Slots   = 1
+Input   = 'Zee_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2ele",              "L2electron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2ele-lowpt",        "L2electronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2eleoffline",       "L2electron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2eleoffline-lowpt", "L2electronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFele",              "EFelectron",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFele-lowpt",        "EFelectronLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFeleoffline",       "EFelectron",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFeleoffline-lowpt", "EFelectronLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py
new file mode 100755
index 000000000000..23ec19ec16f2
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for el_zee_pu40_st
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.RDO.e3601_s2665_s2183_r7191
+# art-input-nfiles: 8
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['electron']
+rdo2aod.max_events = 8000 
+rdo2aod.threads = 1 # TODO: change to 4
+rdo2aod.concurrent_events = 1 # TODO: change to 4
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
+test.check_steps.append(comp3)
+
+comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+
+comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40.py
index f2f3774b7bdc..49fd0d57815e 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40.py
@@ -27,7 +27,6 @@
 
 
 Slices  = ['fsjet']
-RunEF   = False
 Events  = 2000 
 Threads = 1 
 Slots   = 1 # what about the mt: 4 art directive ? nfiles: 3 ?
@@ -35,7 +34,14 @@ Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json
 
 postinclude_file = 'TIDAml_extensions.py'
 
-TrackReference = [ 'Truth', 'Offline' ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                        -o data-hists.root" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat     -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat -r Offline -o data-hists-offline-vtx.root" ) ]
+
+Comp = [ ( "FSjet",        "L2fsjet",     "data-hists.root",              " -c TIDAhisto-panel.dat      -d HLTL2-plots " ),
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat      -d HLTL2-plots-offline " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ) ]
 
 
 from AthenaCommon.Include import include 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py
new file mode 100755
index 000000000000..c7d0df17463a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+
+# art-description: art job for fsjet_ml_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['fsjet']
+RunEF   = False
+Events  = 2000 
+Threads = 1 
+Slots   = 1 # what about the mt: 4 art directive ? nfiles: 3 ?
+Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
+
+postinclude_file = 'TIDAml_extensions.py'
+
+TrackReference = [ 'Truth', 'Offline' ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_nopps_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_nopps_pu40.py
index bed747938cc0..239bfe93dbb4 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_nopps_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_nopps_pu40.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# art-description: art job for fsjet_pu40_new
+# art-description: art job for fsjet_nopps_pu40
 # art-type: grid
 # art-include: master/Athena
 # art-input-nfiles: 3
@@ -30,16 +30,15 @@ os.system("echo 'ftf = findAlgorithm(topSequence, \"TrigFastTrackFinder__jet\")'
 os.system("echo 'ftf.TripletDoPPS=False' >> dopps.py")
 
 Slices  = ['fsjet']
-RunEF   = False
 Events  = 2000 
 Threads = 8 
 Slots   = 8
 postinclude_file = 'dopps.py'
 Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
 
-Jobs = [ ( "Truth",       " TIDAdata-run3.dat              -o data-hists.root" ), 
-         ( "Offline",     " TIDAdata-run3-offline.dat      -o data-hists-offline.root" ),
-         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -o data-hists-offline-vtx.root" ) ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                        -o data-hists.root" ), 
+         ( "Offline",     " TIDAdata-run3-offline.dat     -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat -r Offline -o data-hists-offline-vtx.root" ) ]
 
 
 Comp = [ ( "FSjet",        "L2fsjet",     "data-hists.root",              " -c TIDAhisto-panel.dat      -d HLTL2-plots " ),
@@ -49,7 +48,7 @@ Comp = [ ( "FSjet",        "L2fsjet",     "data-hists.root",              " -c T
 
 
 from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_NewBase.py")
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
 
  
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40.py
index 7906c655c024..c350cca4608f 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40.py
@@ -27,13 +27,20 @@
 
 
 Slices  = ['fsjet']
-RunEF   = False
 Events  = 2000 
 Threads = 8 
 Slots   = 8
 Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
 
-TrackReference = [ 'Truth', 'Offline' ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                        -o data-hists.root" ), 
+         ( "Offline",     " TIDAdata-run3-offline.dat     -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat -r Offline -o data-hists-offline-vtx.root" ) ]
+
+
+Comp = [ ( "FSjet",        "L2fsjet",     "data-hists.root",              " -c TIDAhisto-panel.dat      -d HLTL2-plots " ),
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat      -d HLTL2-plots-offline " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ) ]
 
 
 from AthenaCommon.Include import include 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_new.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_new.py
deleted file mode 100755
index 0e0eb8d1d459..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_new.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for fsjet_pu40_new
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['fsjet']
-RunEF   = False
-Events  = 2000 
-Threads = 8 
-Slots   = 8
-Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
-
-Jobs = [ ( "Truth",       " TIDAdata-run3.dat              -o data-hists.root" ), 
-         ( "Offline",     " TIDAdata-run3-offline.dat      -o data-hists-offline.root" ),
-         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat  -o data-hists-offline-vtx.root" ) ]
-
-
-Comp = [ ( "FSjet",        "L2fsjet",     "data-hists.root",              " -c TIDAhisto-panel.dat      -d HLTL2-plots " ),
-         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat      -d HLTL2-plots-offline " ),
-         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
-         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ) ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_NewBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py
new file mode 100755
index 000000000000..706271f7e055
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+# art-description: art job for fsjet_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['fsjet']
+RunEF   = False
+Events  = 2000 
+Threads = 8 
+Slots   = 8
+Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
+
+TrackReference = [ 'Truth', 'Offline' ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st.py
index bded7eec2ff5..9a0b6137f8c2 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st.py
@@ -27,13 +27,19 @@
 
 
 Slices  = ['fsjet']
-RunEF   = False
 Events  = 2000 
 Threads = 1 
 Slots   = 1 # what about the mt: 4 art directive ? nfiles: 3 ?
 Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
 
-TrackReference = [ 'Truth', 'Offline' ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                        -o data-hists.root" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat     -r Offline -o data-hists-offline.root" ),
+         ( "OfflineVtx",  " TIDAdata-run3-offline-vtx.dat -r Offline -o data-hists-offline-vtx.root" ) ]
+
+Comp = [ ( "FSjet",        "L2fsjet",     "data-hists.root",              " -c TIDAhisto-panel.dat      -d HLTL2-plots " ),
+         ( "FSjetoffline", "L2fsjet",     "data-hists-offline.root",      " -c TIDAhisto-panel.dat      -d HLTL2-plots-offline " ),
+         ( "FSvtx",        "L2fsjetvtx",  "data-hists-offline-vtx.root",  " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtx     --ncols 3" ),
+         ( "FSvtxall",     "L2fsjetvtx",  "data-hists-offline.root",      " -c TIDAhisto-panel-vtx.dat  -d HLTL2-plots-vtxall  --ncols 3" ) ]
 
 
 from AthenaCommon.Include import include 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py
new file mode 100755
index 000000000000..eaac4d29a2ba
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+# art-description: art job for fsjet_pu40_st
+# art-type: grid
+# art-include: master/Athena
+# art-input-nfiles: 3
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['fsjet']
+RunEF   = False
+Events  = 2000 
+Threads = 1 
+Slots   = 1 # what about the mt: 4 art directive ? nfiles: 3 ?
+Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
+
+TrackReference = [ 'Truth', 'Offline' ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias.py
index 29c48f98f889..65289fc30f95 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias.py
@@ -28,13 +28,16 @@
 
 
 Slices  = ['minbias']
-RunEF   = False
 Events  = 8000 
 Threads = 8 
 Slots   = 8
 Input   = 'minbias'    # defined in TrigValTools/share/TrigValInputs.json  
 
-TrackReference = [ 'Truth', 'Offline' ]
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2minbias",        "L2minbias", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2minbiasoffline", "L2minbias", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ) ]
 
 
 from AthenaCommon.Include import include 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py
new file mode 100755
index 000000000000..ed5c049f98d0
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+
+# art-description: art job for minbias
+# art-type: grid
+# art-include: master/Athena
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-athena-nfiles: 4
+# art-athena-mt: 8
+# art-memory: 4096
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['minbias']
+RunEF   = False
+Events  = 8000 
+Threads = 8 
+Slots   = 8
+Input   = 'minbias'    # defined in TrigValTools/share/TrigValInputs.json  
+
+TrackReference = [ 'Truth', 'Offline' ]
+
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys.py
index c3fd1df819ee..932606d97b49 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys.py
@@ -25,94 +25,27 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['muon']
+Events  = 6000 
+Threads = 8 
+Slots   = 8
+Input   = 'Bphys_JpsiPhi'    # defined in TrigValTools/share/TrigValInputs.json
 
-import sys,getopt
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 13" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2muon-lowpt",        "L2muonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2muonoffline",       "L2muon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2muonoffline-lowpt", "L2muonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFmuon-lowpt",        "EFmuonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFmuonoffline",       "EFmuon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFmuonoffline-lowpt", "EFmuonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
 
 
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
 
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 6000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'Bphys_JpsiPhi'    # defined in TrigValTools/share/TrigValInputs.json  
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
  
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
-test.check_steps.append(comp3)
-  
-comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-  
-comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_mt-old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py
similarity index 74%
rename from Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_mt-old.py
rename to Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py
index 59d3c9157039..81e88a51941f 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_mt-old.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py
@@ -1,11 +1,9 @@
 #!/usr/bin/env python
 
-# art-description: art job for mu_Zmumu_pu40_mt-old
+# art-description: art job for mu_bphys
 # art-type: grid
 # art-include: master/Athena
-# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
-# art-input-nfiles: 4
-# art-athena-mt: 4
+# art-athena-mt: 8
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
 # art-output: *.txt
@@ -28,7 +26,7 @@
 
 
 from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
 
 import sys,getopt
 
@@ -55,17 +53,12 @@ for opt,arg in opts:
 
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 4
-rdo2aod.concurrent_events = 4
+rdo2aod.max_events = 6000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
+rdo2aod.input = 'Bphys_JpsiPhi'    # defined in TrigValTools/share/TrigValInputs.json  
 
 test = Test.Test()
 test.art_type = 'grid'
@@ -77,7 +70,7 @@ if (not exclude):
  
 # Run Tidardict
 if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep('TrigInDetDict')
+    rdict = TrigInDetdictStep()
     rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
     test.check_steps.append(rdict)
     rdict2 = TrigInDetdictStep('TrigInDetDict2')
@@ -92,18 +85,18 @@ test.check_steps.append(comp)
 comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
 test.check_steps.append(comp2)
 
-comp3=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp3.type = 'offline'
+comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
 test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp4.type = 'offline'
+  
+comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
 test.check_steps.append(comp4)
 
-comp5=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
+comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
+comp5.type = 'offline'
 test.check_steps.append(comp5)
   
-comp6=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
+comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
+comp6.type = 'offline'
 test.check_steps.append(comp6)
 
 comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0.py
index 3fe507c6da70..79a90f3c2721 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
-# art-description: art job for mu_singlemu_larged0_pu
+# art-description: art job for mu_singlemu_larged0
 # art-type: grid
 # art-include: master/Athena
-# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7772
+# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7728
 # art-input-nfiles: 10
 # art-athena-mt: 8
 # art-memory: 4096
@@ -27,99 +27,28 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['muon']
+Events  = 20000 
+Threads = 8 
+Slots   = 8
+Input   = 'Single_mu_larged0'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
 
-import sys,getopt
+Jobs = [ ( "Truth",       " TIDAdata-run3-larged0.dat                    -o data-hists.root -p 13",   "Test_bin_larged0.dat" ),
+         ( "Offline",     " TIDAdata-run3-offline-larged0.dat -r Offline -o data-hists-offline.root", "Test_bin_larged0.dat" ) ]
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2muon-lowpt",        "L2muonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2muonoffline",       "L2muon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2muonoffline-lowpt", "L2muonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFmuon-lowpt",        "EFmuonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFmuonoffline",       "EFmuon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFmuonoffline-lowpt", "EFmuonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
 
 
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
 
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_mu_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
  
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
-test.check_steps.append(comp3)
-  
-comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-  
-comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py
new file mode 100755
index 000000000000..ae3122782018
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_singlemu_larged0_pu
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7772
+# art-input-nfiles: 10
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['muon']
+rdo2aod.max_events = 20000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Single_mu_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-larged0.dat -f data-hists.root -p 13 -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline-larged0.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
+test.check_steps.append(comp3)
+  
+comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+  
+comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu.py
index 1f955a0f5bbc..da177d05348c 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu.py
@@ -3,7 +3,7 @@
 # art-description: art job for mu_singlemu_larged0_pu
 # art-type: grid
 # art-include: master/Athena
-# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7728
+# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7772
 # art-input-nfiles: 10
 # art-athena-mt: 8
 # art-memory: 4096
@@ -27,99 +27,28 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['muon']
+Events  = 20000 
+Threads = 8 
+Slots   = 8
+Input   = 'Single_mu_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
 
-import sys,getopt
+Jobs = [ ( "Truth",       " TIDAdata-run3-larged0.dat                    -o data-hists.root -p 13",   "Test_bin_larged0.dat" ),
+         ( "Offline",     " TIDAdata-run3-offline-larged0.dat -r Offline -o data-hists-offline.root", "Test_bin_larged0.dat" ) ]
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2muon-lowpt",        "L2muonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2muonoffline",       "L2muon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2muonoffline-lowpt", "L2muonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFmuon-lowpt",        "EFmuonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFmuonoffline",       "EFmuon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFmuonoffline-lowpt", "EFmuonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
 
 
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
 
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_mu_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
  
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
-test.check_steps.append(comp3)
-  
-comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-  
-comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py
new file mode 100755
index 000000000000..a3cc45d3f8fd
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_singlemu_larged0_pu
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7728
+# art-input-nfiles: 10
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['muon']
+rdo2aod.max_events = 20000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+if local:
+    rdo2aod.input = 'Single_mu_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
+else:
+    rdo2aod.input = ''
+    rdo2aod.args += '--inputRDOFile=$ArtInFile '
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3-larged0.dat -f data-hists.root -p 13 -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict)
+    rdict2 = TrigInDetdictStep('TrigInDetDict2')
+    rdict2.args='TIDAdata-run3-offline-larged0.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
+    test.check_steps.append(rdict2)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
+test.check_steps.append(comp2)
+
+comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
+test.check_steps.append(comp3)
+  
+comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
+test.check_steps.append(comp4)
+
+comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
+comp5.type = 'offline'
+test.check_steps.append(comp5)
+  
+comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
+comp6.type = 'offline'
+test.check_steps.append(comp6)
+
+comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
+comp7.type = 'offline'
+test.check_steps.append(comp7)
+  
+comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
+comp8.type = 'offline'
+test.check_steps.append(comp8)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py
index 4e9c9c5a13d0..a89bdac87da5 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40.py
@@ -28,16 +28,24 @@
 
 
 Slices  = ['muon']
-RunEF   = True
 Events  = 8000 
 Threads = 8 
 Slots   = 8
 Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
 GridFiles=True
 
-Args = " -p 13 "
-TrackReference = [ 'Truth', 'Offline' ]
-Lowpt          = [ False, True ] 
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 13" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2muon-lowpt",        "L2muonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2muonoffline",       "L2muon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2muonoffline-lowpt", "L2muonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFmuon-lowpt",        "EFmuonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFmuonoffline",       "EFmuon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFmuonoffline-lowpt", "EFmuonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
 
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py
index 93fb82a789b1..1467d3d2f4e9 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build.py
@@ -4,67 +4,22 @@
 # art-type: build
 # art-include: master/Athena
 
-import sys,getopt
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print ("-x             don't run athena or post post-processing, only plotting")
-    print ("-p             run post-processing, even if -x is set")
+Slices  = ['muon']
+Events  = 100 
+Threads = 1 
+Slots   = 1
+Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+Art_type= 'build'
 
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 13" ) ]
 
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ) ]
 
-        
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
 
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 100 # TODO: 2000 events
-rdo2aod.threads = 1 # TODO: change to 4
-rdo2aod.concurrent_events = 1 # TODO: change to 4
-rdo2aod.perfmon = False
-rdo2aod.input = 'Zmumu_pu40'   # defined in TrigValTools/share/TrigValInputs.json  
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
 
-test = Test.Test()
-test.art_type = 'build'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
-    test.check_steps.append(rdict)
  
-
-# Now the comparitor steps
-comp=TrigInDetCompStep( 'Comp_L2muon', 'L2', 'muon' )
-comp.flag = 'L2muon'
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep( 'Comp_EFmuon', 'EF', 'muon' )
-comp2.flag = 'EFmuon'
-test.check_steps.append(comp2)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py
new file mode 100755
index 000000000000..be5e11daf870
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_Zmumu_pu40_build
+# art-type: build
+# art-include: master/Athena
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print ("-x             don't run athena or post post-processing, only plotting")
+    print ("-p             run post-processing, even if -x is set")
+
+
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+        
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['muon']
+rdo2aod.max_events = 100 # TODO: 2000 events
+rdo2aod.threads = 1 # TODO: change to 4
+rdo2aod.concurrent_events = 1 # TODO: change to 4
+rdo2aod.perfmon = False
+rdo2aod.input = 'Zmumu_pu40'   # defined in TrigValTools/share/TrigValInputs.json  
+
+
+test = Test.Test()
+test.art_type = 'build'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
+    test.check_steps.append(rdict)
+ 
+
+# Now the comparitor steps
+comp=TrigInDetCompStep( 'Comp_L2muon', 'L2', 'muon' )
+comp.flag = 'L2muon'
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep( 'Comp_EFmuon', 'EF', 'muon' )
+comp2.flag = 'EFmuon'
+test.check_steps.append(comp2)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py
new file mode 100755
index 000000000000..39175be7de87
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_Zmumu_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
+# art-input-nfiles: 4
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['muon']
+RunEF   = True
+Events  = 8000 
+Threads = 8 
+Slots   = 8
+Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Args = " -p 13 "
+TrackReference = [ 'Truth', 'Offline' ]
+Lowpt          = [ False, True ] 
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short.py
index 296bd53e6e45..6b61a0f3c1c8 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short.py
@@ -28,16 +28,24 @@
 
 
 Slices  = ['muon']
-RunEF   = True
 Events  = 2000 
 Threads = 8 
 Slots   = 8
 Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
 GridFiles=True
 
-Args = " -p 13 "
-TrackReference = [ 'Truth', 'Offline' ]
-Lowpt          = [ False, True ] 
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 13" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2muon-lowpt",        "L2muonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2muonoffline",       "L2muon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2muonoffline-lowpt", "L2muonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFmuon-lowpt",        "EFmuonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFmuonoffline",       "EFmuon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFmuonoffline-lowpt", "EFmuonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
 
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py
new file mode 100755
index 000000000000..73924c0f5e9a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_Zmumu_pu40
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
+# art-input-nfiles: 4
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['muon']
+RunEF   = True
+Events  = 2000 
+Threads = 8 
+Slots   = 8
+Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Args = " -p 13 "
+TrackReference = [ 'Truth', 'Offline' ]
+Lowpt          = [ False, True ] 
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st.py
index 6a5a726e71f4..af19f978666e 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st.py
@@ -28,16 +28,24 @@
 
 
 Slices  = ['muon']
-RunEF   = True
 Events  = 2000 
 Threads = 1 
 Slots   = 1
 Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
 GridFiles=True
 
-Args = " -p 13 "
-TrackReference = [ 'Truth', 'Offline' ]
-Lowpt          = [ False, True ] 
+Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 13" ),
+         ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
+
+Comp = [ ( "L2muon",              "L2muon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "L2muon-lowpt",        "L2muonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt " ),
+         ( "L2muonoffline",       "L2muon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "L2muonoffline-lowpt", "L2muonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTL2-plots-lowpt-offline " ),
+         ( "EFmuon",              "EFmuon",      "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "EFmuon-lowpt",        "EFmuonLowpt", "data-hists.root",         " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt " ),
+         ( "EFmuonoffline",       "EFmuon",      "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ),
+         ( "EFmuonoffline-lowpt", "EFmuonLowpt", "data-hists-offline.root", " -c TIDAhisto-panel.dat  -d HLTEF-plots-lowpt-offline " ) ]
+
 
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py
new file mode 100755
index 000000000000..146fda5462f1
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_Zmumu_pu40_st
+# art-type: grid
+# art-include: master/Athena
+# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
+# art-input-nfiles: 4
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+Slices  = ['muon']
+RunEF   = True
+Events  = 2000 
+Threads = 1 
+Slots   = 1
+Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
+GridFiles=True
+
+Args = " -p 13 "
+TrackReference = [ 'Truth', 'Offline' ]
+Lowpt          = [ False, True ] 
+
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
+
+
+ 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py
index 8dbd12f05f00..d743d196d530 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# art-description: art job for mu_ztautau_pu46
+# art-description: art job for tau_ztautau_pu46
 # art-type: grid
 # art-include: master/Athena
 # art-athena-mt: 8
@@ -25,70 +25,21 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['tau']
+Events  = 6000
+Threads = 8 
+Slots   = 8
+Input   = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
 
-import sys,getopt
+Jobs = [ ( "Offline",  " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ),
+         ( "Truth",    " TIDAdata-run3.dat                    -o data-hists.root" ) ]
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
 
+Comp = [ ( "L2tau",        "L2tau",       "data-hists.root",          " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "EFtau",        "EFtau",       "data-hists.root",          " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "L2tauOff",     "L2tau",       "data-hists-offline.root",  " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "EFtauOff",     "EFtau",       "data-hists-offline.root",  " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ) ]
+   
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['tau']
-rdo2aod.max_events = 6000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2tau','L2','tau')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFtau','EF','tau')
-test.check_steps.append(comp2)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_new.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_new.py
deleted file mode 100755
index 8307c10bbeff..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_new.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for tau_ztautau_pu46_new
-# art-type: grid
-# art-include: master/Athena
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['tau']
-Events  = 6000
-Threads = 8 
-Slots   = 8
-Input   = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
-
-Jobs = [ ( "Offline",  " TIDAdata-run3-offline.dat -o data-hists-offline.root" ),
-         ( "Truth",    " TIDAdata-run3.dat         -o data-hists.root" ) ]
-
-
-Comp = [ ( "L2tau",        "L2tau",       "data-hists.root",          " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
-         ( "EFtau",        "EFtau",       "data-hists.root",          " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
-         ( "L2tauOff",     "L2tau",       "data-hists-offline.root",  " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
-         ( "EFtauOff",     "EFtau",       "data-hists-offline.root",  " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ) ]
-   
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_NewBase.py")
-
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py
new file mode 100755
index 000000000000..b96643db6aef
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_ztautau_pu46
+# art-type: grid
+# art-include: master/Athena
+# art-athena-mt: 8
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['tau']
+rdo2aod.max_events = 6000 
+rdo2aod.threads = 8
+rdo2aod.concurrent_events = 8
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.input = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2tau','L2','tau')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFtau','EF','tau')
+test.check_steps.append(comp2)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py
index c89cacfa0b7b..27f1c21df5be 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# art-description: art job for mu_ztautau_pu46_st
+# art-description: art job for tau_ztautau_pu46_st
 # art-type: grid
 # art-include: master/Athena
 # art-athena-mt: 4
@@ -25,70 +25,21 @@
 # art-output: *.dat 
 
 
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+Slices  = ['tau']
+Events  = 6000
+Threads = 1 
+Slots   = 1
+Input   = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
 
-import sys,getopt
+Jobs = [ ( "Offline",  " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ),
+         ( "Truth",    " TIDAdata-run3.dat                    -o data-hists.root" ) ]
 
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
 
+Comp = [ ( "L2tau",        "L2tau",       "data-hists.root",          " -c TIDAhisto-panel.dat  -d HLTL2-plots " ),
+         ( "EFtau",        "EFtau",       "data-hists.root",          " -c TIDAhisto-panel.dat  -d HLTEF-plots " ),
+         ( "L2tauOff",     "L2tau",       "data-hists-offline.root",  " -c TIDAhisto-panel.dat  -d HLTL2-plots-offline " ),
+         ( "EFtauOff",     "EFtau",       "data-hists-offline.root",  " -c TIDAhisto-panel.dat  -d HLTEF-plots-offline " ) ]
+   
+from AthenaCommon.Include import include 
+include("TrigInDetValidation/TrigInDetValidation_Base.py")
 
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['tau']
-rdo2aod.max_events = 6000 
-rdo2aod.threads = 1
-rdo2aod.concurrent_events = 1
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2tau','L2','tau')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFtau','EF','tau')
-test.check_steps.append(comp2)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py
new file mode 100755
index 000000000000..2eed16f43211
--- /dev/null
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+
+# art-description: art job for mu_ztautau_pu46_st
+# art-type: grid
+# art-include: master/Athena
+# art-athena-mt: 4
+# art-memory: 4096
+# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
+# art-output: *.txt
+# art-output: *.log
+# art-output: log.*
+# art-output: *.out
+# art-output: *.err
+# art-output: *.log.tar.gz
+# art-output: *.new
+# art-output: *.json
+# art-output: *.root
+# art-output: *.check*
+# art-output: HLT*
+# art-output: times*
+# art-output: cost-perCall
+# art-output: cost-perEvent
+# art-output: cost-perCall-chain
+# art-output: cost-perEvent-chain
+# art-output: *.dat 
+
+
+from TrigValTools.TrigValSteering import Test, CheckSteps
+from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
+
+import sys,getopt
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
+except getopt.GetoptError:
+    print("Usage:  ")
+    print("-l(--local)    run locally with input file from art eos grid-input")
+    print("-x             don't run athena or post post-processing, only plotting")
+    print("-p             run post-processing, even if -x is set")
+
+
+local=False
+exclude=False
+postproc=False
+for opt,arg in opts:
+    if opt in ("-l", "--local"):
+        local=True
+    if opt=="-x":
+        exclude=True
+    if opt=="-p":
+        postproc=True
+
+
+rdo2aod = TrigInDetReco()
+rdo2aod.slices = ['tau']
+rdo2aod.max_events = 6000 
+rdo2aod.threads = 1
+rdo2aod.concurrent_events = 1
+rdo2aod.perfmon = False
+rdo2aod.timeout = 18*3600
+rdo2aod.input = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
+
+
+test = Test.Test()
+test.art_type = 'grid'
+if (not exclude):
+    test.exec_steps = [rdo2aod]
+    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
+    test.check_steps = CheckSteps.default_check_steps(test)
+
+ 
+# Run Tidardict
+if ((not exclude) or postproc ):
+    rdict = TrigInDetdictStep()
+    rdict.args='TIDAdata-run3.dat -f data-hists.root -b Test_bin.dat '
+    test.check_steps.append(rdict)
+
+ 
+# Now the comparitor steps
+comp=TrigInDetCompStep('Comp_L2tau','L2','tau')
+test.check_steps.append(comp)
+  
+comp2=TrigInDetCompStep('Comp_EFtau','EF','tau')
+test.check_steps.append(comp2)
+
+# CPU cost steps
+cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
+test.check_steps.append(cpucost)
+
+cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
+test.check_steps.append(cpucost2)
+
+import sys
+sys.exit(test.run())
-- 
GitLab


From 86b11ca77921b94729cd22d2b786a4bf53d63ae6 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Fri, 18 Dec 2020 12:55:53 +0000
Subject: [PATCH 114/308] Remove hardcoded manipulation of WriteHandle names in
 MuonCreatorAlg

---
 .../src/MooSegmentFinderAlg.cxx               | 45 +---------
 .../src/MooSegmentFinderAlg.h                 | 83 +++++++------------
 .../src/MuonSegmentFinderAlg.h                |  2 +-
 .../src/MuonCombinedInDetExtensionAlg.h       |  1 +
 .../MuonCombinedAlgs/src/MuonCreatorAlg.cxx   | 17 ++--
 .../MuonCombinedAlgs/src/MuonCreatorAlg.h     |  7 +-
 .../src/MuonCreatorTool.cxx                   |  9 +-
 .../MuonCombinedReconstructionConfig.py       |  3 +-
 .../python/MuonCombinedAlgs.py                |  7 +-
 .../python/HLTMenuConfig/Muon/MuonSetup.py    |  4 +-
 .../python/HLTMenuConfig/Muon/generateMuon.py |  2 +-
 11 files changed, 65 insertions(+), 115 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx
index b63dc2e7a5a5..413b64de7ce0 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx
@@ -6,43 +6,11 @@
 
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 #include "MuonSegment/MuonSegment.h"
-#include "MuonSegmentCombinerToolInterfaces/IMooSegmentCombinationFinder.h"
-#include "MuonSegmentMakerToolInterfaces/IMuonSegmentOverlapRemovalTool.h"
-
-MooSegmentFinderAlg::MooSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator)
-    : AthReentrantAlgorithm(name, pSvcLocator),
-      m_keyTgc("TGC_Measurements"),
-      m_keyTgcPriorBC("TGC_MeasurementsPriorBC"),
-      m_keyTgcNextBC("TGC_MeasurementsNextBC"),
-      m_keyRpc("RPC_Measurements"),
-      m_keyCsc("CSC_Clusters"),
-      m_keyMdt("MDT_DriftCircles"),
-      m_patternCombiLocation("MuonHoughPatternCombinations"),
-      m_segmentLocation("MooreSegments")
-{
-    declareProperty("UseRPC", m_useRpc = true);
-    declareProperty("UseTGC", m_useTgc = true);
-    declareProperty("UseTGCPriorBC", m_useTgcPriorBC = false);
-    declareProperty("UseTGCNextBC", m_useTgcNextBC = false);
-    declareProperty("UseCSC", m_useCsc = true);
-    declareProperty("UseMDT", m_useMdt = true);
-
-    declareProperty("doTGCClust", m_doTGCClust = false);
-    declareProperty("doRPCClust", m_doRPCClust = false);
-    declareProperty("doClusterTruth", m_doClusterTruth = false);
-
-    declareProperty("CscPrepDataContainer", m_keyCsc);
-    declareProperty("MdtPrepDataContainer", m_keyMdt);
-    declareProperty("RpcPrepDataContainer", m_keyRpc);
-    declareProperty("TgcPrepDataContainer", m_keyTgc);
-    declareProperty("TgcPrepDataContainerPriorBC", m_keyTgcPriorBC);
-    declareProperty("TgcPrepDataContainerNextBC", m_keyTgcNextBC);
-
-    declareProperty("MuonPatternCombinationLocation", m_patternCombiLocation);
-    declareProperty("MuonSegmentOutputLocation", m_segmentLocation);
-}
 
-MooSegmentFinderAlg::~MooSegmentFinderAlg() {}
+
+MooSegmentFinderAlg::MooSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthReentrantAlgorithm(name, pSvcLocator) {
+}
 
 StatusCode
 MooSegmentFinderAlg::initialize()
@@ -143,8 +111,3 @@ MooSegmentFinderAlg::execute(const EventContext& ctx) const
     return StatusCode::SUCCESS;
 }  // execute
 
-StatusCode
-MooSegmentFinderAlg::finalize()
-{
-    return StatusCode::SUCCESS;
-}
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h
index 7973fac205df..7706d5c6862d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.h
@@ -7,6 +7,9 @@
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
+
 #include "MuonPattern/MuonPatternCombinationCollection.h"
 #include "MuonPrepRawData/CscPrepDataCollection.h"
 #include "MuonPrepRawData/MdtPrepDataCollection.h"
@@ -18,23 +21,17 @@
 #include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinder.h"
 #include "TrkSegment/SegmentCollection.h"
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
-
-class MsgStream;
-
-namespace Muon {
-class IMooSegmentCombinationFinder;
-class IMuonSegmentOverlapRemovalTool;
-}  // namespace Muon
+#include "MuonSegmentCombinerToolInterfaces/IMooSegmentCombinationFinder.h"
+#include "MuonSegmentMakerToolInterfaces/IMuonSegmentOverlapRemovalTool.h"
 
 class MooSegmentFinderAlg : public AthReentrantAlgorithm {
   public:
     MooSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator);
 
-    virtual ~MooSegmentFinderAlg();
+    virtual ~MooSegmentFinderAlg()=default;
 
     virtual StatusCode initialize() override;
     virtual StatusCode execute(const EventContext& ctx) const override;
-    virtual StatusCode finalize() override;
 
   private:
     template <class T, class Y>
@@ -44,52 +41,36 @@ class MooSegmentFinderAlg : public AthReentrantAlgorithm {
     Trk::SegmentCollection* extractSegmentCollection(const MuonSegmentCombinationCollection& segmentCombinations) const;
 
     /** selection flags for all four technologies */
-    bool m_useTgc;
-    bool m_useTgcPriorBC;
-    bool m_useTgcNextBC;
-    bool m_useRpc;
-    bool m_useCsc;
-    bool m_useMdt;
+    Gaudi::Property<bool> m_useTgc{this,"UseTGC",true};
+    Gaudi::Property<bool> m_useTgcPriorBC{this,"UseTGCPriorBC",false};
+    Gaudi::Property<bool> m_useTgcNextBC{this,"UseTGCNextBC",false};
+    Gaudi::Property<bool> m_useRpc{this,"UseRPC",true};
+    Gaudi::Property<bool> m_useCsc{this,"UseCSC",true};
+    Gaudi::Property<bool> m_useMdt{this,"UseMDT",true};
 
     /** selection flags for cluster based segment finding */
-    bool m_doTGCClust;
-    bool m_doRPCClust;
-    bool m_doClusterTruth;
+    Gaudi::Property<bool> m_doTGCClust{this,"doTGCClust",false};
+    Gaudi::Property<bool> m_doRPCClust{this,"doRPCClust",false};
+    Gaudi::Property<bool> m_doClusterTruth{this,"doClusterTruth",false};
 
     /** storegate location of the MuonPrepDataContainer for all four technologies */
-    SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgc;
-    SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgcPriorBC;
-    SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgcNextBC;
-    SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_keyRpc;
-    SG::ReadHandleKey<Muon::CscPrepDataContainer> m_keyCsc;
-    SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_keyMdt;
-
-    SG::ReadHandleKey<PRD_MultiTruthCollection> m_tgcTruth{this, "TGCTruth", "TGC_TruthMap",
-                                                           "TGC PRD Multi-truth Collection"};
-    SG::ReadHandleKey<PRD_MultiTruthCollection> m_rpcTruth{this, "RPCTruth", "RPC_TruthMap",
-                                                           "RPC PRD Multi-truth Collection"};
-
-    SG::WriteHandleKey<MuonPatternCombinationCollection> m_patternCombiLocation;
-    SG::WriteHandleKey<Trk::SegmentCollection>           m_segmentLocation;
-    SG::WriteHandleKey<Muon::HoughDataPerSectorVec>      m_houghDataPerSectorVecKey{
-        this, "Key_MuonLayerHoughToolHoughDataPerSectorVec", "HoughDataPerSectorVec", "HoughDataPerSectorVec key"};
-
-    ToolHandle<Muon::IMooSegmentCombinationFinder> m_segmentFinder{
-        this,
-        "SegmentFinder",
-        "Muon::MooSegmentCombinationFinder/MooSegmentCombinationFinder",
-    };  //<! pointer to the segment finder
-    ToolHandle<Muon::IMuonClusterSegmentFinder> m_clusterSegMaker{
-        this,
-        "MuonClusterSegmentFinderTool",
-        "Muon::MuonClusterSegmentFinder/MuonClusterSegmentFinder",
-    };
-    ToolHandle<Muon::IMuonSegmentOverlapRemovalTool> m_overlapRemovalTool{
-        this,
-        "SegmentOverlapRemovalTool",
-        "Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool",
-        "tool to removal overlaps in segment combinations",
-    };
+    SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgc{this,"TgcPrepDataContainer","TGC_Measurements"};
+    SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgcPriorBC{this,"TgcPrepDataContainerPriorBC","TGC_MeasurementsPriorBC"};
+    SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgcNextBC{this,"TgcPrepDataContainerNextBC","TGC_MeasurementsNextBC"};
+    SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_keyRpc{this,"RpcPrepDataContainer","RPC_Measurements"};
+    SG::ReadHandleKey<Muon::CscPrepDataContainer> m_keyCsc{this,"CscPrepDataContainer","CSC_Clusters"};
+    SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_keyMdt{this,"MdtPrepDataContainer","MDT_DriftCircles"};
+
+    SG::ReadHandleKey<PRD_MultiTruthCollection> m_tgcTruth{this,"TGCTruth","TGC_TruthMap","TGC PRD Multi-truth Collection"};
+    SG::ReadHandleKey<PRD_MultiTruthCollection> m_rpcTruth{this,"RPCTruth","RPC_TruthMap","RPC PRD Multi-truth Collection"};
+
+    SG::WriteHandleKey<MuonPatternCombinationCollection> m_patternCombiLocation{this,"MuonPatternCombinationLocation","MuonHoughPatternCombinations"};
+    SG::WriteHandleKey<Trk::SegmentCollection> m_segmentLocation{this,"MuonSegmentOutputLocation","MooreSegments"};
+    SG::WriteHandleKey<Muon::HoughDataPerSectorVec> m_houghDataPerSectorVecKey{this,"Key_MuonLayerHoughToolHoughDataPerSectorVec","HoughDataPerSectorVec","HoughDataPerSectorVec key"};
+
+    ToolHandle<Muon::IMooSegmentCombinationFinder> m_segmentFinder{this,"SegmentFinder","Muon::MooSegmentCombinationFinder/MooSegmentCombinationFinder","pointer to the segment finder"};
+    ToolHandle<Muon::IMuonClusterSegmentFinder> m_clusterSegMaker{this,"MuonClusterSegmentFinderTool","Muon::MuonClusterSegmentFinder/MuonClusterSegmentFinder"};
+    ToolHandle<Muon::IMuonSegmentOverlapRemovalTool> m_overlapRemovalTool{this,"SegmentOverlapRemovalTool","Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool","tool to removal overlaps in segment combinations"};
 };
 
 template <class T, class Y>
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
index 846365764702..9d974f2d0fcb 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
@@ -106,7 +106,7 @@ class MuonSegmentFinderAlg : public AthReentrantAlgorithm {
         "Csc4dSegmentMaker/Csc4dSegmentMaker",
     };
 
-
+    // the following Trk::SegmentCollection MuonSegments are sttandard MuonSegments, the MuGirl segments are stored in MuonCreatorAlg.h
     SG::WriteHandleKey<Trk::SegmentCollection> m_segmentCollectionKey{
         this,
         "SegmentCollectionName",
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
index aace58bb052c..dbebf2928022 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
@@ -92,6 +92,7 @@ class MuonCombinedInDetExtensionAlg : public AthAlgorithm {
         "MuGirlMETracks",
         "ME track collection",
     };
+    // these are the MuGirl segments inputs
     SG::WriteHandleKey<Trk::SegmentCollection> m_segments{
         this,
         "SegmentCollection",
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
index e66d0fdc6aaf..e442f3ba5e53 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
@@ -16,9 +16,14 @@
 #include "xAODMuon/SlowMuonAuxContainer.h"
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODCaloEvent/CaloClusterAuxContainer.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
 #include <vector>
 
+namespace {
+  static constexpr const double MeVtoGeV = 1/Gaudi::Units::GeV;
+}
+
 MuonCreatorAlg::MuonCreatorAlg(const std::string& name, ISvcLocator* pSvcLocator):
   AthAlgorithm(name,pSvcLocator) {
 }
@@ -33,8 +38,6 @@ StatusCode MuonCreatorAlg::initialize()
   ATH_CHECK(m_muonCandidateCollectionName.initialize(!m_buildSlowMuon));
   //Can't use a flag in intialize for an array of keys
   if(!m_doSA) ATH_CHECK(m_tagMaps.initialize());
-  m_segTrkContainerName = "Trk"+m_segContainerName.key();
-  m_segContainerName = "xaod"+m_segContainerName.key();
   ATH_CHECK(m_segContainerName.initialize());
   ATH_CHECK(m_segTrkContainerName.initialize());
   m_combinedTrkCollectionName = m_combinedCollectionName.key()+"Tracks";
@@ -176,26 +179,26 @@ StatusCode MuonCreatorAlg::execute()
   //---------------------------------------------------------------------------------------------------------------------//
 
   // Only run monitoring for online algorithms
-  if ( not m_monTool.name().empty() ) {
+  if (!m_monTool.name().empty()) {
     // Monitoring histograms and variables
     auto muon_n     = Monitored::Scalar<int>("muon_n", wh_muons->size());
-    auto muon_pt    = Monitored::Collection("muon_pt",    *(wh_muons.ptr()),  [](auto const& mu) {return mu->pt()/1000.0;}); // converted to GeV
+    auto muon_pt    = Monitored::Collection("muon_pt",    *(wh_muons.ptr()),  [](auto const& mu) {return mu->pt()*MeVtoGeV;}); // converted to GeV
     auto muon_eta   = Monitored::Collection("muon_eta",   *(wh_muons.ptr()),  &xAOD::Muon_v1::eta);
     auto muon_phi   = Monitored::Collection("muon_phi",   *(wh_muons.ptr()),  &xAOD::Muon_v1::phi);
 
     auto satrks_n     = Monitored::Scalar<int>("satrks_n", wh_extrtp->size());
-    auto satrks_pt  = Monitored::Collection("satrks_pt",  *(wh_extrtp.ptr()), [](auto const& satrk) {return satrk->pt()/1000.0;}); // converted to GeV
+    auto satrks_pt  = Monitored::Collection("satrks_pt",  *(wh_extrtp.ptr()), [](auto const& satrk) {return satrk->pt()*MeVtoGeV;}); // converted to GeV
     auto satrks_eta = Monitored::Collection("satrks_eta", *(wh_extrtp.ptr()), &xAOD::TrackParticle_v1::eta);
     auto satrks_phi = Monitored::Collection("satrks_phi", *(wh_extrtp.ptr()), &xAOD::TrackParticle_v1::phi);
 
     auto cbtrks_n   = Monitored::Scalar<int>("cbtrks_n", wh_combtp->size());    
-    auto cbtrks_pt  = Monitored::Collection("cbtrks_pt",  *(wh_combtp.ptr()), [](auto const& cbtrk) {return cbtrk->pt()/1000.0;}); // converted to GeV
+    auto cbtrks_pt  = Monitored::Collection("cbtrks_pt",  *(wh_combtp.ptr()), [](auto const& cbtrk) {return cbtrk->pt()*MeVtoGeV;}); // converted to GeV
     auto cbtrks_eta = Monitored::Collection("cbtrks_eta", *(wh_combtp.ptr()), &xAOD::TrackParticle_v1::eta);
     auto cbtrks_phi = Monitored::Collection("cbtrks_phi", *(wh_combtp.ptr()), &xAOD::TrackParticle_v1::phi);
 
     if (!m_doSA) {
       auto idtrks_n   = Monitored::Scalar<int>("idtrks_n", indetCandidateCollection->size());
-      auto idtrks_pt  = Monitored::Collection("idtrks_pt", *indetCandidateCollection, [](auto const& idtrk) {return idtrk->indetTrackParticle().pt()/1000.0;});
+      auto idtrks_pt  = Monitored::Collection("idtrks_pt", *indetCandidateCollection, [](auto const& idtrk) {return idtrk->indetTrackParticle().pt()*MeVtoGeV;});
       auto idtrks_eta = Monitored::Collection("idtrks_eta", *indetCandidateCollection, [](auto const& idtrk) {return idtrk->indetTrackParticle().eta();});
       auto idtrks_phi = Monitored::Collection("idtrks_phi", *indetCandidateCollection, [](auto const& idtrk) {return idtrk->indetTrackParticle().phi();});
       auto monitorIt = Monitored::Group(m_monTool, muon_n, muon_pt, muon_eta, muon_phi, satrks_n, satrks_pt, satrks_eta, satrks_phi, cbtrks_n, cbtrks_pt,
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h
index 23f8b75dd562..754f58f9aa67 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h
@@ -52,8 +52,11 @@ class MuonCreatorAlg : public AthAlgorithm
   SG::ReadHandleKey<InDetCandidateCollection> m_indetCandidateCollectionName{this,"InDetCandidateLocation","InDetCandidates","ID candidates"};
   SG::ReadHandleKey<MuonCandidateCollection> m_muonCandidateCollectionName{this,"MuonCandidateLocation","MuonCandidates","Muon candidates"};
   SG::ReadHandleKeyArray<MuonCombined::InDetCandidateToTagMap> m_tagMaps{this,"TagMaps",{"muidcoTagMap","stacoTagMap","muGirlTagMap","caloTagMap","segmentTagMap"},"ID candidate to tag maps"};
-  SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_segContainerName{this, "SegmentContainerName", "MuonSegments", "Segments"};
-  SG::WriteHandleKey<Trk::SegmentCollection> m_segTrkContainerName{this,"TrackSegmentContainerName","MuonSegments","Track segments"};
+  SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_segContainerName{this, "SegmentContainerName", "xaodMuonSegments", "Segments"};
+
+  // the following Trk::SegmentCollection MuonSegments are MuGirl segments, the standard MuonSegments are store in MuonSegmentFinderAlg.h
+  SG::WriteHandleKey<Trk::SegmentCollection> m_segTrkContainerName{this,"TrackSegmentContainerName","TrkMuonSegments","Track segments"};
+
   SG::WriteHandleKey<xAOD::CaloClusterContainer> m_clusterContainerName{this, "ClusterContainerName", "MuonClusterCollection", "Clusters"};
   SG::WriteHandleKey<CaloClusterCellLinkContainer> m_clusterContainerLinkName{this,"CaloClusterCellLinkName","MuonClusterCollection","Cluster links"};
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
index fff7d67d497b..0a5c02b700c5 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
@@ -738,7 +738,7 @@ namespace MuonCombined {
           muon.setTrackParticleLink(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle, link );
         }
         else ATH_MSG_WARNING("Creating of MuGirl TrackParticle Link failed");
-      }     
+      }
     }
 
     if (outputData.xaodSegmentContainer){
@@ -746,10 +746,7 @@ namespace MuonCombined {
 
       std::vector< ElementLink< xAOD::MuonSegmentContainer > > segments;
       for( const auto& segLink : tag->segments() ){ 
-	
-        ElementLink<xAOD::MuonSegmentContainer> link = createMuonSegmentElementLink(segLink,
-                                                                                    *outputData.xaodSegmentContainer,
-										    outputData.muonSegmentCollection);
+        ElementLink<xAOD::MuonSegmentContainer> link = createMuonSegmentElementLink(segLink, *outputData.xaodSegmentContainer, outputData.muonSegmentCollection);
         if( link.isValid() ) {
           //link.toPersistent();
           segments.push_back(link);
@@ -758,7 +755,7 @@ namespace MuonCombined {
         else ATH_MSG_WARNING("Creating of MuGirl segment Link failed");         
       }
       muon.setMuonSegmentLinks(segments);
-    }  
+    }
     ATH_MSG_DEBUG("Done Adding MuGirl Muon  " << tag->author() << " type " << tag->type());    
   }
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
index 36ddf5317f33..3ba9de7e4146 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
@@ -255,7 +255,8 @@ def StauCreatorAlgCfg(flags, name="StauCreatorAlg", **kwargs ):
     kwargs.setdefault("ExtrapolatedLocation","ExtrapolatedStau")
     kwargs.setdefault("MSOnlyExtrapolatedLocation","MSOnlyExtrapolatedStau")
     kwargs.setdefault("MuonCandidateLocation","")
-    kwargs.setdefault("SegmentContainerName","StauSegments")
+    kwargs.setdefault("SegmentContainerName","xaodStauSegments")
+    kwargs.setdefault("TrackSegmentContainerName","TrkStauSegments")
     kwargs.setdefault("BuildSlowMuon",1)
     kwargs.setdefault("ClusterContainerName", "SlowMuonClusterCollection")
     kwargs.setdefault("TagMaps",["stauTagMap"])
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 2035e3bf58a6..3baeb10f2c1e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -199,8 +199,8 @@ def MuonCreatorAlg_LRT( name="MuonCreatorAlg_LRT",**kwargs ):
     kwargs.setdefault("ExtrapolatedLocation", "ExtraPolated"+MuonCbKeys.FinalMuonsLargeD0())
     kwargs.setdefault("MSOnlyExtrapolatedLocation", "MSOnlyExtraPolated"+MuonCbKeys.FinalMuonsLargeD0())
     kwargs.setdefault("CombinedLocation", "Combined"+MuonCbKeys.FinalMuonsLargeD0())
-    kwargs.setdefault("SegmentContainerName", "MuonSegments_LRT")
-    kwargs.setdefault("TrackSegmentContainerName", "TrackMuonSegments_LRT")
+    kwargs.setdefault("SegmentContainerName", "xaodMuonSegments_LRT")
+    kwargs.setdefault("TrackSegmentContainerName", "TrkMuonSegments_LRT")
     kwargs.setdefault("BuildSlowMuon", False)
     kwargs.setdefault("MakeClusters", False)
     kwargs.setdefault("ClusterContainerName", "")
@@ -216,7 +216,8 @@ def StauCreatorAlg( name="StauCreatorAlg", **kwargs ):
     kwargs.setdefault("ExtrapolatedLocation","ExtrapolatedStau")
     kwargs.setdefault("MSOnlyExtrapolatedLocation","MSOnlyExtrapolatedStau")
     kwargs.setdefault("MuonCandidateLocation","")
-    kwargs.setdefault("SegmentContainerName","StauSegments")
+    kwargs.setdefault("SegmentContainerName","xaodStauSegments")
+    kwargs.setdefault("TrackSegmentContainerName","TrkStauSegments")
     kwargs.setdefault("BuildSlowMuon",1)
     kwargs.setdefault("ClusterContainerName", "SlowMuonClusterCollection")
     kwargs.setdefault("TagMaps",["stauTagMap"])
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index ffae34767d60..b3de9157559c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -785,7 +785,7 @@ def muEFCBRecoSequence( RoIs, name ):
     cbMuonName = muNamesFS.EFCBName
 
   themuoncbcreatoralg = MuonCreatorAlg("TrigMuonCreatorAlgCB_"+name, MuonCandidateLocation=candidatesName, TagMaps=["muidcoTagMap"], InDetCandidateLocation="InDetCandidates_"+name,
-                                       MuonContainerLocation = cbMuonName, SegmentContainerName = "CBSegments", ExtrapolatedLocation = "CBExtrapolatedMuons",
+                                       MuonContainerLocation = cbMuonName, SegmentContainerName = "xaodCBSegments", TrackSegmentContainerName = "TrkCBSegments", ExtrapolatedLocation = "CBExtrapolatedMuons",
                                        MSOnlyExtrapolatedLocation = "CBMSonlyExtrapolatedMuons", CombinedLocation = "HLT_CBCombinedMuon_"+name,
                                        MonTool = MuonCreatorAlgMonitoring("MuonCreatorAlgCB_"+name))
 
@@ -921,7 +921,7 @@ def muEFInsideOutRecoSequence(RoIs, name):
   else:
     theInsideOutRecoAlg = MuonInsideOutRecoAlg("TrigMuonInsideOutRecoAlg_"+name,InDetCandidateLocation="InDetCandidates_"+name)
     insideoutcreatoralg = MuonCreatorAlg("TrigMuonCreatorAlgInsideOut_"+name, TagMaps=["muGirlTagMap"],InDetCandidateLocation="InDetCandidates_"+name,
-                                         MuonContainerLocation = cbMuonName, SegmentContainerName = "InsideOutCBSegments", ExtrapolatedLocation = "InsideOutCBExtrapolatedMuons",
+                                         MuonContainerLocation = cbMuonName, SegmentContainerName = "xaodInsideOutCBSegments", TrackSegmentContainerName = "TrkInsideOutCBSegments", ExtrapolatedLocation = "InsideOutCBExtrapolatedMuons",
                                          MSOnlyExtrapolatedLocation = "InsideOutCBMSOnlyExtrapolatedMuons", CombinedLocation = "InsideOutCBCombinedMuon", MonTool = MuonCreatorAlgMonitoring("MuonCreatorAlgInsideOut_"+name))
 
   efAlgs.append(theInsideOutRecoAlg)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
index cce859909024..747038c4ec9e 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
@@ -377,7 +377,7 @@ def generateChains( flags, chainDict ):
         recoCB.mergeReco(muonCombCfg)
 
         muonCreatorCBCfg = MuonCreatorAlgCfg(muonflags, name="TrigMuonCreatorAlgCB_RoI", MuonCandidateLocation="MuonCandidates", TagMaps=["muidcoTagMap"], 
-                                            InDetCandidateLocation="InDetCandidates_RoI", MuonContainerLocation = "MuonsCB", SegmentContainerName = "CBSegments", 
+                                            InDetCandidateLocation="InDetCandidates_RoI", MuonContainerLocation = "MuonsCB", SegmentContainerName = "xaodCBSegments", TrackSegmentContainerName = "TrkCBSegments",
                                             ExtrapolatedLocation = "CBExtrapolatedMuons", MSOnlyExtrapolatedLocation = "CBMSonlyExtrapolatedMuons", CombinedLocation = "HLT_CBCombinedMuon_RoI")
         recoCB.mergeReco(muonCreatorCBCfg)
 
-- 
GitLab


From 61f8398517c37ab43564d9b9de739c607c11a26a Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Fri, 18 Dec 2020 13:05:57 +0000
Subject: [PATCH 115/308] Distance Solution : Move inline methods to .icc ,
 default ctor,dtor,copy,move

---
 .../TrkSurfaces/DistanceSolution.h            | 86 +++++--------------
 .../TrkSurfaces/DistanceSolution.icc          | 69 +++++++++++++++
 .../TrkSurfaces/src/DistanceSolution.cxx      | 28 ------
 3 files changed, 91 insertions(+), 92 deletions(-)
 create mode 100644 Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
 delete mode 100644 Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx

diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
index 60ee6ea87fed..d38c5f9e7714 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
+++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
@@ -9,9 +9,7 @@
 #ifndef TRKSURFACES_DISTANCESOLUTION_H
 #define TRKSURFACES_DISTANCESOLUTION_H
 
-// STD
-#include <iostream>
-#include <math.h>
+#include <cmath>
 
 namespace Trk {
 
@@ -26,14 +24,19 @@ namespace Trk {
 class DistanceSolution
 {
 public:
-  /**Default Constructor*/
-  DistanceSolution();
-
-  /**Constructor*/
-  DistanceSolution(int num, double current = 0., bool signedDist = false, double first = 0., double second = 0.);
-
-  /**Destructor*/
-  virtual ~DistanceSolution() = default;
+  DistanceSolution() = default;
+  DistanceSolution(const DistanceSolution&) = default;
+  DistanceSolution(DistanceSolution&&) = default;
+  DistanceSolution& operator=(const DistanceSolution&) = default;
+  DistanceSolution& operator=(DistanceSolution&&) = default;
+  ~DistanceSolution() = default;
+
+   /**Constructor*/
+  DistanceSolution(int num,
+                   double current = 0.,
+                   bool signedDist = false,
+                   double first = 0.,
+                   double second = 0.);
 
   // methods to access solutions
   /** Number of intersection solutions*/
@@ -42,7 +45,8 @@ public:
   /** Distance to first intersection solution along direction*/
   double first() const;
 
-  /** Distance to second intersection solution along direction (for a cylinder surface)*/
+  /** Distance to second intersection solution along direction (for a cylinder
+   * surface)*/
   double second() const;
 
   /** Absolute Distance to closest solution */
@@ -51,14 +55,15 @@ public:
   /** Distance to point of closest approach along direction*/
   double toPointOfClosestApproach() const;
 
-  /** Current distance to surface (spatial), signed (along/opposite to surface normal) if input argument true (absolute
-   * value by default)*/
+  /** Current distance to surface (spatial), signed (along/opposite to surface
+   * normal) if input argument true (absolute value by default)*/
   double currentDistance(bool signedDist = false) const;
 
-  /** This method indicates availability of signed current distance (false for Perigee and StraighLineSurface) */
+  /** This method indicates availability of signed current distance (false for
+   * Perigee and StraighLineSurface) */
   bool signedDistance() const;
 
-protected:
+private:
   int m_num;
   double m_first;
   double m_second;
@@ -66,54 +71,7 @@ protected:
   bool m_signedDist;
 };
 
-inline int
-DistanceSolution::numberOfSolutions() const
-{
-  return m_num;
-}
-
-inline double
-DistanceSolution::first() const
-{
-  return m_first;
-}
-
-inline double
-DistanceSolution::second() const
-{
-  return m_second;
-}
-
-inline double
-DistanceSolution::absClosest() const
-{
-  if (m_num > 1)
-    return (m_first * m_first < m_second * m_second) ? fabs(m_first) : fabs(m_second);
-  else
-    return fabs(m_first);
-}
-
-inline double
-DistanceSolution::toPointOfClosestApproach() const
-{
-  return m_first;
-}
-
-inline double
-DistanceSolution::currentDistance(bool signedDist) const
-{
-  if (signedDist)
-    return m_current;
-  else
-    return fabs(m_current);
-}
-
-inline bool
-DistanceSolution::signedDistance() const
-{
-  return m_signedDist;
-}
-
 } // end of namespace
 
+#include "TrkSurfaces/DistanceSolution.icc"
 #endif // TRKSURFACES_DISTANCESOLUTION_H
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
new file mode 100644
index 000000000000..15ef7e32d23a
--- /dev/null
+++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
@@ -0,0 +1,69 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+namespace Trk {
+inline DistanceSolution::DistanceSolution(int num,
+                                          double current,
+                                          bool signedDist,
+                                          double first,
+                                          double second)
+  : m_num(num)
+  , m_first(first)
+  , m_second(second)
+  , m_current(current)
+  , m_signedDist(signedDist)
+{}
+
+inline int
+DistanceSolution::numberOfSolutions() const
+{
+  return m_num;
+}
+
+inline double
+DistanceSolution::first() const
+{
+  return m_first;
+}
+
+inline double
+DistanceSolution::second() const
+{
+  return m_second;
+}
+
+inline double
+DistanceSolution::absClosest() const
+{
+  if (m_num > 1) {
+    return (m_first * m_first < m_second * m_second) ? std::abs(m_first)
+                                                     : std::abs(m_second);
+  } else {
+    return std::abs(m_first);
+  }
+}
+
+inline double
+DistanceSolution::toPointOfClosestApproach() const
+{
+  return m_first;
+}
+
+inline double
+DistanceSolution::currentDistance(bool signedDist) const
+{
+  if (signedDist) {
+    return m_current;
+  } else {
+    return std::abs(m_current);
+  }
+}
+
+inline bool
+DistanceSolution::signedDistance() const
+{
+  return m_signedDist;
+}
+
+} // end of namespace
+
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx
deleted file mode 100644
index a7d7a4cdf548..000000000000
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// DistanceSolution.cxx, (c) ATLAS Detector Software
-///////////////////////////////////////////////////////////////////
-
-// Trk
-#include "TrkSurfaces/DistanceSolution.h"
-
-// default constructor
-Trk::DistanceSolution::DistanceSolution()
-  : m_num()
-  , m_first()
-  , m_second()
-  , m_current()
-  , m_signedDist()
-{}
-
-// constructor
-Trk::DistanceSolution::DistanceSolution(int num, double current, bool signedDist, double first, double second)
-  : m_num(num)
-  , m_first(first)
-  , m_second(second)
-  , m_current(current)
-  , m_signedDist(signedDist)
-{}
-- 
GitLab


From 3b8863d3376e205f91fcff71e50ce76c7b9e1f53 Mon Sep 17 00:00:00 2001
From: Oliver Majersky <oliver.majersky@cern.ch>
Date: Fri, 18 Dec 2020 15:11:30 +0100
Subject: [PATCH 116/308] Re-enable calibration and selection for large-R jets.

---
 .../Root/TopObjectSelection.cxx               |  3 +-
 .../Root/JetObjectCollectionMaker.cxx         | 28 +++++++++++--------
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/TopObjectSelection.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/TopObjectSelection.cxx
index 2430e825e7a9..784e2854a250 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/TopObjectSelection.cxx
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/TopObjectSelection.cxx
@@ -523,8 +523,7 @@ namespace top {
                  "TopObjectSelection::applySelectionPreOverlapRemovalLargeRJets() failed to retrieve large R jets");
 
       for (auto jetPtr : *jets) {
-        //char decoration = m_largeJetSelection->passSelection(*jetPtr);
-        char decoration = '0';
+        char decoration = m_largeJetSelection->passSelection(*jetPtr);
         jetPtr->auxdecor<char>(m_passPreORSelection) = decoration;
         jetPtr->auxdecor<char>(m_ORToolDecoration) = decoration * 2;
         if (m_doLooseCuts) {
diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/JetObjectCollectionMaker.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/JetObjectCollectionMaker.cxx
index 244d7303f591..ac997ed1b6ec 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/JetObjectCollectionMaker.cxx
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/JetObjectCollectionMaker.cxx
@@ -249,17 +249,15 @@ namespace top {
     if (m_config->jetSubstructureName() == "SubjetMaker") m_jetSubstructure.reset(new top::SubjetMaker);
 
     ///-- Large R jet truth labeling --///
-//    m_jetTruthLabelingTool = nullptr;
-//    if (m_config->isMC() && m_config->useLargeRJets()) {
-//      m_jetTruthLabelingTool = std::unique_ptr<JetTruthLabelingTool>(new JetTruthLabelingTool("JetTruthLabeling"));
-//      // For DAOD_PHYS we need to pass few more arguments as it uses TRUTH3
-//      if (m_config->getDerivationStream() == "PHYS") {
-//        top::check(m_jetTruthLabelingTool->setProperty("UseTRUTH3", true), "Failed to set UseTRUTH3 for m_jetTruthLabelingTool");
-//        top::check(m_jetTruthLabelingTool->setProperty("TruthBosonContainerName", "TruthBoson"), "Failed to set truth container name for m_jetTruthLabelingTool");
-//        top::check(m_jetTruthLabelingTool->setProperty("TruthTopQuarkContainerName", "TruthTop"), "Failed to set truth container name for m_jetTruthLabelingTool");
-//      }
-//      top::check(m_jetTruthLabelingTool->initialize(), "Failed to initialize m_jetTruthLabelingTool");
-//    }
+    m_jetTruthLabelingTool = nullptr;
+    if (m_config->isMC() && m_config->useLargeRJets()) {
+      m_jetTruthLabelingTool = std::unique_ptr<JetTruthLabelingTool>(new JetTruthLabelingTool("JetTruthLabeling"));
+      // For DAOD_PHYS we need to pass few more arguments as it uses TRUTH3
+      top::check(m_jetTruthLabelingTool->setProperty("UseTRUTH3", true), "Failed to set UseTRUTH3 for m_jetTruthLabelingTool");
+      top::check(m_jetTruthLabelingTool->setProperty("TruthBosonContainerName", "TruthBoson"), "Failed to set truth container name for m_jetTruthLabelingTool");
+      top::check(m_jetTruthLabelingTool->setProperty("TruthTopQuarkContainerName", "TruthTop"), "Failed to set truth container name for m_jetTruthLabelingTool");
+      top::check(m_jetTruthLabelingTool->initialize(), "Failed to initialize m_jetTruthLabelingTool");
+   }
 
     // set the systematics list
     m_config->systematicsJets(specifiedSystematics());
@@ -383,7 +381,13 @@ namespace top {
 
     ///-- Apply calibration --///
     ///-- Calibrate jet container --///
-    top::check(m_jetCalibrationTool->applyCalibration(*(shallow_xaod_copy.first)), "Failed to applyCalibration");
+    if (isLargeR) {
+      top::check(m_jetCalibrationToolLargeR->applyCalibration(*(shallow_xaod_copy.first)),
+          "Failed to do applyCalibration on large-R jets");
+    } else {
+      top::check(m_jetCalibrationTool->applyCalibration(*(shallow_xaod_copy.first)),
+          "Failed to do applyCalibration on small-R jets");
+    }
 
     ///-- Loop over the xAOD Container --///
     for (const auto jet : *(shallow_xaod_copy.first)) {
-- 
GitLab


From 541d832338f182b7b92fbeeb3f14635edf4d5a6d Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 22:47:19 -0500
Subject: [PATCH 117/308] AthenaKernel: Fix a typo in comments.

Fix a typo in comments.
---
 Control/AthenaKernel/AthenaKernel/RCUUpdater.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Control/AthenaKernel/AthenaKernel/RCUUpdater.h b/Control/AthenaKernel/AthenaKernel/RCUUpdater.h
index 52ad28d0b300..1f36834bc0a1 100644
--- a/Control/AthenaKernel/AthenaKernel/RCUUpdater.h
+++ b/Control/AthenaKernel/AthenaKernel/RCUUpdater.h
@@ -1,6 +1,6 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 /*
- * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
  */
 // $Id$
 /**
@@ -81,7 +81,7 @@ public:
    * @param p The object to delete.
    *
    * The object @c p will be queued for deletion once a grace period
-   * has passed for all slots.  In contrast to using @c updater,
+   * has passed for all slots.  In contrast to using @c update,
    * this does not change the current object.  It also does not mark
    * the current slot as having completed the grace period (so this can
    * be called by a thread running outside of a slot context).
-- 
GitLab


From fe7907bcc1980dd7b1bee93863d938f5533c327a Mon Sep 17 00:00:00 2001
From: Jonathan Bossio <jonathan.bossio@cern.ch>
Date: Fri, 18 Dec 2020 14:43:19 +0000
Subject: [PATCH 118/308] Simplify conf of offline MT jet trigger monitoring

---
 .../python/TrigJetMonitorAlgorithm.py         | 162 +++++++-----------
 1 file changed, 64 insertions(+), 98 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
index 8dbad0384928..a4c69b02dfdc 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
@@ -35,82 +35,54 @@ Chain2L1JetCollDict = { # set L1 jet collection name for L1 jet chains
 # HLT jet collections and chains to monitor
 ############################################
 
-Chain2JetCollDict  = dict() # set HLT jet collection for AT and legacy master HLT jet chains
-JetCollections     = dict() # List of HLT jet collections for AT and legacy master
-TurnOnCurves       = dict() # List reference chains and offline jet collections to be used for producing turn-on curves
-JetColls2Match     = dict()
+Chains2Monitor  = dict() # set HLT jet collection, reference chain and offline jet collection for turn-on curves, for AT and legacy master HLT jet chains
+JetCollections  = dict() # List of HLT jet collections for AT and legacy master (stating which should be matched and to which offline jet collection
 
 # AthenaMT
-JetCollections['MT'] = [
-  'HLT_AntiKt4EMTopoJets_subjesIS',                   # default small-R EM
-  'HLT_AntiKt10JetRCJets_subjesIS',                   # a10r
-  'HLT_AntiKt10LCTopoJets_subjes',                    # a10
-  'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes', # a10t
-  'HLT_AntiKt4EMPFlowJets_subjesIS_ftf',              # pflow w/o calo+track GSC
-  'HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf',           # pflow w/ calo+track GSC
-  'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf',        # pflow w/ residual + calo+track GSC
-  'HLT_AntiKt4EMPFlowJets_nojcalib_ftf',              # pflow nojcalib
-  'HLT_AntiKt4EMPFlowCSSKJets_nojcalib_ftf',          # pflow cssk nojcalib
-]
-Chain2JetCollDict['MT'] = {
-  'HLT_j420_L1J100'                        : 'HLT_AntiKt4EMTopoJets_subjesIS',
-  'HLT_j260_320eta490_L1J75_31ETA49'       : 'HLT_AntiKt4EMTopoJets_subjesIS',
-  'HLT_5j70_0eta240_L14J20'                : 'HLT_AntiKt4EMTopoJets_subjesIS',
-  'HLT_3j200_L1J100'                       : 'HLT_AntiKt4EMTopoJets_subjesIS',
-  'HLT_j460_a10r_L1J100'                   : 'HLT_AntiKt10JetRCJets_subjesIS',
-  'HLT_j460_a10_lcw_subjes_L1J100'         : 'HLT_AntiKt10LCTopoJets_subjes',
-  'HLT_j460_a10t_lcw_jes_L1J100'           : 'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes',
-  'HLT_2j330_a10t_lcw_jes_35smcINF_L1J100' : 'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes',
-  'HLT_j45_pf_ftf_L1J15'                   : 'HLT_AntiKt4EMPFlowJets_subjesIS_ftf',
-  'HLT_j45_pf_subjesgscIS_ftf_L1J15'       : 'HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf',
-  'HLT_j85_pf_ftf_L1J20'                   : 'HLT_AntiKt4EMPFlowJets_subjesIS_ftf',
-  'HLT_j45_pf_nojcalib_ftf_L1J15'          : 'HLT_AntiKt4EMPFlowJets_nojcalib_ftf',
-  'HLT_j45_csskpf_nojcalib_ftf_L1J15'      : 'HLT_AntiKt4EMPFlowCSSKJets_nojcalib_ftf',
-  'HLT_10j40_pf_subresjesgscIS_ftf_L14J15' : 'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf',
-}
-TurnOnCurves['MT'] = { # ref chain, offline jet coll
-  'HLT_j420_L1J100'                        : ['HLT_j85_L1J20','AntiKt4EMTopoJets'],
-  'HLT_3j200_L1J100'                       : ['HLT_j85_L1J20','AntiKt4EMTopoJets'],
-  'HLT_j460_a10r_L1J100'                   : ['HLT_j85_L1J20','AntiKt4EMTopoJets'],
-  'HLT_j460_a10_lcw_subjes_L1J100'         : ['HLT_j85_L1J20','AntiKt4EMTopoJets'],
-  'HLT_j460_a10t_lcw_jes_L1J100'           : ['HLT_j85_L1J20','AntiKt4EMTopoJets'],
-  'HLT_2j330_a10t_lcw_jes_35smcINF_L1J100' : ['HLT_j85_L1J20','AntiKt4EMTopoJets'],
-  'HLT_j85_pf_ftf_L1J20'                   : ['HLT_j45_pf_ftf_L1J15','AntiKt4EMPFlowJets'],
+JetCollections['MT'] = {
+  'HLT_AntiKt4EMTopoJets_subjesIS'                   : { 'MatchTo' : 'AntiKt4EMPFlowJets' }, # default small-R EM
+  'HLT_AntiKt10JetRCJets_subjesIS'                   : { 'MatchTo' : 'NONE' },               # a10r
+  'HLT_AntiKt10LCTopoJets_subjes'                    : { 'MatchTo' : 'NONE' },               # a10
+  'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes' : { 'MatchTo' : 'NONE' },               # a10t
+  'HLT_AntiKt4EMPFlowJets_subjesIS_ftf'              : { 'MatchTo' : 'AntiKt4EMPFlowJets' }, # pflow w/o calo+track GSC
+  'HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf'           : { 'MatchTo' : 'AntiKt4EMPFlowJets' }, # pflow w/ calo+track GSC
+  'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf'        : { 'MatchTo' : 'AntiKt4EMPFlowJets' }, # pflow w/ residual + calo+track GSC
+  'HLT_AntiKt4EMPFlowJets_nojcalib_ftf'              : { 'MatchTo' : 'NONE' },               # pflow nojcalib
+  'HLT_AntiKt4EMPFlowCSSKJets_nojcalib_ftf'          : { 'MatchTo' : 'NONE' },               # pflow cssk nojcalib
 }
-JetColls2Match['MT'] = {
-  'HLT_AntiKt4EMTopoJets_subjesIS'            : 'AntiKt4EMPFlowJets',
-  'HLT_AntiKt4EMPFlowJets_subjesIS_ftf'       : 'AntiKt4EMPFlowJets',
-  'HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf'    : 'AntiKt4EMPFlowJets',
-  'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf' : 'AntiKt4EMPFlowJets',
+Chains2Monitor['MT'] = {
+  'HLT_j420_L1J100'                        : { 'HLTColl' : 'HLT_AntiKt4EMTopoJets_subjesIS',                   'RefChain' : 'HLT_j85_L1J20',        'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j260_320eta490_L1J75_31ETA49'       : { 'HLTColl' : 'HLT_AntiKt4EMTopoJets_subjesIS',                   'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
+  'HLT_5j70_0eta240_L14J20'                : { 'HLTColl' : 'HLT_AntiKt4EMTopoJets_subjesIS',                   'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
+  'HLT_3j200_L1J100'                       : { 'HLTColl' : 'HLT_AntiKt4EMTopoJets_subjesIS',                   'RefChain' : 'HLT_j85_L1J20',        'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j460_a10r_L1J100'                   : { 'HLTColl' : 'HLT_AntiKt10JetRCJets_subjesIS',                   'RefChain' : 'HLT_j85_L1J20',        'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j460_a10_lcw_subjes_L1J100'         : { 'HLTColl' : 'HLT_AntiKt10LCTopoJets_subjes',                    'RefChain' : 'HLT_j85_L1J20',        'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j460_a10t_lcw_jes_L1J100'           : { 'HLTColl' : 'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes', 'RefChain' : 'HLT_j85_L1J20',        'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_2j330_a10t_lcw_jes_35smcINF_L1J100' : { 'HLTColl' : 'HLT_AntiKt10LCTopoTrimmedPtFrac4SmallR20Jets_jes', 'RefChain' : 'HLT_j85_L1J20',        'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j45_pf_ftf_L1J15'                   : { 'HLTColl' : 'HLT_AntiKt4EMPFlowJets_subjesIS_ftf',              'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
+  'HLT_j45_pf_subjesgscIS_ftf_L1J15'       : { 'HLTColl' : 'HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf',           'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
+  'HLT_j85_pf_ftf_L1J20'                   : { 'HLTColl' : 'HLT_AntiKt4EMPFlowJets_subjesIS_ftf',              'RefChain' : 'HLT_j45_pf_ftf_L1J15', 'OfflineColl' : 'AntiKt4EMPFlowJets' },
+  'HLT_j45_pf_nojcalib_ftf_L1J15'          : { 'HLTColl' : 'HLT_AntiKt4EMPFlowJets_nojcalib_ftf',              'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
+  'HLT_j45_csskpf_nojcalib_ftf_L1J15'      : { 'HLTColl' : 'HLT_AntiKt4EMPFlowCSSKJets_nojcalib_ftf',          'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
+  'HLT_10j40_pf_subresjesgscIS_ftf_L14J15' : { 'HLTColl' : 'HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf',        'RefChain' : 'NONE',                 'OfflineColl' : 'NONE' },
 }
 
 # Legacy
-JetCollections['Legacy'] = [
-  'HLT_xAOD__JetContainer_a4tcemsubjesISFS',    # default small-R
-  'HLT_xAOD__JetContainer_a10r_tcemsubjesISFS', # a10r
-  'HLT_xAOD__JetContainer_a10tclcwsubjesFS',    # a10
-  'HLT_xAOD__JetContainer_a10ttclcwjesFS',      # a10t
-]
-Chain2JetCollDict['Legacy'] = {
-  'HLT_j420'                               : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',
-  'HLT_j260_320eta490'                     : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',
-  'HLT_j460_a10r_L1J100'                   : 'HLT_xAOD__JetContainer_a10r_tcemsubjesISFS',
-  'HLT_j460_a10_lcw_subjes_L1J100'         : 'HLT_xAOD__JetContainer_a10tclcwsubjesFS',
-  'HLT_j460_a10t_lcw_jes_L1J100'           : 'HLT_xAOD__JetContainer_a10ttclcwjesFS',
-  'HLT_2j330_a10t_lcw_jes_35smcINF_L1J100' : 'HLT_xAOD__JetContainer_a10ttclcwjesFS',
-  'HLT_5j70_0eta240'                       : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',
-  'HLT_3j200'                              : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',
-}
-TurnOnCurves['Legacy'] = { # ref chain, offline jet coll
-  'HLT_j420'                               : ['HLT_j175','AntiKt4EMTopoJets'],
-  'HLT_j260_320eta490'                     : ['HLT_j45_320eta490','AntiKt4EMTopoJets'],
-  'HLT_j460_a10r_L1J100'                   : ['HLT_j175','AntiKt4EMTopoJets'],
-  'HLT_j460_a10_lcw_subjes_L1J100'         : ['HLT_j175','AntiKt4EMTopoJets'],
-  'HLT_j460_a10t_lcw_jes_L1J100'           : ['HLT_j175','AntiKt4EMTopoJets'],
-  'HLT_2j330_a10t_lcw_jes_35smcINF_L1J100' : ['HLT_j175','AntiKt4EMTopoJets'],
-  'HLT_3j200'                              : ['HLT_j175','AntiKt4EMTopoJets'],
+JetCollections['Legacy'] = {
+  'HLT_xAOD__JetContainer_a4tcemsubjesISFS'    : { 'MatchTo' : 'NONE' }, # default small-R
+  'HLT_xAOD__JetContainer_a10r_tcemsubjesISFS' : { 'MatchTo' : 'NONE' }, # a10r
+  'HLT_xAOD__JetContainer_a10tclcwsubjesFS'    : { 'MatchTo' : 'NONE' }, # a10
+  'HLT_xAOD__JetContainer_a10ttclcwjesFS'      : { 'MatchTo' : 'NONE' }, # a10t
 }
-JetColls2Match['Legacy'] = {
+Chains2Monitor['Legacy'] = {
+  'HLT_j420'                               : { 'HLTColl' : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',    'RefChain' : 'HLT_j175',          'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j260_320eta490'                     : { 'HLTColl' : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',    'RefChain' : 'HLT_j45_320eta490', 'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j460_a10r_L1J100'                   : { 'HLTColl' : 'HLT_xAOD__JetContainer_a10r_tcemsubjesISFS', 'RefChain' : 'HLT_j175',          'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j460_a10_lcw_subjes_L1J100'         : { 'HLTColl' : 'HLT_xAOD__JetContainer_a10tclcwsubjesFS',    'RefChain' : 'HLT_j175',          'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_j460_a10t_lcw_jes_L1J100'           : { 'HLTColl' : 'HLT_xAOD__JetContainer_a10ttclcwjesFS',      'RefChain' : 'HLT_j175',          'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_2j330_a10t_lcw_jes_35smcINF_L1J100' : { 'HLTColl' : 'HLT_xAOD__JetContainer_a10ttclcwjesFS',      'RefChain' : 'HLT_j175',          'OfflineColl' : 'AntiKt4EMTopoJets' },
+  'HLT_5j70_0eta240'                       : { 'HLTColl' : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',    'RefChain' : 'NONE',              'OfflineColl' : 'NONE' },
+  'HLT_3j200'                              : { 'HLTColl' : 'HLT_xAOD__JetContainer_a4tcemsubjesISFS',    'RefChain' : 'HLT_j175',          'OfflineColl' : 'AntiKt4EMTopoJets' },
 }
 
 #########################################################
@@ -187,11 +159,12 @@ def TrigJetMonConfig(inputFlags):
   from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
   cfg = ComponentAccumulator()
 
-  # Match HLT to offline jets
-  for j1,j2 in JetColls2Match[InputType].items():
-    name = 'Matching_{}_{}'.format(j1,j2)
-    alg = CompFactory.JetMatcherAlg(name, JetContainerName1=j1,JetContainerName2=j2)
-    cfg.addEventAlgo(alg)
+  # Match HLT jets to offline jets
+  for hltColl,collDict in JetCollections[InputType].items():
+    if collDict['MatchTo'] != 'NONE':
+      name = 'Matching_{}_{}'.format(hltColl,collDict['MatchTo'])
+      alg = CompFactory.JetMatcherAlg(name, JetContainerName1=hltColl,JetContainerName2=collDict['MatchTo'])
+      cfg.addEventAlgo(alg)
 
   # The following class will make a sequence, configure algorithms, and link
   # them to GenericMonitoringTools
@@ -221,7 +194,8 @@ def TrigJetMonConfig(inputFlags):
     monitorConf.toAlg(helper)
 
   # Loop over HLT jet chains
-  for chain,jetcoll in Chain2JetCollDict[InputType].items():
+  for chain,chainDict in Chains2Monitor[InputType].items():
+    jetcoll = chainDict['HLTColl']
     # kinematic plots
     if AthenaMT:
       chainMonitorConfT = jetChainMonitoringConfig(inputFlags,jetcoll,chain,AthenaMT,True)
@@ -229,13 +203,8 @@ def TrigJetMonConfig(inputFlags):
     chainMonitorConfF = jetChainMonitoringConfig(inputFlags,jetcoll,chain,AthenaMT,False)
     chainMonitorConfF.toAlg(helper)
     # efficiency plots
-    refChain       = 'NONE'
-    offlineJetColl = 'NONE'
-    if chain in TurnOnCurves[InputType]:
-      refChain       = TurnOnCurves[InputType][chain][0]
-      offlineJetColl = TurnOnCurves[InputType][chain][1]
-    if offlineJetColl != 'NONE' and refChain != 'NONE':
-      effMonitorConf = jetEfficiencyMonitoringConfig(inputFlags,jetcoll,offlineJetColl,chain,refChain,AthenaMT)
+    if chainDict['RefChain'] != 'NONE' and chainDict['OfflineColl'] != 'NONE':
+      effMonitorConf = jetEfficiencyMonitoringConfig(inputFlags,jetcoll,chainDict['OfflineColl'],chain,chainDict['RefChain'],AthenaMT)
       effMonitorConf.toAlg(helper)
 
   cfg.merge(helper.result())
@@ -334,7 +303,7 @@ def jetMonitoringConfig(inputFlags,jetcoll,athenaMT):
        print('bottomlevel = '+str(conf.bottomLevelDir))
        group = monhelper.addGroup(parentAlg, conf.Group, conf.topLevelDir+'/'+conf.bottomLevelDir+'/NoTriggerSelection/')
        # define the histogram
-       group.defineHistogram('ptdiff',title='title', type="TH1F", path='MatchedJets_{}'.format(JetColls2Match[InputType][jetcoll]), xbins=100 , xmin=-100000, xmax=100000. ,)
+       group.defineHistogram('ptdiff',title='title', type="TH1F", path='MatchedJets_{}'.format(JetCollections[InputType][jetcoll]['MatchTo']), xbins=100 , xmin=-100000, xmax=100000. ,)
 
    # Declare a configuration dictionnary for a JetContainer
    if isOnline:
@@ -352,8 +321,8 @@ def jetMonitoringConfig(inputFlags,jetcoll,athenaMT):
      else:
        for hist in ExtraLargeROnlineHists: conf.appendHistos(hist)
      # Add matched jets plots
-     if jetcoll in JetColls2Match[InputType]:
-       matchedJetColl = JetColls2Match[InputType][jetcoll]
+     if JetCollections[InputType][jetcoll]['MatchTo'] != 'NONE':
+       matchedJetColl = JetCollections[InputType][jetcoll]['MatchTo']
        name           = 'jetMatched_{}_{}'.format(jetcoll,matchedJetColl)
        jetmatchKey    = '{}.matched_{}'.format(jetcoll,matchedJetColl)
        jetptdiffKey   = '{}.ptdiff_{}'.format(jetcoll,matchedJetColl)
@@ -598,11 +567,12 @@ if __name__=='__main__':
   helper = AthMonitorCfgHelper(ConfigFlags,'TrigJetMonitorAlgorithm')
   cfg.merge(helper.result()) # merge it to add the sequence needed to add matchers
 
-  # Match HLT to offline jets
-  for j1,j2 in JetColls2Match[InputType].items():
-    name = 'Matching_{}_{}'.format(j1,j2)
-    alg = CompFactory.JetMatcherAlg(name, JetContainerName1=j1,JetContainerName2=j2)
-    cfg.addEventAlgo(alg,sequenceName='AthMonSeq_TrigJetMonitorAlgorithm') # Add matchers to monitoring alg sequence
+  # Match HLT jets to offline jets
+  for hltColl,collDict in JetCollections[InputType].items():
+    if collDict['MatchTo'] != 'NONE':
+      name = 'Matching_{}_{}'.format(hltColl,collDict['MatchTo'])
+      alg = CompFactory.JetMatcherAlg(name, JetContainerName1=hltColl,JetContainerName2=collDict['MatchTo'])
+      cfg.addEventAlgo(alg,sequenceName='AthMonSeq_TrigJetMonitorAlgorithm') # Add matchers to monitoring alg sequence
 
   # Loop over L1 jet collectoins
   for jetcoll in L1JetCollections:
@@ -627,7 +597,8 @@ if __name__=='__main__':
     monitorConf.toAlg(helper)
 
   # Loop over HLT jet chains
-  for chain,jetcoll in Chain2JetCollDict[InputType].items():
+  for chain,chainDict in Chains2Monitor[InputType].items():
+    jetcoll = chainDict['HLTColl']
     # kinematic plots
     if AthenaMT:
       chainMonitorConfT = jetChainMonitoringConfig(ConfigFlags,jetcoll,chain,AthenaMT,True)
@@ -635,13 +606,8 @@ if __name__=='__main__':
     chainMonitorConfF = jetChainMonitoringConfig(ConfigFlags,jetcoll,chain,AthenaMT,False)
     chainMonitorConfF.toAlg(helper)
     # efficiency plots
-    refChain       = 'NONE'
-    offlineJetColl = 'NONE'
-    if chain in TurnOnCurves[InputType]:
-      refChain       = TurnOnCurves[InputType][chain][0]
-      offlineJetColl = TurnOnCurves[InputType][chain][1]
-    if offlineJetColl != 'NONE' and refChain != 'NONE':
-      effMonitorConf = jetEfficiencyMonitoringConfig(ConfigFlags,jetcoll,offlineJetColl,chain,refChain,AthenaMT)
+    if chainDict['RefChain'] != 'NONE' and chainDict['OfflineColl'] != 'NONE':
+      effMonitorConf = jetEfficiencyMonitoringConfig(ConfigFlags,jetcoll,chainDict['OfflineColl'],chain,chainDict['RefChain'],AthenaMT)
       effMonitorConf.toAlg(helper)
 
   cfg.merge(helper.result())
-- 
GitLab


From 6f704809e9d7d2218de45599fe2e04333cc8dc2d Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 15:58:20 +0100
Subject: [PATCH 119/308] TrigT2CaloCommon: delete unused TrigDataAccessATLFAST

---
 .../src/TrigDataAccessATLFAST.cxx             | 636 ------------------
 .../src/TrigDataAccessATLFAST.h               | 335 ---------
 .../components/TrigT2CaloCommon_entries.cxx   |   2 -
 3 files changed, 973 deletions(-)
 delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx
 delete mode 100644 Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx
deleted file mode 100644
index a237fa318f8b..000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.cxx
+++ /dev/null
@@ -1,636 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-// ********************************************************************
-//
-// NAME:     TrigDataAccessATLFAST.cxx
-// PACKAGE:  Trigger/TrigAlgorithms/TrigT2CaloCommon
-//
-// AUTHOR:   Denis Oliveira Damazio
-//
-// REFERENCES: This will provide infrastructure for the Tools
-//		to perform their algorithms
-//
-// ********************************************************************
-
-#include "GaudiKernel/MsgStream.h"
-
-#include "CaloIdentifier/LArEM_ID.h"
-#include "LArRecEvent/LArCell.h"
-#include "LArRecEvent/LArFebEnergyCollection.h"
-
-#include "CaloIdentifier/LArEM_ID.h"
-#include "CaloEvent/CaloCluster.h"
-#include "CaloGeoHelpers/CaloSampling.h"
-
-#include "LArRawUtils/LArRoI_Map.h"
-#include "IRegionSelector/IRegSelSvc.h"
-
-#include "TrigDataAccessATLFAST.h"
-
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-
-#include "TrigSteeringEvent/TrigRoiDescriptor.h"
-
-// Event Incident to get EventInfo
-#include "GaudiKernel/IIncidentSvc.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-
-ATLAS_NO_CHECK_FILE_THREAD_SAFETY;  // legacy trigger code
-
-// Initialize method for all tools
-// Retrieval of all Tools to be used during run
-StatusCode TrigDataAccessATLFAST::initialize()
-{
-
-        ATH_MSG_DEBUG("in initialize() by TrigDataAccessATLFAST");
-
-	// Some tools are necessary for the Algorithm to run
-	// The RegionSelector is being retrieved here
-        if( (m_pRegionSelector.retrieve()).isFailure() ) {
-	  ATH_MSG_FATAL("Unable to retrieve RegionSelector Service");
-	  return StatusCode::FAILURE;
-	}
-
-	// Reserve vectors space to avoid online memory allocation
-	// Limits to be studied
-	m_rIds.reserve(30);
-	m_vrodid32.reserve(30);
-	m_tile.push_back(0);
-// Event handling
-	IIncidentSvc* p_incSvc;
-	if ( service("IncidentSvc",p_incSvc, true).isFailure() ) {
-	  ATH_MSG_ERROR("Unable to get the IncidentSvc");
-	}else{
-	p_incSvc->addListener(this, "BeginEvent",100);
-	}
-	// Method not called yet
-	m_iov_called=false;
-	// Register function for the detector store
-        const DataHandle<AthenaAttributeList> febrodmap;
-	if ( detStore()->regFcn(&ITrigDataAccess::beginRunHandle,
-		(ITrigDataAccess*)this,
-				 febrodmap, "/LAR/Identifier/FebRodMap", true).isFailure() ) { //FIXME hardcoded database folder name
-	  ATH_MSG_ERROR(" Can't regFnc with Condition ");
-	  return StatusCode::FAILURE;
-        }
-	// Just to the Missing Et slice
-        if ( m_usefullcoll ) {
-	IRegSelSvc* regSelSvc = &(*m_pRegionSelector);
-	if ( detStore()->regFcn(&IRegSelSvc::handle,
-		regSelSvc,
-		&ITrigDataAccess::beginRunHandle_RegSelSvc,
-		(ITrigDataAccess*)this,true).isFailure() ) {
-	  ATH_MSG_ERROR(" Can't regFnc with Condition");
-	  return StatusCode::FAILURE;
-	}
-          m_rIdsem0.reserve(12288);
-          m_rIdsem1.reserve(300);
-          m_rIdsem2.reserve(300);
-          m_rIdsem3.reserve(300);
-          m_rIdshec.reserve(4352);
-          m_rIdshec0.reserve(300);
-          m_rIdshec1.reserve(300);
-          m_rIdshec2.reserve(300);
-          m_rIdsfcalhad0.reserve(256);
-          m_rIdsfcalhad1.reserve(128);
-          m_rIdsfcalem0.reserve(300);
-          m_rIdstile.reserve(300);
-          m_vrodid32lar.reserve(300);
-          m_vrodid32em.reserve(724);
-          m_vrodid32hec.reserve(72);
-          m_vrodid32hec0.reserve(24);
-          m_vrodid32hec1.reserve(24);
-          m_vrodid32hec2.reserve(24);
-          m_vrodid32fcalem.reserve(8);
-          m_vrodid32fcalhad.reserve(6);
-          m_vrodid32tile.reserve(300);
-	} // end of m_usefullcoll
-
-	return StatusCode::SUCCESS;
-} // End of initialize
-
-StatusCode TrigDataAccessATLFAST::beginRunHandle(IOVSVC_CALLBACK_ARGS){
-	// The ByteStreamCnv (Through LArTT_Selector needs a map of the
-	// RoIs, being retrieved here
-	if(toolSvc()->retrieveTool("LArRoI_Map",m_roiMap).isFailure()) {
-	  ATH_MSG_FATAL("Could not find LArRoI_Map");
-	  return StatusCode::FAILURE;
-	} // End of if LArRoI_Map
-
-#ifdef DOBYTESTREAMCNV
-        //m_datablock.reserve(350);
-	m_larcell = new LArCellCont();
-	if ( (m_larcell->initialize()).isFailure() ){
-	  ATH_MSG_FATAL("Could not init larcell");
-        }
-        m_sel= new LArTT_Selector<LArCellCont>(m_roiMap,m_larcell);
-        if(m_usefullcoll){
-          m_selem = new LArTT_Selector<LArCellCont>(m_roiMap,m_larcell);
-          m_selhec = new LArTT_Selector<LArCellCont>(m_roiMap,m_larcell);
-          m_selfcalhad = new LArTT_Selector<LArCellCont>(m_roiMap,m_larcell);
-          m_selfcalem = new LArTT_Selector<LArCellCont>(m_roiMap,m_larcell);
-        }
-	m_tilecell = new TileCellCont();
-        if ( (m_tilecell->initialize()).isFailure() ){
-	  ATH_MSG_FATAL("Could not init tilecell");
-        }
-        //m_febcoll = new LArFebEnergyCollection();
-	if(m_usefullcoll){
-	  ATH_MSG_DEBUG("Preparing the full collections");
-          if ( m_rIdsem0.size() != 0 ) m_rIdsem0.clear();
-          if ( m_rIdsem1.size() != 0 ) m_rIdsem1.clear();
-          if ( m_rIdsem2.size() != 0 ) m_rIdsem2.clear();
-          if ( m_rIdsem3.size() != 0 ) m_rIdsem3.clear();
-          if ( m_rIdshec.size() != 0 ) m_rIdshec.clear();
-          if ( m_rIdshec0.size() != 0 ) m_rIdshec0.clear();
-          if ( m_rIdshec1.size() != 0 ) m_rIdshec1.clear();
-          if ( m_rIdsfcalhad0.size() != 0 ) m_rIdsfcalhad0.clear();
-          if ( m_rIdsfcalhad1.size() != 0 ) m_rIdsfcalhad1.clear();
-          if ( m_rIdsfcalem0.size() != 0 ) m_rIdsfcalem0.clear();
-          if ( m_rIdstile.size() != 0 ) m_rIdstile.clear();
-	} // End of m_usefullcoll
-#endif
-	m_iov_called=true;
-	return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode TrigDataAccessATLFAST::beginRunHandle_RegSelSvc(IOVSVC_CALLBACK_ARGS){
-	  if(m_usefullcoll){
-	    ATH_MSG_DEBUG("Finalizing Preparation of full collections");
-	  //	  TrigRoiDescriptor tmproi( 0, -4.8, 4.8, 0, -M_PI, M_PI, 0, 0, 0 );
-	  TrigRoiDescriptor tmproi( true );  /// give it true during the constructor, you get a full scan RoI
-
-	  //          const double mineta = -4.8;
-	  //          const double maxeta = 4.8;
-	  //          const double minphi = -M_PI;
-	  //          const double maxphi = M_PI;
-	  //           // TTEM 
-	  //           m_pRegionSelector->DetROBIDListUint(TTEM,-1,mineta,maxeta,minphi,maxphi,m_vrodid32em);
-	  //           // TTHEC
-	  //           m_pRegionSelector->DetROBIDListUint(TTHEC,0,mineta,maxeta,minphi,maxphi,m_vrodid32hec0);
-	  //           m_pRegionSelector->DetROBIDListUint(TTHEC,1,mineta,maxeta,minphi,maxphi,m_vrodid32hec1);
-	  //           m_pRegionSelector->DetROBIDListUint(TTHEC,2,mineta,maxeta,minphi,maxphi,m_vrodid32hec2);
-	  //           // FCALHAD
-	  //           m_pRegionSelector->DetROBIDListUint(FCALHAD,-1,mineta,maxeta,minphi,maxphi,m_vrodid32fcalhad);
-	  //           m_pRegionSelector->DetROBIDListUint(FCALEM,-1,mineta,maxeta,minphi,maxphi,m_vrodid32fcalem);
-	  //           // TILE
-	  //           m_pRegionSelector->DetROBIDListUint(TILE,mineta,maxeta,minphi,maxphi,m_vrodid32tile);
-	  //           m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32em.begin(),m_vrodid32em.end());
-	  //           m_vrodid32hec.insert(m_vrodid32hec.end(),m_vrodid32hec0.begin(),m_vrodid32hec0.end());
-	  //           m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32fcalhad.begin(),m_vrodid32fcalhad.end());
-	  //           m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32fcalem.begin(),m_vrodid32fcalem.end());
-	  //           m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32hec.begin(),m_vrodid32hec.end());
-	  //           m_pRegionSelector->DetHashIDList(TTEM,0,mineta,maxeta,minphi,maxphi,&m_rIdsem0);
-	  //           m_pRegionSelector->DetHashIDList(TTEM,1,mineta,maxeta,minphi,maxphi,&m_rIdsem1);
-	  //           m_pRegionSelector->DetHashIDList(TTEM,2,mineta,maxeta,minphi,maxphi,&m_rIdsem2);
-	  //           m_pRegionSelector->DetHashIDList(TTEM,3,mineta,maxeta,minphi,maxphi,&m_rIdsem3);
-	  //           m_pRegionSelector->DetHashIDList(TTHEC,0,mineta,maxeta,minphi,maxphi,&m_rIdshec0);
-	  //           m_pRegionSelector->DetHashIDList(TTHEC,1,mineta,maxeta,minphi,maxphi,&m_rIdshec1);
-	  //           m_pRegionSelector->DetHashIDList(TTHEC,2,mineta,maxeta,minphi,maxphi,&m_rIdshec2);
-	  //           m_pRegionSelector->DetHashIDList(FCALHAD,0,mineta,maxeta,minphi,maxphi,&m_rIdsfcalhad0);
-	  //           m_pRegionSelector->DetHashIDList(FCALHAD,1,mineta,maxeta,minphi,maxphi,&m_rIdsfcalhad1);
-	  //           m_pRegionSelector->DetHashIDList(FCALEM,0,mineta,maxeta,minphi,maxphi,&m_rIdsfcalem0);
-	  //           m_pRegionSelector->DetHashIDList(TILE,mineta,maxeta,minphi,maxphi,&m_rIdstile);
-	  
-
-	  m_pRegionSelector->DetROBIDListUint(TTEM,-1, tmproi, m_vrodid32em);
-          // TTHEC
-          m_pRegionSelector->DetROBIDListUint(TTHEC,0, tmproi, m_vrodid32hec0);
-          m_pRegionSelector->DetROBIDListUint(TTHEC,1, tmproi, m_vrodid32hec1);
-          m_pRegionSelector->DetROBIDListUint(TTHEC,2, tmproi, m_vrodid32hec2);
-          // FCALHAD
-          m_pRegionSelector->DetROBIDListUint(FCALHAD,-1, tmproi, m_vrodid32fcalhad);
-          m_pRegionSelector->DetROBIDListUint(FCALEM,-1,  tmproi, m_vrodid32fcalem);
-          // TILE
-          m_pRegionSelector->DetROBIDListUint(TILE, tmproi, m_vrodid32tile);
-          m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32em.begin(),m_vrodid32em.end());
-          m_vrodid32hec.insert(m_vrodid32hec.end(),m_vrodid32hec0.begin(),m_vrodid32hec0.end());
-	  m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32fcalhad.begin(),m_vrodid32fcalhad.end());
-          m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32fcalem.begin(),m_vrodid32fcalem.end());
-          m_vrodid32lar.insert(m_vrodid32lar.end(),m_vrodid32hec.begin(),m_vrodid32hec.end());
-          m_pRegionSelector->DetHashIDList(TTEM,0, tmproi, m_rIdsem0);
-          m_pRegionSelector->DetHashIDList(TTEM,1, tmproi, m_rIdsem1);
-          m_pRegionSelector->DetHashIDList(TTEM,2, tmproi, m_rIdsem2);
-          m_pRegionSelector->DetHashIDList(TTEM,3, tmproi, m_rIdsem3);
-          m_pRegionSelector->DetHashIDList(TTHEC,0, tmproi, m_rIdshec0);
-          m_pRegionSelector->DetHashIDList(TTHEC,1, tmproi, m_rIdshec1);
-          m_pRegionSelector->DetHashIDList(TTHEC,2, tmproi, m_rIdshec2);
-          m_pRegionSelector->DetHashIDList(FCALHAD,0, tmproi, m_rIdsfcalhad0);
-          m_pRegionSelector->DetHashIDList(FCALHAD,1, tmproi, m_rIdsfcalhad1);
-	  m_pRegionSelector->DetHashIDList(FCALEM,0, tmproi, m_rIdsfcalem0);
-          m_pRegionSelector->DetHashIDList(TILE, tmproi,  m_rIdstile);
-      
-
-          // TTEM 
-          m_rIdsem0.insert(m_rIdsem0.end(),m_rIdsem1.begin(),m_rIdsem1.end());
-          m_rIdsem0.insert(m_rIdsem0.end(),m_rIdsem2.begin(),m_rIdsem2.end());
-          m_rIdsem0.insert(m_rIdsem0.end(),m_rIdsem3.begin(),m_rIdsem3.end());
-          // TTHEC
-          m_rIdshec.insert(m_rIdshec.end(),m_rIdshec0.begin(),m_rIdshec0.end());
-          m_rIdshec.insert(m_rIdshec.end(),m_rIdshec1.begin(),m_rIdshec1.end());
-          m_rIdshec.insert(m_rIdshec.end(),m_rIdshec2.begin(),m_rIdshec2.end());
-          // FCALHAD
-          m_rIdsfcalhad0.insert(m_rIdsfcalhad0.end(),m_rIdsfcalhad1.begin(),m_rIdsfcalhad1.end());
-
-          m_selem->setRoIs(m_rIdsem0);
-          m_selhec->setRoIs(m_rIdshec);
-          m_selfcalhad->setRoIs(m_rIdsfcalhad0);
-          m_selfcalem->setRoIs(m_rIdsfcalem0);
-	} // End of m_usefullcoll
-	return StatusCode::SUCCESS;
-}
-
-// Finalize method for all tools
-StatusCode TrigDataAccessATLFAST::finalize(){
-        if (msgLvl(MSG::DEBUG)) {
-          ATH_MSG_INFO( "in finalize() by TrigDataAccess" );
-	}
-#ifdef DOBYTESTREAMCNV
-	if ( m_iov_called ){
-        if ( (m_larcell->finalize()).isFailure() ){
-	  ATH_MSG_FATAL("Could not finish larcell");
-        }
-        delete m_larcell;
-        if ( (m_tilecell->finalize()).isFailure() ){
-	  ATH_MSG_FATAL("Could not finish tilecell");
-        }
-        delete m_tilecell;
-        delete m_sel;
-	if(m_usefullcoll){
-         delete m_selem;
-         delete m_selhec;
-         delete m_selfcalhad;
-         delete m_selfcalem;
-	}
-	}
-#endif
-	return StatusCode::SUCCESS;
-
-} // End of finalize
-
-// This should be run to provide ByteStreamCnv with rodid's to
-// look up for. addROBData only works in athenaMT
-void TrigDataAccessATLFAST::RegionSelectorRobID (const int sampling,
-						 const IRoiDescriptor& roi,
-						 const DETID detid, bool /*fetchROBs*/) {
-        // Clears up m_vrodid32
-        if ( m_vrodid32.size() != 0 ) m_vrodid32.clear();
-        if ( detid != TILE ){
-	  m_pRegionSelector->DetROBIDListUint(detid,sampling, roi, m_vrodid32);
-        }
-        else { // TILE does not need sample
-	  m_pRegionSelector->DetROBIDListUint(detid, roi, m_vrodid32);
-        }
-	if (msgLvl(MSG::DEBUG)) {
-          ATH_MSG_DEBUG( "m_vrodid32.size() = " << m_vrodid32.size() );
-	  for(unsigned int i = 0 ; i < m_vrodid32.size() ; i++)
-            ATH_MSG_DEBUG( "m_vrodid32[" << i << "]=" << m_vrodid32[i] );
-	}
-}  // End of RegionSelectorRobID
-
-
-// This code should load m_listID with Detectors ID
-// Should this return a flag in case of failure?
-void TrigDataAccessATLFAST::RegionSelectorListID (const int sampling,
-						  const IRoiDescriptor& roi, const DETID detid) {
-        // Clears up m_rIds
-        if ( m_rIds.size() != 0 ) m_rIds.clear();
-  
-        if ( detid != TILE ){
-	  m_pRegionSelector->DetHashIDList(detid,sampling, roi, m_rIds);
-	}
-        else{ // TILE does not need sample
-	  m_pRegionSelector->DetHashIDList(detid, roi, m_rIds);					   
-	}
-	
-	if (msgLvl(MSG::DEBUG)) {
-          ATH_MSG_DEBUG( "m_rIds.size() = " << m_rIds.size() );
-	  for(unsigned int i = 0; i < m_rIds.size() ; i++)
-            ATH_MSG_DEBUG( "m_rIds[" << i << "]=" << m_rIds[i] );
-	}	
-} // End of RegionSelectorListID
-
-
-
-
-
-// This method should load all the infrastructure for the offline
-// Collection of cells. The iterators m_iBegin, m_iEnd and m_it
-// will have the cells Collection to be used by the Algorithm
-StatusCode TrigDataAccessATLFAST::LoadCollections (
-		LArTT_Selector<LArCellCont>::const_iterator& Begin,
-		LArTT_Selector<LArCellCont>::const_iterator& End,
-		const unsigned int /*sample*/, bool /*prepare*/) {
-        if (msgLvl(MSG::DEBUG)) {
-          ATH_MSG_DEBUG( "m_rIds.size() in LoadColl = " << m_rIds.size() );
-	  for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
-            ATH_MSG_DEBUG( "m_rIds[" << i << "]=" << m_rIds[i] );
-	}
-
-	Begin=End;
-
-	const DataHandle<CaloCellContainer> cells;
-	if (evtStore()->retrieve(cells,"AllCalo").isFailure()) {
-	  ATH_MSG_ERROR("Could not find AllCalo container");
-	  return StatusCode::FAILURE;
-        } // End of if StoreGateSvc
-
-        int rodidx = 0;
-        for (size_t i = 0; i < m_vrodid32.size(); ++i){
-		// Find the collection to fill
-		const std::vector<LArCellCollection*>::const_iterator it =
-			(m_larcell->find(m_vrodid32[rodidx]));
-/*
-        	LArCellCollection* col =
-			*(m_larcell->find(m_vrodid32[rodidx]));
-*/
-		if ( it != m_larcell->end() ) { // Alread decoded collection
-		LArCellCollection *col = *it;
-		// Fills from the container
-		fillColl(cells,*col);
-        	// if (col->size() == 0) return StatusCode::FAILURE;
-		}
-		rodidx++;
-
-  	} // End of for through RobFrags
-
-        // These iterators can be used by every Tool
-        m_sel->setRoIs(m_rIds);
-        Begin = m_sel->begin();
-        End   = m_sel->end();
-	if (msgLvl(MSG::DEBUG)) {
-	  LArTT_Selector<LArCellCont>::const_iterator it;
-	  for ( it=Begin; it != End; ++it ){
-            ATH_MSG_DEBUG( "Eta: " << (*it)->eta()
-                           << "; Phi: " << (*it)->phi() <<
-                           "; Energy: " << (*it)->energy() );
-	  } // End of for printout cells
-	}
-	return StatusCode::SUCCESS;
-} // End of method
-StatusCode TrigDataAccessATLFAST::LoadCollections (
-                TileCellCollection::const_iterator& Begin,
-                TileCellCollection::const_iterator& End,
-                const unsigned int sample, bool /*prepare*/){
-
-	const DataHandle<CaloCellContainer> cells;
-	if (evtStore()->retrieve(cells,"AllCalo").isFailure()) {
-	  ATH_MSG_ERROR("Could not find AllCalo container");
-	  return StatusCode::FAILURE;
-        } // End of if StoreGateSvc
-
-	int i = sample;
-	Begin=End;
-	//for (size_t i = 0; i < m_listID.size(); ++i){
-		m_tile[0] = m_tilecell->find_rod(m_rIds[i]);
-		// Find the collection to fill
-                TileCellCollection* col = NULL;
-		col = *(m_tilecell->find(m_rIds[i]));
-		if ( col != NULL ) {
-		fillColl(cells,*col);
-                Begin = col->begin();
-                End = col->end();
-		}
-
-        //} // End of for through RobFrags
-
-	if (msgLvl(MSG::DEBUG)) {
-	  TileCellCollection::const_iterator itt = Begin;
-	  for (itt=Begin;itt!=End;++itt){
-            ATH_MSG_DEBUG( "Eta: " << (*itt)->eta()
-                           << "; Phi: " << (*itt)->phi() <<
-                           "; Energy: " << (*itt)->energy() << 
-                           "; Hash Id: " << (*itt)->caloDDE()->calo_hash() );
-	  } // End of for printout cells
-	}
-        return StatusCode::SUCCESS;
-
-} // End of LoadCollections
-
-// This method does not make sense for ATLFAST
-StatusCode TrigDataAccessATLFAST::LoadCollections (
-                LArFebEnergyCollection::const_iterator& /*Begin*/,
-                LArFebEnergyCollection::const_iterator& /*End*/,
-                const unsigned int /*sample*/, bool /*prepare*/){
-
-/*
-	m_robFrags.clear();
-        m_robDataProvider->getROBData(m_vrodid32,m_robFrags);
-
-        //int rodidx = 0;
-	LArFebEnergyCollection* m_febcoll;
-        m_febcoll = new LArFebEnergyCollection();
-        for (size_t i = 0; i < m_robFrags.size(); ++i){
-                m_lardecoder->check_valid(m_robFrags[i],msg());
-                //m_datablock.clear();
-                // Get Rod Data and size of fragment
-                const uint32_t* roddata1 = 0;
-                m_robFrags[i]->rod_data(roddata1);
-                size_t roddatasize = m_robFrags[i]->rod_ndata();
-                if (roddatasize < 3) {
-                        ATH_MSG_FATAL( "Error reading bytestream"<<
-                           "event: Empty ROD block (less than 3 words)" );
-                        return StatusCode::FAILURE;
-                } // End of if small size
-                m_lardecoder->setRobFrag(m_robFrags[i]);
-                m_lardecoder->fillCollectionHLTFeb(roddata1,roddatasize,*m_febcoll);
-                // if (col->size() == 0) return StatusCode::FAILURE;
-
-        } // End of for through RobFrags
-        // These iterators can be used by every Tool
-        Begin = m_febcoll->begin();
-        End   = m_febcoll->end();
-
-#ifndef NDEBUG
-        for(LArFebEnergyCollection::const_iterator it = Begin; 
-              it!=End; ++it){
-              ATH_MSG_DEBUG( " Feb ID = " << (*it)->getFebId() 
-                       << " Feb Ex = " << (*it)->getFebEx()
-                       << " Feb Ey = " << (*it)->getFebEy() 
-                       << " Feb Ez = " << (*it)->getFebEz() );
-        }
-#endif
-*/
-        return StatusCode::SUCCESS;
-
-} // End of LoadCollections
-
-StatusCode TrigDataAccessATLFAST::LoadFullCollections (
-                LArTT_Selector<LArCellCont>::const_iterator& Begin,
-                LArTT_Selector<LArCellCont>::const_iterator& End,
-                const DETID /*detid*/, bool /*prepare*/) {
-
-        if (msgLvl(MSG::DEBUG)) {
-          ATH_MSG_DEBUG( "m_rIds.size() in LoadColl = " << m_rIds.size() );
-	  for(unsigned int i = 0 ; i < m_rIds.size() ; i++)
-            ATH_MSG_DEBUG( "m_rIds[" << i << "]=" << m_rIds[i] );
-	}
-
-        Begin=End;
-
-        const DataHandle<CaloCellContainer> cells;
-        if (evtStore()->retrieve(cells,"AllCalo").isFailure()) {
-	  ATH_MSG_ERROR("Could not find AllCalo container");
-	  return StatusCode::FAILURE;
-        } // End of if StoreGateSvc
-
-        int rodidx = 0;
-        for (size_t i = 0; i < m_vrodid32lar.size(); ++i){
-           const std::vector<LArCellCollection*>::const_iterator it =
-                   (m_larcell->find(m_vrodid32lar[rodidx]));
-          if (it != m_larcell->end() ) {
-              LArCellCollection *col = *it;
-              fillColl(cells,*col);
-          }
-                rodidx++;
-        } // End of for through RobFrags
-
-
-	if (msgLvl(MSG::DEBUG)) {
-	  int i=0;
-	  LArTT_Selector<LArCellCont>::const_iterator it;
-	  for ( it=Begin; it != End; ++it ){
-            ATH_MSG_DEBUG( "Eta: " << (*it)->eta()
-                           << "; Phi: " << (*it)->phi() <<
-                           "; Energy: " << (*it)->energy() );
-	    i++;
-	  } // End of for printout cells
-	}
-        return StatusCode::SUCCESS;
-} // End of method
-StatusCode TrigDataAccessATLFAST::LoadFullCollections (
-                TileCellCollection::const_iterator& Begin,
-                TileCellCollection::const_iterator& End,
-                const unsigned int sample, bool /*prepare*/){
-
-        const DataHandle<CaloCellContainer> cells;
-        if (evtStore()->retrieve(cells,"AllCalo").isFailure()) {
-	  ATH_MSG_ERROR("Could not find AllCalo container");
-	    return StatusCode::FAILURE;
-        } // End of if StoreGateSvc
-
-
-        int i = sample;
-        Begin=End;
-                m_tile[0] = m_tilecell->find_rod(m_rIdstile[i]);
-                // Find the collection to fill
-                TileCellCollection* col = NULL;
-                col = *(m_tilecell->find(m_rIdstile[i]));
-                if( col!=NULL){
-                  fillColl(cells,*col);
-                  Begin = col->begin();
-                  End = col->end();
-                }
-
-	if (msgLvl(MSG::DEBUG)) {
-	  TileCellCollection::const_iterator itt = Begin;
-	  for (itt=Begin;itt!=End;++itt){
-            ATH_MSG_DEBUG( "Eta: " << (*itt)->eta()
-                           << "; Phi: " << (*itt)->phi() <<
-                           "; Energy: " << (*itt)->energy() <<
-                           "; Hash Id: " << (*itt)->caloDDE()->calo_hash() );
-	  } // End of for printout cells
-	}
-        return StatusCode::SUCCESS;
-
-} // End of LoadCollections
-
-// The following method does not make sense to ATLFAST
-StatusCode TrigDataAccessATLFAST::LoadFullCollections (
-                LArFebEnergyCollection::const_iterator& /*Begin*/,
-                LArFebEnergyCollection::const_iterator& /*End*/,
-                const DETID /*detid*/, bool /*prepare*/){
-
-
-/*
-	m_robFrags.clear();
-        switch (detid) {
-           case TTEM:
-             m_robDataProvider->getROBData(m_vrodid32em,m_robFrags);
-             break;
-           case TTHEC:
-             m_robDataProvider->getROBData(m_vrodid32hec0,m_robFrags);
-             break;
-           case FCALEM:
-             m_robDataProvider->getROBData(m_vrodid32fcalem,m_robFrags);
-             break;
-           case FCALHAD:
-             m_robDataProvider->getROBData(m_vrodid32fcalhad,m_robFrags);
-             break;
-           default:
-             break;
-        }
-
-        LArFebEnergyCollection* m_febcoll;
-        m_febcoll = new LArFebEnergyCollection();
-
-        for( size_t i=0; i< m_robFrags.size(); ++i){
-                m_lardecoder->check_valid(m_robFrags[i],msg());
-                const uint32_t* roddata1 = 0;
-                m_robFrags[i]->rod_data(roddata1);
-                size_t roddatasize = m_robFrags[i]->rod_ndata();
-                if(roddatasize < 3) {
-                       ATH_MSG_FATAL( "Error reading bytestream " <<
-                                  "event: Empty ROD block (less than 3 words)" );
-                       return StatusCode::FAILURE;
-                }
-                m_lardecoder->setRobFrag(m_robFrags[i]);
-                m_lardecoder->fillCollectionHLTFeb(roddata1,roddatasize,*m_febcoll);
-        }
-
-        Begin = m_febcoll->begin();
-        End = m_febcoll->end();
-        std::cout << "This is the detectorID = " << detid << std::endl;
-        std::cout << "This is the febcoll size = " << m_febcoll->size() << std::endl;
-
-#ifndef NDEBUG
-        for(LArFebEnergyCollection::const_iterator it = Begin;
-              it!=End; ++it){
-              ATH_MSG_DEBUG( " Feb ID = " << (*it)->getFebId()
-                       << " Feb Ex = " << (*it)->getFebEx()
-                       << " Feb Ey = " << (*it)->getFebEy()
-                       << " Feb Ez = " << (*it)->getFebEz() );
-        }
-#endif
-*/
-        return StatusCode::SUCCESS;
-
-} // End of LoadFullCollections
-
-// The following method does not make sense to ATLFAST
-StatusCode TrigDataAccessATLFAST::LoadFullCollections (
-                TileL2Container::const_iterator& /*Begin*/,
-                TileL2Container::const_iterator& /*End*/){
-        return StatusCode::SUCCESS;
-
-} // End of LoadFullCollections
-
-// handle events (beginEvent only) to prepare containers
-void TrigDataAccessATLFAST::handle(const Incident & inc ) {
-  m_larcell->eventNumber(inc.context().eventID().event_number());
-}
-
-template<class T>
-void TrigDataAccessATLFAST::fillColl(const DataHandle<CaloCellContainer>& input, T& output){
-	typedef typename T::iterator IT;
-	IT it,end;
-	it=  output.begin();
-	end= output.end();
-	for( ; it!= end; ++it ) {
-		if ( (*it)->caloDDE() != NULL ) {
-		  IdentifierHash id = (*it)->caloDDE()->calo_hash();
-		  const CaloCell* cell = NULL;
-		  cell = input->findCell(id);
-		  if ( cell != NULL ) (*it)->setEnergy(cell->energy()+1.0);
-		}
-	}
-}
-
-
-
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h
deleted file mode 100644
index 2b68f8b2fc52..000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccessATLFAST.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-/********************************************************************
- 
- NAME:     TrigDataAccessATLFAST.h
- PACKAGE:  Trigger/TrigAlgorithms/TrigT2CaloCommon
- 
- AUTHOR:   Denis Oliveira Damazio
-
- PURPOSE:  Tool designed to perform data access to
-           Calorimeter cells. It does not perform
-           ByteStream conversion. Just uses the ATLFast
-	   CaloCellContainer AllCalo. It is, however,
-           driven by Region of Interest (in eta/phi)
-           definition.
- *******************************************************************/
-
-#ifndef TRIGT2CALOCOMMONATLFAST_TRIGDATAACCESS_H 
-#define TRIGT2CALOCOMMONATLFAST_TRIGDATAACCESS_H
-
-#include "GaudiKernel/IAlgTool.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/IProperty.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-
-#include "StoreGate/DataHandle.h"
-#include "CaloIdentifier/CaloIdManager.h"
-#include "TrigTimeAlgs/TrigTimerSvc.h"
-
-#include "TrigT2CaloCommon/ITrigDataAccess.h"
-#include "Identifier/IdentifierHash.h"
-
-#include "LArRecEvent/LArCellCollection.h"
-#include "LArRecEvent/LArFebEnergyCollection.h"
-
-#include "TileEvent/TileCell.h"
-
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-#include "LArByteStream/LArRodDecoder.h"
-#include "TileByteStream/TileROD_Decoder.h"
-
-#include "TrigT2CaloCommon/T2GeometryTool.h"
-#include "TrigT2CaloCommon/T2Calibration.h"
-#include "CaloGeoHelpers/CaloSampling.h"
-#include "eformat/old/util.h"
-
-#include "GaudiKernel/IIncidentListener.h"
-#include "GaudiKernel/Incident.h"
-
-#include "TrigSteeringEvent/TrigRoiDescriptor.h"
-
-#include "CxxUtils/phihelper.h"
-
-#include "CxxUtils/checker_macros.h"
-ATLAS_NO_CHECK_FILE_THREAD_SAFETY;  // legacy trigger code
-
-class IRegSelSvc;
-// class ITrigRegionSelector;
-class LArRoI_Map;
-class IROBDataProviderSvc;
-class T2CaloConfig;
-
-/** Class that provides access to data for
-    Calorimeter LVL2 Algorithms */
-class TrigDataAccessATLFAST: virtual public ITrigDataAccess, public AthAlgTool,
-	virtual public IIncidentListener {
-  public:
-    /** Real Constructor */
-    TrigDataAccessATLFAST(const std::string & type, const std::string & name,
-                 const IInterface* parent) : AthAlgTool(type,name,parent),
-		 m_pRegionSelector("RegSelSvc/RegSelSvc","TrigDataAccess"){
-	declareInterface<ITrigDataAccess>(this); 
-	declareProperty("RegSelSvc",m_pRegionSelector,"Region Selector Service access");
-	// New property for MET slice
-        declareProperty("loadFullCollections",  m_usefullcoll=false);
-    }
-    /** Destructor */
-    virtual ~TrigDataAccessATLFAST() { }
-
-
-    /** The same function should initialize all internal Tools
-    */
-    StatusCode initialize();
-    /** Finalize */
-    StatusCode finalize();
-    /** handle to init a new event */
-    void handle (const Incident& );
-    /** begin run handle for conditions */
-    StatusCode beginRunHandle(IOVSVC_CALLBACK_ARGS);
-    /** begin run handle for conditions and RegSelSvc */
-    StatusCode beginRunHandle_RegSelSvc(IOVSVC_CALLBACK_ARGS);
-
-    /** Expose list of ROBs */
-
-    void ROBList( const IRoiDescriptor& /* roi */,
-		  std::vector<uint32_t>& /*vec*/){ }
-
-    /// obsolete
-    void ROBList( const double /* etamin */, const double /*etamax*/,
-		  const double /*phimin*/, const double /*phimax*/,
-		  std::vector<uint32_t>& /*vec*/){ }
-
-
-  protected:
-    // methods for tools
-    // The two methods below could be united in a single one
-    // They load this class with the list of ROBs to be looked after
-    // By default TTEM is requested but TTHEC and TILE may also be used.
-
-    void RegionSelectorListID (const int sampling, const IRoiDescriptor& roi,
-			       const DETID detid=TTEM);    
-   
-    void RegionSelectorRobID (const int sampling,  const IRoiDescriptor& roi,
-			      const DETID detid=TTEM, bool fetchROBs = true);
-    
-    /** 
-        * @brief Region Selector Input. Prepare internal tables
-        * with online/offline Identifiers used in ByteStream
-        * Conversion and data iterators (to Calorimeter Cells).
-        * @param[in] sampling layer (not used for TileCal).
-        * @param[in] IRoiDescriptor for Region of Interest definition.
-        * @param[in] DETID which can be TTEM (default), TTHEC, TILE.
-         */
-    virtual inline void RegionSelector(const int sampling, const IRoiDescriptor& roi, const DETID detid=TTEM){
-      RegionSelectorListID(sampling, roi, detid);
-      RegionSelectorRobID (sampling, roi, detid);
-    };
-
-    
-    /// obsolete
-
-    /** 
-        * @brief Region Selector Input. Prepare internal tables
-        * with online/offline Identifiers used in ByteStream
-        * Conversion and data iterators (to Calorimeter Cells).
-        * @param[in] sampling layer (not used for TileCal).
-        * @param[in] etamin/etamax for Region of Interest definition.
-        * @param[in] phimin/phimax for Region of Interest definition.
-        * @param[in] DETID which can be TTEM (default), TTHEC, TILE.
-         */
-    void RegionSelectorListID (const int sampling, 
-			       const double etamin, const double etamax, 
-			       const double phimin, const double phimax,
-			       const DETID detid=TTEM) { 
-      TrigRoiDescriptor roi( 0.5*(etamin+etamax), etamin, etamax, CxxUtils::phiMean(phimin,phimax), phimin, phimax);
-      RegionSelectorListID(sampling, roi, detid);
-    }
-    
-    void RegionSelectorRobID (const int sampling, const double etamin,
-			      const double etamax, const double phimin, const double phimax,
-			      const DETID detid=TTEM, bool /* fetchROBs*/ = true) { 
-      TrigRoiDescriptor roi( 0.5*(etamin+etamax), etamin, etamax, CxxUtils::phiMean(phimin,phimax), phimin, phimax);
-      RegionSelectorRobID(sampling, roi, detid);
-    }
-
-    /// obsolete methods ///
-    virtual inline void RegionSelector(const int sampling, 
-				       const double etamin, const double etamax, 
-				       const double phimin, const double phimax,
-				       const DETID detid=TTEM){
-      TrigRoiDescriptor roi( 0.5*(etamin+etamax), etamin, etamax, CxxUtils::phiMean(phimin,phimax), phimin, phimax);
-      RegionSelector(sampling, roi, detid);
-    };
-	
-       /** 
-        * @brief LoadCollections fetches data via ROBDataProvider
-        * and really provides ByteStream Conversion by calling 
-        * detector specific (LAr or Tile) ByteStream Conversion
-        * Tools within RoI as defined in the above method.
-        * @param[out] LArTT_Selector<LArCellCont> outputs
-        *       begin, end interator to LArCells.
-        * @param[in] sample (deprecated) maintained for compatibility.
-        * @param[in] prepare if container should be prepared or
-        *       considered as already existing (multilayer HEC or Tile
-        *       access).
-        */
-    StatusCode LoadCollections (
-	LArTT_Selector<LArCellCont>::const_iterator&,
-	LArTT_Selector<LArCellCont>::const_iterator&,
-	const unsigned int sample = 0, bool prepare=true );
-	/** 
-        * @brief LoadCollections fetches data via ROBDataProvider
-        * and really provides ByteStream Conversion by calling 
-        * detector specific (LAr or Tile) ByteStream Conversion
-        * Tools within RoI as defined in the above method.
-        * @param[out] TileCellCollection::const_iterator outputs
-        *       begin, end interator to TileCells.
-        * @param[in] sample (deprecated) maintained for compatibility.
-        * @param[in] prepare if container should be prepared or
-        *       considered as already existing (multilayer HEC or Tile
-        *       access).
-        */
-    StatusCode LoadCollections (
-	TileCellCollection::const_iterator&,
-	TileCellCollection::const_iterator&,
-	const unsigned int sample = 0, bool prepare=true);
-        /** MBTS collection */
-    StatusCode LoadMBTS(TileCellCollection::const_iterator&,
-                TileCellCollection::const_iterator&){
-	return StatusCode::SUCCESS; }
-        /** Load Zdc Collection */
-    StatusCode LoadZdcCollection(ZdcRawChannelCollection::const_iterator&,
-                ZdcRawChannelCollection::const_iterator&){
-	return StatusCode::SUCCESS; }
-
-	/** 
-        * @brief LoadCollections fetches data via ROBDataProvider
-        * and really provides ByteStream Conversion by calling 
-        * detector specific (LAr or Tile) ByteStream Conversion
-        * Tools within RoI as defined in the above method.
-        * @param[out] LArFebEnergyCollection::const_iterator outputs
-        *       begin, end interator to LArFebEnergy Collections.
-        * @param[in] sample (deprecated) maintained for compatibility.
-        * @param[in] prepare if container should be prepared or
-        *       considered as already existing (multilayer HEC or Tile
-        *       access).
-        */
-    StatusCode LoadCollections (
-	LArFebEnergyCollection::const_iterator&,
-	LArFebEnergyCollection::const_iterator&,
-	const unsigned int sample = 0, bool prepare=true);
-        /** 
-        * @brief Loads the full collection for the missing et computation
-        */
-    StatusCode LoadFullCollections (
-        LArTT_Selector<LArCellCont>::const_iterator&,
-        LArTT_Selector<LArCellCont>::const_iterator&,
-        DETID detid, bool prepare=true );
-        /** 
-        * @brief Loads the full collection for the missing et computation
-        */
-    StatusCode LoadFullCollections (
-        TileCellCollection::const_iterator&,
-        TileCellCollection::const_iterator&,
-        const unsigned int sample = 0, bool prepare=true );
-        /** 
-        * @brief Loads the full collection for the missing et computation
-        */
-
-    StatusCode LoadFullCollections (
-        LArFebEnergyCollection::const_iterator&,
-        LArFebEnergyCollection::const_iterator&,
-        DETID detid, bool prepare=true );
-        /**
-        * @brief Loads the full collection for the missing et computation
-        */
-    StatusCode LoadFullCollections (
-                TileL2Container::const_iterator& Begin,
-                TileL2Container::const_iterator& End);
-        /**
-        * @brief Loads the full collection fast
-        */
-    StatusCode LoadFullCollections (
-                CaloCellContainer::const_iterator&,
-                CaloCellContainer::const_iterator&){
-                return StatusCode::SUCCESS; }
-	/** Number of Tile Calorimeter modules found in
-        * the Region of Interest */
-    unsigned int TileContSize ( void ) { return m_rIds.size(); } 
-	/** Number of Tile Calorimeter modules found in
-        * the Region of Interest MET case -> All Calo*/
-    unsigned int TileFullContSize ( void ) { return m_rIdstile.size(); }
-	/** Error reporting */
-	uint32_t report_error ( void ) { return 0x0; }
-    
-    /** RegSelSvc handle */
-    ServiceHandle<IRegSelSvc>         m_pRegionSelector;
-    /** LArRoI_Map used by LArTT_Selector */
-    const LArRoI_Map*            m_roiMap;           
-
-	/** iterators to LArCells type depending on
-	access way (IDC or Cont) */
-	LArTT_Selector<LArCellCont>* m_sel;
-        LArTT_Selector<LArCellCont>* m_sellarfull;
-        LArTT_Selector<LArCellCont>* m_selem;
-        LArTT_Selector<LArCellCont>* m_selhec;
-        LArTT_Selector<LArCellCont>* m_selfcalhad;
-        LArTT_Selector<LArCellCont>* m_selfcalem;
-	/** LArCellCont pointer - has collections of LArCells */
-	LArCellCont* m_larcell;
-	/** TileCellCont pointer - has collections of TileCells */
-	TileCellCont* m_tilecell;
-	/** Input DataBlock to pre-allocate memory space for
-	ROBFragment to be decoded */
-	//std::vector<uint32_t> m_datablock;
-//        LArFebEnergyCollection* m_febcoll;
-
-
-    // Objects that the Tools should not worry about
-  private:
-        /** method to fill collection with container information */
-        template<class T>
-        void fillColl(const DataHandle<CaloCellContainer>& input, T& output);
-        /** fill vector with all RodIds and Hash Id's in initialize */
-        bool m_usefullcoll;
-	/** List of Hash Id's to be fetched for a given RoI. */
-	std::vector<IdentifierHash> m_rIds;
-        std::vector<IdentifierHash> m_rIdsem0;
-        std::vector<IdentifierHash> m_rIdsem1;
-        std::vector<IdentifierHash> m_rIdsem2;
-        std::vector<IdentifierHash> m_rIdsem3;
-        std::vector<IdentifierHash> m_rIdshec;
-        std::vector<IdentifierHash> m_rIdshec0;
-        std::vector<IdentifierHash> m_rIdshec1;
-        std::vector<IdentifierHash> m_rIdshec2;
-        std::vector<IdentifierHash> m_rIdsfcalhad0;
-        std::vector<IdentifierHash> m_rIdsfcalhad1;
-        std::vector<IdentifierHash> m_rIdsfcalem0;
-        std::vector<IdentifierHash> m_rIdstile;
-	/** List of RodIds to be fetched for a given RoI. */
-	std::vector<uint32_t> m_vrodid32;
-        std::vector<uint32_t> m_vrodid32lar;
-        std::vector<uint32_t> m_vrodid32em;
-        std::vector<uint32_t> m_vrodid32hec;
-        std::vector<uint32_t> m_vrodid32hec0;
-        std::vector<uint32_t> m_vrodid32hec1;
-        std::vector<uint32_t> m_vrodid32hec2;
-        std::vector<uint32_t> m_vrodid32fcalem;
-        std::vector<uint32_t> m_vrodid32fcalhad;
-        std::vector<uint32_t> m_vrodid32tile;
-	/** List of Detector ID (needed for London Schema - TileCal)
-	    elements for offline like data organization (module
-	    ID for TileCal, TTsample ID for LAr).
-	*/
-	std::vector<int> m_listID;
-	/** space for Tile Calorimeter Identifier */
-	std::vector<unsigned int> m_tile;
-	/** check whether iov method was called */
-	bool m_iov_called;
-};
-
-#endif
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx
index 21f494b12ab0..c7c1a055c1dd 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/components/TrigT2CaloCommon_entries.cxx
@@ -1,13 +1,11 @@
 #include "TrigT2CaloCommon/T2GeometryTool.h"
 #include "../TrigDataAccess.h"
-#include "../TrigDataAccessATLFAST.h"
 #include "../TrigCaloDataAccessSvc.h"
 #include "../TestCaloDataAccess.h"
 #include "../CompareCells.h"
 
 DECLARE_COMPONENT( T2GeometryTool )
 DECLARE_COMPONENT( TrigDataAccess )
-DECLARE_COMPONENT( TrigDataAccessATLFAST )
 DECLARE_COMPONENT( TrigCaloDataAccessSvc)
 DECLARE_COMPONENT( TestCaloDataAccess )
 DECLARE_COMPONENT( CompareCells )
-- 
GitLab


From b4573703ca96ff1c5245f108c7196173c08a4314 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 16:27:02 +0100
Subject: [PATCH 120/308] TrigT2CaloEgamma: remove unused RegSelSvc handle

---
 .../TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx         | 6 ++----
 .../TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h           | 5 +----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx
index eb09ae61f467..e92b6df15cd3 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /*
@@ -25,14 +25,12 @@
 class ISvcLocator;
 
 T2CaloEgammaReFastAlgo::T2CaloEgammaReFastAlgo(const std::string& name, ISvcLocator* pSvcLocator) :
-    AthReentrantAlgorithm(name, pSvcLocator),
-    m_regionSelector("RegSelSvc", name)
+    AthReentrantAlgorithm(name, pSvcLocator)
 {}
 
 StatusCode T2CaloEgammaReFastAlgo::initialize()
 {
   m_emAlgTools.retrieve().ignore();
-  ATH_CHECK(m_regionSelector.retrieve());
   ATH_CHECK(m_clusterContainerKey.initialize());
   ATH_CHECK(m_roiCollectionKey.initialize());
   ATH_CHECK( m_bcidAvgKey.initialize() );
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
index e0691b9ff219..962ae5af0f5a 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaReFastAlgo.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -19,7 +19,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
-#include "IRegionSelector/IRegSelSvc.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
 #include "CaloEvent/CaloBCIDAverage.h"
@@ -47,8 +46,6 @@ class T2CaloEgammaReFastAlgo : public AthReentrantAlgorithm {
     // float calculateZ0(const float etaLayer1, const float etaLayer2);
   
   private:
-    ServiceHandle<IRegSelSvc> m_regionSelector;
-  
     // Properties:
     Gaudi::Property<float> m_l1eta{this, "L1ForceEta", -10.0, "Forced LVL1 eta"};
     Gaudi::Property<float> m_l1phi{this, "L1ForcePhi", -10.0, "Forced LVL1 phi"};
-- 
GitLab


From 0f4248b98150087a868a577561cbb858b0f2e9ed Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 16:30:36 +0100
Subject: [PATCH 121/308] TrigPartialEventBuilding: remove unused IRegSelSvc
 include

---
 .../TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h        | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h
index 66ed0062b6c5..073a1e3b4fcf 100644
--- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h
+++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/RoIPEBInfoWriterTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TrigPartialEventBuilding_RoIPEBInfoWriterTool_h
@@ -7,7 +7,6 @@
 
 #include "TrigPartialEventBuilding/PEBInfoWriterToolBase.h"
 #include "IRegionSelector/RegSelEnums.h"
-#include "IRegionSelector/IRegSelSvc.h"
 #include "IRegionSelector/IRegSelTool.h"
 
 /** @class RoIPEBInfoWriterTool
-- 
GitLab


From ded1f6beb246b608f88179e07bf147d0eaf559cb Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 16:31:01 +0100
Subject: [PATCH 122/308] TRT_TrigTrackSegmentsFinder: remove unused IRegSelSvc
 include

---
 .../src/components/TRT_TrigTrackSegmentsFinder_entries.cxx       | 1 -
 1 file changed, 1 deletion(-)

diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/components/TRT_TrigTrackSegmentsFinder_entries.cxx b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/components/TRT_TrigTrackSegmentsFinder_entries.cxx
index b1d7b62ed071..9149a6dd83cb 100644
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/components/TRT_TrigTrackSegmentsFinder_entries.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/src/components/TRT_TrigTrackSegmentsFinder_entries.cxx
@@ -1,5 +1,4 @@
 #include "TRT_TrigTrackSegmentsFinder/TRT_TrigTrackSegmentsFinder.h"
-#include "IRegionSelector/IRegSelSvc.h"
 
 using namespace InDet;
 
-- 
GitLab


From e68bae9df29fe9752c9c918686cf30d05c344996 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 16:31:24 +0100
Subject: [PATCH 123/308] SiTrigSPSeededTrackFinder: remove unused IRegSelSvc
 include

Also move other interface includes to main header file.
---
 .../SiTrigSPSeededTrackFinder.h                      | 12 ++++--------
 .../components/SiTrigSPSeededTrackFinder_entries.cxx |  5 -----
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h
index 2ce82cb6394b..ac36a7e433c7 100755
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////
@@ -33,18 +33,14 @@
 
 //!< Trigger specific stuff
 #include "TrigInterfaces/FexAlgo.h"
-
 #include "TrkEventUtils/PRDtoTrackMap.h"
+#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
+#include "InDetRecToolInterfaces/ISiZvertexMaker.h"
+#include "InDetRecToolInterfaces/ISiTrackMaker.h"
 
 //forward declarations
 class TrigTimer;
 
-namespace InDet {
-  class ISiSpacePointsSeedMaker;
-  class ISiZvertexMaker;
-  class ISiTrackMaker;
-}
-
 namespace InDet {
   
   //!< Class-algorithm for track finding in Pixels and SCT
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/components/SiTrigSPSeededTrackFinder_entries.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/components/SiTrigSPSeededTrackFinder_entries.cxx
index 1e4aa94a9b86..81479d68bfd2 100644
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/components/SiTrigSPSeededTrackFinder_entries.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/src/components/SiTrigSPSeededTrackFinder_entries.cxx
@@ -1,10 +1,5 @@
 #include "SiTrigSPSeededTrackFinder/SiTrigSPSeededTrackFinder.h"
 
-#include "InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h"
-#include "InDetRecToolInterfaces/ISiZvertexMaker.h" 
-#include "InDetRecToolInterfaces/ISiTrackMaker.h" 
-#include "IRegionSelector/IRegSelSvc.h"
-
 using namespace InDet;
 
 DECLARE_COMPONENT( SiTrigSPSeededTrackFinder )
-- 
GitLab


From 86039641276ac8850ed35521cff69720c1d6109b Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 16:33:04 +0100
Subject: [PATCH 124/308] iPatRecExample: remove commented RegSelSvc code

---
 .../iPat/iPatRecExample/share/iPatRec_jobOptions.py       | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py b/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
index d65f219d642c..5465f4a2cf49 100755
--- a/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
+++ b/Reconstruction/iPat/iPatRecExample/share/iPatRec_jobOptions.py
@@ -89,14 +89,6 @@ if DetFlags.detdescr.ID_on() and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRI
     ToolSvc += TrackFollower(name = 'TrackFollower',
                              TRT_Recon = "TRT_Recon/TRT_Recon")
     
-    # include the RegionSelector service
-    if DetFlags.haveRIO.TRT_on():
-        from AthenaCommon.AppMgr import ServiceMgr
-        # from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-        # iPatRegSelSvc  = RegSelSvcDefault()
-        # iPatRegSelSvc.enableTRT = True
-        # ServiceMgr += iPatRegSelSvc
-
     # -------------------------------------------------------------
     # Algorithm Private Options: iPatRec
     # -------------------------------------------------------------
-- 
GitLab


From 8650f40ee3d0129c1155cb2bf2ec7d18ce786b9a Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 16:37:53 +0100
Subject: [PATCH 125/308] TriggerJobOpts: delete RegSelSvc related Modifiers

---
 .../TriggerJobOpts/python/Modifiers.py        | 42 +------------------
 1 file changed, 1 insertion(+), 41 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py b/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py
index 3c5cc3f12863..9c3462731bdb 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/Modifiers.py
@@ -494,33 +494,8 @@ class optimizeChainOrder(_modifier):
             topSequence.TrigSteer_HLT.ExecutionOrderStrategy.order=[ 'name:.+beamspot.+',
                                                                     'name:.+j.+',
                                                                     'name:.+2tau.+',
-                                                                    'name:.+tau.+'  ]
-
-class disablePixels(_modifier):
-    """
-    Turns off pixels in region selector
-    """
-    def postSetup(self):
-        svcMgr.RegSelSvc.enablePixel=False
-
-class disableSCTBarrel(_modifier):
-    """
-    Turns off SCT Barrel in region selector and badly mapped ROB
-    """
-    def postSetup(self):
-        svcMgr.RegSelSvc.DeleteSiRobList=range(0x210000,0x21000a+1)+range(0x210100,0x21010a+1)+range(0x220000,0x22000a+1)+range(0x220100,0x22010a+1)+[0x240005]
-
-class disableIBL(_modifier):
-    """
-    Turn off IBL from readout
-    """
-
-    def postSetup(self):
-        import TrigInDetValidation.InDetModules as IDM
-        pixel_barrel_layer1_hashes = IDM.getHashes(IDM.getLayer(IDM.getBarrel(IDM.Pixel),0))
-        svcMgr.RegSelSvc.DeletePixelHashList=pixel_barrel_layer1_hashes
-        svcMgr.ROBDataProviderSvc.ignoreROB=[1310848, 1310849, 1310850, 1310851, 1310899, 1310944, 1310913, 1310946, 1310929, 1310912, 1310914, 1310736, 1310737, 1310738, 1310739, 1310752, 1310753, 1310754, 1310755, 1310883, 1310897, 1310930, 1310896, 1310898, 1310768, 1310769, 1310770, 1310771, 1310784, 1310785, 1310786, 1310787, 1310867, 1310931, 1310881, 1310880, 1310882, 1310800, 1310801, 1310802, 1310803, 1310816, 1310817, 1310818, 1310819, 1310915, 1310865, 1310864, 1310945, 1310928, 1310866, 1310832, 1310833, 1310834, 1310835, 1310947]
 
+                                                                    'name:.+tau.+'  ]
 class disableIBLInTracking(_modifier):
     """
     Turn off IBL in tracking algorithms (data still available for PEB etc)
@@ -1395,21 +1370,6 @@ class LumiFromSqlite(_modifier):
                 folders += [f]
         svcMgr.IOVDbSvc.Folders = folders
 
-class LumiRegionZmax168(_modifier):
-    """
-    decrease the size (equivalent of 3*sigma_z) of luminous region for ID tracking to 168 mm
-    """
-    def preSetup(self):
-        from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import L2IDTrackingCuts
-        from AthenaCommon.SystemOfUnits import mm
-        L2IDTrackingCuts.setRegSelZmax(168* mm)
-
-    def postSetup(self):
-        from AthenaCommon.AlgSequence import AlgSequence
-        topSequence = AlgSequence()
-        RegSelSvc=topSequence.allConfigurables.get("RegSelSvcDefault")
-        from AthenaCommon.SystemOfUnits import mm
-        RegSelSvc.DeltaZ = 168* mm
 
 class useDynamicAlignFolders(_modifier):
     """
-- 
GitLab


From 43f9fd59668ab002b2900e52c760bf60b507d246 Mon Sep 17 00:00:00 2001
From: Oleh Kivernyk <oleh.kivernyk@cern.ch>
Date: Fri, 18 Dec 2020 16:53:03 +0100
Subject: [PATCH 126/308] Adding default photon efficiency correction map file
 from Rel21.7

---
 .../Root/AsgPhotonEfficiencyCorrectionTool.cxx                  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
index 23923003e442..a3178fe0f472 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
@@ -64,7 +64,7 @@ AsgPhotonEfficiencyCorrectionTool::AsgPhotonEfficiencyCorrectionTool( std::strin
   declareProperty( "CorrectionFileNameUnconv", m_corrFileNameUnconv="",
                    "File that stores the correction factors for simulation for unconverted photons");
 				   
-  declareProperty("MapFilePath", m_mapFile = "" ,
+  declareProperty("MapFilePath", m_mapFile = "PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map1.txt",
                   "Full path to the map file");  
 				  
   declareProperty( "ForceDataType", m_dataTypeOverwrite=-1,
-- 
GitLab


From 2024d0944e082b494661223749f7c707aa7f1807 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Fri, 18 Dec 2020 17:19:09 +0100
Subject: [PATCH 127/308] Moved the import of the geometry modules into the
 TPCnvTest(...) function.

Thereby avoiding having to escape importing errors on every import attempt.
---
 .../python/TPCnvTestConfig.py                 | 35 ++++---------------
 1 file changed, 7 insertions(+), 28 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py b/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py
index 8b2556970110..5d7f3d6df640 100644
--- a/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/python/TPCnvTestConfig.py
@@ -8,34 +8,6 @@ from AthenaConfiguration.MainServicesConfig import MainServicesCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg
 from AthenaPoolUtilities.DumperConfig import Dumper, find_file
-try:
-    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
-except ImportError:
-    pass
-try:
-    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
-except ImportError:
-    pass
-try:
-    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
-except ImportError:
-    pass
-try:
-    from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
-except ImportError:
-    pass
-try:
-    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
-except ImportError:
-    pass
-try:
-    from TileGeoModel.TileGMConfig import TileGMCfg
-except ImportError:
-    pass
-try:
-    from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
-except ImportError:
-    pass
 #from AtlasGeoModel.ForDetGeoModelConfig import ForDetGeometryCfg
 Configurable.configurableRun3Behavior = True
 
@@ -83,24 +55,31 @@ def TPCnvTest(infile, keys, useGeoModelSvc=False, useIOVDbSvc=False, doPixel=Fal
     EventCnvSuperTool = None
     if useGeoModelSvc:
         if ConfigFlags.Detector.GeometryPixel:
+            from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
             acc.merge(PixelGeometryCfg(ConfigFlags))
             useGeoModelSvc = True
         if ConfigFlags.Detector.GeometrySCT:
+            from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
             acc.merge(SCT_GeometryCfg(ConfigFlags))
             useGeoModelSvc = True
         if ConfigFlags.Detector.GeometryTRT:
+            from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
             acc.merge(TRT_GeometryCfg(ConfigFlags))
             useGeoModelSvc = True
         if ConfigFlags.Detector.GeometryLAr:
+            from LArGeoAlgsNV.LArGMConfig import LArGMCfg
             acc.merge(LArGMCfg(ConfigFlags))
             useGeoModelSvc = True
         if ConfigFlags.Detector.GeometryTile:
+            from TileGeoModel.TileGMConfig import TileGMCfg
             acc.merge(TileGMCfg(ConfigFlags))
             useGeoModelSvc = True
         if ConfigFlags.Detector.GeometryMuon:
+            from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
             acc.merge(MuonGeoModelCfg(ConfigFlags))
             useGeoModelSvc = True
         #acc.merge(ForDetGeometryCfg(ConfigFlags))
+        from AtlasGeoModel.GeoModelConfig import GeoModelCfg
         acc.merge(GeoModelCfg(ConfigFlags))
         acc.getService("GeoModelSvc").IgnoreTagDifference = True
         if doTracks:
-- 
GitLab


From 2904e609e744365d044903dc80438b0d46dea245 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 18 Dec 2020 17:23:06 +0100
Subject: [PATCH 128/308] EventUtils: Delete unused ParticleSortingAlg/Tool

`IJobOptionsSvc` is deprecated and this code is not used anywhere.
---
 .../EventUtils/src/ParticleSortingAlg.cxx     | 158 ---------
 .../EventUtils/src/ParticleSortingAlg.h       | 149 --------
 .../EventUtils/src/ParticleSortingTool.cxx    | 318 ------------------
 .../EventUtils/src/ParticleSortingTool.h      | 183 ----------
 .../src/components/EventUtils_entries.cxx     |   4 -
 5 files changed, 812 deletions(-)
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
 delete mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h

diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
deleted file mode 100644
index f5ad85275d7f..000000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
+++ /dev/null
@@ -1,158 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingAlg.cxx
-// Implementation file for class ParticleSortingAlg
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-
-// EventUtils includes
-#include "ParticleSortingAlg.h"
-
-// FrameWork includes
-#include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-
-///////////////////////////////////////////////////////////////////
-// Public methods:
-///////////////////////////////////////////////////////////////////
-
-// Constructors
-////////////////
-ParticleSortingAlg::ParticleSortingAlg( const std::string& name,
-                                        ISvcLocator* pSvcLocator ) :
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_jos("JobOptionsSvc", name),
-  m_tool("ParticleSortingTool/ParticleSortingTool", this),
-  m_inCollKey(""),
-  m_setInCollKey(false),
-  m_outCollKey(""),
-  m_setOutCollKey(false),
-  m_sortVar("pt"),
-  m_setSortVar(false),
-  m_sortDescending(true),
-  m_setSortDescending(false),
-  m_nEventsProcessed(0)
-{
-  declareProperty("JobOptionsSvc",   m_jos, "The JobOptionService instance.");
-
-  declareProperty("SortingTool",        m_tool, "The private ParticleSortingTool" );
-
-  declareProperty("InputContainer",  m_inCollKey="",   "Input container name" );
-  m_inCollKey.declareUpdateHandler( &ParticleSortingAlg::setupInputContainer, this );
-
-  declareProperty("OutputContainer", m_outCollKey="",
-                  "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" );
-  m_outCollKey.declareUpdateHandler( &ParticleSortingAlg::setupOutputContainer, this );
-
-  declareProperty("SortVariable",    m_sortVar="pt",
-                  "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" );
-  m_sortVar.declareUpdateHandler( &ParticleSortingAlg::setupSortVar, this );
-
-  declareProperty("SortDescending",   m_sortDescending=true,
-                  "Define if the container should be sorted in a descending order (default=true)" );
-  m_sortDescending.declareUpdateHandler( &ParticleSortingAlg::setupSortDescending, this );
-}
-
-
-
-// Destructor
-///////////////
-ParticleSortingAlg::~ParticleSortingAlg()
-{}
-
-
-
-// Athena Algorithm's Hooks
-////////////////////////////
-StatusCode ParticleSortingAlg::initialize()
-{
-  ATH_MSG_DEBUG ("Initializing " << name() << "...");
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_jos );
-  ATH_MSG_DEBUG ( " using = " << m_tool );
-  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_sortVar );
-  ATH_MSG_DEBUG ( " using = " << m_sortDescending );
-
-
-  // Initialize the counters to zero
-  m_nEventsProcessed = 0 ;
-
-
-  // Get the JobOptionService
-  // We will use this to set the properties of our private skimming tool
-  // from the properties of this algorithm.
-  ATH_MSG_VERBOSE( "Getting the JobOptionService");
-  ATH_CHECK( m_jos.retrieve() );
-
-  // Get the full name of the private skimTool
-  ATH_MSG_VERBOSE( "Getting the full name of the tool");
-  const std::string& fullToolName = this->name() + "." + m_tool.name();
-  ATH_MSG_DEBUG( "Got the full name of the tool: " << fullToolName );
-
-  // Now, set all properties of the private skimTool that were acutally configured
-  if (m_setInCollKey) {
-    ATH_MSG_DEBUG( "Setting property" << m_inCollKey
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKey) );
-  }
-  if (m_setOutCollKey) {
-    ATH_MSG_DEBUG( "Setting property" << m_outCollKey
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_outCollKey) );
-  }
-  if (m_setSortVar) {
-    ATH_MSG_DEBUG( "Setting property" << m_sortVar
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortVar) );
-  }
-  if (m_setSortDescending) {
-    ATH_MSG_DEBUG( "Setting property" << m_sortDescending
-                   << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortDescending) );
-  }
-  ATH_MSG_DEBUG( "Done setting properties of the tool");
-
-  // Get the skimming tool
-  ATH_CHECK( m_tool.retrieve() );
-
-  ATH_MSG_DEBUG ( "==> done with initialize " << name() << "..." );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode ParticleSortingAlg::finalize()
-{
-  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
-
-  // Release all tools and services
-  ATH_CHECK( m_jos.release() );
-  ATH_CHECK( m_tool.release() );
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode ParticleSortingAlg::execute()
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> execute " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-  // Call the tool
-  ATH_CHECK( m_tool->addBranches() );
-
-  return StatusCode::SUCCESS;
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
deleted file mode 100644
index 763f04c952ca..000000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
+++ /dev/null
@@ -1,149 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingAlg.h
-// Header file for class ParticleSortingAlg
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-#ifndef EVENTUTILS_PARTICLESORTINGALG_H
-#define EVENTUTILS_PARTICLESORTINGALG_H 1
-
-// FrameWork includes
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
-
-// STL includes
-#include <string>
-
-// Forward declarations
-class IJobOptionsSvc;
-namespace DerivationFramework {
-  class IAugmentationTool;
-}
-
-class ParticleSortingAlg
-  : public ::AthAlgorithm
-{
-
-  ///////////////////////////////////////////////////////////////////
-  // Public methods:
-  ///////////////////////////////////////////////////////////////////
- public:
-
-  // Copy constructor:
-
-  /// Constructor with parameters:
-  ParticleSortingAlg( const std::string& name, ISvcLocator* pSvcLocator );
-
-  /// Destructor:
-  virtual ~ParticleSortingAlg();
-
-  /// Athena algorithm's initalize hook
-  virtual StatusCode  initialize();
-
-  /// Athena algorithm's execute hook
-  virtual StatusCode  execute();
-
-  /// Athena algorithm's finalize hook
-  virtual StatusCode  finalize();
-
-
-private:
-  // The update handlers
-
-  /// This internal method will realize if a user sets the 'InputContainer' property
-  void setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'OutputContainer' property
-  void setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'SortVariable' property
-  void setupSortVar( Gaudi::Details::PropertyBase& /*prop*/ );
-
-  /// This internal method will realize if a user sets the 'SortDeceding' property
-  void setupSortDescending( Gaudi::Details::PropertyBase& /*prop*/ );
-
-
-
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
- private:
-  /// The job options service (will be used to forward this algs properties to
-  /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
-
-  /// The ToolHandle to the private ParticleSortingTool
-  ToolHandle<DerivationFramework::IAugmentationTool> m_tool;
-
-  /// Input container name
-  StringProperty m_inCollKey;
-
-  /// This boolean is true if the user sets the 'InputContainer' property
-  bool m_setInCollKey;
-
-
-  /// The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects
-  StringProperty m_outCollKey;
-
-  /// This boolean is true if the user sets the 'OutputContainer' property
-  bool m_setOutCollKey;
-
-
-  /// Define by what parameter to sort (default: 'pt')
-  StringProperty m_sortVar;
-
-  /// This boolean is true if the user sets the 'SortVariable' property
-  bool m_setSortVar;
-
-
-  /// Define if the container should be sorted in a descending order (default=true)
-  BooleanProperty m_sortDescending;
-
-  /// This boolean is true if the user sets the 'SortDescending' property
-  bool m_setSortDescending;
-
-
-  /// Internal event counter
-  unsigned long m_nEventsProcessed;
-
-};
-
-
-
-///////////////////////////////////////////////////////////////////
-// Inline methods:
-///////////////////////////////////////////////////////////////////
-
-/// This internal method will realize if a user sets the 'InputContainer' property
-inline void ParticleSortingAlg::setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setInCollKey = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'OutputContainer' property
-inline void ParticleSortingAlg::setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
-  m_setOutCollKey = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'SortVariable' property
-inline void ParticleSortingAlg::setupSortVar( Gaudi::Details::PropertyBase& /*prop*/ )
-{
-  m_setSortVar = true;
-  return;
-}
-
-/// This internal method will realize if a user sets the 'SortDeceding' property
-inline void ParticleSortingAlg::setupSortDescending( Gaudi::Details::PropertyBase& /*prop*/ )
-{
-  m_setSortDescending = true;
-  return;
-}
-
-
-#endif //> !EVENTUTILS_PARTICLESORTINGALG_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
deleted file mode 100644
index 876c7e005d22..000000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
+++ /dev/null
@@ -1,318 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingTool.cxx
-// Implementation file for class ParticleSortingTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-
-// EventUtils includes
-#include "ParticleSortingTool.h"
-
-// EDM includes
-#include "xAODBase/IParticle.h"
-#include "xAODBase/IParticleContainer.h"
-#include "xAODMuon/MuonContainer.h"
-#include "xAODJet/JetContainer.h"
-#include "xAODEgamma/ElectronContainer.h"
-#include "xAODEgamma/PhotonContainer.h"
-#include "xAODTau/TauJetContainer.h"
-#include "xAODPFlow/PFOContainer.h"
-#include "xAODTracking/NeutralParticleContainer.h"
-#include "xAODTracking/TrackParticleContainer.h"
-#include "xAODTruth/TruthParticleContainer.h"
-#include "xAODParticleEvent/CompositeParticleContainer.h"
-#include "xAODParticleEvent/ParticleContainer.h"
-#include "xAODCaloEvent/CaloClusterContainer.h"
-#include "AthContainers/ConstDataVector.h"
-
-// Constructors
-////////////////
-ParticleSortingTool::ParticleSortingTool( const std::string& type,
-                                          const std::string& name,
-                                          const IInterface* parent ) :
-  ::AthAlgTool  ( type, name, parent ),
-  m_inCollKey(""),
-  m_outCollKey(""),
-  m_sortVar("pt"),
-  m_sortDescending(true),
-  m_contID(0),
-  m_sortID(0),
-  m_nEventsProcessed(0)
-{
-  declareInterface< DerivationFramework::IAugmentationTool >(this);
-
-  declareProperty("InputContainer",  m_inCollKey="",   "Input container name" );
-
-  declareProperty("OutputContainer", m_outCollKey="",
-                  "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" );
-
-  declareProperty("SortVariable",    m_sortVar="pt",
-                  "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" );
-
-  declareProperty("SortDescending",   m_sortDescending=true,
-                  "Define if the container should be sorted in a descending order (default=true)" );
-}
-
-
-// Destructor
-///////////////
-ParticleSortingTool::~ParticleSortingTool()
-{}
-
-
-
-// Athena algtool's Hooks
-////////////////////////////
-StatusCode ParticleSortingTool::initialize()
-{
-  ATH_MSG_DEBUG ("Initializing " << name() << "...");
-
-  // Print out the used configuration
-  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
-  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
-
-  // initialize the counters
-  m_contID           = 0;
-  m_sortID           = 0;
-  m_nEventsProcessed = 0;
-
-  // Figure out how to sort
-  if ( m_sortVar.value() == "pt" )            { m_sortID = 1; }
-  else if ( m_sortVar.value() == "eta" )      { m_sortID = 2; }
-  else if ( m_sortVar.value() == "phi" )      { m_sortID = 3; }
-  else if ( m_sortVar.value() == "m" )        { m_sortID = 4; }
-  else if ( m_sortVar.value() == "e" )        { m_sortID = 5; }
-  else if ( m_sortVar.value() == "rapidity" ) { m_sortID = 6; }
-  else {
-    ATH_MSG_INFO("Didn't find a valid value for SortVariable=" << m_sortVar.value() << "."
-                 << " Assuming it's an auxdata member");
-    m_sortID = 7;
-  }
-  if ( m_sortDescending.value() ) { m_sortID *= -1; }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-StatusCode ParticleSortingTool::finalize()
-{
-  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-// Declare a short pre-processor macro to deal with the different container types
-#define COPY_AND_SORT_CONTAINER( CONTAINERTYPE )                                       \
-else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) {               \
-  ATH_MSG_DEBUG("Trying to copy, sort, and record container of type "#CONTAINERTYPE ); \
-  const CONTAINERTYPE* inCont;                                                         \
-  ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) );                    \
-  CONTAINERTYPE* outCont = new CONTAINERTYPE( SG::VIEW_ELEMENTS );                     \
-  *outCont = *inCont;                                                                  \
-  ATH_CHECK( evtStore()->record ( outCont, m_outCollKey.value() ) );                   \
-  ATH_CHECK( this->doSort(outCont) );                                                  \
-}
-
-
-// Declare a short pre-processor macro to deal with the different container types
-#define OVERWRITE_AND_SORT_CONTAINER( CONTAINERTYPE )                                                \
-else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) {                             \
-  ATH_MSG_DEBUG("Trying to copy, sort, and overwrite container of type "#CONTAINERTYPE );            \
-  const CONTAINERTYPE* inCont;                                                                       \
-  ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) );                                  \
-  ConstDataVector<CONTAINERTYPE>* outCont = new ConstDataVector<CONTAINERTYPE>( SG::VIEW_ELEMENTS ); \
-  for ( const CONTAINERTYPE::base_value_type* inPart : *inCont ){                                    \
-    outCont->push_back(inPart);                                                                      \
-  }                                                                                                  \
-  ATH_CHECK( evtStore()->overwrite( outCont, m_inCollKey.value() ) );                                \
-  ATH_CHECK( this->doSortConst<CONTAINERTYPE>(outCont) );                                            \
-}
-
-
-
-StatusCode ParticleSortingTool::addBranches() const
-{
-  // Increase the event counter
-  ++m_nEventsProcessed;
-
-  // Simple status message at the beginning of each event execute,
-  ATH_MSG_DEBUG ( "==> addBranches " << name() << " on " << m_nEventsProcessed << ". event..." );
-
-  if ( m_outCollKey.value().empty() ) {
-    // Try to get the input container as non-const
-    ATH_MSG_DEBUG("Got an empty 'OutputCollection' property. "
-                  << "Trying to retrieve a non-const version of the 'InputContainer'...");
-    xAOD::IParticleContainer* inCont = evtStore()->tryRetrieve<xAOD::IParticleContainer>( m_inCollKey.value() );
-    if (inCont){ ATH_CHECK( this->doSort(inCont) ); }
-    else {
-      ATH_MSG_DEBUG("We couldn't retrieve a non-const version of the input container... try const.");
-      const xAOD::IParticleContainer* inCont2 = nullptr;
-      ATH_CHECK( evtStore()->retrieve( inCont2, m_inCollKey.value()) );
-      // Now, do the copy and sorting and overwriting of all known container types
-      if (false) {
-      }
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::MuonContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::ElectronContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::PhotonContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::TauJetContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::JetContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::PFOContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::NeutralParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::TrackParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::TruthParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::CompositeParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::ParticleContainer)
-      OVERWRITE_AND_SORT_CONTAINER(xAOD::CaloClusterContainer)
-      else {
-        ATH_MSG_ERROR("Couln't find the provided intput container in store gate for later overwriting");
-        return StatusCode::FAILURE;
-      }
-    }
-  }
-  else {
-    ATH_MSG_DEBUG("Got a non-empty 'OutputCollection' property. "
-                  << "Trying to retrieve a const version of the 'InputContainer'...");
-
-    // Now, do the copy and sorting of all known container types
-    if (false) {
-    }
-    COPY_AND_SORT_CONTAINER(xAOD::MuonContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::ElectronContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::PhotonContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::TauJetContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::JetContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::PFOContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::NeutralParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::TrackParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::TruthParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::CompositeParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::ParticleContainer)
-    COPY_AND_SORT_CONTAINER(xAOD::CaloClusterContainer)
-    else {
-      ATH_MSG_ERROR("Couln't find the provided intput container in store gate");
-      return StatusCode::FAILURE;
-    }
-
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-StatusCode ParticleSortingTool::doSort( xAOD::IParticleContainer* cont ) const
-{
-  if ( !cont ) {
-    ATH_MSG_ERROR("No container to be sorted");
-    return StatusCode::FAILURE;
-  }
-  // Actually do the sorting, using a C++11 lambda function construct
-  // to be able to use the member function here
-  if ( std::abs(m_sortID) == 1 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePt(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 2 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEta(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 3 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePhi(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 4 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareMass(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 5 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEnergy(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 6 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareRapidity(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 7 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareAuxData(a,b);
-                } );
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-bool ParticleSortingTool::comparePt( const xAOD::IParticle* partA,
-                                     const xAOD::IParticle* partB ) const
-{
-  const double a = partA->pt();
-  const double b = partB->pt();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareEta( const xAOD::IParticle* partA,
-                                      const xAOD::IParticle* partB ) const
-{
-  const double a = partA->eta();
-  const double b = partB->eta();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::comparePhi( const xAOD::IParticle* partA,
-                                      const xAOD::IParticle* partB ) const
-{
-  const double a = partA->phi();
-  const double b = partB->phi();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareMass( const xAOD::IParticle* partA,
-                                       const xAOD::IParticle* partB ) const
-{
-  const double a = partA->m();
-  const double b = partB->m();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareEnergy( const xAOD::IParticle* partA,
-                                         const xAOD::IParticle* partB ) const
-{
-  const double a = partA->e();
-  const double b = partB->e();
-  return this->compareDouble(a,b);
-}
-
-
-bool ParticleSortingTool::compareRapidity( const xAOD::IParticle* partA,
-                                           const xAOD::IParticle* partB ) const
-{
-  const double a = partA->rapidity();
-  const double b = partB->rapidity();
-  return this->compareDouble(a,b);
-}
-
-bool ParticleSortingTool::compareAuxData( const xAOD::IParticle* partA,
-                                       const xAOD::IParticle* partB ) const
-{
-  const double a = partA->auxdata<float>( this->m_sortVar.value() );
-  const double b = partB->auxdata<float>( this->m_sortVar.value() );
-  return this->compareDouble(a,b);
-}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h
deleted file mode 100644
index dc097711cfb2..000000000000
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h
+++ /dev/null
@@ -1,183 +0,0 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-// ParticleSortingTool.h
-// Header file for class ParticleSortingTool
-// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
-///////////////////////////////////////////////////////////////////
-#ifndef EVENTUTILS_PARTICLESORTINGTOOL_H
-#define EVENTUTILS_PARTICLESORTINGTOOL_H 1
-
-// FrameWork includes
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
-#include "CxxUtils/fpcompare.h"
-
-// EDM inlcudes
-#include "xAODBase/IParticle.h"
-#include "xAODBase/IParticleContainer.h"
-#include "AthContainers/ConstDataVector.h"
-
-// STL includes
-#include <vector>
-#include <string>
-#include <cmath>
-
-class ParticleSortingTool
-  : virtual public ::DerivationFramework::IAugmentationTool,
-            public ::AthAlgTool
-{
-
-  ///////////////////////////////////////////////////////////////////
-  // Public methods:
-  ///////////////////////////////////////////////////////////////////
-public:
-
-  // Copy constructor:
-
-  /// Constructor with parameters:
-  ParticleSortingTool( const std::string& type,
-                       const std::string& name,
-                       const IInterface* parent );
-
-  /// Destructor:
-  virtual ~ParticleSortingTool();
-
-  /// Athena algtool's initialize
-  virtual StatusCode  initialize() override;
-
-  /// Athena algtool's finalize
-  virtual StatusCode  finalize() override;
-
-
-  /// Implement the method from the ISkimmingTool interface
-  virtual StatusCode addBranches() const final override;
-
-
-
-// Private methods
-private:
-
-  /// Helper method that implements the call to the right sort function
-  StatusCode doSort( xAOD::IParticleContainer* cont ) const;
-
-  /// Helper method to sort a ConstDataVector
-  template<class CONTAINERTYPE>
-  StatusCode doSortConst( ConstDataVector<CONTAINERTYPE>* cont ) const;
-
-  /// The method to compare the particle's pt
-  bool comparePt( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's eta
-  bool compareEta( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's phi
-  bool comparePhi( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's mass
-  bool compareMass( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's energy
-  bool compareEnergy( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare the particle's rapidity
-  bool compareRapidity( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// The method to compare an auxdata member of the particle
-  bool compareAuxData( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
-
-  /// Method to compare two doubles
-  inline bool compareDouble( double a, double b ) const;
-
-
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
-private:
-
-  /// Input container name
-  StringProperty m_inCollKey;
-
-  /// The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects
-  StringProperty m_outCollKey;
-
-  /// Define by what parameter to sort (default: 'pt')
-  StringProperty m_sortVar;
-
-  /// Define if the container should be sorted in a descending order (default=true)
-  BooleanProperty m_sortDescending;
-
-
-  /// Internal container type identifier
-  mutable unsigned int m_contID;
-
-  /// Internal identifier for the type of sorting
-  mutable int m_sortID;
-
-  /// Internal event counter
-  mutable unsigned long m_nEventsProcessed;
-
-};
-
-
-inline bool ParticleSortingTool::compareDouble( double a, double b ) const
-{
-  if ( m_sortID < 0 ) { return CxxUtils::fpcompare::greater(a,b); }
-  else { return CxxUtils::fpcompare::less(a,b); }
-}
-
-
-template<class CONTAINERTYPE>
-StatusCode ParticleSortingTool::doSortConst( ConstDataVector<CONTAINERTYPE>* cont ) const
-{
-  if ( !cont ) {
-    ATH_MSG_ERROR("No ConstDataVector to be sorted");
-    return StatusCode::FAILURE;
-  }
-  // Actually do the sorting, using a C++11 lambda function construct
-  // to be able to use the member function here
-  if ( std::abs(m_sortID) == 1 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePt(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 2 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEta(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 3 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->comparePhi(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 4 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareMass(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 5 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareEnergy(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 6 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareRapidity(a,b);
-                } );
-  }
-  else if ( std::abs(m_sortID) == 7 ) {
-    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
-                  return this->compareAuxData(a,b);
-                } );
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-
-
-#endif //> !EVENTUTILS_PARTICLESORTINGTOOL_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
index 1f217ab44bc0..557082712e44 100644
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
@@ -1,5 +1,3 @@
-#include "../ParticleSortingTool.h"
-#include "../ParticleSortingAlg.h"
 #include "../CutTool.h"
 #include "../CutAlg.h"
 #include "../ParticleSelectionTool.h"
@@ -9,8 +7,6 @@
 #include "../TriggerSelectionAlg.h"
 #include "../EventDecisionAlg.h"
 
-DECLARE_COMPONENT( ParticleSortingTool )
-DECLARE_COMPONENT( ParticleSortingAlg )
 DECLARE_COMPONENT( CutTool )
 DECLARE_COMPONENT( CutAlg )
 DECLARE_COMPONENT( ParticleSelectionTool )
-- 
GitLab


From df502c0e325c788b090ee86444947deddd8f0d33 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 18 Dec 2020 16:46:31 +0000
Subject: [PATCH 129/308] Revert "Merge branch
 'DistanceSolution_default_move_inline_to_icc' into 'master'"

This reverts merge request !39259
---
 .../TrkSurfaces/DistanceSolution.h            | 86 ++++++++++++++-----
 .../TrkSurfaces/DistanceSolution.icc          | 69 ---------------
 .../TrkSurfaces/src/DistanceSolution.cxx      | 28 ++++++
 3 files changed, 92 insertions(+), 91 deletions(-)
 delete mode 100644 Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
 create mode 100644 Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx

diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
index d38c5f9e7714..60ee6ea87fed 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
+++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
@@ -9,7 +9,9 @@
 #ifndef TRKSURFACES_DISTANCESOLUTION_H
 #define TRKSURFACES_DISTANCESOLUTION_H
 
-#include <cmath>
+// STD
+#include <iostream>
+#include <math.h>
 
 namespace Trk {
 
@@ -24,19 +26,14 @@ namespace Trk {
 class DistanceSolution
 {
 public:
-  DistanceSolution() = default;
-  DistanceSolution(const DistanceSolution&) = default;
-  DistanceSolution(DistanceSolution&&) = default;
-  DistanceSolution& operator=(const DistanceSolution&) = default;
-  DistanceSolution& operator=(DistanceSolution&&) = default;
-  ~DistanceSolution() = default;
-
-   /**Constructor*/
-  DistanceSolution(int num,
-                   double current = 0.,
-                   bool signedDist = false,
-                   double first = 0.,
-                   double second = 0.);
+  /**Default Constructor*/
+  DistanceSolution();
+
+  /**Constructor*/
+  DistanceSolution(int num, double current = 0., bool signedDist = false, double first = 0., double second = 0.);
+
+  /**Destructor*/
+  virtual ~DistanceSolution() = default;
 
   // methods to access solutions
   /** Number of intersection solutions*/
@@ -45,8 +42,7 @@ public:
   /** Distance to first intersection solution along direction*/
   double first() const;
 
-  /** Distance to second intersection solution along direction (for a cylinder
-   * surface)*/
+  /** Distance to second intersection solution along direction (for a cylinder surface)*/
   double second() const;
 
   /** Absolute Distance to closest solution */
@@ -55,15 +51,14 @@ public:
   /** Distance to point of closest approach along direction*/
   double toPointOfClosestApproach() const;
 
-  /** Current distance to surface (spatial), signed (along/opposite to surface
-   * normal) if input argument true (absolute value by default)*/
+  /** Current distance to surface (spatial), signed (along/opposite to surface normal) if input argument true (absolute
+   * value by default)*/
   double currentDistance(bool signedDist = false) const;
 
-  /** This method indicates availability of signed current distance (false for
-   * Perigee and StraighLineSurface) */
+  /** This method indicates availability of signed current distance (false for Perigee and StraighLineSurface) */
   bool signedDistance() const;
 
-private:
+protected:
   int m_num;
   double m_first;
   double m_second;
@@ -71,7 +66,54 @@ private:
   bool m_signedDist;
 };
 
+inline int
+DistanceSolution::numberOfSolutions() const
+{
+  return m_num;
+}
+
+inline double
+DistanceSolution::first() const
+{
+  return m_first;
+}
+
+inline double
+DistanceSolution::second() const
+{
+  return m_second;
+}
+
+inline double
+DistanceSolution::absClosest() const
+{
+  if (m_num > 1)
+    return (m_first * m_first < m_second * m_second) ? fabs(m_first) : fabs(m_second);
+  else
+    return fabs(m_first);
+}
+
+inline double
+DistanceSolution::toPointOfClosestApproach() const
+{
+  return m_first;
+}
+
+inline double
+DistanceSolution::currentDistance(bool signedDist) const
+{
+  if (signedDist)
+    return m_current;
+  else
+    return fabs(m_current);
+}
+
+inline bool
+DistanceSolution::signedDistance() const
+{
+  return m_signedDist;
+}
+
 } // end of namespace
 
-#include "TrkSurfaces/DistanceSolution.icc"
 #endif // TRKSURFACES_DISTANCESOLUTION_H
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
deleted file mode 100644
index 15ef7e32d23a..000000000000
--- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-namespace Trk {
-inline DistanceSolution::DistanceSolution(int num,
-                                          double current,
-                                          bool signedDist,
-                                          double first,
-                                          double second)
-  : m_num(num)
-  , m_first(first)
-  , m_second(second)
-  , m_current(current)
-  , m_signedDist(signedDist)
-{}
-
-inline int
-DistanceSolution::numberOfSolutions() const
-{
-  return m_num;
-}
-
-inline double
-DistanceSolution::first() const
-{
-  return m_first;
-}
-
-inline double
-DistanceSolution::second() const
-{
-  return m_second;
-}
-
-inline double
-DistanceSolution::absClosest() const
-{
-  if (m_num > 1) {
-    return (m_first * m_first < m_second * m_second) ? std::abs(m_first)
-                                                     : std::abs(m_second);
-  } else {
-    return std::abs(m_first);
-  }
-}
-
-inline double
-DistanceSolution::toPointOfClosestApproach() const
-{
-  return m_first;
-}
-
-inline double
-DistanceSolution::currentDistance(bool signedDist) const
-{
-  if (signedDist) {
-    return m_current;
-  } else {
-    return std::abs(m_current);
-  }
-}
-
-inline bool
-DistanceSolution::signedDistance() const
-{
-  return m_signedDist;
-}
-
-} // end of namespace
-
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx
new file mode 100644
index 000000000000..a7d7a4cdf548
--- /dev/null
+++ b/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx
@@ -0,0 +1,28 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+// DistanceSolution.cxx, (c) ATLAS Detector Software
+///////////////////////////////////////////////////////////////////
+
+// Trk
+#include "TrkSurfaces/DistanceSolution.h"
+
+// default constructor
+Trk::DistanceSolution::DistanceSolution()
+  : m_num()
+  , m_first()
+  , m_second()
+  , m_current()
+  , m_signedDist()
+{}
+
+// constructor
+Trk::DistanceSolution::DistanceSolution(int num, double current, bool signedDist, double first, double second)
+  : m_num(num)
+  , m_first(first)
+  , m_second(second)
+  , m_current(current)
+  , m_signedDist(signedDist)
+{}
-- 
GitLab


From 04b942dd03eb858647181bf922e8c1412e39895d Mon Sep 17 00:00:00 2001
From: Tim Adye <Tim.Adye@cern.ch>
Date: Fri, 18 Dec 2020 16:52:53 +0000
Subject: [PATCH 130/308] remove old ART tests (except for all_ttbar_pu40_old)

---
 .../TrigInDetValidation/CMakeLists.txt        |   2 +-
 .../test/test_trigID_all_ttbar_pu80_old.py    | 127 -----------------
 .../test_trigID_all_ttbar_pu80_short_old.py   | 127 -----------------
 .../test/test_trigID_all_ttbar_pu80_st_old.py | 128 ------------------
 .../test/test_trigID_bjet_nopps_pu40_old.py   |  45 ------
 .../test/test_trigID_bjet_pu40_old.py         |  40 ------
 .../test/test_trigID_el_jpsiee_pu40_old.py    | 125 -----------------
 ...test_trigID_el_singlee_7-80_larged0_old.py | 125 -----------------
 ...t_trigID_el_singlee_7-80_larged0_pu_old.py | 125 -----------------
 .../test/test_trigID_el_singlee_7-80_old.py   | 125 -----------------
 .../test_trigID_el_singlee_7-80_pu40_old.py   | 125 -----------------
 .../test/test_trigID_el_zee_pu40_old.py       | 125 -----------------
 .../test/test_trigID_el_zee_pu40_short_old.py | 125 -----------------
 .../test/test_trigID_el_zee_pu40_st_old.py    | 125 -----------------
 .../test/test_trigID_fsjet_ml_pu40_old.py     |  45 ------
 .../test/test_trigID_fsjet_pu40_old.py        |  43 ------
 .../test/test_trigID_fsjet_pu40_st_old.py     |  43 ------
 .../test/test_trigID_minbias_old.py           |  44 ------
 .../test/test_trigID_mu_bphys_old.py          | 118 ----------------
 .../test_trigID_mu_singlemu_larged0_old.py    | 125 -----------------
 .../test_trigID_mu_singlemu_larged0_pu_old.py | 125 -----------------
 .../test_trigID_mu_zmumu_pu40_build_old.py    |  70 ----------
 .../test/test_trigID_mu_zmumu_pu40_old.py     |  46 -------
 .../test_trigID_mu_zmumu_pu40_short_old.py    |  46 -------
 .../test/test_trigID_mu_zmumu_pu40_st_old.py  |  46 -------
 .../test/test_trigID_tau_ztautau_pu46_old.py  |  94 -------------
 .../test_trigID_tau_ztautau_pu46_st_old.py    |  94 -------------
 27 files changed, 1 insertion(+), 2407 deletions(-)
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py
 delete mode 100755 Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py

diff --git a/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt b/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt
index 5fa71b2c2ec4..bb8602ea3856 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigInDetValidation/CMakeLists.txt
@@ -17,5 +17,5 @@ atlas_install_scripts( scripts/TIDA*.py test/test*.py POST_BUILD_CMD ${ATLAS_FLA
 # Unit test for python test scripts:
 atlas_add_test( TrigValSteeringUT
                 SCRIPT trigvalsteering-unit-tester.py ${CMAKE_CURRENT_SOURCE_DIR}/test
-                PROPERTIES TIMEOUT 1200
+                PROPERTIES TIMEOUT 600
                 POST_EXEC_SCRIPT nopost.sh )
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py
deleted file mode 100755
index 63ce3daf22f0..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_old.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for all_ttbar_pu80
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon','electron','tau','bjet']
-rdo2aod.max_events = 4000 
-rdo2aod.threads = 8 
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-comp.test='ttbar'
-test.check_steps.append(comp)
- 
- 
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-comp2.test='ttbar'
-test.check_steps.append(comp2)
-
-
-comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
-comp3.test='ttbar'
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
-comp4.test='ttbar'
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
-comp5.test='ttbar'
-test.check_steps.append(comp5)
-
-comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
-comp6.test='ttbar'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
-comp7.test='ttbar'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
-comp8.test='ttbar'
-test.check_steps.append(comp8)
-
-comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
-comp9.test='ttbar'
-test.check_steps.append(comp9)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py
deleted file mode 100755
index 83941ab6bf6a..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short_old.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for all_ttbar_pu80_short
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon','electron','tau','bjet']
-rdo2aod.max_events = 1000 
-rdo2aod.threads = 8 
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-comp.test='ttbar'
-test.check_steps.append(comp)
- 
- 
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-comp2.test='ttbar'
-test.check_steps.append(comp2)
-
-
-comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
-comp3.test='ttbar'
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
-comp4.test='ttbar'
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
-comp5.test='ttbar'
-test.check_steps.append(comp5)
-
-comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
-comp6.test='ttbar'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
-comp7.test='ttbar'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
-comp8.test='ttbar'
-test.check_steps.append(comp8)
-
-comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
-comp9.test='ttbar'
-test.check_steps.append(comp9)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py
deleted file mode 100755
index 357cde750984..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st_old.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for all_ttbar_pu80_st
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon','electron','tau','bjet']
-rdo2aod.max_events = 1000 
-rdo2aod.threads = 1 
-rdo2aod.concurrent_events = 1 
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-offline.dat -r Offline -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-comp.test='ttbar'
-test.check_steps.append(comp)
- 
- 
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-comp2.test='ttbar'
-test.check_steps.append(comp2)
-
-
-comp3=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
-comp3.test='ttbar'
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
-comp4.test='ttbar'
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2tau','L2','tau')
-comp5.test='ttbar'
-test.check_steps.append(comp5)
-
-comp6=TrigInDetCompStep('Comp_EFtau','EF','tau')
-comp6.test='ttbar'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2ele','L2','electron')
-comp7.test='ttbar'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFele','EF','electron')
-comp8.test='ttbar'
-test.check_steps.append(comp8)
-
-comp9=TrigInDetCompStep('Comp_L2FS','L2','FS')
-comp9.test='ttbar'
-test.check_steps.append(comp9)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py
deleted file mode 100755
index f014eae0bec7..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_nopps_pu40_old.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for bjet_pu40_mt
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-import os
-os.system("echo 'ftf = findAlgorithm(topSequence, \"TrigFastTrackFinder__jet\")' > dopps.py")
-os.system("echo 'ftf.TripletDoPPS=False' >> dopps.py")
-
-Slices = ['bjet']
-RunEF   = True
-Events  = 4000
-Threads = 8 
-Slots   = 8
-postinclude_file = 'dopps.py'
-Input = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
-
-TrackReference = [ 'Truth', 'Offline' ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py
deleted file mode 100755
index 3aa3e95ad34f..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_bjet_pu40_old.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for bjet_pu40_mt
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-Slices = ['bjet']
-RunEF   = True
-Events  = 4000
-Threads = 8 
-Slots   = 8
-Input = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
-
-TrackReference = [ 'Truth', 'Offline' ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py
deleted file mode 100755
index 3995c8d3cec0..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_jpsiee_pu40_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_Jpsiee_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.129190.Pythia8_AU2CTEQ6L1_ppToJpsie3e3.recon.RDO.e3802_s2608_s2183_r7042
-# art-input-nfiles: 16
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Jpsiee_pu40'     # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py
deleted file mode 100755
index 976ed85fa7dc..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_singlee_7-80_larged0
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.159053.ParticleGenerator_e_Et7to80_vertxy20.recon.RDO.e3603_s2726_r7728
-# art-input-nfiles: 10
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-larged0-el.dat -f data-hists.root -p 11 -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline-larged0-el.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py
deleted file mode 100755
index ed1cd1d3eb80..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_larged0_pu_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_singlee_7-80_larged0_pu
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.159053.ParticleGenerator_e_Et7to80_vertxy20.recon.RDO.e3603_s2726_r7772
-# art-input-nfiles: 10
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-larged0-el.dat -f data-hists.root -p 11 -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline-larged0-el.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py
deleted file mode 100755
index 50bf73e3b531..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_singlee_7-80
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.159010.ParticleGenerator_e_Et7to80.recon.RDO.e1948_s2726_r7728
-# art-input-nfiles: 10
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el'     # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py
deleted file mode 100755
index f9da6ad43467..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_singlee_7-80_pu40_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_singlee_7-80_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.159010.ParticleGenerator_e_Et7to80.recon.RDO.e1948_s2726_r7728
-# art-input-nfiles: 10
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_el_pu'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py
deleted file mode 100755
index 82997b99273f..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_zee_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.RDO.e3601_s2665_s2183_r7191
-# art-input-nfiles: 8
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 16000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py
deleted file mode 100755
index b7b997ecba6e..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_short_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_zee_pu40_short
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.RDO.e3601_s2665_s2183_r7191
-# art-input-nfiles: 8
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py
deleted file mode 100755
index 23ec19ec16f2..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for el_zee_pu40_st
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.RDO.e3601_s2665_s2183_r7191
-# art-input-nfiles: 8
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['electron']
-rdo2aod.max_events = 8000 
-rdo2aod.threads = 1 # TODO: change to 4
-rdo2aod.concurrent_events = 1 # TODO: change to 4
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Zee_pu40'      # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2ele','L2','electron')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFele','EF','electron')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2eleLowpt','L2','electron',lowpt=True)
-test.check_steps.append(comp3)
-
-comp4=TrigInDetCompStep('Comp_EFeleLowpt','EF','electron',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2ele_off','L2','electron')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFele_off','EF','electron')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2eleLowpt_off','L2','electron',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-
-comp8=TrigInDetCompStep('Comp_EFeleLowpt_off','EF','electron',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py
deleted file mode 100755
index c7d0df17463a..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_ml_pu40_old.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for fsjet_ml_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['fsjet']
-RunEF   = False
-Events  = 2000 
-Threads = 1 
-Slots   = 1 # what about the mt: 4 art directive ? nfiles: 3 ?
-Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
-
-postinclude_file = 'TIDAml_extensions.py'
-
-TrackReference = [ 'Truth', 'Offline' ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py
deleted file mode 100755
index 706271f7e055..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_old.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for fsjet_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['fsjet']
-RunEF   = False
-Events  = 2000 
-Threads = 8 
-Slots   = 8
-Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
-
-TrackReference = [ 'Truth', 'Offline' ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py
deleted file mode 100755
index eaac4d29a2ba..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_fsjet_pu40_st_old.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for fsjet_pu40_st
-# art-type: grid
-# art-include: master/Athena
-# art-input-nfiles: 3
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['fsjet']
-RunEF   = False
-Events  = 2000 
-Threads = 1 
-Slots   = 1 # what about the mt: 4 art directive ? nfiles: 3 ?
-Input   = 'ttbar'    # defined in TrigValTools/share/TrigValInputs.json  
-
-TrackReference = [ 'Truth', 'Offline' ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py
deleted file mode 100755
index ed5c049f98d0..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_minbias_old.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-
-
-# art-description: art job for minbias
-# art-type: grid
-# art-include: master/Athena
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-athena-nfiles: 4
-# art-athena-mt: 8
-# art-memory: 4096
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['minbias']
-RunEF   = False
-Events  = 8000 
-Threads = 8 
-Slots   = 8
-Input   = 'minbias'    # defined in TrigValTools/share/TrigValInputs.json  
-
-TrackReference = [ 'Truth', 'Offline' ]
-
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py
deleted file mode 100755
index 81e88a51941f..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_bphys_old.py
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_bphys
-# art-type: grid
-# art-include: master/Athena
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 6000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'Bphys_JpsiPhi'    # defined in TrigValTools/share/TrigValInputs.json  
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
-test.check_steps.append(comp3)
-  
-comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-  
-comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py
deleted file mode 100755
index ae3122782018..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_singlemu_larged0_pu
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7772
-# art-input-nfiles: 10
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_mu_larged0_pu'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-larged0.dat -f data-hists.root -p 13 -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline-larged0.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
-test.check_steps.append(comp3)
-  
-comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-  
-comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py
deleted file mode 100755
index a3cc45d3f8fd..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_singlemu_larged0_pu_old.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_singlemu_larged0_pu
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.107237.ParticleGenerator_mu_Pt4to100_vertxy20.recon.RDO.e3603_s2726_r7728
-# art-input-nfiles: 10
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 20000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-if local:
-    rdo2aod.input = 'Single_mu_larged0'    # defined in TrigValTools/share/TrigValInputs.json  
-else:
-    rdo2aod.input = ''
-    rdo2aod.args += '--inputRDOFile=$ArtInFile '
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3-larged0.dat -f data-hists.root -p 13 -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict)
-    rdict2 = TrigInDetdictStep('TrigInDetDict2')
-    rdict2.args='TIDAdata-run3-offline-larged0.dat -r Offline  -f data-hists-offline.root -b Test_bin_larged0.dat '
-    test.check_steps.append(rdict2)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2muon','L2','muon')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFmuon','EF','muon')
-test.check_steps.append(comp2)
-
-comp3=TrigInDetCompStep('Comp_L2muonLowpt','L2','muon',lowpt=True)
-test.check_steps.append(comp3)
-  
-comp4=TrigInDetCompStep('Comp_EFmuonLowpt','EF','muon',lowpt=True)
-test.check_steps.append(comp4)
-
-comp5=TrigInDetCompStep('Comp_L2muon_off','L2','muon')
-comp5.type = 'offline'
-test.check_steps.append(comp5)
-  
-comp6=TrigInDetCompStep('Comp_EFmuon_off','EF','muon')
-comp6.type = 'offline'
-test.check_steps.append(comp6)
-
-comp7=TrigInDetCompStep('Comp_L2muonLowpt_off','L2','muon',lowpt=True)
-comp7.type = 'offline'
-test.check_steps.append(comp7)
-  
-comp8=TrigInDetCompStep('Comp_EFmuonLowpt_off','EF','muon',lowpt=True)
-comp8.type = 'offline'
-test.check_steps.append(comp8)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py
deleted file mode 100755
index be5e11daf870..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_build_old.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_Zmumu_pu40_build
-# art-type: build
-# art-include: master/Athena
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print ("-x             don't run athena or post post-processing, only plotting")
-    print ("-p             run post-processing, even if -x is set")
-
-
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-        
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['muon']
-rdo2aod.max_events = 100 # TODO: 2000 events
-rdo2aod.threads = 1 # TODO: change to 4
-rdo2aod.concurrent_events = 1 # TODO: change to 4
-rdo2aod.perfmon = False
-rdo2aod.input = 'Zmumu_pu40'   # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'build'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -p 13 -b Test_bin.dat '
-    test.check_steps.append(rdict)
- 
-
-# Now the comparitor steps
-comp=TrigInDetCompStep( 'Comp_L2muon', 'L2', 'muon' )
-comp.flag = 'L2muon'
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep( 'Comp_EFmuon', 'EF', 'muon' )
-comp2.flag = 'EFmuon'
-test.check_steps.append(comp2)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py
deleted file mode 100755
index 39175be7de87..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_old.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_Zmumu_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
-# art-input-nfiles: 4
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['muon']
-RunEF   = True
-Events  = 8000 
-Threads = 8 
-Slots   = 8
-Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
-GridFiles=True
-
-Args = " -p 13 "
-TrackReference = [ 'Truth', 'Offline' ]
-Lowpt          = [ False, True ] 
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py
deleted file mode 100755
index 73924c0f5e9a..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_short_old.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_Zmumu_pu40
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
-# art-input-nfiles: 4
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['muon']
-RunEF   = True
-Events  = 2000 
-Threads = 8 
-Slots   = 8
-Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
-GridFiles=True
-
-Args = " -p 13 "
-TrackReference = [ 'Truth', 'Offline' ]
-Lowpt          = [ False, True ] 
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py
deleted file mode 100755
index 146fda5462f1..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_mu_zmumu_pu40_st_old.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_Zmumu_pu40_st
-# art-type: grid
-# art-include: master/Athena
-# art-input: mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.RDO.e3601_s2576_s2132_r7143
-# art-input-nfiles: 4
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-Slices  = ['muon']
-RunEF   = True
-Events  = 2000 
-Threads = 1 
-Slots   = 1
-Input   = 'Zmumu_pu40'    # defined in TrigValTools/share/TrigValInputs.json
-GridFiles=True
-
-Args = " -p 13 "
-TrackReference = [ 'Truth', 'Offline' ]
-Lowpt          = [ False, True ] 
-
-from AthenaCommon.Include import include 
-include("TrigInDetValidation/TrigInDetValidation_OldBase.py")
-
-
- 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py
deleted file mode 100755
index b96643db6aef..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_old.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_ztautau_pu46
-# art-type: grid
-# art-include: master/Athena
-# art-athena-mt: 8
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['tau']
-rdo2aod.max_events = 6000 
-rdo2aod.threads = 8
-rdo2aod.concurrent_events = 8
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2tau','L2','tau')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFtau','EF','tau')
-test.check_steps.append(comp2)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py
deleted file mode 100755
index 2eed16f43211..000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st_old.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-
-# art-description: art job for mu_ztautau_pu46_st
-# art-type: grid
-# art-include: master/Athena
-# art-athena-mt: 4
-# art-memory: 4096
-# art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
-# art-output: *.txt
-# art-output: *.log
-# art-output: log.*
-# art-output: *.out
-# art-output: *.err
-# art-output: *.log.tar.gz
-# art-output: *.new
-# art-output: *.json
-# art-output: *.root
-# art-output: *.check*
-# art-output: HLT*
-# art-output: times*
-# art-output: cost-perCall
-# art-output: cost-perEvent
-# art-output: cost-perCall-chain
-# art-output: cost-perEvent-chain
-# art-output: *.dat 
-
-
-from TrigValTools.TrigValSteering import Test, CheckSteps
-from TrigInDetValidation.TrigInDetOldArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
-
-import sys,getopt
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
-except getopt.GetoptError:
-    print("Usage:  ")
-    print("-l(--local)    run locally with input file from art eos grid-input")
-    print("-x             don't run athena or post post-processing, only plotting")
-    print("-p             run post-processing, even if -x is set")
-
-
-local=False
-exclude=False
-postproc=False
-for opt,arg in opts:
-    if opt in ("-l", "--local"):
-        local=True
-    if opt=="-x":
-        exclude=True
-    if opt=="-p":
-        postproc=True
-
-
-rdo2aod = TrigInDetReco()
-rdo2aod.slices = ['tau']
-rdo2aod.max_events = 6000 
-rdo2aod.threads = 1
-rdo2aod.concurrent_events = 1
-rdo2aod.perfmon = False
-rdo2aod.timeout = 18*3600
-rdo2aod.input = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
-
-
-test = Test.Test()
-test.art_type = 'grid'
-if (not exclude):
-    test.exec_steps = [rdo2aod]
-    test.exec_steps.append(TrigInDetAna()) # Run analysis to produce TrkNtuple
-    test.check_steps = CheckSteps.default_check_steps(test)
-
- 
-# Run Tidardict
-if ((not exclude) or postproc ):
-    rdict = TrigInDetdictStep()
-    rdict.args='TIDAdata-run3.dat -f data-hists.root -b Test_bin.dat '
-    test.check_steps.append(rdict)
-
- 
-# Now the comparitor steps
-comp=TrigInDetCompStep('Comp_L2tau','L2','tau')
-test.check_steps.append(comp)
-  
-comp2=TrigInDetCompStep('Comp_EFtau','EF','tau')
-test.check_steps.append(comp2)
-
-# CPU cost steps
-cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
-test.check_steps.append(cpucost)
-
-cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
-test.check_steps.append(cpucost2)
-
-import sys
-sys.exit(test.run())
-- 
GitLab


From e276dc1b82fb8af7f8ba2728a605bf1446fb7090 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Fri, 18 Dec 2020 18:55:18 +0100
Subject: [PATCH 131/308] Distance  solution, move inline to .icc and use
 default. Also fix SCT_Digitization to used std::log, std::sqrt

---
 .../src/SCT_SurfaceChargesGenerator.cxx       | 10 +--
 .../TrkSurfaces/DistanceSolution.h            | 86 +++++--------------
 .../TrkSurfaces/DistanceSolution.icc          | 69 +++++++++++++++
 .../TrkSurfaces/src/DistanceSolution.cxx      | 28 ------
 4 files changed, 96 insertions(+), 97 deletions(-)
 create mode 100644 Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
 delete mode 100644 Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx

diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
index 23711b4ea8a9..adb1988e8216 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
@@ -213,13 +213,13 @@ float SCT_SurfaceChargesGenerator::driftTime(float zhit, const SiDetectorElement
         ATH_MSG_ERROR("driftTime: negative argument X for log(X) " << zhit);
       }
       return -1.0;
-    } else { 
+    } else {
       // (m_biasVoltage<m_depletionVoltage) can happen with underdepleted sensors, lose charges in that volume
       return -10.0;
     }
   }
 
-  float t_drift{log((depletionVoltage + biasVoltage) / denominator)};
+  float t_drift{std::log((depletionVoltage + biasVoltage) / denominator)};
   t_drift *= thickness * thickness / (2.0 * m_siPropertiesTool->getSiProperties(hashId).holeDriftMobility() * depletionVoltage);
   return t_drift;
 }
@@ -236,7 +236,7 @@ float SCT_SurfaceChargesGenerator::diffusionSigma(float zhit, const SiDetectorEl
   const float t{driftTime(zhit, element)}; // in ns
 
   if (t > 0.0) {
-    const float sigma{static_cast<float>(sqrt(2. * m_siPropertiesTool->getSiProperties(hashId).holeDiffusionConstant() * t))}; // in mm
+    const float sigma{static_cast<float>(std::sqrt(2. * m_siPropertiesTool->getSiProperties(hashId).holeDiffusionConstant() * t))}; // in mm
     return sigma;
   } else {
     return 0.0;
@@ -351,7 +351,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* element,
   const float cPhi{static_cast<float>(endPos[SiHit::xPhi]) - xPhi};
   const float cDep{static_cast<float>(endPos[SiHit::xDep]) - xDep};
 
-  const float LargeStep{sqrt(cEta*cEta + cPhi*cPhi + cDep*cDep)};
+  const float LargeStep{std::sqrt(cEta*cEta + cPhi*cPhi + cDep*cDep)};
   const int numberOfSteps{static_cast<int>(LargeStep / m_smallStepLength) + 1};
   const float steps{static_cast<float>(m_numberOfCharges * numberOfSteps)};
   const float e1{static_cast<float>(phit.energyLoss() / steps)};
@@ -394,7 +394,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiDetectorElement* element,
   const float StepX{cEta / numberOfSteps};
   const float StepY{cPhi / numberOfSteps};
   const float StepZ{cDep / numberOfSteps};
-  
+
   // check the status of truth information for this SiHit
   // some Truth information is cut for pile up events
   const EBC_EVCOLL evColl = EBC_MAINEVCOLL;
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
index 60ee6ea87fed..d38c5f9e7714 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
+++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.h
@@ -9,9 +9,7 @@
 #ifndef TRKSURFACES_DISTANCESOLUTION_H
 #define TRKSURFACES_DISTANCESOLUTION_H
 
-// STD
-#include <iostream>
-#include <math.h>
+#include <cmath>
 
 namespace Trk {
 
@@ -26,14 +24,19 @@ namespace Trk {
 class DistanceSolution
 {
 public:
-  /**Default Constructor*/
-  DistanceSolution();
-
-  /**Constructor*/
-  DistanceSolution(int num, double current = 0., bool signedDist = false, double first = 0., double second = 0.);
-
-  /**Destructor*/
-  virtual ~DistanceSolution() = default;
+  DistanceSolution() = default;
+  DistanceSolution(const DistanceSolution&) = default;
+  DistanceSolution(DistanceSolution&&) = default;
+  DistanceSolution& operator=(const DistanceSolution&) = default;
+  DistanceSolution& operator=(DistanceSolution&&) = default;
+  ~DistanceSolution() = default;
+
+   /**Constructor*/
+  DistanceSolution(int num,
+                   double current = 0.,
+                   bool signedDist = false,
+                   double first = 0.,
+                   double second = 0.);
 
   // methods to access solutions
   /** Number of intersection solutions*/
@@ -42,7 +45,8 @@ public:
   /** Distance to first intersection solution along direction*/
   double first() const;
 
-  /** Distance to second intersection solution along direction (for a cylinder surface)*/
+  /** Distance to second intersection solution along direction (for a cylinder
+   * surface)*/
   double second() const;
 
   /** Absolute Distance to closest solution */
@@ -51,14 +55,15 @@ public:
   /** Distance to point of closest approach along direction*/
   double toPointOfClosestApproach() const;
 
-  /** Current distance to surface (spatial), signed (along/opposite to surface normal) if input argument true (absolute
-   * value by default)*/
+  /** Current distance to surface (spatial), signed (along/opposite to surface
+   * normal) if input argument true (absolute value by default)*/
   double currentDistance(bool signedDist = false) const;
 
-  /** This method indicates availability of signed current distance (false for Perigee and StraighLineSurface) */
+  /** This method indicates availability of signed current distance (false for
+   * Perigee and StraighLineSurface) */
   bool signedDistance() const;
 
-protected:
+private:
   int m_num;
   double m_first;
   double m_second;
@@ -66,54 +71,7 @@ protected:
   bool m_signedDist;
 };
 
-inline int
-DistanceSolution::numberOfSolutions() const
-{
-  return m_num;
-}
-
-inline double
-DistanceSolution::first() const
-{
-  return m_first;
-}
-
-inline double
-DistanceSolution::second() const
-{
-  return m_second;
-}
-
-inline double
-DistanceSolution::absClosest() const
-{
-  if (m_num > 1)
-    return (m_first * m_first < m_second * m_second) ? fabs(m_first) : fabs(m_second);
-  else
-    return fabs(m_first);
-}
-
-inline double
-DistanceSolution::toPointOfClosestApproach() const
-{
-  return m_first;
-}
-
-inline double
-DistanceSolution::currentDistance(bool signedDist) const
-{
-  if (signedDist)
-    return m_current;
-  else
-    return fabs(m_current);
-}
-
-inline bool
-DistanceSolution::signedDistance() const
-{
-  return m_signedDist;
-}
-
 } // end of namespace
 
+#include "TrkSurfaces/DistanceSolution.icc"
 #endif // TRKSURFACES_DISTANCESOLUTION_H
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
new file mode 100644
index 000000000000..15ef7e32d23a
--- /dev/null
+++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DistanceSolution.icc
@@ -0,0 +1,69 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+namespace Trk {
+inline DistanceSolution::DistanceSolution(int num,
+                                          double current,
+                                          bool signedDist,
+                                          double first,
+                                          double second)
+  : m_num(num)
+  , m_first(first)
+  , m_second(second)
+  , m_current(current)
+  , m_signedDist(signedDist)
+{}
+
+inline int
+DistanceSolution::numberOfSolutions() const
+{
+  return m_num;
+}
+
+inline double
+DistanceSolution::first() const
+{
+  return m_first;
+}
+
+inline double
+DistanceSolution::second() const
+{
+  return m_second;
+}
+
+inline double
+DistanceSolution::absClosest() const
+{
+  if (m_num > 1) {
+    return (m_first * m_first < m_second * m_second) ? std::abs(m_first)
+                                                     : std::abs(m_second);
+  } else {
+    return std::abs(m_first);
+  }
+}
+
+inline double
+DistanceSolution::toPointOfClosestApproach() const
+{
+  return m_first;
+}
+
+inline double
+DistanceSolution::currentDistance(bool signedDist) const
+{
+  if (signedDist) {
+    return m_current;
+  } else {
+    return std::abs(m_current);
+  }
+}
+
+inline bool
+DistanceSolution::signedDistance() const
+{
+  return m_signedDist;
+}
+
+} // end of namespace
+
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx
deleted file mode 100644
index a7d7a4cdf548..000000000000
--- a/Tracking/TrkDetDescr/TrkSurfaces/src/DistanceSolution.cxx
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// DistanceSolution.cxx, (c) ATLAS Detector Software
-///////////////////////////////////////////////////////////////////
-
-// Trk
-#include "TrkSurfaces/DistanceSolution.h"
-
-// default constructor
-Trk::DistanceSolution::DistanceSolution()
-  : m_num()
-  , m_first()
-  , m_second()
-  , m_current()
-  , m_signedDist()
-{}
-
-// constructor
-Trk::DistanceSolution::DistanceSolution(int num, double current, bool signedDist, double first, double second)
-  : m_num(num)
-  , m_first(first)
-  , m_second(second)
-  , m_current(current)
-  , m_signedDist(signedDist)
-{}
-- 
GitLab


From ce96956917b86df0548848191807c5ecebbcc269 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 15:36:10 -0500
Subject: [PATCH 132/308] MuonEfficiencyCorrections: Fix gcc11 warning.

Check result of dynamic_cast before dereferencing.
---
 .../MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx
index f79401d6fe90..34fb5811805a 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx
@@ -86,9 +86,12 @@ namespace TestMuonSF {
     MuonSFBranches::MuonSFBranches(TTree* tree, const ToolHandle<CP::IMuonEfficiencyScaleFactors> &handle, const std::string& rel_name) :
                 MuonEffiBranches(tree),
                 m_handle(handle),
-                m_uncorrelate_sys(dynamic_cast<const CP::MuonEfficiencyScaleFactors*>(handle.operator->())->uncorrelate_sys()),
                 m_release(rel_name),
-                m_SFs() {
+                m_SFs()
+    {
+      auto mesf = dynamic_cast<const CP::MuonEfficiencyScaleFactors*>(handle.operator->());
+      if (!mesf) std::abort();
+      m_uncorrelate_sys = mesf->uncorrelate_sys();
     }
     CP::CorrectionCode MuonSFBranches::fill(const xAOD::Muon& muon) {
         /// Only the raw systematic sets have been activated
-- 
GitLab


From a4a712fe99e5d20832311db10ddea861c3ed6dfe Mon Sep 17 00:00:00 2001
From: leggett <leggett@cern.ch>
Date: Wed, 16 Dec 2020 08:36:06 -0800
Subject: [PATCH 133/308] update Gaudi version to v35r0.002

---
 Projects/AthAnalysis/build_externals.sh   | 2 +-
 Projects/AthGeneration/build_externals.sh | 2 +-
 Projects/AthSimulation/build_externals.sh | 2 +-
 Projects/Athena/build_externals.sh        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Projects/AthAnalysis/build_externals.sh b/Projects/AthAnalysis/build_externals.sh
index a204d1b32c07..7fe421a38b15 100755
--- a/Projects/AthAnalysis/build_externals.sh
+++ b/Projects/AthAnalysis/build_externals.sh
@@ -25,7 +25,7 @@ BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
 EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_2"
-            -DATLAS_GAUDI_TAG="v35r0.001")
+            -DATLAS_GAUDI_TAG="v35r0.002")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/AthGeneration/build_externals.sh b/Projects/AthGeneration/build_externals.sh
index 926cc7c91aaf..b7857649238b 100755
--- a/Projects/AthGeneration/build_externals.sh
+++ b/Projects/AthGeneration/build_externals.sh
@@ -25,7 +25,7 @@ BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
 EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_3"
-            -DATLAS_GAUDI_TAG="v35r0.001")
+            -DATLAS_GAUDI_TAG="v35r0.002")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh
index 507d9e19dd0a..ed6424280e47 100755
--- a/Projects/AthSimulation/build_externals.sh
+++ b/Projects/AthSimulation/build_externals.sh
@@ -25,7 +25,7 @@ BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
 EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_3"
-            -DATLAS_GAUDI_TAG="v35r0.001")
+            -DATLAS_GAUDI_TAG="v35r0.002")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh
index 8766b836971c..568ea8a80524 100755
--- a/Projects/Athena/build_externals.sh
+++ b/Projects/Athena/build_externals.sh
@@ -25,7 +25,7 @@ BUILDTYPE="RelWithDebInfo"
 FORCE=""
 CI=""
 EXTRACMAKE=(-DLCG_VERSION_NUMBER=98 -DLCG_VERSION_POSTFIX="python3_ATLAS_3"
-            -DATLAS_GAUDI_TAG="v35r0.001")
+            -DATLAS_GAUDI_TAG="v35r0.002")
 while getopts ":t:b:x:fch" opt; do
     case $opt in
         t)
-- 
GitLab


From ad324bf501f045d16aee52355bde8239639d4b65 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Fri, 18 Dec 2020 22:20:26 +0100
Subject: [PATCH 134/308] Fix the analyses for the EF bjet tests

Basic cut and paste schoolboy error copying the bjet tests from
muon tests, and then forgetting to change the chains.

This fixes it
---
 .../TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py      | 2 +-
 .../TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py      | 2 +-
 .../test/test_trigID_all_ttbar_pu80_short.py                    | 2 +-
 .../TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
index 54421eb0d9fc..eb28cde6636c 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
@@ -45,7 +45,7 @@ Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c T
          ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
          ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
          ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
-         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+         ( "EFbjet",       "EFbjet",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
    
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
index 8a755103d53d..535cb0fea32e 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80.py
@@ -45,7 +45,7 @@ Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c T
          ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
          ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
          ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
-         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+         ( "EFbjet",       "EFbjet",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
    
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py
index b1f1181b7bd4..cb3f5d352056 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_short.py
@@ -45,7 +45,7 @@ Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c T
          ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
          ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
          ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
-         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+         ( "EFbjet",       "EFbjet",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
    
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py
index ad18d67f9c52..78e80ff19b35 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_st.py
@@ -45,7 +45,7 @@ Comp = [ ( "L2muon",       "L2muon",      "data-hists-offline.root",      " -c T
          ( "EFmuon",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-muon " ),
          ( "EFelectron",   "EFelectron",  "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-electron " ),
          ( "EFtau",        "EFtau",       "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-tau " ),
-         ( "EFbjet",       "EFmuon",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
+         ( "EFbjet",       "EFbjet",      "data-hists-offline.root",   " -c TIDAhisto-panel.dat  -d HLTEF-plots-bjet " ) ]
    
 from AthenaCommon.Include import include 
 include("TrigInDetValidation/TrigInDetValidation_Base.py")
-- 
GitLab


From 74d8b629aeb82d5df92dba50ffd4b3ddd0245b3d Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 15:22:42 -0500
Subject: [PATCH 135/308] CalibrationDataInterface: Fix gcc11 warning.

Null pointer dereference.
---
 .../CalibrationDataInterface/Root/CalibrationDataContainer.cxx   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/Root/CalibrationDataContainer.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/Root/CalibrationDataContainer.cxx
index a4282a8e0e9b..b5b064be8c4a 100644
--- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/Root/CalibrationDataContainer.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/Root/CalibrationDataContainer.cxx
@@ -880,6 +880,7 @@ CalibrationDataHistogramContainer::getInterpolatedUncertainty(TH1* hist) const
 
     // Copied from TH3::Interpolate()
 
+    yAxis = hist->GetYaxis();
     zAxis = hist->GetZaxis();
 
     Int_t ubx = xAxis->FindBin(m_vars[0]);
-- 
GitLab


From 69c2e28aeefb40d29c4cb5cb1b93f04edb81708f Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 7 Dec 2020 23:27:20 -0500
Subject: [PATCH 136/308] TrigMonitorBase: Fix compilation with gcc11.

Can't use full template-id as a ctor name with c++20.
---
 .../TrigMonitorBase/src/TrigGenericMonitoringTool.h       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigGenericMonitoringTool.h b/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigGenericMonitoringTool.h
index 6a905fc31aca..c004d0f4f4e9 100755
--- a/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigGenericMonitoringTool.h
+++ b/Trigger/TrigMonitoring/TrigMonitorBase/src/TrigGenericMonitoringTool.h
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGMONITORBASE_TRIGGENERICMONITORINGTOOL_H
@@ -120,9 +120,9 @@ template<class M, class P>     // Mutex and Proxy type
 class TrigGenericMonitoringTool : public TrigMonitorToolBase {
 public:
   
-  TrigGenericMonitoringTool<M,P>(const std::string & type, 
-                                 const std::string & name,
-                                 const IInterface* parent);
+  TrigGenericMonitoringTool(const std::string & type, 
+                            const std::string & name,
+                            const IInterface* parent);
   virtual ~TrigGenericMonitoringTool();
   
   virtual StatusCode bookHists();
-- 
GitLab


From 759fbbebeddc4d5877138cece5ca07d9b3a19eeb Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 11:27:43 -0500
Subject: [PATCH 137/308] TrigT2CaloEgamma: Fix gcc11 warning.

Misleading indentation.
---
 Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
index 5fa15c079144..f74fb7eac36e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/RingerReFex.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /*******************************************************
@@ -432,7 +432,7 @@ const {
     ATH_MSG_DEBUG("RingSet number is: " << rs);  
     for(unsigned i=0;i<rset.at(rs).samples().size();i++)
       ATH_MSG_DEBUG("   Calo layer ID is : "<< rset.at(rs).samples()[i] );
-      ATH_MSG_DEBUG("search eta window: " << m_etaSearchWindowSize << " search phi window: " << m_phiSearchWindowSize);
+    ATH_MSG_DEBUG("search eta window: " << m_etaSearchWindowSize << " search phi window: " << m_phiSearchWindowSize);
     ATH_MSG_DEBUG("deta: " << m_detaRings[rs] << " dphi: " << m_dphiRings[rs]);
     ATH_MSG_DEBUG("Pattern has size equal than: " << rset.at(rs).pattern().size());
     for(unsigned i=0;i<rset.at(rs).pattern().size();++i)
-- 
GitLab


From 3297c9480456af1ceaf8478930e80e20d9b5167a Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 14:56:29 -0500
Subject: [PATCH 138/308] TrigTauEmulation: Fix gcc11 warning.

Misleading indentation.
---
 .../TrigTauAnalysis/TrigTauEmulation/Root/Parser.cxx          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/Root/Parser.cxx b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/Root/Parser.cxx
index e0e1fc74dbbc..cda4d7cd6bef 100644
--- a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/Root/Parser.cxx
+++ b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/Root/Parser.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // vim: ts=2 sw=2
@@ -158,7 +158,7 @@ int Parser::get_pass_number(const std::string & item_name)
     return m_nonTOPO_items[item_name];
   else
     MY_MSG_WARNING(item_name << " is not in the map of items"); 
-    return -1;
+  return -1;
 }
 
 
-- 
GitLab


From 53292866909c68da95dd449365b8cd66fa68bb45 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Fri, 18 Dec 2020 05:05:15 +0100
Subject: [PATCH 139/308] TrkExTools: Fix memory leak.

In extrapolateStepwiseImpl, we need to delete the parameters
in cache.m_parametersOnDetElements if we don't return them.
---
 Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
index 27073c6f4311..51abc695c50f 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
@@ -531,6 +531,9 @@ Trk::Extrapolator::extrapolateStepwiseImpl(const EventContext& ctx,
       msg << "Will not cleanup " << static_cast<const void*>(cache.m_parametersOnDetElements);
       throw std::logic_error(msg.str());
     }
+    for (const Trk::TrackParameters* p : tmp) {
+      delete p;
+    }
     tmp.clear();
   }
   return Trk::TrackParametersUVector(tmp.begin(), tmp.end());
-- 
GitLab


From db36f13d3abc58802173b20f36873a923aae8b39 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 14 Dec 2020 15:34:13 +0100
Subject: [PATCH 140/308] InDetTrackSelectorTool: Fix clang warings.

Missing override keywords.
---
 .../InDetTrackSelectorTool/InDetCosmicTrackSelectorTool.h   | 6 +++---
 .../InDetTrackSelectorTool/InDetIsoTrackSelectorTool.h      | 6 +++---
 .../InDetTrackSelectorTool/InDetTrackSelectorTool.h         | 6 +++---
 .../InDetTrackSelectorTool/InDetTrtDriftCircleCutTool.h     | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetCosmicTrackSelectorTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetCosmicTrackSelectorTool.h
index 007d78cf7437..c9f682775b31 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetCosmicTrackSelectorTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetCosmicTrackSelectorTool.h
@@ -38,11 +38,11 @@ namespace InDet
 
     ~InDetCosmicTrackSelectorTool();
 
-    bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const;
+    virtual bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const override;
 
-    bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const;
+    virtual bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const override;
 
-    bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const {
+    virtual bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const  override {
       ATH_MSG_WARNING("xAOD::TrackParticle selection not implemented yet");
       return false;
     }
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetIsoTrackSelectorTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetIsoTrackSelectorTool.h
index b121018457f5..0a32e5de9211 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetIsoTrackSelectorTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetIsoTrackSelectorTool.h
@@ -42,13 +42,13 @@ namespace InDet
       ~InDetIsoTrackSelectorTool();
 
       /** ESD type interface */
-      bool decision(const Trk::AtaStraightLine&, const Trk::Track& track) const;
+      virtual bool decision(const Trk::AtaStraightLine&, const Trk::Track& track) const override;
       
       /** AOD type interface */
-      bool decision(const Trk::AtaStraightLine&, const Trk::TrackParticleBase& trackParticle) const;
+      virtual bool decision(const Trk::AtaStraightLine&, const Trk::TrackParticleBase& trackParticle) const override;
       
       /** Work-horse interface - will ignore TrackSelector */
-      bool decision(const Trk::AtaStraightLine&, const Trk::TrackParameters& trackPars) const;
+      virtual bool decision(const Trk::AtaStraightLine&, const Trk::TrackParameters& trackPars) const override;
 
     private:
       /** Robust cut window setting */
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h
index 386090734df0..c3633ad3c5a8 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrackSelectorTool.h
@@ -50,11 +50,11 @@ namespace InDet
 
       ~InDetTrackSelectorTool();
 
-      bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const;
+      virtual bool decision(const Trk::Track& track,const Trk::Vertex* vertex) const override;
 
-      bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const;
+      virtual bool decision(const Trk::TrackParticleBase& track,const Trk::Vertex* vertex) const override;
 
-      bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const {
+      virtual bool decision(const xAOD::TrackParticle&,const xAOD::Vertex*) const override {
 	ATH_MSG_WARNING("xAOD::TrackParticle selection not implemented yet");
 	return false;
       }
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrtDriftCircleCutTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrtDriftCircleCutTool.h
index e399c8e5fc54..406b0f29cdcc 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrtDriftCircleCutTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetTrtDriftCircleCutTool.h
@@ -30,10 +30,10 @@ namespace InDet{
       
       InDetTrtDriftCircleCutTool(const std::string& t, const std::string& n, const IInterface*  p);
       
-      ~InDetTrtDriftCircleCutTool();
+      virtual ~InDetTrtDriftCircleCutTool();
       
       /** @brief Minimum number of drift circles using the track scoring tool */
-      int minNumberDCs(const Trk::TrackParameters*) const;
+      virtual int minNumberDCs(const Trk::TrackParameters*) const override;
       
     private:
       
-- 
GitLab


From aa8cda3588def2d86301356b5ceb83a922637055 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 14 Dec 2020 15:32:56 +0100
Subject: [PATCH 141/308] InDetSecVxFinderTool: Fix clang warnings.

Missing override keywords.
---
 .../InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h      | 2 +-
 .../InDetSecVxFinderTool/InDetJetFitterVxFinder.h              | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h
index ed687a57f512..6025446d5865 100755
--- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h
+++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetImprovedJetFitterVxFinder.h
@@ -74,7 +74,7 @@ namespace InDet {
 
     virtual Trk::VxSecVertexInfo* findSecVertex(const xAOD::Vertex & primaryVertex,
 						const TLorentzVector & jetMomentum,
-						const std::vector<const xAOD::IParticle*> & inputTracks) const;
+						const std::vector<const xAOD::IParticle*> & inputTracks) const override;
 
   private:
 
diff --git a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterVxFinder.h b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterVxFinder.h
index 13cd285d3563..747166aa128c 100755
--- a/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterVxFinder.h
+++ b/InnerDetector/InDetRecTools/InDetSecVxFinderTool/InDetSecVxFinderTool/InDetJetFitterVxFinder.h
@@ -62,9 +62,10 @@ namespace InDet {
 
     ~InDetJetFitterVxFinder();
 
+    virtual
     Trk::VxSecVertexInfo* findSecVertex(const xAOD::Vertex & /*primaryVertex*/,
 					const TLorentzVector & /*jetMomentum*/,
-					const std::vector<const xAOD::IParticle*> & /*inputTracks*/ ) const
+					const std::vector<const xAOD::IParticle*> & /*inputTracks*/ ) const override
     {
       /* not implemented */
       return 0;
-- 
GitLab


From 8bad7ccae73edca2e09946ab2d118c56fc04d388 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Fri, 18 Dec 2020 17:32:51 +0100
Subject: [PATCH 142/308] Left it up to the CMake code to decide when the unit
 test should use bramspot information.

All clients will need to set this flag of EventInfoCnvAlgCfg(...) correctly
from now on, otherwise they'll get an import error if they used an incorrect
setting in one of the lightweight offline releases.
---
 Event/xAOD/xAODEventInfoCnv/CMakeLists.txt             |  8 ++++++--
 .../xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py  | 10 ++--------
 Event/xAOD/xAODEventInfoCnv/test/EventInfoCnv_test.py  |  5 +++--
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt b/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
index 5a2c859b9011..04e7b723247c 100644
--- a/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
@@ -22,12 +22,16 @@ atlas_install_python_modules( python/*.py
 atlas_install_joboptions( share/*.py )
 
 # Setup and run tests
+set( _extraFlags )
+if( SIMULATIONBASE OR GENERATIONBASE OR XAOD_ANALYSIS )
+   set( _extraFlags --noBeamSpot )
+endif()
 atlas_add_test( EvenInfoCnvConfigTest
-                SCRIPT test/EventInfoCnv_test.py
+                SCRIPT test/EventInfoCnv_test.py ${_extraFlags}
                 PROPERTIES TIMEOUT 300 )
 
 atlas_add_test( EvenInfoCnvConfigTestMT
-                SCRIPT test/EventInfoCnv_test.py -n 25 -t 3
+                SCRIPT test/EventInfoCnv_test.py -n 25 -t 3 ${_extraFlags}
                 PROPERTIES TIMEOUT 300 )
 
 if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
diff --git a/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py b/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
index ff1996d04d63..63a47365a81d 100644
--- a/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
+++ b/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
@@ -3,7 +3,6 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
-from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
@@ -23,13 +22,8 @@ def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg",
     # TODO: luminosity
 
     if not disableBeamSpot:
-        try:
-            from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
-            acc.merge(BeamSpotCondAlgCfg(flags))
-        except ImportError:
-            log = logging.getLogger( 'EventInfoCnvAlgCfg' )
-            log.info( 'BeamSpotConditions not available, not using it' )
-            pass
+        from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
+        acc.merge(BeamSpotCondAlgCfg(flags))
 
     xAODMaker__EventInfoCnvAlg = CompFactory.xAODMaker.EventInfoCnvAlg
     alg = xAODMaker__EventInfoCnvAlg(name, **kwargs)
diff --git a/Event/xAOD/xAODEventInfoCnv/test/EventInfoCnv_test.py b/Event/xAOD/xAODEventInfoCnv/test/EventInfoCnv_test.py
index f73ec006e4a5..6902395cab1b 100755
--- a/Event/xAOD/xAODEventInfoCnv/test/EventInfoCnv_test.py
+++ b/Event/xAOD/xAODEventInfoCnv/test/EventInfoCnv_test.py
@@ -24,6 +24,7 @@ from argparse import ArgumentParser
 parser = ArgumentParser()
 parser.add_argument("-n", "--maxEvents",  default=3, type=int, help="The number of events to run. 0 skips execution")
 parser.add_argument("-t", "--threads", default=1, type=int, help="The number of concurrent threads to run. 0 uses serial Athena.")
+parser.add_argument("-b", "--noBeamSpot", default=False, action="store_true", help="Don't try to use beamspot information in the conversion test")
 parser.add_argument("-V", "--verboseAccumulators", default=False, action="store_true", help="Print full details of the AlgSequence for each accumulator")
 args = parser.parse_args()
 
@@ -43,7 +44,7 @@ if args.threads > 0:
 ConfigFlags.lock()
 
 # Function tests
-accAlg = EventInfoCnvAlgCfg(ConfigFlags)
+accAlg = EventInfoCnvAlgCfg(ConfigFlags, disableBeamSpot=args.noBeamSpot)
 # reset to prevent errors on deletion
 accAlg.__init__()
 
@@ -52,7 +53,7 @@ acc = MainServicesCfg(ConfigFlags)
 acc.merge(PoolReadCfg(ConfigFlags))
 
 # Add event info overlay
-acc.merge(EventInfoCnvAlgCfg(ConfigFlags))
+acc.merge(EventInfoCnvAlgCfg(ConfigFlags, disableBeamSpot=args.noBeamSpot))
 
 # Add output
 acc.merge(OutputStreamCfg(ConfigFlags, "HITS"))
-- 
GitLab


From 058ae3f4ae73c4ee5194ea576655b587e9215d61 Mon Sep 17 00:00:00 2001
From: Rachid Mazini <rachid.mazini@cern.ch>
Date: Fri, 18 Dec 2020 13:16:23 +0000
Subject: [PATCH 143/308] Merge branch
 '21.0-addTFCSEnergyInterpolationHistogram' into '21.0'

21.0 add tfcs energy interpolation histogram

See merge request atlas/athena!39061

(cherry picked from commit f96b90179034c79bd332df6e8e979ba9c641ca3b)

276d333d Add TFCSEnergyInterpolationHistogram
fe5f851a Merge remote-tracking branch 'upstream/21.0' into 21.0-addTFCSEnergyInterpolationHistogram
046dbe07 Incorporate changes analogous to commit 5abe7a1f
6b8dcea4 Merge remote-tracking branch 'upstream/21.0' into 21.0-addTFCSEnergyInterpolationHistogram
7ddd1df2 Merge remote-tracking branch 'upstream/21.0' into 21.0-addTFCSEnergyInterpolationHistogram
c5f1bb7b implementing comments
7fd57998 Merge remote-tracking branch 'upstream/21.0' into 21.0-addTFCSEnergyInterpolationHistogram
958d7091 undo implementation of one comment (root macro coding standard)
---
 .../ISF_FastCaloSimEvent/CMakeLists.txt       |   1 +
 .../ISF_FastCaloSimEvent/LinkDef.h            |   2 +
 .../TFCSEnergyInterpolationHistogram.h        |  48 ++++++
 .../src/TFCSEnergyInterpolationHistogram.cxx  | 147 ++++++++++++++++++
 4 files changed, 198 insertions(+)
 create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h
 create mode 100644 Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationHistogram.cxx

diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt
index 814e20154195..45d8d29cb4d3 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/CMakeLists.txt
@@ -41,6 +41,7 @@ atlas_add_root_dictionary( ISF_FastCaloSimEvent _dictSource
                            ISF_FastCaloSimEvent/TFCSParametrization.h 
                            ISF_FastCaloSimEvent/TFCSInvisibleParametrization.h
                            ISF_FastCaloSimEvent/TFCSInitWithEkin.h
+                           ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h
                            ISF_FastCaloSimEvent/TFCSEnergyInterpolationLinear.h
                            ISF_FastCaloSimEvent/TFCSEnergyInterpolationPiecewiseLinear.h
                            ISF_FastCaloSimEvent/TFCSEnergyInterpolationSpline.h
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h
index 03c4fe28ed56..8567ec9c6b3c 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/LinkDef.h
@@ -26,6 +26,7 @@
 #include "ISF_FastCaloSimEvent/TFCSParametrization.h"
 #include "ISF_FastCaloSimEvent/TFCSInvisibleParametrization.h"
 #include "ISF_FastCaloSimEvent/TFCSInitWithEkin.h"
+#include "ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h"
 #include "ISF_FastCaloSimEvent/TFCSEnergyInterpolationLinear.h"
 #include "ISF_FastCaloSimEvent/TFCSEnergyInterpolationPiecewiseLinear.h"
 #include "ISF_FastCaloSimEvent/TFCSEnergyInterpolationSpline.h"
@@ -295,6 +296,7 @@
 #pragma link C++ class TFCSParametrization+;
 #pragma link C++ class TFCSInvisibleParametrization+;
 #pragma link C++ class TFCSInitWithEkin+;
+#pragma link C++ class TFCSEnergyInterpolationHistogram+;
 #pragma link C++ class TFCSEnergyInterpolationLinear+;
 #pragma link C++ class TFCSEnergyInterpolationPiecewiseLinear-;
 #pragma link C++ class TFCSEnergyInterpolationSpline+;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h
new file mode 100644
index 000000000000..a730b92e9343
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h
@@ -0,0 +1,48 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ISF_FASTCALOSIMEVENT_TFCSEnergyInterpolationHistogram_h
+#define ISF_FASTCALOSIMEVENT_TFCSEnergyInterpolationHistogram_h
+
+#include "ISF_FastCaloSimEvent/TFCSParametrization.h"
+#include "TH1F.h"
+
+class TFCSEnergyInterpolationHistogram:public TFCSParametrization {
+public:
+  TFCSEnergyInterpolationHistogram(const char* name=nullptr, const char* title=nullptr);
+
+  enum FCSEnergyInitializationStatusBits {
+     kOnlyScaleEnergy = BIT(15) ///< Set this bit in the TObject bit field the simulated energy should only be scaled by the spline
+  };
+
+  bool OnlyScaleEnergy() const {return TestBit(kOnlyScaleEnergy);};
+  void set_OnlyScaleEnergy() {SetBit(kOnlyScaleEnergy);};
+  void reset_OnlyScaleEnergy() {ResetBit(kOnlyScaleEnergy);};
+
+  virtual bool is_match_Ekin_bin(int /*Ekin_bin*/) const override {return true;};
+  virtual bool is_match_calosample(int /*calosample*/) const override {return true;};
+  
+  ///Initialize interpolation from histogram
+  ///x values should be Ekin, y values should <E(reco)/Ekin(true)>
+  void InitFromHist(const TH1F& hist) {m_hist=hist;};
+
+  const TH1F& hist() const {return m_hist;};
+
+  ///Initialize simulstate with the mean reconstructed energy in the calorimater expeted from the true kinetic energy
+  virtual FCSReturnCode simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const override;
+  void Print(Option_t *option="") const override;
+
+  static void unit_test(TFCSSimulationState* simulstate=nullptr,TFCSTruthState* truth=nullptr, const TFCSExtrapolationState* extrapol=nullptr,TH1F* hist=nullptr);
+private:
+  TH1F m_hist;
+
+  ClassDefOverride(TFCSEnergyInterpolationHistogram,1)  //TFCSEnergyInterpolationHistogram
+};
+
+#if defined(__ROOTCLING__) && defined(__FastCaloSimStandAlone__)
+#pragma link C++ class TFCSEnergyInterpolationHistogram+;
+#endif
+
+#endif
+
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationHistogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationHistogram.cxx
new file mode 100644
index 000000000000..90937730936a
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSEnergyInterpolationHistogram.cxx
@@ -0,0 +1,147 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "ISF_FastCaloSimEvent/TFCSEnergyInterpolationHistogram.h"
+#include "ISF_FastCaloSimEvent/TFCSSimulationState.h"
+#include "ISF_FastCaloSimEvent/TFCSTruthState.h"
+#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TGraph.h"
+#include "TAxis.h"
+#include <iostream>
+#include <vector>
+
+#ifdef __FastCaloSimStandAlone__
+namespace Gaudi {
+  namespace Units {
+    constexpr double megaelectronvolt = 1.;
+    constexpr double kiloelectronvolt = 1.e-3 * megaelectronvolt;
+    constexpr double keV = kiloelectronvolt;
+  }
+}
+#else
+#include "GaudiKernel/SystemOfUnits.h"
+#endif
+
+//=============================================
+//======= TFCSEnergyInterpolation =========
+//=============================================
+
+TFCSEnergyInterpolationHistogram::TFCSEnergyInterpolationHistogram(const char* name, const char* title):TFCSParametrization(name,title)
+{
+}
+
+FCSReturnCode TFCSEnergyInterpolationHistogram::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState*) const
+{
+  float Emean;
+  float Einit;
+  const float Ekin=truth->Ekin();
+  if(OnlyScaleEnergy()) Einit=simulstate.E();
+  else Einit=Ekin;
+  if(Einit<m_hist.GetXaxis()->GetBinLowEdge(1)) {
+    Emean=m_hist.GetBinContent(1)*Einit;
+  } else {
+    if(Einit>m_hist.GetXaxis()->GetBinUpEdge(m_hist.GetNbinsX())) {
+      Emean=m_hist.GetBinContent(m_hist.GetNbinsX())*Einit;
+    } else {
+      Emean=m_hist.GetBinContent(m_hist.GetXaxis()->FindBin(Einit))*Einit;
+    }  
+  }  
+
+  if(OnlyScaleEnergy()) {
+    ATH_MSG_DEBUG("set E="<<Emean<<" for true Ekin="<<truth->Ekin()<<" and E="<<Einit);
+  }
+  else{
+    ATH_MSG_DEBUG("set E="<<Emean<<" for true Ekin="<<truth->Ekin());
+  }
+  simulstate.set_E(Emean);
+
+  return FCSSuccess;
+}
+
+void TFCSEnergyInterpolationHistogram::Print(Option_t *option) const
+{
+  TString opt(option);
+  bool shortprint=opt.Index("short")>=0;
+  bool longprint=msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint);
+  TString optprint=opt;
+  optprint.ReplaceAll("short","");
+  TFCSParametrization::Print(option);
+
+  if(longprint) ATH_MSG_INFO(optprint <<(OnlyScaleEnergy()?"  E()*":"  Ekin()*")<<"histNbins="<<m_hist.GetNbinsX()
+                           <<" "<<m_hist.GetXaxis()->GetBinLowEdge(1)<<"<=Ekin<="<<m_hist.GetXaxis()->GetBinUpEdge(m_hist.GetNbinsX()));
+}
+
+void TFCSEnergyInterpolationHistogram::unit_test(TFCSSimulationState* simulstate,TFCSTruthState* truth, const TFCSExtrapolationState* extrapol,TH1F* hist)
+{
+  if(!simulstate) simulstate=new TFCSSimulationState();
+  if(!truth) truth=new TFCSTruthState();
+  if(!extrapol) extrapol=new TFCSExtrapolationState();
+  
+  if(!hist) {
+    hist = new TH1F("h1", "h1 title", 16, 0., 512.);
+    hist->SetBinContent( 1,0.687165);
+    hist->SetBinContent( 2,0.756837);
+    hist->SetBinContent( 3,0.836673);
+    hist->SetBinContent( 4,0.896336);
+    hist->SetBinContent( 5,0.889785);
+    hist->SetBinContent( 6,0.901266);
+    hist->SetBinContent( 7,0.888937);
+    hist->SetBinContent( 8,0.919943);
+    hist->SetBinContent( 9,0.941806);
+    hist->SetBinContent(10,0.934668);
+    hist->SetBinContent(11,0.939502);
+    hist->SetBinContent(12,0.940796);
+    hist->SetBinContent(13,0.945894);
+    hist->SetBinContent(14,0.955445);
+    hist->SetBinContent(15,0.955593);
+    hist->SetBinContent(16,0.943673);
+  }  
+  
+  TH1F* hdraw=(TH1F*)hist->Clone();
+  hdraw->SetMarkerColor(46);
+  hdraw->SetMarkerStyle(8);
+  
+  TFCSEnergyInterpolationHistogram test("testTFCSEnergyInterpolationHistogram","test TFCSEnergyInterpolationHistogram");
+  test.set_pdgid(22);
+  test.set_Ekin_nominal(0.5*(hdraw->GetXaxis()->GetBinLowEdge(1)+hdraw->GetXaxis()->GetBinUpEdge(hdraw->GetNbinsX())));
+  test.set_Ekin_min(hdraw->GetXaxis()->GetBinLowEdge(1));
+  test.set_Ekin_max(hdraw->GetXaxis()->GetBinUpEdge(hdraw->GetNbinsX()));
+  test.set_eta_nominal(0.225);
+  test.set_eta_min(0.2);
+  test.set_eta_max(0.25);
+  test.InitFromHist(*hist);
+  //test.set_OnlyScaleEnergy();
+  test.Print();
+  test.hist().Dump();
+  
+  truth->set_pdgid(22);
+  
+  TGraph* gr=new TGraph();
+  gr->SetNameTitle("testTFCSEnergyInterpolationHistogramLogX","test TFCSEnergyInterpolationHistogram");
+  gr->GetXaxis()->SetTitle("Ekin [MeV]");
+  gr->GetYaxis()->SetTitle("<E(reco)>/Ekin(true)");
+  
+  int ip=0;
+  for(float Ekin=std::max(test.Ekin_min()*0.25,0.1);Ekin<=test.Ekin_max()*4;Ekin*=1.05) {
+    //Init LorentzVector for truth. For photon Ekin=E
+    truth->SetPxPyPzE(Ekin,0,0,Ekin);
+    simulstate->set_E(Ekin);
+    if (test.simulate(*simulstate,truth,extrapol) != FCSSuccess) {
+      return;
+    }
+    gr->SetPoint(ip,Ekin,simulstate->E()/Ekin);
+    ++ip;
+  }  
+
+  //Drawing doesn't make sense inside athena and necessary libraries not linked by default
+  #if defined(__FastCaloSimStandAlone__)
+  TCanvas* c=new TCanvas(hdraw->GetName(),hdraw->GetTitle());
+  hdraw->Draw("HIST");
+  gr->Draw("same,APL");
+  c->SetLogx();
+  #endif
+}
+
-- 
GitLab


From 4399344834002ecdd64f685a539d3a7ceb69e708 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 17 Dec 2020 10:12:09 +0100
Subject: [PATCH 144/308] build_externals.sh: fix externals hash generation

The hash used to decide if the externals have to be rebuild only
considered the first entry of `EXTRACMAKE`. All others (e.g. the new
Gaudi version argument) were ignored.
---
 Projects/AnalysisBase/build_externals.sh  | 2 +-
 Projects/AthAnalysis/build_externals.sh   | 2 +-
 Projects/AthGeneration/build_externals.sh | 2 +-
 Projects/AthSimulation/build_externals.sh | 2 +-
 Projects/Athena/build_externals.sh        | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Projects/AnalysisBase/build_externals.sh b/Projects/AnalysisBase/build_externals.sh
index 081074ee028a..cd54bc498a1a 100755
--- a/Projects/AnalysisBase/build_externals.sh
+++ b/Projects/AnalysisBase/build_externals.sh
@@ -85,7 +85,7 @@ fi
 # Get the version of AnalysisBase for the build.
 version=`cat ${thisdir}/version.txt`
 # Generate hash of any extra cmake arguments.
-cmakehash=`echo -n "${EXTRACMAKE}" | openssl md5 | awk '{print $2}'`
+cmakehash=`echo -n "${EXTRACMAKE[@]}" | openssl md5 | awk '{print $2}'`
 
 # Check if previous externals build can be reused:
 externals_stamp=${BUILDDIR}/build/AnalysisBaseExternals/externals-${version}-${cmakehash}.stamp
diff --git a/Projects/AthAnalysis/build_externals.sh b/Projects/AthAnalysis/build_externals.sh
index 7fe421a38b15..daf7ace342e3 100755
--- a/Projects/AthAnalysis/build_externals.sh
+++ b/Projects/AthAnalysis/build_externals.sh
@@ -91,7 +91,7 @@ fi
 # Get the version of AthAnalysis for the build.
 version=`cat ${thisdir}/version.txt`
 # Generate hash of any extra cmake arguments.
-cmakehash=`echo -n "${EXTRACMAKE}" | openssl md5 | awk '{print $2}'`
+cmakehash=`echo -n "${EXTRACMAKE[@]}" | openssl md5 | awk '{print $2}'`
 
 # Check if previous externals build can be reused:
 externals_stamp=${BUILDDIR}/build/AthAnalysisExternals/externals-${version}-${cmakehash}.stamp
diff --git a/Projects/AthGeneration/build_externals.sh b/Projects/AthGeneration/build_externals.sh
index b7857649238b..bd2ac7f08028 100755
--- a/Projects/AthGeneration/build_externals.sh
+++ b/Projects/AthGeneration/build_externals.sh
@@ -99,7 +99,7 @@ fi
 # Get the version of AthGeneration for the build.
 version=`cat ${thisdir}/version.txt`
 # Generate hash of any extra cmake arguments.
-cmakehash=`echo -n "${EXTRACMAKE}" | openssl md5 | awk '{print $2}'`
+cmakehash=`echo -n "${EXTRACMAKE[@]}" | openssl md5 | awk '{print $2}'`
 
 # Check if previous externals build can be reused:
 externals_stamp=${BUILDDIR}/build/AthGenerationExternals/externals-${version}-${cmakehash}.stamp
diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh
index ed6424280e47..e7ce96a862f4 100755
--- a/Projects/AthSimulation/build_externals.sh
+++ b/Projects/AthSimulation/build_externals.sh
@@ -91,7 +91,7 @@ fi
 # Get the version of AthSimulation for the build.
 version=`cat ${thisdir}/version.txt`
 # Generate hash of any extra cmake arguments.
-cmakehash=`echo -n "${EXTRACMAKE}" | openssl md5 | awk '{print $2}'`
+cmakehash=`echo -n "${EXTRACMAKE[@]}" | openssl md5 | awk '{print $2}'`
 
 # Check if previous externals build can be reused:
 externals_stamp=${BUILDDIR}/build/AthSimulationExternals/externals-${version}-${cmakehash}.stamp
diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh
index 568ea8a80524..32400efb469d 100755
--- a/Projects/Athena/build_externals.sh
+++ b/Projects/Athena/build_externals.sh
@@ -99,7 +99,7 @@ fi
 # Get the version of Athena for the build.
 version=`cat ${thisdir}/version.txt`
 # Generate hash of any extra cmake arguments.
-cmakehash=`echo -n "${EXTRACMAKE}" | openssl md5 | awk '{print $2}'`
+cmakehash=`echo -n "${EXTRACMAKE[@]}" | openssl md5 | awk '{print $2}'`
 
 # Check if previous externals build can be reused:
 externals_stamp=${BUILDDIR}/build/AthenaExternals/externals-${version}-${cmakehash}.stamp
-- 
GitLab


From 083dca588375610c3ccc3c973ad1dcdb8fa0b288 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Sat, 19 Dec 2020 13:47:28 +0100
Subject: [PATCH 145/308] Updated JetVertexTaggerTool to find its default
 calibration file correctly.

---
 .../JetMomentTools/JetMomentTools/JetVertexTaggerTool.h    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h
index aa52d5990dc3..2227f68e2e27 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h
@@ -21,7 +21,7 @@
 /// JVFCorr: a corrected JVF calculation accounting for the number of PU tracks in the event.
 ///
 /// Calculation requires three main types of information
-///     1. Vertex container for the event (from evtStore), with respect to which the JVT track sums 
+///     1. Vertex container for the event (from evtStore), with respect to which the JVT track sums
 ///     2. Tracks associated to each of the input jet (in the jet aux store)
 ///     3. Track vertex association object (from evtStore)
 ///     4. The track container needed for PU track counting
@@ -44,7 +44,7 @@
 ///  AssociatedTracks - name for attribute holding the list of associated tracks
 ///  TrackVertexAssociation - name for the container holding the track-vertex associations
 ///  TrackSelector - tool to select tracks (none ==> no selection)
-///  JVTFileName - ROOT Filename containing JVT likelihood histogram	
+///  JVTFileName - ROOT Filename containing JVT likelihood histogram
 ///  JVTLikelihoodHistName - JVT Likelihood histogram name
 ///  JVTName - name for the 3 JVT attributes (default is "JVT")
 ///  K_JVFCorrScale - the scale factor for pileup tracks in the JVFCorr calculation (default is 0.01)
@@ -107,7 +107,7 @@ private:  // data
   // Configurable parameters
   Gaudi::Property<std::string> m_jetContainerName{this,"JetContainer", "", "SG key for the input jet container"};
   Gaudi::Property<std::string> m_jvtlikelihoodHistName{this, "JVTLikelihoodHistName", "JVTRootCore_kNN100trim_pt20to50_Likelihood", "JVT likelihood histogram name"};
-  Gaudi::Property<std::string> m_jvtfileName{this, "JVTFileName", "JVTlikelihood_20140805.root", "JVT likelihood file name"};
+  Gaudi::Property<std::string> m_jvtfileName{this, "JVTFileName", "JetMomentTools/JVTlikelihood_20140805.root", "JVT likelihood file name"};
 
   SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key{this, "VertexContainer", "PrimaryVertices", "SG key for input vertex container"};
   SG::ReadDecorHandleKey<xAOD::JetContainer> m_jvfCorrKey{this, "JVFCorrName", "JVFCorr", "SG key for input JVFCorr decoration"};
@@ -123,4 +123,3 @@ private:  // data
 
 
 #endif
-
-- 
GitLab


From 462f104964a291f565b6b1b6965e97cf6cd19c54 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Sat, 19 Dec 2020 13:59:43 +0100
Subject: [PATCH 146/308] Fixed the name of the JVT calibration file to use.

---
 .../TrigEFMissingET/src/EFMissingETFromTrackAndJets.cxx         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndJets.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndJets.cxx
index 31030deee8fd..d38809bf8d7d 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndJets.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndJets.cxx
@@ -68,7 +68,7 @@ StatusCode EFMissingETFromTrackAndJets::initialize()
     } // if timing service
 
     // JVT likelihood histogram
-    TString jvtFile = "JVTlikelihood_20140805.root";
+    TString jvtFile = "JetMomentTools/JVTlikelihood_20140805.root";
     TString jvtName = "JVTRootCore_kNN100trim_pt20to50_Likelihood";
     m_jvtLikelihood = (TH2F *) getHistogramFromFile(jvtName, jvtFile);
     if (m_jvtLikelihood == nullptr) {
-- 
GitLab


From d0aaa40252ac09d23fd8685c9473711e2d6ef5ac Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 16 Dec 2020 12:25:55 -0500
Subject: [PATCH 147/308] AthContainers: Use ConcurrentStrMap.

Use ConcurrentStrMap in AuxTypeRegistry for the string->auxid
and the string->factory maps, allowing them to be read without taking
a lock.
---
 .../AthContainers/AuxTypeRegistry.h           | 54 ++++----------
 .../AthContainers/AuxTypeRegistry.icc         |  6 +-
 .../AthContainers/Root/AuxTypeRegistry.cxx    | 74 +++++++++----------
 3 files changed, 55 insertions(+), 79 deletions(-)

diff --git a/Control/AthContainers/AthContainers/AuxTypeRegistry.h b/Control/AthContainers/AthContainers/AuxTypeRegistry.h
index 79661353a42e..62a8b883078c 100644
--- a/Control/AthContainers/AthContainers/AuxTypeRegistry.h
+++ b/Control/AthContainers/AthContainers/AuxTypeRegistry.h
@@ -1,10 +1,8 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id: AuxTypeRegistry.h 784452 2016-11-15 21:40:41Z ssnyder $
 /**
  * @file AthContainers/AuxTypeRegistry.h
  * @author scott snyder <snyder@bnl.gov>
@@ -23,6 +21,8 @@
 #include "AthContainers/tools/AuxTypeVector.h"
 #include "AthContainers/tools/AuxTypeVectorFactory.h"
 #include "AthContainers/tools/threading.h"
+#include "CxxUtils/ConcurrentStrMap.h"
+#include "CxxUtils/SimpleUpdater.h"
 #include "CxxUtils/bitmask.h"
 #ifndef XAOD_STANDALONE
 #include "AthenaKernel/IInputRename.h"
@@ -289,7 +289,7 @@ public:
    * @brief Return the vector factory for a given vector element type.
    * @param ti The type of the vector element.
    *
-   * Returns 0 if the type is not known.
+   * Returns nullptr if the type is not known.
    * (Use @c addFactory to add new mappings.)
    */
   const IAuxTypeVectorFactory* getFactory (const std::type_info& ti) const;
@@ -393,25 +393,12 @@ private:
    * @brief Return the vector factory for a given auxid.
    * @param auxid The desired aux data item.
    *
-   * Returns 0 if the type is not known.
+   * Returns nullptr if the type is not known.
    * (Use @c addFactory to add new mappings.)
    */
   const IAuxTypeVectorFactory* getFactory (SG::auxid_t auxid) const;
 
 
-  /**
-   * @brief Return the vector factory for a given vector element type.
-   *        (external locking)
-   * @param lock The registry lock.
-   * @param ti The type of the vector element.
-   *
-   * Returns 0 if the type is not known.
-   * (Use @c addFactory to add new mappings.)
-   */
-  const IAuxTypeVectorFactory* getFactory (lock_t& lock,
-                                           const std::type_info& ti) const;
-
-
   /**
    * @brief Add a new type -> factory mapping.  (external locking)
    * @param lock The registry lock.
@@ -447,6 +434,15 @@ private:
   IAuxTypeVectorFactory* makeFactoryNull() const;
 
 
+  /**
+   * @brief Return the key used to look up an entry in m_auxids.
+   * @param name The name of the aux data item.
+   * @param clsname The name of its associated class.  May be blank.
+   */
+  static std::string makeKey (const std::string& name,
+                              const std::string& clsname);
+
+
   /// Hold information about one aux data item.
   struct typeinfo_t
   {
@@ -472,30 +468,12 @@ private:
   AthContainers_detail::concurrent_vector<typeinfo_t> m_types;
 
 
-  /// Key used for name -> auxid lookup.
-  /// First element is name, second is class name.
-  typedef std::pair<std::string, std::string> key_t;
-
-
-  /// Helper to hash the key type.
-  struct stringpair_hash
-  {
-    size_t operator() (const key_t& key) const
-    {
-      return shash (key.first) + shash (key.second);
-    }
-    std::hash<std::string> shash;
-  };
-
-
   /// Map from name -> auxid.
-  typedef std::unordered_map<key_t, SG::auxid_t, stringpair_hash>
-    id_map_t;
+  using id_map_t = CxxUtils::ConcurrentStrMap<SG::auxid_t, CxxUtils::SimpleUpdater>;
   id_map_t m_auxids;
 
   /// Map from type_info name -> IAuxTypeVectorFactory.
-  typedef std::unordered_map<std::string,
-                             const IAuxTypeVectorFactory*> ti_map_t;
+  using ti_map_t = CxxUtils::ConcurrentStrMap<const IAuxTypeVectorFactory*, CxxUtils::SimpleUpdater>;
   ti_map_t m_factories;
 
   /// Hold additional factory instances we need to delete.
diff --git a/Control/AthContainers/AthContainers/AuxTypeRegistry.icc b/Control/AthContainers/AthContainers/AuxTypeRegistry.icc
index f888377cebba..386ca1b5dd2f 100644
--- a/Control/AthContainers/AthContainers/AuxTypeRegistry.icc
+++ b/Control/AthContainers/AthContainers/AuxTypeRegistry.icc
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id: AuxTypeRegistry.icc 602003 2014-06-16 17:07:01Z ssnyder $
 /**
  * @file AthContainers/AuxTypeRegistry.icc
  * @author scott snyder <snyder@bnl.gov>
@@ -38,7 +36,7 @@ AuxTypeRegistry::getAuxID (const std::string& name,
  * @brief Return the vector factory for a given auxid.
  * @param auxid The desired aux data item.
  *
- * Returns 0 if the type is not known.
+ * Returns nullptr if the type is not known.
  * (Use @c addFactory to add new mappings.)
  */
 inline
diff --git a/Control/AthContainers/Root/AuxTypeRegistry.cxx b/Control/AthContainers/Root/AuxTypeRegistry.cxx
index 46da2502ef06..0bf50e9e99bb 100644
--- a/Control/AthContainers/Root/AuxTypeRegistry.cxx
+++ b/Control/AthContainers/Root/AuxTypeRegistry.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file AthContainers/AuxTypeRegistry.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -68,9 +66,12 @@ SG::auxid_t
 AuxTypeRegistry::findAuxID( const std::string& name,
                             const std::string& clsname ) const
 {
-  lock_t lock (m_mutex);
-  key_t key (name, clsname);
-  id_map_t::const_iterator i = m_auxids.find (key);
+  // No locking needed here.
+  // The extra test here is to avoid having to copy a string
+  // in the common case where clsname is blank.
+  id_map_t::const_iterator i = m_auxids.find (clsname.empty() ?
+                                              name :
+                                              makeKey (name, clsname));
   if (i != m_auxids.end()) {
     return i->second;
   }
@@ -121,6 +122,21 @@ AuxTypeRegistry::makeVectorFromData (SG::auxid_t auxid,
 }
 
 
+/**
+ * @brief Return the key used to look up an entry in m_auxids.
+ * @param name The name of the aux data item.
+ * @param clsname The name of its associated class.  May be blank.
+ */
+std::string AuxTypeRegistry::makeKey (const std::string& name,
+                                      const std::string& clsname)
+{
+  if (clsname.empty()) {
+    return name;
+  }
+  return clsname + "::" + name;
+}
+
+
 
 /**
  * @brief Return the name of an aux data item.
@@ -294,34 +310,16 @@ void AuxTypeRegistry::clear (SG::auxid_t auxid, void* dst, size_t dst_index)
  * @brief Return the vector factory for a given vector element type.
  * @param ti The type of the vector element.
  *
- * Returns 0 if the type is not known.
+ * Returns nullptr if the type is not known.
  * (Use @c addFactory to add new mappings.)
  */
 const IAuxTypeVectorFactory*
 AuxTypeRegistry::getFactory (const std::type_info& ti) const
-{
-  lock_t lock (m_mutex);
-  return getFactory (lock, ti);
-}
-
-
-/**
- * @brief Return the vector factory for a given vector element type.
- *        (external locking)
- * @param lock The registry lock.
- * @param ti The type of the vector element.
- *
- * Returns 0 if the type is not known.
- * (Use @c addFactory to add new mappings.)
- */
-const IAuxTypeVectorFactory*
-AuxTypeRegistry::getFactory (lock_t& /*lock*/,
-                             const std::type_info& ti) const
 {
   ti_map_t::const_iterator it = m_factories.find (ti.name());
   if (it != m_factories.end())
     return it->second;
-  return 0;
+  return nullptr;
 }
 
 
@@ -358,7 +356,7 @@ void AuxTypeRegistry::addFactory (lock_t& /*lock*/,
                                   const std::type_info& ti,
                                   IAuxTypeVectorFactory* factory)
 {
-  ti_map_t::iterator it = m_factories.find (ti.name());
+  ti_map_t::const_iterator it = m_factories.find (ti.name());
   if (it != m_factories.end()) {
     if (it->second->isDynamic() && !factory->isDynamic()) {
       // Replacing a dynamic factory with a non-dynamic one.
@@ -366,13 +364,13 @@ void AuxTypeRegistry::addFactory (lock_t& /*lock*/,
       // Instead, push it on a vector to remember it so we can delete
       // it later.
       m_oldFactories.push_back (it->second);
-      it->second = factory;
+      m_factories.insert_or_assign (ti.name(), factory);
     }
     else
       delete factory;
   }
   else
-    m_factories[ti.name()] = factory;
+    m_factories.insert_or_assign (ti.name(), factory);
 }
 
 
@@ -382,6 +380,8 @@ void AuxTypeRegistry::addFactory (lock_t& /*lock*/,
  * Populates the type -> factory mappings for standard C++ types.
  */
 AuxTypeRegistry::AuxTypeRegistry()
+  : m_auxids (id_map_t::Updater_t()),
+    m_factories (ti_map_t::Updater_t())
 {
   m_types.reserve (auxid_set_size_hint);
 
@@ -419,7 +419,7 @@ AuxTypeRegistry::AuxTypeRegistry()
  */
 AuxTypeRegistry::~AuxTypeRegistry()
 {
-  for (ti_map_t::value_type& p : m_factories)
+  for (auto& p : m_factories)
     delete p.second;
   for (const IAuxTypeVectorFactory* p : m_oldFactories)
     delete p;
@@ -453,9 +453,9 @@ AuxTypeRegistry::findAuxID (const std::string& name,
                             const std::type_info& ti,
                             IAuxTypeVectorFactory* (AuxTypeRegistry::*makeFactory) () const)
 {
-  lock_t lock (m_mutex);
-  key_t key (name, clsname);
-  id_map_t::iterator i = m_auxids.find (key);
+  lock_t lock (m_mutex);  // May be able to relax this lock.
+  std::string key = makeKey (name, clsname);
+  id_map_t::const_iterator i = m_auxids.find (key);
   if (i != m_auxids.end()) {
     typeinfo_t& m = m_types[i->second];
 
@@ -479,7 +479,7 @@ AuxTypeRegistry::findAuxID (const std::string& name,
         IAuxTypeVectorFactory* fac2 = (*this.*makeFactory)();
         if (fac2) {
           addFactory (lock, ti, fac2);
-          m.m_factory = getFactory (lock, ti);
+          m.m_factory = getFactory (ti);
         }
       }
       return i->second;
@@ -490,12 +490,12 @@ AuxTypeRegistry::findAuxID (const std::string& name,
     // fall through, get a new auxid and real type info
     // new auxid needed so a new data vector is created in the AuxStore
   }
-  const IAuxTypeVectorFactory* fac = getFactory (lock, ti);
+  const IAuxTypeVectorFactory* fac = getFactory (ti);
   if (!fac || fac->isDynamic()) {
     IAuxTypeVectorFactory* fac2 = (*this.*makeFactory)();
     if (fac2) {
       addFactory (lock, ti, fac2);
-      fac = getFactory (lock, ti);
+      fac = getFactory (ti);
     }
   }
   if (!fac) return null_auxid;
@@ -508,7 +508,7 @@ AuxTypeRegistry::findAuxID (const std::string& name,
   t.m_factory = fac;
   t.m_flags = flags;
   AthContainers_detail::fence_seq_cst();
-  m_auxids[key] = auxid;
+  m_auxids.insert_or_assign (key, auxid);
 
   return auxid;
 }
-- 
GitLab


From ff00aca8ad883619fdb69701315d7669525d1580 Mon Sep 17 00:00:00 2001
From: Dan Guest <daniel.hay.guest@cern.ch>
Date: Sat, 19 Dec 2020 16:11:23 +0000
Subject: [PATCH 148/308] ATLASRECTS-5201: DL1 double -> float encore

---
 .../JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx
index 1f3b1a95c823..b521064476b2 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/HbbTag.cxx
@@ -161,9 +161,9 @@ namespace {
         return {hk::eta, j.eta()};
       };
     } else {
-      // for now we assume everything we read from b-tagging is a double,
+      // for now we assume everything we read from b-tagging is a float,
       // this is only true for DL1 scores.
-      return BTagPairGetter<double>(key);
+      return BTagPairGetter<float>(key);
     }
   }
 
-- 
GitLab


From ede21980b73df73248198b643b69e05606e5045f Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Sat, 19 Dec 2020 16:12:30 +0000
Subject: [PATCH 149/308] Hepmc3 nightly fixes 17122020 part 2

---
 Generators/Pythia8_i/src/Pythia8_i.cxx | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Generators/Pythia8_i/src/Pythia8_i.cxx b/Generators/Pythia8_i/src/Pythia8_i.cxx
index 3b4206af8779..b54fbea36b22 100644
--- a/Generators/Pythia8_i/src/Pythia8_i.cxx
+++ b/Generators/Pythia8_i/src/Pythia8_i.cxx
@@ -606,6 +606,26 @@ StatusCode Pythia8_i::genFinalize(){
 ////////////////////////////////////////////////////////////////////////////////
 void Pythia8_i::addLHEToHepMC(HepMC::GenEvent *evt){
 
+#ifdef HEPMC3
+  HepMC::GenEvent *procEvent = new HepMC::GenEvent();
+
+  // Adding the LHE event to the HepMC results in undecayed partons in the event record.
+  // Pythia's HepMC converter throws up undecayed partons, so we ignore that
+  // (expected) exception this time
+  m_pythiaToHepMC.fill_next_event(m_pythia->process, procEvent, evt->event_number(), &m_pythia->info, &m_pythia->settings);
+
+  for(auto  p: *procEvent){
+    p->set_status(1003);
+  }
+
+  //This code and the HepMC2 version below assume a correct input, e.g. beams[0]->end_vertex() exists.
+  for(auto  v: procEvent->vertices()) v->set_status(1);
+  auto beams=evt->beams();
+  auto procBeams=procEvent->beams();
+  if(beams[0]->momentum().pz() * procBeams[0]->momentum().pz() < 0.) std::swap(procBeams[0],procBeams[1]);
+  for (auto p: procBeams[0]->end_vertex()->particles_out())  beams[0]->end_vertex()->add_particle_out(p);
+  for (auto p: procBeams[1]->end_vertex()->particles_out())  beams[1]->end_vertex()->add_particle_out(p);
+#else
   HepMC::GenEvent *procEvent = new HepMC::GenEvent(evt->momentum_unit(), evt->length_unit());
 
   // Adding the LHE event to the HepMC results in undecayed partons in the event record.
@@ -668,6 +688,7 @@ void Pythia8_i::addLHEToHepMC(HepMC::GenEvent *evt){
     vit = vtxCopies.find((*p)->end_vertex());
     if(vit != vtxCopies.end()) vit->second->add_particle_in(pCopy);
   }
+#endif
 
   return;
 }
-- 
GitLab


From 6d2d38f65ecc5307e1ebfa90d21642f42bc48b8c Mon Sep 17 00:00:00 2001
From: Giancarlo Panizzo <giancarlo.panizzo@cern.ch>
Date: Sun, 20 Dec 2020 09:37:02 +0000
Subject: [PATCH 150/308] Fix problems with ART tests in master, r 22

---
 Generators/Pythia8_i/src/Pythia8_i.cxx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Generators/Pythia8_i/src/Pythia8_i.cxx b/Generators/Pythia8_i/src/Pythia8_i.cxx
index 3b4206af8779..6ff590bcda8a 100644
--- a/Generators/Pythia8_i/src/Pythia8_i.cxx
+++ b/Generators/Pythia8_i/src/Pythia8_i.cxx
@@ -76,7 +76,7 @@ m_failureCount(0),
 m_procPtr(0),
 m_userHooksPtrs(),
 m_doLHE3Weights(false),
-m_athenaTool("IPythia8Custom")
+m_athenaTool("")
 {
   declareProperty("Commands", m_commands);
   declareProperty("CollisionEnergy", m_collisionEnergy = 14000.0);
@@ -191,7 +191,7 @@ StatusCode Pythia8_i::genInitialize() {
     m_pythia->settings.addWord(param.first, param.second);
   }
 
-  if(m_athenaTool.typeAndName() != "IPythia8Custom"){
+  if( ! m_athenaTool.empty() ){
     if(m_athenaTool.retrieve().isFailure()){
       ATH_MSG_ERROR("Unable to retrieve Athena Tool for custom Pythia processing");
       return StatusCode::FAILURE;
@@ -202,7 +202,6 @@ StatusCode Pythia8_i::genInitialize() {
     }
   }
 
-
   // Now apply the settings from the JO
   for(const std::string &cmd : m_commands){
 
@@ -386,7 +385,8 @@ StatusCode Pythia8_i::callGenerator(){
     }
   }
 
-  if(m_athenaTool.typeAndName() != "IPythia8Custom"){
+  ATH_MSG_DEBUG("Now checking with Tool.empty() second time");
+  if( ! m_athenaTool.empty() ){
       StatusCode stat = m_athenaTool->ModifyPythiaEvent(*m_pythia);
       if(stat != StatusCode::SUCCESS) returnCode = stat;
   }
@@ -570,7 +570,7 @@ StatusCode Pythia8_i::genFinalize(){
     std::cout << "Using FxFx cross section recipe: xs = "<< m_sigmaTotal << " / " << 1e9*info.nTried() << std::endl;
   }
 
-  if(m_athenaTool.typeAndName() != "IPythia8Custom"){
+  if( ! m_athenaTool.empty()){
     double xsmod = m_athenaTool->CrossSectionScaleFactor();
     ATH_MSG_DEBUG("Multiplying cross-section by Pythia Modifier tool factor " << xsmod );
     xs *= xsmod;
-- 
GitLab


From 8ad4844fbee60d522acece11d6c2c5caaa80af41 Mon Sep 17 00:00:00 2001
From: Joerg Stelzer <joerg.stelzer@cern.ch>
Date: Sun, 20 Dec 2020 19:04:43 +0100
Subject: [PATCH 151/308] Fix once-per-job memory leak in CTP simulation

---
 Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.cxx | 11 +++++++----
 Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.h   |  4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.cxx b/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.cxx
index 890651d88094..78a8f419f534 100644
--- a/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.cxx
+++ b/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.cxx
@@ -38,6 +38,9 @@ LVL1CTP::ResultBuilder::ResultBuilder( const std::string& type,
 
 LVL1CTP::ResultBuilder::~ResultBuilder() {
    delete m_ctpDataFormat;
+   for(auto & x : m_internalTrigger) {
+      delete x.second;
+   }
 }
 
 
@@ -78,10 +81,10 @@ LVL1CTP::ResultBuilder::createTriggerConfigMaps(const ConfigSource & cfgSrc) con
       }
 
       // build map of name to ctp thresholds
-      m_thrConfigMap = new ThresholdMap( cfgSrc.l1menu() );
+      m_thrConfigMap = std::make_unique<ThresholdMap>( cfgSrc.l1menu() );
 
       // build map of name to ctp items
-      m_itemConfigMap = new ItemMap( cfgSrc.l1menu() );
+      m_itemConfigMap = std::make_unique<ItemMap>( cfgSrc.l1menu() );
 
    } else if( cfgSrc.ctpConfig() != nullptr ) {
 
@@ -102,9 +105,9 @@ LVL1CTP::ResultBuilder::createTriggerConfigMaps(const ConfigSource & cfgSrc) con
          m_internalTrigger[ rndm->name() ] = rndm;
       }
 
-      m_thrConfigMap = new ThresholdMap( cfgSrc.ctpConfig()->menu().thresholdVector());
+      m_thrConfigMap = std::make_unique<ThresholdMap>( cfgSrc.ctpConfig()->menu().thresholdVector());
 
-      m_itemConfigMap = new ItemMap( cfgSrc.ctpConfig()->menu().itemVector(), 
+      m_itemConfigMap = std::make_unique<ItemMap>( cfgSrc.ctpConfig()->menu().itemVector(),
                                      cfgSrc.ctpConfig()->prescaleSet() );
    } else {
       ATH_MSG_FATAL("No L1 trigger menu was provided");
diff --git a/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.h b/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.h
index a211285f9b04..3694457bd1e8 100644
--- a/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.h
+++ b/Trigger/TrigT1/TrigT1CTP/src/ResultBuilder.h
@@ -95,8 +95,8 @@ namespace LVL1CTP {
       std::vector<std::string> firedItems(const std::vector<uint32_t>& triggerWords) const;
 
       // configuration information
-      mutable ThresholdMap*         m_thrConfigMap ATLAS_THREAD_SAFE { nullptr };    //!< Map between threshold objects and their CTP-internal description
-      mutable ItemMap*              m_itemConfigMap ATLAS_THREAD_SAFE { nullptr };   //!< Map between item objects and their CTP-internal description
+      mutable std::unique_ptr<ThresholdMap>         m_thrConfigMap ATLAS_THREAD_SAFE { nullptr };    //!< Map between threshold objects and their CTP-internal description
+      mutable std::unique_ptr<ItemMap>              m_itemConfigMap ATLAS_THREAD_SAFE { nullptr };   //!< Map between item objects and their CTP-internal description
       mutable InternalTriggerMap    m_internalTrigger ATLAS_THREAD_SAFE;             //!< internal triggers BGRP and RNDM
       unsigned int                  m_ctpVersionNumber { 4 };      //!< CTP data format version (4 in most of Run 2 and in Run 3) 
       CTPdataformatVersion*         m_ctpDataFormat { nullptr };   //!< CTP data format details
-- 
GitLab


From c0b23d3a164e73c09e98b2f389a175c9fbc89838 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 05:46:32 +0100
Subject: [PATCH 152/308] TrigConfStorage: Fix memory leaks.

Fix a few memory leaks.
---
 .../TrigConfStorage/src/L1TopoMenuLoader.cxx             | 4 +---
 .../TrigConfStorage/src/LogicExpression.cxx              | 9 +++++++--
 .../TrigConfStorage/src/ThresholdConfigLoader.cxx        | 4 ++--
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/L1TopoMenuLoader.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/L1TopoMenuLoader.cxx
index 769f8dbaec29..34183f582c52 100644
--- a/Trigger/TrigConfiguration/TrigConfStorage/src/L1TopoMenuLoader.cxx
+++ b/Trigger/TrigConfiguration/TrigConfStorage/src/L1TopoMenuLoader.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "L1TopoMenuLoader.h"
@@ -702,14 +702,12 @@ bool TrigConf::L1TopoMenuLoader::loadTopoConfig( TXC::L1TopoMenu& tcaTarget) {
       fillQuery(query0.get(), attList0);
       coral::ICursor& cursor0 = query0->execute();
 
-      TXC::L1TopoConfigGlobal* l1topoconfigglobal = new TXC::L1TopoConfigGlobal();
       while(cursor0.next()){
          const coral::AttributeList& row0 = cursor0.currentRow();
 
          string tc_name = row0["TC.TC_NAME"].data<string>();
          string tc_value = row0["TC.TC_VALUE"].data<string>();
 
-         l1topoconfigglobal->addTopoConfigElement(tc_name,tc_value);
          tcaTarget.addL1TopoConfigGlobal(TXC::TopoConfigElement(tc_name,tc_value));
       }
 
diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/LogicExpression.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/LogicExpression.cxx
index 1f077490875a..385a070811f7 100755
--- a/Trigger/TrigConfiguration/TrigConfStorage/src/LogicExpression.cxx
+++ b/Trigger/TrigConfiguration/TrigConfStorage/src/LogicExpression.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "./LogicExpression.h"
@@ -25,7 +25,9 @@ LogicExpression::LogicExpression(const std::string& name, std::ostream & o)
 {}
 
 
-LogicExpression::~LogicExpression() {}
+LogicExpression::~LogicExpression()
+{
+}
 
 
 bool
@@ -295,6 +297,9 @@ LogicExpression::print(const std::string& indent) const {
 void
 LogicExpression::clear() {
    m_State = kELEMENT;
+   for (LogicExpression* e : m_SubLogics) {
+     delete e;
+   }
    m_SubLogics.clear();
    m_Element = "";
 }
diff --git a/Trigger/TrigConfiguration/TrigConfStorage/src/ThresholdConfigLoader.cxx b/Trigger/TrigConfiguration/TrigConfStorage/src/ThresholdConfigLoader.cxx
index 40d7d496d29b..1a136dd22ac8 100755
--- a/Trigger/TrigConfiguration/TrigConfStorage/src/ThresholdConfigLoader.cxx
+++ b/Trigger/TrigConfiguration/TrigConfStorage/src/ThresholdConfigLoader.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "./ThresholdConfigLoader.h"
@@ -416,7 +416,7 @@ bool TrigConf::ThresholdConfigLoader::load( ThresholdConfig& thrConfig ) {
             //tt->setNumberofValues(numberofvalues);
             // trigger thresholds sorted by type
             thrConfig.addTriggerThreshold(tt);
-            tt = new TriggerThreshold();
+            tt = nullptr;
          }
 
          nRowsLoop2 = row["TT.L1TT_ID"].data<int>();
-- 
GitLab


From 52f33de9f81ecedeaa89628cde77b13e1c7d47d4 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Sat, 19 Dec 2020 16:45:59 +0100
Subject: [PATCH 153/308] JetTagCalibration: Trying to fix memory leak.

In JetTagCalibCondAlg, make sure that the TObjArray we read owns its elements.
---
 .../JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx
index d355ea90553d..c44cbab6be97 100644
--- a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 /*
  *   */
@@ -560,6 +560,7 @@ namespace Analysis {
                 TObjArray * toa = dynamic_cast<TObjArray*>(hPointer.get());
                 if (toa) {
                   ATH_MSG_DEBUG("#BTAG# The TObjArray to build the input variables of BDT for " << tagger<< " is valid");
+                  toa->SetOwner (true);
                   std::vector<std::string> inputVars; inputVars.clear();
                   std::string commaSepVars="";
                   TObjString *tos= nullptr;
-- 
GitLab


From 2f938d9d987e9c1fb82874abd2e02be8fc513275 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Thu, 17 Dec 2020 00:26:07 +0100
Subject: [PATCH 154/308] TileTrackingGeometry: Fix leaks.

Fix leaks of Trk::Material objects.
---
 .../TileTrackingGeometry/CMakeLists.txt       |  2 +-
 .../TileTrackingGeometry/TileVolumeBuilder.h  |  8 +++
 .../src/TileVolumeBuilder.cxx                 | 54 +++++++++++--------
 3 files changed, 41 insertions(+), 23 deletions(-)

diff --git a/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt b/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt
index fc4d3393492d..1f77414b14b7 100644
--- a/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt
+++ b/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_add_component( TileTrackingGeometry
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrInterfaces CaloDetDescrLib StoreGateLib TileDetDescr TrkDetDescrGeoModelCnv TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes CaloTrackingGeometryLib )
+                     LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrInterfaces CaloDetDescrLib StoreGateLib TileDetDescr TrkDetDescrGeoModelCnv TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes CaloTrackingGeometryLib CxxUtils )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/TileCalorimeter/TileTrackingGeometry/TileTrackingGeometry/TileVolumeBuilder.h b/TileCalorimeter/TileTrackingGeometry/TileTrackingGeometry/TileVolumeBuilder.h
index 863678fc4fda..bd3a93c594e1 100755
--- a/TileCalorimeter/TileTrackingGeometry/TileTrackingGeometry/TileVolumeBuilder.h
+++ b/TileCalorimeter/TileTrackingGeometry/TileTrackingGeometry/TileVolumeBuilder.h
@@ -12,11 +12,15 @@
 // Gaudi
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "CxxUtils/checker_macros.h"
 // Trk
 #include "TrkDetDescrInterfaces/ITrackingVolumeBuilder.h"
 #include "CaloTrackingGeometry/ICaloSurfaceBuilder.h"
+#include "TrkGeometry/Material.h"
 // STL
 #include <vector>
+#include <memory>
+#include <mutex>
 
 class TileDetDescrManager;
 class CaloDetDescrManager;
@@ -70,6 +74,8 @@ namespace Tile {
       void printInfo(GeoPVConstLink pv) const;
       void printChildren(GeoPVConstLink pv, int igen, Amg::Transform3D trIn) const;
 
+      void throwIntoGarbage (std::unique_ptr<Trk::Material> mat) const;
+
       const TileDetDescrManager*                        m_tileMgr;                        //!< Calo DetDescrMgr
       std::string                                       m_tileMgrLocation;                //!< Location of the CaloDetDescrMgr
        
@@ -84,6 +90,8 @@ namespace Tile {
       
       bool                             m_forceSymmetry;              //!< forces volume symmetry between negative/positive part
 
+      mutable std::mutex m_garbageMutex;
+      mutable std::vector<std::unique_ptr<Trk::Material> > m_garbage ATLAS_THREAD_SAFE;
   };
   
 } // end of namespace
diff --git a/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx b/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx
index ca6732cc16d8..6e09f563e3a7 100755
--- a/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx
+++ b/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx
@@ -185,8 +185,8 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   std::vector<std::pair<const Trk::Surface*,const Trk::Surface*> > exitSurf  = m_surfBuilder->exitSurfaces();
   
   // averaged material properties 
-  const Trk::Material* barrelProperties = new Trk::Material(22.7, 212., 45.8, 21.4, 0.0062);
-  const Trk::Material* extendedBarrelProperties = new Trk::Material(22.7, 210., 45.8, 21.4, 0.0062);
+  auto barrelProperties = std::make_unique<Trk::Material>(22.7, 212., 45.8, 21.4, 0.0062);
+  auto extendedBarrelProperties = std::make_unique<Trk::Material>(22.7, 210., 45.8, 21.4, 0.0062);
   // material properties with layer encoding - to be defined later 
   const Trk::BinnedMaterial* barrelMaterialBinned = 0;
   const Trk::BinnedMaterial* extendedMaterialBinned = 0;
@@ -201,10 +201,10 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   // layer material can be adjusted here
   std::vector<Trk::IdentifiedMaterial> matTB; 
   int baseID = Trk::GeometrySignature(Trk::Calo)*1000 + 12;
-  matTB.emplace_back(barrelProperties,0);
-  matTB.emplace_back(barrelProperties,baseID);
-  matTB.emplace_back(barrelProperties,baseID+1);
-  matTB.emplace_back(barrelProperties,baseID+2);
+  matTB.emplace_back(barrelProperties.get(),0);
+  matTB.emplace_back(barrelProperties.get(),baseID);
+  matTB.emplace_back(barrelProperties.get(),baseID+1);
+  matTB.emplace_back(barrelProperties.get(),baseID+2);
   
   // material index 
   std::vector<size_t> ltb{0,1,2,3};
@@ -212,10 +212,10 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   // layer material can be adjusted here
   std::vector<Trk::IdentifiedMaterial> matETB; 
   baseID = Trk::GeometrySignature(Trk::Calo)*1000 + 18;
-  matETB.emplace_back(extendedBarrelProperties,0);
-  matETB.emplace_back(extendedBarrelProperties,baseID);
-  matETB.emplace_back(extendedBarrelProperties,baseID+1);
-  matETB.emplace_back(extendedBarrelProperties,baseID+2);
+  matETB.emplace_back(extendedBarrelProperties.get(),0);
+  matETB.emplace_back(extendedBarrelProperties.get(),baseID);
+  matETB.emplace_back(extendedBarrelProperties.get(),baseID+1);
+  matETB.emplace_back(extendedBarrelProperties.get(),baseID+2);
 
   // layer material can be adjusted here
   //Trk::MaterialProperties barrelFingerGapProperties = Trk::MaterialProperties(1., 130./0.35, 0.003*pow(0.35,3),30.);
@@ -292,7 +292,7 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
 	    steps.push_back(depth);
 	    Trk::BinUtility* rBU = new Trk::BinUtility(steps, Trk::open, Trk::binR);
 	    
-	    barrelMaterialBinned = new Trk::BinnedMaterial(barrelProperties,rBU,ltb,matTB);
+	    barrelMaterialBinned = new Trk::BinnedMaterial(barrelProperties.get(),rBU,ltb,matTB);
             
 	    tileBarrel = new Trk::AlignableTrackingVolume(0,align,                          
 							  tileBarrelBounds,
@@ -356,7 +356,7 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
 	    steps.push_back(tileExtendedBounds->outerRadius());
 	    Trk::BinUtility* eBU = new Trk::BinUtility(steps, Trk::open, Trk::binR);
 	    
-	    extendedMaterialBinned = new Trk::BinnedMaterial(extendedBarrelProperties,eBU,ltb,matETB);
+	    extendedMaterialBinned = new Trk::BinnedMaterial(extendedBarrelProperties.get(),eBU,ltb,matETB);
 	    
 	    tileExtendedTrackingVolume = new Trk::AlignableTrackingVolume(new Amg::Transform3D(Amg::Translation3D(childPosition)),
 									  align,
@@ -381,7 +381,7 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
 	      steps.push_back(tileExtendedBounds->outerRadius());
 	      Trk::BinUtility* eBU = new Trk::BinUtility(steps, Trk::open, Trk::binR);
 	      
-	      extendedMaterialBinned = new Trk::BinnedMaterial(extendedBarrelProperties,eBU,ltb,matETB);
+	      extendedMaterialBinned = new Trk::BinnedMaterial(extendedBarrelProperties.get(),eBU,ltb,matETB);
 	      
 	      tileExtendedTrackingVolume = new Trk::AlignableTrackingVolume(new Amg::Transform3D(Amg::Translation3D(childPosition)),
 									    align,
@@ -441,9 +441,9 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   std::vector<Trk::IdentifiedMaterial> matITC;
   // layer material can be adjusted here
   baseID = Trk::GeometrySignature(Trk::Calo)*1000;
-  matITC.emplace_back(barrelProperties,baseID+15);
-  matITC.emplace_back(barrelProperties,baseID+16);
-  matITC.emplace_back(barrelProperties,baseID+17);
+  matITC.emplace_back(barrelProperties.get(),baseID+15);
+  matITC.emplace_back(barrelProperties.get(),baseID+16);
+  matITC.emplace_back(barrelProperties.get(),baseID+17);
 
   // ITCPlug1
   double p1Z = 0.5*(plug1Z-plug1hZ+tileExtZ);
@@ -462,8 +462,8 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   std::vector<float> bpsteps{float(plug1R), float(tileBarrelBounds->outerRadius())};
   Trk::BinUtility* rBU = new Trk::BinUtility(bpsteps, Trk::open, Trk::binR);
   Trk::BinUtility* rBUc = rBU->clone();
-  const Trk::BinnedMaterial* plug1MatPos = new Trk::BinnedMaterial(barrelProperties,rBU,dummylay,matITC);
-  const Trk::BinnedMaterial* plug1MatNeg = new Trk::BinnedMaterial(barrelProperties,rBUc,dummylay,matITC);
+  const Trk::BinnedMaterial* plug1MatPos = new Trk::BinnedMaterial(barrelProperties.get(),rBU,dummylay,matITC);
+  const Trk::BinnedMaterial* plug1MatNeg = new Trk::BinnedMaterial(barrelProperties.get(),rBUc,dummylay,matITC);
 
   Amg::Transform3D* align=0;      
 
@@ -497,8 +497,8 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   std::vector<float> p2steps{float(plug2R), float(plug1R)};
   Trk::BinUtility* p2BU = new Trk::BinUtility(p2steps, Trk::open, Trk::binR);
   Trk::BinUtility* p2BUc = p2BU->clone();
-  const Trk::BinnedMaterial* plug2MatPos = new Trk::BinnedMaterial(barrelProperties,p2BU,p2lay,matITC);
-  const Trk::BinnedMaterial* plug2MatNeg = new Trk::BinnedMaterial(barrelProperties,p2BUc,p2lay,matITC);
+  const Trk::BinnedMaterial* plug2MatPos = new Trk::BinnedMaterial(barrelProperties.get(),p2BU,p2lay,matITC);
+  const Trk::BinnedMaterial* plug2MatNeg = new Trk::BinnedMaterial(barrelProperties.get(),p2BUc,p2lay,matITC);
       
   Trk::AlignableTrackingVolume* itcPlug2Pos = new Trk::AlignableTrackingVolume(itcP2PosTransform, align,
 									       itcPlug2Bounds,
@@ -530,7 +530,7 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
   std::vector<size_t> glay(1,2);
   std::vector<float> gsteps{float(gapi-gapBounds->halflengthZ()), float(gapi+gapBounds->halflengthZ())};
   Trk::BinUtility* gp = new Trk::BinUtility(gsteps, Trk::open, Trk::binZ);
-  const Trk::BinnedMaterial* gpMat = new Trk::BinnedMaterial(barrelProperties,gp,glay,matITC);
+  const Trk::BinnedMaterial* gpMat = new Trk::BinnedMaterial(barrelProperties.get(),gp,glay,matITC);
       
   Trk::AlignableTrackingVolume* gapPos = new Trk::AlignableTrackingVolume(gapPosTransform, align,
 									  gapBounds,
@@ -540,7 +540,7 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
 
   std::vector<float> nsteps{float(-gapi-gapBounds->halflengthZ()), float(-gapi+gapBounds->halflengthZ())};
   Trk::BinUtility* gn = new Trk::BinUtility(nsteps, Trk::open, Trk::binZ);
-  const Trk::BinnedMaterial* gnMat = new Trk::BinnedMaterial(barrelProperties,gn,glay,matITC);
+  const Trk::BinnedMaterial* gnMat = new Trk::BinnedMaterial(barrelProperties.get(),gn,glay,matITC);
       
   Trk::AlignableTrackingVolume* gapNeg = new Trk::AlignableTrackingVolume(gapNegTransform, align,
 									  gapBounds->clone(),
@@ -795,6 +795,9 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking
     printCheckResult(msg(MSG::DEBUG), tileGirder);
   } // end of detailed output
 
+  throwIntoGarbage (std::move (barrelProperties));
+  throwIntoGarbage (std::move (extendedBarrelProperties));
+
   return tileTrackingVolumes;
 }
 
@@ -857,3 +860,10 @@ void Tile::TileVolumeBuilder::printChildren(const PVConstLink pv,int igen, Amg::
   }  
    
 }
+
+
+void Tile::TileVolumeBuilder::throwIntoGarbage (std::unique_ptr<Trk::Material> mat) const
+{
+  std::scoped_lock lock (m_garbageMutex);
+  m_garbage.push_back (std::move (mat));
+}
-- 
GitLab


From 38a6b8aa96575bb89af116f9425808c56a068c52 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 15:47:05 -0500
Subject: [PATCH 155/308] ElectronPhotonShowerShapeFudgeTool: cmake fix

Typo in ROOT library name.
---
 .../ElectronPhotonShowerShapeFudgeTool/CMakeLists.txt           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonShowerShapeFudgeTool/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonShowerShapeFudgeTool/CMakeLists.txt
index ca06985255b7..1498568361a3 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonShowerShapeFudgeTool/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonShowerShapeFudgeTool/CMakeLists.txt
@@ -4,7 +4,7 @@
 atlas_subdir( ElectronPhotonShowerShapeFudgeTool )
 
 # External dependencies:
-find_package( ROOT COMPONENTS Core MathCore Hist Graph RIO )
+find_package( ROOT COMPONENTS Core MathCore Hist Graf RIO )
 
 # Component(s) in the package:
 atlas_add_library( ElectronPhotonShowerShapeFudgeToolLib
-- 
GitLab


From 723b782af198f69e382d77b110a80a692988eadd Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 16:55:34 -0500
Subject: [PATCH 156/308] DerivationFrameworkMuons: cmake fix

The src/compoents/* files should go into only the component library.
---
 .../DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt
index 1cff0de860dc..fbe51bc9e84a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/CMakeLists.txt
@@ -9,7 +9,7 @@ find_package( ROOT COMPONENTS Core MathCore )
 # Component(s) in the package:
 #the library is used by the MCP software https://gitlab.cern.ch/atlas-mcp/MuonPerformanceAnalysis
 atlas_add_library( DerivationFrameworkMuonsLib
-   DerivationFrameworkMuons/*.h src/*.cxx src/components/*.cxx
+   DerivationFrameworkMuons/*.h src/*.cxx
    PUBLIC_HEADERS DerivationFrameworkMuons
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
    LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthContainers AthenaBaseComps AthenaKernel CaloEvent CaloGeoHelpers DerivationFrameworkInterfaces ExpressionEvaluationLib FourMomUtils GaudiKernel ICaloTrkMuIdTools InDetTrackSelectionToolLib MCTruthClassifierLib RecoToolInterfaces TrigDecisionToolLib TrigMuonMatchingLib TrkExInterfaces TrkParameters TrkSurfaces muonEvent xAODBase xAODCaloEvent xAODEventInfo xAODJet xAODMuon xAODPrimitives xAODTracking xAODTruth )
-- 
GitLab


From 11f47745be4f4fa31c1bfa585bf600f7aee0486d Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 16:07:38 -0500
Subject: [PATCH 157/308] xAODBTaggingEfficiency: Fix gcc11 warning.

Usused typedef.
---
 .../xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx     | 1 -
 1 file changed, 1 deletion(-)

diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx
index 3f728ee3f1a8..3d864fa7a1fc 100644
--- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx
@@ -1126,7 +1126,6 @@ StatusCode BTaggingTruthTaggingTool::getDirectTaggedJets(TRFinfo &trfinf,std::ve
 
 
 double BTaggingTruthTaggingTool::getEvtSF(TRFinfo &trfinf,int sys){
-  ANA_CHECK_SET_TYPE (StatusCode);
   double SF = 1.;
   std::vector<bool> is_tagged;
   ANA_CHECK_THROW( getDirectTaggedJets(trfinf,is_tagged) );
-- 
GitLab


From 2f81a69201baf272ade8a688590ac791387b0d93 Mon Sep 17 00:00:00 2001
From: fdelrio <fdelrio@cern.ch>
Date: Mon, 21 Dec 2020 09:27:52 +0100
Subject: [PATCH 158/308] Added cleaning variables for RScan jets

---
 .../python/AntiKt2LCTopoJetsCPContent.py                        | 2 +-
 .../python/AntiKt6LCTopoJetsCPContent.py                        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py
index 0cfdc2899869..a297308e6338 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt2LCTopoJetsCPContent.py
@@ -4,7 +4,7 @@ AntiKt2LCTopoJetsCPContent = [
 "Kt4LCTopoOriginEventShape",
 "Kt4LCTopoOriginEventShapeAux.Density",
 "AntiKt2LCTopoJets",
-"AntiKt2LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing",
+"AntiKt2LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing.EMFrac.HECFrac.AverageLArQF.NegativeE.LArQuality.HECQuality",
 "MET_Track",
 "MET_TrackAux.name.mpx.mpy",
 "PrimaryVertices",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py
index c88b609afbe6..1dd1e51247f3 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/AntiKt6LCTopoJetsCPContent.py
@@ -4,7 +4,7 @@ AntiKt6LCTopoJetsCPContent = [
 "Kt4LCTopoOriginEventShape",
 "Kt4LCTopoOriginEventShapeAux.Density",
 "AntiKt6LCTopoJets",
-"AntiKt6LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing",
+"AntiKt6LCTopoJetsAux.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.EnergyPerSampling.ActiveArea4vec_eta.ActiveArea4vec_m.ActiveArea4vec_phi.ActiveArea4vec_pt.DetectorEta.DetectorY.FracSamplingMax.FracSamplingMaxIndex.GhostTrack.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.Timing.EMFrac.HECFrac.AverageLArQF.NegativeE.LArQuality.HECQuality",
 "MET_Track",
 "MET_TrackAux.name.mpx.mpy",
 "PrimaryVertices",
-- 
GitLab


From 1d04b1c38dd50959c382cba64b2b133005a5da9b Mon Sep 17 00:00:00 2001
From: Alaettin Serhan Mete <alaettin.serhan.mete@cern.ch>
Date: Mon, 21 Dec 2020 08:57:10 +0000
Subject: [PATCH 159/308] PerfMonComps: Add some additional information to the
 PerfMonMTSvc output

---
 .../PerfMonComps/src/PerfMonMTSvc.cxx         | 193 +++++++++++++-----
 .../PerfMonComps/src/PerfMonMTSvc.h           |  10 +-
 .../PerfMonComps/src/PerfMonMTUtils.h         |   2 +
 3 files changed, 147 insertions(+), 58 deletions(-)

diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
index bd14c1b9e88c..59cafdc5ecef 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.cxx
@@ -13,10 +13,15 @@
 // PerfMonComps includes
 #include "PerfMonMTSvc.h"
 #include "PerfMonUtils.h"  // borrow from existing code
+#include "SemiDetMisc.h"   // borrow from existing code
 
 // STD includes
 #include <algorithm>
 
+// Boost includes
+#include "boost/format.hpp"
+#include "boost/filesystem.hpp"
+
 /*
  * Constructor
  */
@@ -137,7 +142,7 @@ void PerfMonMTSvc::startAud(const std::string& stepName, const std::string& comp
     if (!m_doComponentLevelMonitoring) return;
 
     // Start component auditing
-    auto ctx = Gaudi::Hive::currentContext(); 
+    auto ctx = Gaudi::Hive::currentContext();
     startCompAud(stepName, compName, ctx);
   }
 }
@@ -155,7 +160,7 @@ void PerfMonMTSvc::stopAud(const std::string& stepName, const std::string& compN
     if (!m_doComponentLevelMonitoring) return;
 
     // Stop component auditing
-    auto ctx = Gaudi::Hive::currentContext(); 
+    auto ctx = Gaudi::Hive::currentContext();
     stopCompAud(stepName, compName, ctx);
   }
 }
@@ -207,8 +212,8 @@ void PerfMonMTSvc::startCompAud(const std::string& stepName, const std::string&
   // Generate State
   PMonMT::StepComp currentState = generate_state(stepName, compName);
 
-  // Check if this is the first time calling if so create the mesurement data if not use the existing one. 
-  // Metrics are collected per slot then aggregated before reporting 
+  // Check if this is the first time calling if so create the mesurement data if not use the existing one.
+  // Metrics are collected per slot then aggregated before reporting
   data_map_t& compLevelDataMap = m_compLevelDataMapVec[ctx.valid() ? ctx.slot() : 0];
   if(compLevelDataMap.find(currentState) == compLevelDataMap.end()) {
     compLevelDataMap[currentState] = new PMonMT::MeasurementData();
@@ -312,6 +317,33 @@ bool PerfMonMTSvc::isPower(uint64_t input, uint64_t base) {
   return (input == 1);
 }
 
+/*
+ * Helper finction to estimate CPU efficiency
+ */
+int PerfMonMTSvc::getCpuEfficiency() const {
+
+  // In AthenaMT only the event-loop is executed concurrently
+  // In this metric, we scale the event-loop wall-time by
+  // the number of slots to take the concurrency into account
+  // Then we divide the total cpu-time by this number
+  // It's A metric not THE metric...
+
+  const float totalCpuTime =
+   m_snapshotData[CONFIGURE].getDeltaCPU()  +
+   m_snapshotData[INITIALIZE].getDeltaCPU() +
+   m_snapshotData[EXECUTE].getDeltaCPU()    +
+   m_snapshotData[FINALIZE].getDeltaCPU();
+
+  const float scaledWallTime =
+   m_snapshotData[CONFIGURE].getDeltaWall()  * 1. +
+   m_snapshotData[INITIALIZE].getDeltaWall() * 1. +
+   m_snapshotData[EXECUTE].getDeltaWall()    * m_numberOfSlots +
+   m_snapshotData[FINALIZE].getDeltaWall()   * 1.;
+
+  return ( scaledWallTime > 0 ? totalCpuTime / scaledWallTime * 100. : 0 );
+
+}
+
 /*
  * Report the results to the log and the JSON file
  */
@@ -345,6 +377,7 @@ void PerfMonMTSvc::report2Log() {
   // Summary and system information
   report2Log_Summary();
   report2Log_CpuInfo();
+  report2Log_EnvInfo();
 }
 
 /*
@@ -377,7 +410,7 @@ void PerfMonMTSvc::report2Log_ComponentLevel() {
   ATH_MSG_INFO("                             Component Level Monitoring                                ");
   ATH_MSG_INFO("=======================================================================================");
 
-  ATH_MSG_INFO(format("%1% %|15t|%2% %|25t|%3% %|40t|%4% %|55t|%5% %|75t|%6%") % "Step" % "Count" % "CPU Time [ms]" % 
+  ATH_MSG_INFO(format("%1% %|15t|%2% %|25t|%3% %|40t|%4% %|55t|%5% %|75t|%6%") % "Step" % "Count" % "CPU Time [ms]" %
                "Vmem [kB]" % "Malloc [kB]" % "Component");
 
   ATH_MSG_INFO("---------------------------------------------------------------------------------------");
@@ -408,7 +441,7 @@ void PerfMonMTSvc::report2Log_ComponentLevel() {
                    it.second->getCallCount() % it.second->getDeltaCPU() % it.second->getDeltaVmem() %
                    it.second->getDeltaMalloc() % it.first.compName);
     }
-    if(counter>0) { 
+    if(counter>0) {
       ATH_MSG_INFO("=======================================================================================");
     }
   }
@@ -426,8 +459,8 @@ void PerfMonMTSvc::report2Log_EventLevel_instant() const {
   long pss = m_eventLevelData.getEventLevelPss(m_eventCounter);
   long swap = m_eventLevelData.getEventLevelSwap(m_eventCounter);
 
-  ATH_MSG_INFO("Event [" << std::setw(5) << m_eventCounter << "] CPU Time: " << scaleTime(cpu_time) << 
-               ", Wall Time: " <<  scaleTime(wall_time) << ", Vmem: " << scaleMem(vmem) << 
+  ATH_MSG_INFO("Event [" << std::setw(5) << m_eventCounter << "] CPU Time: " << scaleTime(cpu_time) <<
+               ", Wall Time: " <<  scaleTime(wall_time) << ", Vmem: " << scaleMem(vmem) <<
                ", Rss: " << scaleMem(rss) << ", Pss: " << scaleMem(pss) << ", Swap: " << scaleMem(swap));
 }
 
@@ -438,8 +471,8 @@ void PerfMonMTSvc::report2Log_EventLevel() {
   using boost::format;
 
   ATH_MSG_INFO("                                Event Level Monitoring                                 ");
-  ATH_MSG_INFO("                 (Only first " << m_eventLoopMsgLimit.toString() <<
-               " measurements are explicitly printed)");
+  ATH_MSG_INFO("        (Only the first " << m_eventLoopMsgLimit.toString() <<
+               " and the last measurements are explicitly printed)");
   ATH_MSG_INFO("=======================================================================================");
 
   ATH_MSG_INFO(format("%1% %|16t|%2% %|28t|%3% %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % "Event" % "CPU [s]" %
@@ -448,14 +481,19 @@ void PerfMonMTSvc::report2Log_EventLevel() {
   ATH_MSG_INFO("---------------------------------------------------------------------------------------");
 
   m_eventLoopMsgCounter = 0; // reset counter
+  unsigned long nMeasurements = m_eventLevelData.getNMeasurements();
 
   for (const auto& it : m_eventLevelData.getEventLevelData()) {
-    if(m_eventLoopMsgCounter < m_eventLoopMsgLimit) {
+    // Print
+    if(m_eventLoopMsgCounter < m_eventLoopMsgLimit || m_eventLoopMsgCounter == nMeasurements - 1) {
+      if(m_eventLoopMsgCounter > m_eventLoopMsgLimit) {
+        ATH_MSG_INFO(format("%|=87|") % "...");
+      }
       ATH_MSG_INFO(format("%1% %|16t|%2$.2f %|28t|%3$.2f %|40t|%4% %|52t|%5% %|64t|%6% %|76t|%7%") % it.first %
                    (it.second.cpu_time * 0.001) % (it.second.wall_time * 0.001) % it.second.mem_stats.at("vmem") %
                    it.second.mem_stats.at("rss") % it.second.mem_stats.at("pss") % it.second.mem_stats.at("swap"));
-      m_eventLoopMsgCounter++;
     }
+    m_eventLoopMsgCounter++;
     // Add to leak estimate
     if (it.first >= 25) {
       m_fit_vmem.addPoint(it.first, it.second.mem_stats.at("vmem"));
@@ -471,7 +509,7 @@ void PerfMonMTSvc::report2Log_EventLevel() {
 void PerfMonMTSvc::report2Log_Summary() {
   using boost::format;
 
-  ATH_MSG_INFO("                                 Snaphots Summary                                      ");
+  ATH_MSG_INFO("                                Snapshots Summary                                      ");
   ATH_MSG_INFO("=======================================================================================");
 
   ATH_MSG_INFO(format("%1% %|13t|%2% %|25t|%3% %|37t|%4% %|44t|%5% %|55t|%6% %|66t|%7% %|77t|%8%") % "Step" %
@@ -495,6 +533,7 @@ void PerfMonMTSvc::report2Log_Summary() {
                (m_snapshotData[EXECUTE].getDeltaCPU() / m_eventCounter));
   ATH_MSG_INFO(format("%1% %|35t|%2$.3f ") % "Events per second:" %
                (m_eventCounter / m_snapshotData[EXECUTE].getDeltaWall() * 1000.));
+  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "CPU utilization efficiency [%]:" % getCpuEfficiency());
 
   if (m_doEventLoopMonitoring) {
     ATH_MSG_INFO("***************************************************************************************");
@@ -523,10 +562,28 @@ void PerfMonMTSvc::report2Log_CpuInfo() const {
 
   ATH_MSG_INFO(format("%1% %|34t|%2% ") % "CPU Model:" % get_cpu_model_info());
   ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Number of Available Cores:" % get_cpu_core_info());
+  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Total Memory:" % scaleMem(get_memory_info()));
 
   ATH_MSG_INFO("=======================================================================================");
 }
 
+/*
+ * Report run-time enviroment information
+ */
+void PerfMonMTSvc::report2Log_EnvInfo() const {
+  using boost::format;
+  using boost::filesystem::path;
+
+  ATH_MSG_INFO("                               Environment Information                                 ");
+  ATH_MSG_INFO("=======================================================================================");
+
+  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Malloc Library:" % path(PMonSD::symb2lib("malloc")).filename().string());
+  ATH_MSG_INFO(format("%1% %|35t|%2% ") % "Math Library:" % path(PMonSD::symb2lib("atan2")).filename().string());
+
+  ATH_MSG_INFO("=======================================================================================");
+
+}
+
 /*
  * Report data to JSON
  */
@@ -569,7 +626,7 @@ void PerfMonMTSvc::report2JsonFile() {
  * Report summary data to JSON
  */
 void PerfMonMTSvc::report2JsonFile_Summary(nlohmann::json& j) const {
-  
+
   // Report snapshot level results
   for(int i=0; i < NSNAPSHOTS; i++){
 
@@ -617,29 +674,43 @@ void PerfMonMTSvc::report2JsonFile_Summary(nlohmann::json& j) const {
   // Report Sys info
   const std::string cpuModel = get_cpu_model_info();
   const int coreNum = get_cpu_core_info();
+  const long totMem = get_memory_info();
 
   j["summary"]["sysInfo"] = {{"cpuModel", cpuModel},
-                             {"coreNum", coreNum}};
+                             {"coreNum", coreNum},
+                             {"totMem", totMem}};
+
+  // Report Enviroment info
+  const std::string mallocLib = boost::filesystem::path(PMonSD::symb2lib("malloc")).filename().string();
+  const std::string mathLib = boost::filesystem::path(PMonSD::symb2lib("atan2")).filename().string();
+
+  j["summary"]["envInfo"] = {{"mallocLib", mallocLib},
+                             {"mathLib", mathLib}};
+
+  // Report CPU utilization efficiency;
+  const int cpuUtilEff = getCpuEfficiency();
+  j["summary"]["misc"] = {{"cpuUtilEff", cpuUtilEff}};
+
 }
 
 void PerfMonMTSvc::report2JsonFile_ComponentLevel(nlohmann::json& j) const {
 
   for (const auto& dataMapPerStep : m_stdoutVec_serial) {
-    
+
     for(const auto& meas : dataMapPerStep){
 
       const std::string step = meas.first.stepName;
-      const std::string component = meas.first.compName; 
+      const std::string component = meas.first.compName;
       const uint64_t count = meas.second->getCallCount();
       const double cpuTime = meas.second->getDeltaCPU();
-      const long vmem  = meas.second->getDeltaVmem(); 
+      const long vmem  = meas.second->getDeltaVmem();
       const int mall = meas.second->getDeltaMalloc();
 
       j["componentLevel"][step][component] = {{"count", count},
                                               {"cpuTime", cpuTime},
                                               {"vmem", vmem},
                                               {"malloc", mall}};
-    }    
+    }
 
   }
 
@@ -648,7 +719,7 @@ void PerfMonMTSvc::report2JsonFile_ComponentLevel(nlohmann::json& j) const {
 void PerfMonMTSvc::report2JsonFile_EventLevel(nlohmann::json& j) const {
 
   for (const auto& it : m_eventLevelData.getEventLevelData()) {
-    
+
     const uint64_t event = it.first;
     const double cpuTime = it.second.cpu_time;
     const double wallTime = it.second.wall_time;
@@ -724,7 +795,7 @@ void PerfMonMTSvc::divideData2Steps() {
 std::string PerfMonMTSvc::scaleTime(double timeMeas) const {
   // Not a huge fan of this, we should eventually unify the types
   // Just want to be explicit about what's happening
-  long ms = (long) timeMeas; 
+  long ms = (long) timeMeas;
 
   // Compute hrs and offset
   auto hrs = ms / 3600000;
@@ -739,13 +810,18 @@ std::string PerfMonMTSvc::scaleTime(double timeMeas) const {
   // Primarily care about H:M:S
   std::stringstream ss;
   ss.fill('0');
-  ss << std::setw(2) << hrs << "h" << 
-        std::setw(2) << mins << "m" << 
+  ss << std::setw(2) << hrs << "h" <<
+        std::setw(2) << mins << "m" <<
         std::setw(2) << secs << "s";
   return ss.str();
 }
 
 std::string PerfMonMTSvc::scaleMem(long memMeas) const {
+  // The memory measurements should be positive
+  // Only delta(A,B) can go negative but this method
+  // is not used for those cases, at least for now
+  if (memMeas<0) return "NA";
+
   std::ostringstream ss;
   ss << std::fixed;
   ss << std::setprecision(2);
@@ -789,43 +865,48 @@ std::string PerfMonMTSvc::scaleMem(long memMeas) const {
 /*
  * Collect some hardware information
  */
-std::string PerfMonMTSvc::get_cpu_model_info() const {
-  std::string cpu_model;
-
-  std::ifstream file("/proc/cpuinfo");
-  std::string line;
-  if (file.is_open()) {
-    std::string delimiter = ":";
-    while (getline(file, line)) {
-      std::string key = line.substr(0, line.find(delimiter));
-      if (key == "model name	") {
-        cpu_model = line.substr(line.find(delimiter) + 1, line.length());
-        break;
+std::string PerfMonMTSvc::get_info_from_file(const std::string& fileName,
+                                             const std::string& fieldName) const {
+  // Helper function to read files of type Key : Value
+  // Returns the last instance if there are multiple matches
+  // This is because we use this method to get the processor count
+  std::string result{""};
+
+  std::ifstream file{fileName};
+  std::string line{""};
+
+  while (std::getline(file, line)) {
+    if (line.empty()) continue;
+    size_t splitIdx = line.find(":");
+    if (splitIdx != std::string::npos) {
+      std::string val = line.substr(splitIdx + 1);
+      if (val.empty()) continue;
+      if (line.size() >= fieldName.size() &&
+          line.compare(0, fieldName.size(), fieldName) == 0) {
+        result = val;
       }
     }
-    file.close();
-    return cpu_model;
-  } else {
-    return "Unable to open /proc/cpuinfo";
   }
+
+  file.close();
+
+  return result;
+}
+
+std::string PerfMonMTSvc::get_cpu_model_info() const {
+  return get_info_from_file("/proc/cpuinfo","model name") +
+         get_info_from_file("/proc/cpuinfo","cache size");
 }
 
 int PerfMonMTSvc::get_cpu_core_info() const {
-  int logical_core_num = 0;
-
-  std::ifstream file("/proc/cpuinfo");
-  std::string line;
-  if (file.is_open()) {
-    std::string delimiter = ":";
-    while (getline(file, line)) {
-      std::string key = line.substr(0, line.find(delimiter));
-      if (key == "processor	") {
-        logical_core_num++;
-      }
-    }
-    file.close();
-    return logical_core_num;
-  } else {
-    return -1;
-  }
+  std::string val = get_info_from_file("/proc/cpuinfo","processor");
+  if (val.empty()) return 0;
+  return std::stoi(val) + 1;
+}
+
+long PerfMonMTSvc::get_memory_info() const {
+  std::string val = get_info_from_file("/proc/meminfo","MemTotal");
+  if (val.empty()) return 0;
+  val = val.substr(0, val.size() - 3);  // strip the trailing kB
+  return std::stol(val);
 }
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
index d825d8a6a1b2..b432a7484918 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h
@@ -28,8 +28,6 @@
 #include <iomanip>
 #include <nlohmann/json.hpp>
 
-#include "boost/format.hpp"
-
 // Other Libraries
 #include <algorithm>
 #include <cmath>
@@ -86,6 +84,7 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, virtual public IIncidentListe
   void report2Log_EventLevel();
   void report2Log_Summary();  // make it const
   void report2Log_CpuInfo() const;
+  void report2Log_EnvInfo() const;
 
   /// Report to the JSON File
   void report2JsonFile();
@@ -104,8 +103,12 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, virtual public IIncidentListe
 
   bool isCheckPoint();
 
+  /// A few helper methods to get system information
+  /// These should be carried to PerfMonMTUtils at some point
+  std::string get_info_from_file(const std::string& fileName, const std::string& fieldName) const;
   std::string get_cpu_model_info() const;
   int get_cpu_core_info() const;
+  long get_memory_info() const;
 
   PMonMT::StepComp generate_state(const std::string& stepName, const std::string& compName) const;
 
@@ -196,6 +199,9 @@ class PerfMonMTSvc : virtual public IPerfMonMTSvc, virtual public IIncidentListe
   PerfMon::LinFitSglPass m_fit_vmem;
   PerfMon::LinFitSglPass m_fit_pss;
 
+  // Estimate CPU efficiency
+  int getCpuEfficiency() const;
+
 };  // class PerfMonMTSvc
 
 #endif  // PERFMONCOMPS_PERFMONMTSVC_H
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
index 2b592779bd74..26b0cdb49c07 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTUtils.h
@@ -191,6 +191,8 @@ struct MeasurementData {
 
   event_meas_map_t getEventLevelData() const { return m_eventLevel_delta_map; }
 
+  unsigned long getNMeasurements() const { return m_eventLevel_delta_map.size(); }
+
   double getEventLevelCpuTime(unsigned long long event_count) const {
     return m_eventLevel_delta_map.at(event_count).cpu_time;
   }
-- 
GitLab


From 527b8a5ec725c4a74ae4d503f6896eb3fa2234bc Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 21 Dec 2020 10:18:19 +0100
Subject: [PATCH 160/308] Athena: Add dependency on Frontier_Client

The Frontier client (libfrontier_client.so) was brought in by the now
deleted `TrigConfDBConnection` package. Add this dependency explicitly
to the Athena project (as is already the case for AthGeneration).
---
 Projects/Athena/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt
index 7ebc708d1a56..807280b7e7cb 100644
--- a/Projects/Athena/CMakeLists.txt
+++ b/Projects/Athena/CMakeLists.txt
@@ -76,6 +76,7 @@ if( AtlasHIP_FOUND )
 endif()
 
 # Find some auxiliary packages:
+find_package( Frontier_Client )
 find_package( Doxygen )
 find_package( PNG )
 find_package( VDT )
-- 
GitLab


From 149f360fe109ecd35845d72328543d927d0a5864 Mon Sep 17 00:00:00 2001
From: MatousVozak <matous.vozak@cern.ch>
Date: Mon, 21 Dec 2020 10:47:37 +0100
Subject: [PATCH 161/308] modularise EFID in IDTrig, change i/o of
 configuration of PT algs

---
 .../TrigInDetConfig/python/EFIDTracking.py    | 605 ++++++------------
 .../TrigInDetConfig/python/InDetPT.py         |  18 +-
 .../TrigInDetConfig/python/InDetTrigCommon.py | 385 ++++++++++-
 3 files changed, 565 insertions(+), 443 deletions(-)

diff --git a/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py b/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py
index 4a87c9fe72e5..839a58ba4ab2 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py
@@ -1,242 +1,144 @@
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
-#           Setup of precision tracking
+#           Setup of offline pattern recognition tracking for ID Trigger
+#Heavily inspired by the offline version:
+#https://gitlab.cern.ch/atlas/athena/blob/master/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
 
 from __future__ import print_function
 
 from AthenaCommon.Include import include
 include.block("InDetTrigRecExample/EFInDetConfig.py")
 include("InDetTrigRecExample/InDetTrigRec_jobOptions.py") # this is needed to get InDetTrigFlags
-#from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
 
 from AthenaCommon.Logging import logging 
 log = logging.getLogger("EFIDTracking")
 
-#Start using already decided naming conventions
-#TODO: remap might not be needed in the end once this is consistent with FTF configuration
-#def remap_signature( signature ):
-#   if signature == 'electron':
-#       return 'Electron'
-#   else:
-#        return signature
-
-#def makeInDetPrecisionTracking( whichSignature, verifier = False, inputFTFtracks='TrigFastTrackFinder_Tracks', outputTrackPrefixName = "HLT_ID", rois = 'EMViewRoIs' ):
-#  doTRTextension = False 
-#  ptAlgs = [] #List containing all the precision tracking algorithms hence every new added alg has to be appended to the list
-
-
-  #-----------------------------------------------------------------------------
-  #                        Naming conventions
-
-
-
-
-
-  #-----------------------------------------------------------------------------
-  #                        Verifying input data for the algorithms
-  
-  #If run in views need to check data dependancies!
-  #NOTE: this seems necessary only when PT is called from a different view than FTF otherwise causes stalls
-#  if verifier:
-#         verifier.DataObjects += [  ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+TrigPixelClusterAmbiguitiesMap' ),
-#                                  ( 'TrackCollection' , 'StoreGateSvc+' + inputFTFtracks ) ] 
-      
-  
-  #-----------------------------------------------------------------------------
-  #                        Pattern recognition stage
-#def __init__(self, InputCollections = None, ResolvedTrackCollectionKey = None, SiSPSeededTrackCollectionKey = None , NewTrackingCuts = None, TrackCollectionKeys=[] , TrackCollectionTruthKeys=[]):
-
-#Start using already decided naming conventions
-#TODO: remap might not be needed in the end once this is consistent with FTF configuration
-#TODO unify with PT remap
-#def remap_signature( signature ):
-#   if signature == 'electron':
-#       return 'Electron'
-#   else:
-#        return signature
 
+#Create a view verifier for necessary data collections
+def get_idtrig_view_verifier(name):
+   import AthenaCommon.CfgMgr as CfgMgr
+   from AthenaCommon.GlobalFlags import globalflags
+   from .InDetTrigCollectionKeys import  TrigPixelKeys, TrigSCTKeys
+   from InDetRecExample.InDetKeys import InDetKeys
+   from TrigInDetConfig.TrigInDetConfig import InDetCacheNames
+   viewDataVerifier = CfgMgr.AthViews__ViewDataVerifier( name )
+   viewDataVerifier.DataObjects = [
+                                     ( 'InDet::SCT_ClusterContainer',   TrigSCTKeys.Clusters ),
+                                     ( 'InDet::PixelClusterContainer',  TrigPixelKeys.Clusters ), 
+                                     ( 'SpacePointContainer',           TrigSCTKeys.SpacePoints ),  
+                                     ( 'SpacePointContainer',           TrigPixelKeys.SpacePoints ),
+   #                                  ( 'SpacePointOverlapCollection',   'StoreGateSvc+OverlapSpacePoints' ), 
+   #                                  ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_FlaggedCondData_TRIG' ), 
+   #                                  ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_ByteStreamErrs' ), 
+   #                                  ( 'IDCInDetBSErrContainer',        'StoreGateSvc+PixelByteStreamErrs' ),
+   #    #( 'xAOD::EventInfo', 'StoreGateSvc+EventInfo' ) 
+                                     ]
+   
+   viewDataVerifier.DataObjects = [( 'InDet::PixelClusterContainerCache' , InDetCacheNames.Pixel_ClusterKey ),
+                                   ( 'PixelRDO_Cache' , InDetCacheNames.PixRDOCacheKey ),
+                                   ( 'InDet::SCT_ClusterContainerCache' , InDetCacheNames.SCT_ClusterKey ),
+                                   ( 'SCT_RDO_Cache' , InDetCacheNames.SCTRDOCacheKey ),
+                                   ( 'SpacePointCache' , InDetCacheNames.SpacePointCachePix ),
+                                   ( 'SpacePointCache' , InDetCacheNames.SpacePointCacheSCT ),
+                                   ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.PixBSErrCacheKey ),
+                                   ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.SCTBSErrCacheKey ),
+                                   ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.SCTFlaggedCondCacheKey ),
+                                   ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                   ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
+   
+   # Load RDOs if we aren't loading bytestream
+   from AthenaCommon.AlgSequence import AlgSequence
+   topSequence = AlgSequence()
+   
+   topSequence.SGInputLoader.Load += [ ( 'TagInfo' , 'DetectorStore+ProcessingTags' ) ]
+   
+   if not globalflags.InputFormat.is_bytestream():
+     viewDataVerifier.DataObjects +=   [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
+                                        ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
+                                        ( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
+                                        ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
+     topSequence.SGInputLoader.Load += [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
+                                        ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
+                                        ( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
+                                        ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
+   
+   return viewDataVerifier
+
+
+#Temporary fix before we port offline cuts to trigger code, we are using offline configuration
+def remapToOffline( name ):
+   if name == 'cosmics':
+      return 'Cosmic'
+   else:
+       return name
+
+def makeInDetPatternRecognition( config, verifier = 'IDTrigViewDataVerifier'  ):
+      viewAlgs = [] #list of all algs running in this module
 
-def makeInDetPatternRecognition( whichSignature, rois = 'EMViewRoIs', InputCollections=None,  NewTrackingCuts = None ):
-      from InDetRecExample.InDetJobProperties import InDetFlags
-      #Global keys/names for collections 
-      from InDetRecExample.InDetKeys          import InDetKeys #FIXME: to be replaced with Trig keys?
-      from .InDetTrigCollectionKeys import  TrigPixelKeys, TrigSCTKeys
+      #Load necessary data
+      dataVerifier = None
+      #FIXME: Should not be necessary
+      if verifier:
+         dataVerifier = get_idtrig_view_verifier(verifier+config.name)
+         viewAlgs.append( dataVerifier )
 
-      from AthenaCommon.DetFlags import DetFlags
 
-      from AthenaCommon.AppMgr import ToolSvc
+      #FIXME: For now id setup but eventually port parameters into ConfigSetting in TrigInDetConfig pkg
+      from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
+      from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
+      offName = remapToOffline( config.name )
+      trackingCuts = ConfiguredNewTrackingCuts( offName ) #FIXME: replace cosmic 
+      trackingCuts.__indetflags = InDetTrigFlags
 
-      prefix     = 'InDetTrigMT'
-      suffix =  '_%s'%whichSignature if whichSignature else '' 
-      #Final output track collection
-      #SiSPSeededTrackCollectionKey = "SiSPSeededTracks_%s"%whichSignature 
-      outEFIDTracks             = "HLT_IDTrkTrack_%s_%s"         %( whichSignature, 'EFID')
-      outEFIDTrackParticles     = "HLT_IDTrack_%s_%s"            %( whichSignature, 'EFID')
+      #TODO: to be taken from config info
+      #prefix     = 'InDetTrigMT'
+      #suffix     = '_%s'%whichSignature if whichSignature else '' 
 
+      #outEFIDTracks             = "HLT_IDTrkTrack_%s_%s"         %( whichSignature, 'EFID')
+      #outEFIDTrackParticles     = "HLT_IDTrack_%s_%s"            %( whichSignature, 'EFID')
 
 
-      viewAlgs = [] #list of all algs running in this module
-      #
       # --- decide if use the association tool
-      #
       #FIXME: Make the same decision as offline (based on the tracking cuts)?
-      #if (len(InputCollections) > 0) and (NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0" or NewTrackingCuts.mode() == "BeamGas" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks"  or NewTrackingCuts.mode() == "Disappearing" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" or NewTrackingCuts.mode() == "SLHCConversionFinding"):
-
-      #Why not use association tool? what are the cases when not needed?
+      #Are all of these needed?
+      #if (len(InputCollections) > 0) and (trackingCuts.mode() == "LowPt" or trackingCuts.mode() == "VeryLowPt" or trackingCuts.mode() == "LargeD0" or trackingCuts.mode() == "LowPtLargeD0" or trackingCuts.mode() == "BeamGas" or trackingCuts.mode() == "ForwardTracks" or trackingCuts.mode() == "ForwardSLHCTracks"  or trackingCuts.mode() == "Disappearing" or trackingCuts.mode() == "VeryForwardSLHCTracks" or trackingCuts.mode() == "SLHCConversionFinding"):
       #usePrdAssociationTool = True
       #else:
-      usePrdAssociationTool = False
-
-
-      import InDetRecExample.TrackingCommon as TrackingCommon
+      usePrdAssociationTool = False #Keep false for now
+      #Do we actually need it?
       if usePrdAssociationTool:
+         from .InDetTrigCommon import prdAssociation_builder
          print ('Running SiSPseedTrackFinder!')
-         #FIXME: switch to naming based on tracking
+         InputCollections = None #Dummy atm
+         prdAssociation = prdAssociation_builder( InputCollections )
+         viewAlgs.append( prdAssociation )
 
-         #FIXME: If so:
-         # 1] Get a new association tool
-         #associationTool = TrackingCommon.getInDetTrigPRDtoTrackMapToolGangedPixels(),
 
-         # 2] Use the ganged pixel from here?
-         #from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool
-
-         # 3] Create the new one as in offline tracking:
-         InDetTrigPrdAssociation = TrackingCommon.getInDetTrackPRD_Association(namePrefix     = prefix,
-                                                                               nameSuffix     = suffix,
-                                                                               TracksName     = list(InputCollections))#This is readHandle #What input collection Thought there are no tracks at this point??! 
-         # 4] if so do I use normal or ganged?
-         #from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels
-         #InDetTrigPrdAssociationl = InDet__InDetPRD_AssociationToolGangedPixels(name = "%sPrdAssociationTool%s"%(prefix,suffix),
-         #                                                                          PixelClusterAmbiguitiesMapName = TrigPixelKeys.PRDtoTrackMap )
-         viewAlgs.append( InDetTrigPrdAssociation )
+      #-----------------------------------------------------------------------------
+      #                      Track building stage
 
 
       #FIXME? use trigger flags?
+      # What are the instances when we don't need this?
       #if InDetFlags.doSiSPSeededTrackFinder():
-      doSiSPSeededTrackFinder = True
+      doSiSPSeededTrackFinder = True #True by default to test this
       if doSiSPSeededTrackFinder:
          print ('Running SiSPseedTrackFinder!')
 
-         #FIXME: Need to add different options based on the 
-         from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker
-
-
-         InDetSiSpacePointsSeedMaker = SiSpacePointsSeedMaker (      name                   = "%sInDetSpSeedsMaker%s"%(prefix, suffix), #+NewTrackingCuts.extension(),
-                                                                     pTmin                  = NewTrackingCuts.minPT(),
-                                                                     maxdImpact             = NewTrackingCuts.maxPrimaryImpact(),
-                                                                     maxZ                   = NewTrackingCuts.maxZImpact(),
-                                                                     minZ                   = -NewTrackingCuts.maxZImpact(),
-                                                                     usePixel               = NewTrackingCuts.usePixel(),
-                                                                     SpacePointsPixelName   = TrigPixelKeys.SpacePoints,
-                                                                     # useSCT                 = NewTrackingCuts.useSCT(),
-                                                                     useSCT                 = (NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()),
-                                                                     SpacePointsSCTName     = TrigSCTKeys.SpacePoints,
-                                                                     # useOverlapSpCollection = NewTrackingCuts.useSCT(),
-                                                                     useOverlapSpCollection = (NewTrackingCuts.useSCT() and NewTrackingCuts.useSCTSeeding()),
-                                                                     SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
-                                                                     radMax                 = NewTrackingCuts.radMax(),
-                                                                     RapidityCut            = NewTrackingCuts.maxEta())
-
-         ToolSvc += InDetSiSpacePointsSeedMaker
-         #FIXME consider specific settings here
-         #if NewTrackingCuts.mode() == "Offline" or InDetFlags.doHeavyIon() or  NewTrackingCuts.mode() == "ForwardTracks":
-         #        InDetSiSpacePointsSeedMaker.maxdImpactPPS = NewTrackingCuts.maxdImpactPPSSeeds()
-         #        InDetSiSpacePointsSeedMaker.maxdImpactSSS = NewTrackingCuts.maxdImpactSSSSeeds()
-
-         if usePrdAssociationTool:
-         #   # not all classes have that property !!!
-            InDetSiSpacePointsSeedMaker.PRDtoTrackMap      = TrigPixelKeys.PRDtoTrackMap #InDetTrigPrdAssociationTool
-
-         #if not InDetFlags.doCosmics():
-         #   InDetSiSpacePointsSeedMaker.maxRadius1         = 0.75*NewTrackingCuts.radMax()
-         #   InDetSiSpacePointsSeedMaker.maxRadius2         = NewTrackingCuts.radMax()
-         #   InDetSiSpacePointsSeedMaker.maxRadius3         = NewTrackingCuts.radMax()
-         #if NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
-         #   try :
-         #      InDetSiSpacePointsSeedMaker.pTmax              = NewTrackingCuts.maxPT()
-         #   except:
-         #      pass 
-         #   InDetSiSpacePointsSeedMaker.mindRadius         = 4.0
-         #if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "SLHCConversionFinding":
-         #   InDetSiSpacePointsSeedMaker.minRadius1         = 0
-         #   InDetSiSpacePointsSeedMaker.minRadius2         = 0
-         #   InDetSiSpacePointsSeedMaker.minRadius3         = 0
-         #   InDetSiSpacePointsSeedMaker.maxRadius1         =1000.*Units.mm
-         #   InDetSiSpacePointsSeedMaker.maxRadius2         =1000.*Units.mm
-         #   InDetSiSpacePointsSeedMaker.maxRadius3         =1000.*Units.mm
-         #if NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks":
-         #   InDetSiSpacePointsSeedMaker.checkEta           = True
-         #   InDetSiSpacePointsSeedMaker.etaMin             = NewTrackingCuts.minEta()
-         #   InDetSiSpacePointsSeedMaker.etaMax             = NewTrackingCuts.maxEta()
-         #   InDetSiSpacePointsSeedMaker.RapidityCut        = NewTrackingCuts.maxEta()
-         #if NewTrackingCuts.mode() == "DBM":
-         #   InDetSiSpacePointsSeedMaker.etaMin             = NewTrackingCuts.minEta()
-         #   InDetSiSpacePointsSeedMaker.etaMax             = NewTrackingCuts.maxEta()
-         #   InDetSiSpacePointsSeedMaker.useDBM = True
- 
-
-
-         #Z finder for the vtx
-         #
-         # --- Z-coordinates primary vertices finder (only for collisions)
-         #
-         if InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM":
-            from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk
-            InDetZvertexMaker = InDet__SiZvertexMaker_xk(name          = '%sInDetZvertexMaker%s'%(prefix,suffix),
-                                                         Zmax          = NewTrackingCuts.maxZImpact(),
-                                                         Zmin          = -NewTrackingCuts.maxZImpact(),
-                                                         minRatio      = 0.17) # not default
-            InDetZvertexMaker.SeedMakerTool = InDetSiSpacePointsSeedMaker
-
-            if InDetFlags.doHeavyIon():
-               InDetZvertexMaker.HistSize = 2000
-               ###InDetZvertexMaker.minContent = 200 
-               InDetZvertexMaker.minContent = 30
-               
-            ToolSvc += InDetZvertexMaker
-            #if (InDetFlags.doPrintConfigurables()):
-            #   printfunc (InDetZvertexMaker)
-
-         else:
-            InDetZvertexMaker = None
-
-         #
-      #   # --- SCT and Pixel detector elements road builder
-      #   #
-         #FIXME which propagator
-         # 1] 
-         from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPropagator
-
-         # 2] How about offline
-
-         from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadMaker_xk
-         InDetSiDetElementsRoadMaker = InDet__SiDetElementsRoadMaker_xk(name               = '%sInDetSiRoadMaker%s'%(prefix,suffix),#+NewTrackingCuts.extension(),
-                                                                        PropagatorTool     = InDetTrigPropagator,#InDetPatternPropagator,
-                                                                        usePixel           = NewTrackingCuts.usePixel(),
-                                                                        PixManagerLocation = InDetKeys.PixelManager(),
-                                                                        useSCT             = NewTrackingCuts.useSCT(), 
-                                                                        SCTManagerLocation = InDetKeys.SCT_Manager(), #FIXME change the name?        
-                                                                        RoadWidth          = NewTrackingCuts.RoadWidth())
-
-         ToolSvc += InDetSiDetElementsRoadMaker
-         #if (InDetFlags.doPrintConfigurables()):
-         #   printfunc (     InDetSiDetElementsRoadMaker)
-         # Condition algorithm for InDet__SiDetElementsRoadMaker_xk
+         from AthenaCommon.DetFlags import DetFlags 
+         # --- Loading Pixel, SCT conditions
          if DetFlags.haveRIO.pixel_on():
-         #FIXME:
-         #pixelOn = True
-         #if pixelOn:
-             # Condition algorithm for SiCombinatorialTrackFinder_xk
             from AthenaCommon.AlgSequence import AthSequencer
             condSeq = AthSequencer("AthCondSeq")
             if not hasattr(condSeq, "InDetSiDetElementBoundaryLinksPixelCondAlg"):
-                from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk
-                condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk(name     = "InDetSiDetElementBoundaryLinksPixelCondAlg",
-                                                                      ReadKey  = "PixelDetectorElementCollection",
-                                                                      WriteKey = "PixelDetElementBoundaryLinks_xk",
-                                                                      UsePixelDetectorManager = True)
+               from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk
+               condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk(name     = "InDetSiDetElementBoundaryLinksPixelCondAlg",
+                                                                     ReadKey  = "PixelDetectorElementCollection",
+                                                                     WriteKey = "PixelDetElementBoundaryLinks_xk",)
+
 
-         if NewTrackingCuts.useSCT():
+
+         if trackingCuts.useSCT():
             from AthenaCommon.AlgSequence import AthSequencer
             condSeq = AthSequencer("AthCondSeq")
             if not hasattr(condSeq, "InDet__SiDetElementsRoadCondAlg_xk"):
@@ -245,223 +147,88 @@ def makeInDetPatternRecognition( whichSignature, rois = 'EMViewRoIs', InputColle
 
             if not hasattr(condSeq, "InDetSiDetElementBoundaryLinksSCTCondAlg"):
                from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiDetElementBoundaryLinksCondAlg_xk
-               condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk(name = "InDetSiDetElementBoundaryLinksSCTCondAlg",
-                                                                     ReadKey = "SCT_DetectorElementCollection",
-                                                                     WriteKey = "SCT_DetElementBoundaryLinks_xk")
-
-
-      #   #
-      #   # --- Local track finding using sdCaloSeededSSSpace point seed
-      #   #
-      #   # @TODO ensure that PRD association map is used if usePrdAssociationTool is set
-         is_dbm = InDetFlags.doDBMstandalone() or NewTrackingCuts.extension()=='DBM'
-         rot_creator_digital = TrackingCommon.getInDetRotCreatorDigital() if not is_dbm else TrackingCommon.getInDetRotCreatorDBM()
-
-
-         from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSCTConditionsSummaryTool, InDetTrigPatternUpdator
-
-         from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk
-         track_finder = InDet__SiCombinatorialTrackFinder_xk(name                  = '%sInDetSiComTrackFinder%s'%(prefix,suffix),#+NewTrackingCuts.extension(),
-                                                             PropagatorTool        = InDetTrigPropagator,#InDetPatternPropagator,
-                                                             UpdatorTool           = InDetTrigPatternUpdator,#InDetPatternUpdator,
-                                                             SctSummaryTool        = InDetTrigSCTConditionsSummaryTool,
-                                                             RIOonTrackTool        = rot_creator_digital,
-                                                             usePixel              = DetFlags.haveRIO.pixel_on(),
-                                                             useSCT                = DetFlags.haveRIO.SCT_on() if not is_dbm else False,
-                                                             PixelClusterContainer = TrigPixelKeys.Clusters,#InDetKeys.PixelClusters(),
-                                                             SCT_ClusterContainer  = TrigSCTKeys.Clusters )#InDetKeys.SCT_Clusters())
-
-         ToolSvc += track_finder
-         if is_dbm :
-            track_finder.MagneticFieldMode     = "NoField"
-            track_finder.TrackQualityCut       = 9.3
-
-         
-         #track_finder.SctSummaryTool = InDetTrigSCTConditionsSummaryTool
-         #if (DetFlags.haveRIO.SCT_on()):
-         #   track_finder.SctSummaryTool = InDetSCT_ConditionsSummaryTool
-         #else:
-         #   track_finder.SctSummaryTool = None
-
-      #   ToolSvc += track_finder
-
-         useBremMode = NewTrackingCuts.mode() == "Offline" or NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "DBM"
-         from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk as SiTrackMaker
-         InDetSiTrackMaker = SiTrackMaker(name                          = '%sInDetSiTrackMaker%s'%(prefix,suffix),#+NewTrackingCuts.extension(),
-                                          useSCT                        = NewTrackingCuts.useSCT(),
-                                          usePixel                      = NewTrackingCuts.usePixel(),
-                                          RoadTool                      = InDetSiDetElementsRoadMaker,
-                                          CombinatorialTrackFinder      = track_finder,
-                                          pTmin                         = NewTrackingCuts.minPT(),
-                                          pTminBrem                     = NewTrackingCuts.minPTBrem(),
-                                          pTminSSS                      = InDetFlags.pT_SSScut(),
-                                          nClustersMin                  = NewTrackingCuts.minClusters(),
-                                          nHolesMax                     = NewTrackingCuts.nHolesMax(),
-                                          nHolesGapMax                  = NewTrackingCuts.nHolesGapMax(),
-                                          SeedsFilterLevel              = NewTrackingCuts.seedFilterLevel(),
-                                          Xi2max                        = NewTrackingCuts.Xi2max(),
-                                          Xi2maxNoAdd                   = NewTrackingCuts.Xi2maxNoAdd(),
-                                          nWeightedClustersMin          = NewTrackingCuts.nWeightedClustersMin(),
-                                          CosmicTrack                   = InDetFlags.doCosmics(),
-                                          Xi2maxMultiTracks             = NewTrackingCuts.Xi2max(), # was 3.
-                                          useSSSseedsFilter             = InDetFlags.doSSSfilter(),
-                                          doMultiTracksProd             = True,
-                                          useBremModel                  = InDetFlags.doBremRecovery() and useBremMode, # only for NewTracking the brem is debugged !!!
-                                          doCaloSeededBrem              = InDetFlags.doCaloSeededBrem(),
-                                          doHadCaloSeedSSS              = InDetFlags.doHadCaloSeededSSS(),
-                                          phiWidth                      = NewTrackingCuts.phiWidthBrem(),
-                                          etaWidth                      = NewTrackingCuts.etaWidthBrem(),
-                                          InputClusterContainerName     = InDetKeys.CaloClusterROIContainer(), # "InDetCaloClusterROIs" 
-                                          InputHadClusterContainerName  = InDetKeys.HadCaloClusterROIContainer(), # "InDetCaloClusterROIs" 
-                                          UseAssociationTool            = usePrdAssociationTool)
-
-         ToolSvc += InDetSiTrackMaker
-
-      #FIXME: do only cosmics for now, but change later
-      #   if NewTrackingCuts.mode() == "SLHC" or NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" :
-      #      InDetSiTrackMaker.ITKGeometry = True
-
-      #   if NewTrackingCuts.mode() == "DBM":
-      #      InDetSiTrackMaker.MagneticFieldMode = "NoField"
-      #      InDetSiTrackMaker.useBremModel = False
-      #      InDetSiTrackMaker.doMultiTracksProd = False
-      #      InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder'       
-      #      InDetSiTrackMaker.pTminSSS = -1
-      #      InDetSiTrackMaker.CosmicTrack = False
-      #      InDetSiTrackMaker.useSSSseedsFilter = False
-      #      InDetSiTrackMaker.doCaloSeededBrem = False
-      #      InDetSiTrackMaker.doHadCaloSeedSSS = False
-
-         #elif InDetFlags.doCosmics():
-         #  InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_Cosmic'
-         InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_Cosmic'
+               condSeq += InDet__SiDetElementBoundaryLinksCondAlg_xk(name     = "InDetSiDetElementBoundaryLinksSCTCondAlg",
+                                                                  ReadKey  = "SCT_DetectorElementCollection",
+                                                                  WriteKey = "SCT_DetElementBoundaryLinks_xk")
+            #-------------------------------------------------------
+
+
+         from .InDetTrigCommon import siSPSeededTrackFinder_builder, get_full_name
+         siSPSeededTrackFinder = siSPSeededTrackFinder_builder( name                  = get_full_name( 'siSPSeededTrackFinder', config.name ),
+                                                                outputTracks          = config.EFID.trkTracksEFID(), ##outEFIDTracks, 
+                                                                trackingCuts          = trackingCuts,
+                                                                usePrdAssociationTool = usePrdAssociationTool,
+                                                                nameSuffix            = config.name )
+
+         print(siSPSeededTrackFinder)
+         viewAlgs.append( siSPSeededTrackFinder )
+      #-----------------------------------------------------------------------------
+      #                      Track particle conversion algorithm (for pattern rec.)
+      #                        atm disabled but might be useful later for debugging
       #
-      #   elif InDetFlags.doHeavyIon():
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_HeavyIon'
-      #   
-      #   elif NewTrackingCuts.mode() == "LowPt":
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LowMomentum'
-
-      #   elif NewTrackingCuts.mode() == "VeryLowPt" or (NewTrackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryLowMomentum'           
-
-      #   elif NewTrackingCuts.mode() == "BeamGas":
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_BeamGas'
- 
-      #   elif NewTrackingCuts.mode() == "ForwardTracks":
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardTracks'
-
-      #   elif NewTrackingCuts.mode() == "ForwardSLHCTracks":
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardSLHCTracks'
-
-      #   elif NewTrackingCuts.mode() == "VeryForwardSLHCTracks": 
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryForwardSLHCTracks' 
-
-      #   elif NewTrackingCuts.mode() == "SLHCConversionFinding":
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_SLHCConversionTracks'
-
-      #   elif NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0":
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LargeD0'
-      #  
-      #   else:
-      #     InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSPSeededFinder'
-      #           
-         if InDetFlags.doStoreTrackSeeds():
-              from SeedToTrackConversionTool.SeedToTrackConversionToolConf import InDet__SeedToTrackConversionTool
-              InDet_SeedToTrackConversion = InDet__SeedToTrackConversionTool(name       = "%sInDet_SeedToTrackConversion%s"%(prefix, suffix),
-                                                                             OutputName = InDetKeys.SiSPSeedSegments()+NewTrackingCuts.extension())
-              InDetSiTrackMaker.SeedToTrackConversion = InDet_SeedToTrackConversion
-              InDetSiTrackMaker.SeedSegmentsWrite = True
-
-      #   #InDetSiTrackMaker.OutputLevel = VERBOSE             
-      #   ToolSvc += InDetSiTrackMaker
-      #   if (InDetFlags.doPrintConfigurables()):
-      #      printfunc (InDetSiTrackMaker)
-      #   #
-      #   # set output track collection name
-      #  #
-      #   self.__SiTrackCollection = SiSPSeededTrackCollectionKey
-      #   #
-      #   # --- Setup Track finder using space points seeds
-      #   #
-
-         #FIXME: which summary tool to use??
-         # trackSummaryTool = TrackingCommon.getInDetTrackSummaryToolNoHoleSearch()
-         #ToolSvc += trackSummaryTool
-         from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackSummaryTool
-
-
-         from SiSPSeededTrackFinder.SiSPSeededTrackFinderConf import InDet__SiSPSeededTrackFinder
-         InDetSiSPSeededTrackFinder = InDet__SiSPSeededTrackFinder(name                 = '%sInDetSiSpTrackFinder%s'%(prefix, suffix),# +NewTrackingCuts.extension(),
-                                                                    TrackTool           = InDetSiTrackMaker,
-                                                                    PRDtoTrackMap       = TrigPixelKeys.PRDtoTrackMap if usePrdAssociationTool else '',
-                                                                    SpacePointsPixelName= TrigPixelKeys.SpacePoints,
-                                                                    SpacePointsSCTName  = TrigSCTKeys.SpacePoints,
-                                                                    TrackSummaryTool    = InDetTrigTrackSummaryTool,
-                                                                    TracksLocation      = outEFIDTracks,
-                                                                    SeedsTool           = InDetSiSpacePointsSeedMaker,
-                                                                    useZvertexTool      = InDetFlags.useZvertexTool(),
-                                                                    ZvertexTool         = InDetZvertexMaker )
-
-         if NewTrackingCuts.mode() == "ForwardSLHCTracks" or NewTrackingCuts.mode() == "ForwardTracks":
-                                                                    InDetSiSPSeededTrackFinder.useNewStrategy     = False
-                                                                    InDetSiSPSeededTrackFinder.useMBTSTimeDiff    = InDetFlags.useMBTSTimeDiff()
-                                                                    InDetSiSPSeededTrackFinder.useZBoundFinding   = False
-      #    if InDetFlags.doHeavyIon() :
-      #     InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor
-         else:
-                                                                    InDetSiSPSeededTrackFinder.useZvertexTool      = InDetFlags.useZvertexTool() and NewTrackingCuts.mode() != "DBM"
-                                                                    InDetSiSPSeededTrackFinder.useNewStrategy      = InDetFlags.useNewSiSPSeededTF() and NewTrackingCuts.mode() != "DBM"
-                                                                    InDetSiSPSeededTrackFinder.useMBTSTimeDiff     = InDetFlags.useMBTSTimeDiff()
-                                                                    InDetSiSPSeededTrackFinder.useZBoundFinding    = NewTrackingCuts.doZBoundary() and NewTrackingCuts.mode() != "DBM"   
-
-
-
-         
-         viewAlgs.append( InDetSiSPSeededTrackFinder )
-         
-         #for alg in viewAlgs:
-         #   print alg
-
-      #    if InDetFlags.doHeavyIon() :
-      #     InDetSiSPSeededTrackFinder.FreeClustersCut = 2 #Heavy Ion optimization from Igor
-
-      #   #InDetSiSPSeededTrackFinder.OutputLevel =VERBOSE 
-      #   topSequence += InDetSiSPSeededTrackFinder
-      #   if (InDetFlags.doPrintConfigurables()):
-      #      printfunc (InDetSiSPSeededTrackFinder)
-
-      #   if not InDetFlags.doSGDeletion():
-      #      if InDetFlags.doTruth():
-      #         #
-      #         # set up the truth info for this container
-      #         #
-      #         include ("InDetRecExample/ConfiguredInDetTrackTruth.py")
-      #         InDetTracksTruth = ConfiguredInDetTrackTruth(self.__SiTrackCollection,
-      #                                                      self.__SiTrackCollection+"DetailedTruth",
-      #                                                      self.__SiTrackCollection+"TruthCollection")
-      #         #
-      #         # add final output for statistics
-      #         #
-      #         TrackCollectionKeys      += [ InDetTracksTruth.Tracks() ]
-      #         TrackCollectionTruthKeys += [ InDetTracksTruth.TracksTruth() ]
-      #      else:
-      #         TrackCollectionKeys      += [ self.__SiTrackCollection ]
-      #         
-
-
-      #Convert final track collection to xAOD track particles
-      from .InDetTrigCommon import getTrackParticleCnv  
-      viewAlgs.append( getTrackParticleCnv( prefix, suffix + "_EFID", outEFIDTracks, outEFIDTrackParticles ) )
-
-
-      #print viewAlgs
-      #print 'VIEWS!', len(viewAlgs)
-      #print(len(viewAlgs))
-
-      return  viewAlgs
-
-  #-----------------------------------------------------------------------------
-  #                        Ambiguity solving stage
-      #TODO:
-
+      #from .InDetTrigCommon import trackParticleCnv_builder
+      #trackParticleCnvAlg = trackParticleCnv_builder(name                 = get_full_name( 'xAODParticleCreatorAlg',config.name + '_EFID' ), 
+      #                                               config               = config,
+      #                                               inTrackCollectionKey = config.PT.trkTracksPT(),#config.EFID.trkTracksEFID(),
+      #                                               outTrackParticlesKey = config.EFID.tracksEFID( doRecord = config.isRecordable),
+      #                                               )
+
+      #-----------------------------------------------------------------------------
+      #                      Precision algorithms
+
+      #Verifier should not be necessary when both patt. rec. and PT runs in the same view -> None
+      #Also provides particle cnv alg inside
+      precisionAlgs = makePrecisionInDetPatternRecognition(config      = config,
+                                                           inputTracks = config.EFID.trkTracksEFID(),
+                                                           verifier    = None )
+
+
+      viewAlgs += precisionAlgs
+
+
+      return  viewAlgs, dataVerifier
+
+
+#TODO: potentially  unify with makeInDetPrecisionTracking in the InDetPT.py?
+#TODO better name?
+def makePrecisionInDetPatternRecognition( config, inputTracks,verifier = None ):
+   ptAlgs = [] #List containing all the precision tracking algorithms hence every new added alg has to be appended to the list
+   
+   #-----------------------------------------------------------------------------
+   #                        Verifying input data for the algorithms
+   if verifier:
+     verifier.DataObjects += [ #( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+' + TrigPixelKeys.PixelClusterAmbiguitiesMap ),
+                               ( 'TrackCollection' , 'StoreGateSvc+' + inputTracks )]
+   
+   
+   #-----------------------------------------------------------------------------
+   #                        Ambiguity solving stage
+   from .InDetTrigCommon import ambiguityScoreAlg_builder, ambiguitySolverAlg_builder, get_full_name, get_scoremap_name
+   
+   ambiguityScoreAlg = ambiguityScoreAlg_builder( name                  = get_full_name(  core = 'TrkAmbiguityScore', suffix  = config.name ),
+                                                  config                = config,
+                                                  inputTrackCollection  = inputTracks,
+                                                  outputTrackScoreMap   = get_scoremap_name( config.name ), #Map of tracks and their scores
+                                                 )
+   ptAlgs.append( ambiguityScoreAlg )
+   
+   #FIXME: these alg internally don't expect EFID setting (but FTF), have to take into consideration
+   ambiguitySolverAlg = ambiguitySolverAlg_builder( name                  = get_full_name( core = 'TrkAmbiguitySolver', suffix = config.name ),
+                                                    config                = config,
+                                                    inputTrackScoreMap    = get_scoremap_name( config.name ), #Map of tracks and their scores, 
+                                                    outputTrackCollection = config.PT.trkTracksPT() ) #FIXME: for now keep PT but if TRT added this will ahve to become intermediate collection
+                         
+   ptAlgs.append( ambiguitySolverAlg )
+   
+   #-----------------------------------------------------------------------------
+   #                      Track particle conversion algorithm
+   from .InDetTrigCommon import trackParticleCnv_builder
+   trackParticleCnvAlg = trackParticleCnv_builder(name                 = get_full_name( 'xAODParticleCreatorAlg',config.name + '_IDTrig' ), 
+                                                  config               = config,
+                                                  inTrackCollectionKey = config.PT.trkTracksPT(),
+                                                  outTrackParticlesKey = config.PT.tracksPT( doRecord = config.isRecordable),
+                                                  )
+   
+   ptAlgs.append( trackParticleCnvAlg )
+
+   return ptAlgs
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
index f5b47cfafcb5..89c583c4d709 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
@@ -91,14 +91,20 @@ def makeInDetPrecisionTracking( config = None,
 
   #-----------------------------------------------------------------------------
   #                        Ambiguity solving stage
-  from .InDetTrigCommon import ambiguityScoreAlg_builder, ambiguitySolverAlg_builder, get_full_name
+  from .InDetTrigCommon import ambiguityScoreAlg_builder, ambiguitySolverAlg_builder, get_full_name,  get_scoremap_name
   ambSolvingStageAlgs = [
-                           ambiguityScoreAlg_builder( name   = get_full_name(  core = 'TrkAmbiguityScore', suffix  = config.name ),
-                                                      config = config ),
-
-                           ambiguitySolverAlg_builder( name   = get_full_name( core = 'TrkAmbiguitySolver', suffix = config.name ),
-                                                       config = config )
+                           ambiguityScoreAlg_builder( name                  = get_full_name(  core = 'TrkAmbiguityScore', suffix  = config.name ),
+                                                      config                = config,
+                                                      inputTrackCollection  = config.FT.trkTracksFTF(),
+                                                      outputTrackScoreMap   = get_scoremap_name( config.name ), #Map of tracks and their scores
+                                                    ),
+  
+                           ambiguitySolverAlg_builder( name                  = get_full_name( core = 'TrkAmbiguitySolver', suffix = config.name ),
+                                                       config                = config,
+                                                       inputTrackScoreMap    = get_scoremap_name( config.name ), #Map of tracks and their scores, 
+                                                       outputTrackCollection = nameAmbiTrackCollection  )
                         ]
+   
 
   #Loading the alg to the sequence
   ptAlgs.extend( ambSolvingStageAlgs )
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py
index 3bba5355014c..f4ae49837955 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py
@@ -34,7 +34,7 @@ def get_full_name( core, suffix ):
 
 #Retrieve name of the score map
 #Map of Tracks and floats (representing score of a given track)
-def get_scoredmap( suffix ):
+def get_scoremap_name( suffix ):
    return "ScoredMap{}".format(suffix)
 
 
@@ -305,25 +305,15 @@ def ambiguityProcessorTool_builder( name, config):
 
 
 from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguitySolver
-def ambiguitySolverAlg_builder(name, config):
+def ambiguitySolverAlg_builder(name, config, inputTrackScoreMap, outputTrackCollection):
 
-      #Get correct name for the ouput TrkTrack collection
-      def getTrackOutput():
-         #If we are also applying TRT then this collection is just intermediate
-         if config.PT.setting.doTRT:
-            return  config.PT.trkTracksAS() #"%s%sTrkTrack%s" %('HLT_ID', 'AmbSol', get_name_suffix( config.name() ))
-         #Otherwise use final collection name
-         else:
-            return  config.PT.trkTracksPT()
-
-      #-----------------------
       #Set/Get subtools
       ambiguityProcessor = ambiguityProcessorTool_builder( name   = get_full_name( 'AmbiguityProcessor', config.name),
                                                            config = config )
 
       return Trk__TrkAmbiguitySolver( name               = name,
-                                      TrackInput         = get_scoredmap( get_name_suffix(config.name )),
-                                      TrackOutput        = getTrackOutput(),
+                                      TrackInput         = inputTrackScoreMap,
+                                      TrackOutput        = outputTrackCollection,
                                       AmbiguityProcessor = ambiguityProcessor
                                     )
 
@@ -354,7 +344,7 @@ def ambiguityScoreProcessorTool_builder( name, config):
 
 
 from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguityScore
-def ambiguityScoreAlg_builder(name, config):
+def ambiguityScoreAlg_builder(name, config, inputTrackCollection, outputTrackScoreMap ):
       #Alg loops over provided tracks and calls subtool(TrkAmbigutyScoreProcessor) to assign scores for each one of them
 
       #-----------------------
@@ -363,10 +353,369 @@ def ambiguityScoreAlg_builder(name, config):
       #                                                               config = config )
 
       return Trk__TrkAmbiguityScore(   name                    = name,
-                                       TrackInput              = [ config.FT.trkTracksFTF()  ],
-                                       TrackOutput             = get_scoredmap( get_name_suffix( config.name ) ),
+                                       TrackInput              = [ inputTrackCollection ], #[ config.FT.trkTracksFTF()  ], 
+                                       TrackOutput             = outputTrackScoreMap,  #get_scoredmap( get_name_suffix( config.name ) ),
                                        #Disable processor, see: https://gitlab.cern.ch/atlas/athena/-/merge_requests/36431
                                        AmbiguityScoreProcessor = None, #ambiguityScoreProcessor,
-                                    )
+                                   )
+
+#-------------------------------------------------------------------------------------------------
+#                       Alg/Tools for offline pattern recognition tracking
 
+@makePublicTool
+def siSpacePointsSeedMakerTool_builder(name, trackingCuts, usePrdAssociationTool ):
+   from InDetRecExample.InDetKeys  import  InDetKeys
+   from .InDetTrigCollectionKeys   import  TrigPixelKeys, TrigSCTKeys
+   from InDetRecExample.InDetJobProperties import InDetFlags
+
+   kwargs = {}
+   kwargs = setDefaults( kwargs,
+                         pTmin                  = trackingCuts.minPT(),
+                         maxdImpact             = trackingCuts.maxPrimaryImpact(),
+                         maxZ                   = trackingCuts.maxZImpact(),
+                         minZ                   = -trackingCuts.maxZImpact(),
+                         usePixel               = trackingCuts.usePixel(),
+                         SpacePointsPixelName   = TrigPixelKeys.SpacePoints,
+                         useSCT                 = (trackingCuts.useSCT() and trackingCuts.useSCTSeeding()),
+                         SpacePointsSCTName     = TrigSCTKeys.SpacePoints,
+                         useOverlapSpCollection = (trackingCuts.useSCT() and trackingCuts.useSCTSeeding()),
+                         SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(), #Switch to trigger flags?
+                         radMax                 = trackingCuts.radMax(),
+                         RapidityCut            = trackingCuts.maxEta())
+                       
+   
+   #Change/add tracking  parameters based on the different tracking mode
+   if trackingCuts.mode() == "Offline" or InDetFlags.doHeavyIon() or  trackingCuts.mode() == "ForwardTracks":
+      kwargs = setDefaults( kwargs,
+                            maxdImpactPPS = trackingCuts.maxdImpactPPSSeeds(),
+                            maxdImpactSSS = trackingCuts.maxdImpactSSSSeeds())
+   
+   if usePrdAssociationTool:
+   # not all classes have that property !!!
+      kwargs = setDefaults( kwargs,
+                            PRDtoTrackMap      = TrigPixelKeys.PRDtoTrackMap)
+
+   #FIXME: switch to TrigFlags?
+   if not InDetFlags.doCosmics():
+      kwargs = setDefaults( kwargs,
+                            maxRadius1     = 0.75*trackingCuts.radMax(),
+                            maxRadius2     = trackingCuts.radMax(),
+                            maxRadius3     = trackingCuts.radMax())
+
+   #FIXME add later if needed
+   #if trackingCuts.mode() == "LowPt" or trackingCuts.mode() == "VeryLowPt" or (trackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
+   #   try :
+   #      InDetSiSpacePointsSeedMaker.pTmax              = trackingCuts.maxPT()
+   #   except:
+   #      pass 
+   #   InDetSiSpacePointsSeedMaker.mindRadius         = 4.0
+   #
+   #if trackingCuts.mode() == "SLHC" or trackingCuts.mode() == "SLHCConversionFinding":
+   #   InDetSiSpacePointsSeedMaker.minRadius1         = 0
+   #   InDetSiSpacePointsSeedMaker.minRadius2         = 0
+   #   InDetSiSpacePointsSeedMaker.minRadius3         = 0
+   #   InDetSiSpacePointsSeedMaker.maxRadius1         =1000.*Units.mm
+   #   InDetSiSpacePointsSeedMaker.maxRadius2         =1000.*Units.mm
+   #   InDetSiSpacePointsSeedMaker.maxRadius3         =1000.*Units.mm
+   #
+   #if trackingCuts.mode() == "ForwardTracks" or trackingCuts.mode() == "ForwardSLHCTracks" or trackingCuts.mode() == "VeryForwardSLHCTracks":
+   #   InDetSiSpacePointsSeedMaker.checkEta           = True
+   #   InDetSiSpacePointsSeedMaker.etaMin             = trackingCuts.minEta()
+   #   InDetSiSpacePointsSeedMaker.etaMax             = trackingCuts.maxEta()
+   #   InDetSiSpacePointsSeedMaker.RapidityCut        = trackingCuts.maxEta()
+   #
+   #if trackingCuts.mode() == "DBM":
+   #   InDetSiSpacePointsSeedMaker.etaMin             = trackingCuts.minEta()
+   #   InDetSiSpacePointsSeedMaker.etaMax             = trackingCuts.maxEta()
+   #   InDetSiSpacePointsSeedMaker.useDBM = True
+   
+   
+   from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk as SiSpacePointsSeedMaker
+   return SiSpacePointsSeedMaker ( name    =  name,
+                                   **kwargs)
+
+
+
+
+@makePublicTool
+def zVertexMakerTool_builder(name, trackingCuts, seedMakerTool ):
+   from InDetRecExample.InDetJobProperties import InDetFlags
+   
+   kwargs = {}
+   
+   #Prepare default parameter settings for the tool
+   kwargs = setDefaults( kwargs,
+                         Zmax          = trackingCuts.maxZImpact(),
+                         Zmin          = -trackingCuts.maxZImpact(),
+                         minRatio      = 0.17,
+                         SeedMakerTool = seedMakerTool )
+   
+   
+   if InDetFlags.doHeavyIon():
+      kwargs = setDefaults( kwargs,
+                            HistSize   = 2000,
+                            minContent = 30)
+   
+   from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk
+   return InDet__SiZvertexMaker_xk(name  = name,
+                                   **kwargs)
+
+   
+
+
+def prdAssociation_builder( InputCollections ):
+   import InDetRecExample.TrackingCommon as TrackingCommon
+   #FIXME: If so:
+   # 1] Get a new association tool
+   #associationTool = TrackingCommon.getInDetTrigPRDtoTrackMapToolGangedPixels(),
+   
+   # 2] Use the ganged pixel from here?
+   #from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool
+   
+   # 3] Create the new one as in offline tracking?:
+   prefix     = 'TrigInDet'
+   suffix     = ''#NewTrackingCuts.extension()
+   return TrackingCommon.getInDetTrackPRD_Association(namePrefix   = prefix,
+                                                      nameSuffix   = suffix,
+                                                      TracksName   = list(InputCollections))#This is readHandle #What input collection Thought there are no tracks at this point??!     
+   # 4] if so do I use normal or ganged?
+   #from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels
+   #InDetTrigPrdAssociationl = InDet__InDetPRD_AssociationToolGangedPixels(name = "%sPrdAssociationTool%s"%(prefix,suffix),
+   #                                                                          PixelClusterAmbiguitiesMapName = TrigPixelKeys.PRDtoTrackMap )
+
+@makePublicTool
+def siDetectorElementRoadMakerTool_builder( name, trackingCuts ):
+   from InDetRecExample.InDetKeys  import  InDetKeys 
+   
+   #Are we happy with this propagator?
+   from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadMaker_xk
+   return  InDet__SiDetElementsRoadMaker_xk(name               = name,
+                                            PropagatorTool     = trigPropagator_getter(),
+                                            usePixel           = trackingCuts.usePixel(),
+                                            PixManagerLocation = InDetKeys.PixelManager(), #FIXME: InDetTrigKeys?
+                                            useSCT             = trackingCuts.useSCT(), 
+                                            SCTManagerLocation = InDetKeys.SCT_Manager(),  #FIXME InDetTrigKeys?
+                                            RoadWidth          = trackingCuts.RoadWidth())
+
+
+
+@makePublicTool
+def siCombinatorialTrackFinderTool_builder( name, trackingCuts ):
+   from .InDetTrigCollectionKeys   import TrigPixelKeys, TrigSCTKeys
+   from AthenaCommon.DetFlags      import DetFlags
+   from InDetRecExample.InDetJobProperties import InDetFlags
+   import InDetRecExample.TrackingCommon as TrackingCommon
+
+   #FIXME: quick hack to try running ID, remove later
+   DetFlags.ID_setOn()
+   
+   #Are we happy with these settings?
+   from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSCTConditionsSummaryTool, InDetTrigPatternUpdator
+   # @TODO ensure that PRD association map is used if usePrdAssociationTool is set
+   
+   kwargs = {}
+   #Prepare default parameter settings for the tool
+   kwargs = setDefaults( kwargs,
+                         PropagatorTool        = trigPropagator_getter(),
+                         UpdatorTool           = InDetTrigPatternUpdator,
+                         SctSummaryTool        = InDetTrigSCTConditionsSummaryTool, #Any reason for this to be turned off? None,
+                         RIOonTrackTool        = TrackingCommon.getInDetRotCreatorDigital(),
+                         usePixel              = DetFlags.haveRIO.pixel_on(),
+                         useSCT                = DetFlags.haveRIO.SCT_on(),
+                         PixelClusterContainer = TrigPixelKeys.Clusters,
+                         SCT_ClusterContainer  = TrigSCTKeys.Clusters)
+   
+   #FIXME: Use TriggerFlags instead?
+   if InDetFlags.doDBMstandalone() or trackingCuts.extension() =='DBM':
+      kwargs = setDefaults( kwargs,
+                            MagneticFieldMode     = "NoField",
+                            TrackQualityCut       = 9.3,
+                            useSCT                =  False,
+                            RIOonTrackTool        = TrackingCommon.getInDetRotCreatorDBM(),
+                            )
+   
+   
+   #Add SCT condition summary if specified
+   #FIXME: Use TriggerFlags instead?
+   #if (DetFlags.haveRIO.SCT_on()):
+   #   kwargs = setDefaults( kwargs,
+   #                         SctSummaryTool = InDetTrigSCTConditionsSummaryTool )
+   
+   from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk
+   return InDet__SiCombinatorialTrackFinder_xk(name  = name,
+                                               **kwargs)
+   
+
+@makePublicTool
+def siTrackMakerTool_builder( name, siDetElementsRoadMakerTool, trackFinderTool, trackingCuts, usePrdAssociationTool ):
+   from InDetRecExample.InDetJobProperties import InDetFlags
+   from InDetRecExample.InDetKeys          import InDetKeys 
+   
+   trackPatternRecoInfo = 'SiSPSeededFinder'
+   if InDetFlags.doCosmics():
+      trackPatternRecoInfo = 'SiSpacePointsSeedMaker_Cosmic'
+   
+   elif InDetFlags.doHeavyIon():
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_HeavyIon'
+   
+   elif trackingCuts.mode() == "LowPt":
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_LowMomentum'
+   
+   elif trackingCuts.mode() == "VeryLowPt" or (trackingCuts.mode() == "Pixel" and InDetFlags.doMinBias()):
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryLowMomentum'           
+   
+   elif trackingCuts.mode() == "BeamGas":
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_BeamGas'
+   
+   elif trackingCuts.mode() == "ForwardTracks":
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardTracks'
+   
+   elif trackingCuts.mode() == "ForwardSLHCTracks":
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_ForwardSLHCTracks'
+   
+   elif trackingCuts.mode() == "VeryForwardSLHCTracks": 
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_VeryForwardSLHCTracks' 
+   
+   elif trackingCuts.mode() == "SLHCConversionFinding":
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_SLHCConversionTracks'
+   
+   elif trackingCuts.mode() == "LargeD0" or trackingCuts.mode() == "LowPtLargeD0":
+     trackPatternRecoInfo = 'SiSpacePointsSeedMaker_LargeD0'
+   
+   useBremMode = trackingCuts.mode() == "Offline" or trackingCuts.mode() == "SLHC" or trackingCuts.mode() == "DBM"
+   
+   kwargs = {}
+   #Prepare default parameter settings for the tool
+   kwargs = setDefaults( kwargs,
+                         useSCT                        = trackingCuts.useSCT(),
+                         usePixel                      = trackingCuts.usePixel(),
+                         RoadTool                      = siDetElementsRoadMakerTool,
+                         CombinatorialTrackFinder      = trackFinderTool,
+                         pTmin                         = trackingCuts.minPT(),
+                         pTminBrem                     = trackingCuts.minPTBrem(),
+                         pTminSSS                      = InDetFlags.pT_SSScut(),
+                         nClustersMin                  = trackingCuts.minClusters(),
+                         nHolesMax                     = trackingCuts.nHolesMax(),
+                         nHolesGapMax                  = trackingCuts.nHolesGapMax(),
+                         SeedsFilterLevel              = trackingCuts.seedFilterLevel(),
+                         Xi2max                        = trackingCuts.Xi2max(),
+                         Xi2maxNoAdd                   = trackingCuts.Xi2maxNoAdd(),
+                         nWeightedClustersMin          = trackingCuts.nWeightedClustersMin(),
+                         CosmicTrack                   = InDetFlags.doCosmics(),
+                         Xi2maxMultiTracks             = trackingCuts.Xi2max(), # was 3.
+                         useSSSseedsFilter             = InDetFlags.doSSSfilter(),
+                         doMultiTracksProd             = True,
+                         useBremModel                  = InDetFlags.doBremRecovery() and useBremMode, # only for NewTracking the brem is debugged !!!
+                         doCaloSeededBrem              = InDetFlags.doCaloSeededBrem(),
+                         doHadCaloSeedSSS              = InDetFlags.doHadCaloSeededSSS(),
+                         phiWidth                      = trackingCuts.phiWidthBrem(),
+                         etaWidth                      = trackingCuts.etaWidthBrem(),
+                         InputClusterContainerName     = InDetKeys.CaloClusterROIContainer(), 
+                         InputHadClusterContainerName  = InDetKeys.HadCaloClusterROIContainer(), 
+                         TrackPatternRecoInfo          = trackPatternRecoInfo,
+                         UseAssociationTool            = usePrdAssociationTool)
+   
+   
+   #Change the parameters based on the tracking cuts
+   if trackingCuts.mode() == "SLHC" or trackingCuts.mode() == "ForwardSLHCTracks" or trackingCuts.mode() == "VeryForwardSLHCTracks" :
+      kwargs = setDefaults( kwargs,
+                            ITKGeometry = True )
+   
+   if trackingCuts.mode() == "DBM":
+      kwargs = setDefaults( kwargs,
+                            MagneticFieldMode = "NoField",
+                            useBremModel = False,
+                            doMultiTracksProd = False,
+                            pTminSSS = -1,
+                            CosmicTrack = False,
+                            useSSSseedsFilter = False,
+                            doCaloSeededBrem = False,
+                            doHadCaloSeedSSS = False)
+   
+   if InDetFlags.doStoreTrackSeeds():
+      from SeedToTrackConversionTool.SeedToTrackConversionToolConf import InDet__SeedToTrackConversionTool
+      InDet_SeedToTrackConversion = InDet__SeedToTrackConversionTool(name       = "InDet_SeedToTrackConversion"+trackingCuts.extension(),
+                                                                     OutputName = InDetKeys.SiSPSeedSegments()+trackingCuts.extension())
+      kwargs = setDefaults( kwargs,
+                            SeedToTrackConversion = InDet_SeedToTrackConversion,
+                            SeedSegmentsWrite = True )
+   
+   
+   
+   from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk
+   return  InDet__SiTrackMaker_xk(name = name,
+                                  **kwargs)
+
+
+
+def siSPSeededTrackFinder_builder( name, outputTracks, trackingCuts, usePrdAssociationTool, nameSuffix ):
+   from .InDetTrigCollectionKeys           import TrigPixelKeys, TrigSCTKeys
+   from InDetRecExample.InDetJobProperties import InDetFlags
+
+
+   
+   #Load subtools of the TrackFinder
+   siSpacePointsSeedMakerTool = siSpacePointsSeedMakerTool_builder(name                  = get_full_name( 'siSPSeedMaker', nameSuffix),
+                                                                   trackingCuts          = trackingCuts,
+                                                                   usePrdAssociationTool = usePrdAssociationTool )
+   
+   # --- Z-coordinates primary vertices finder (only for collisions)
+   zVertexMakerTool = None
+   #FIXME:Switch to trig flags?
+   if InDetFlags.useZvertexTool() and trackingCuts.mode() != "DBM":
+      print('Running z-vertex maker')
+      zVertexMakerTool =  zVertexMakerTool_builder(name, trackingCuts, siSpacePointsSeedMakerTool )
+   
+   # --- SCT and Pixel detector elements road builder
+   siDetectorElementRoadMaker = siDetectorElementRoadMakerTool_builder( name         = get_full_name( 'SiDetectorElementRoadMaker', nameSuffix),
+                                                                        trackingCuts = trackingCuts )
+   
+   # --- Local track finding using sdCaloSeededSSSpace point seed
+   siCombinatorialTrackFinderTool = siCombinatorialTrackFinderTool_builder( name         = get_full_name( 'SiCombinatorialTrackFinder', nameSuffix),
+                                                                            trackingCuts = trackingCuts)
+
+
+   siTrackMakerTool =  siTrackMakerTool_builder( name                       = get_full_name( 'siTrackMaker', nameSuffix),
+                                                 siDetElementsRoadMakerTool = siDetectorElementRoadMaker,
+                                                 trackFinderTool            = siCombinatorialTrackFinderTool,
+                                                 trackingCuts               = trackingCuts,
+                                                 usePrdAssociationTool      = usePrdAssociationTool)
+
+   #-----------------------------------------------------
+   #  Configure parameters
+
+   kwargs = {}
+   #Prepare default parameter settings for the tool
+   kwargs = setDefaults( kwargs,
+                         TrackTool           = siTrackMakerTool,
+                         PRDtoTrackMap       = TrigPixelKeys.PRDtoTrackMap if usePrdAssociationTool else '', #TODO: if prd is enabled this needs to be tested
+                         SpacePointsPixelName= TrigPixelKeys.SpacePoints,
+                         SpacePointsSCTName  = TrigSCTKeys.SpacePoints,
+                         TrackSummaryTool    = trackSummaryTool_getter(doTRT=False), #TODO: x-check whether we need different config
+                         TracksLocation      = outputTracks, #outEFIDTracks,
+                         SeedsTool           = siSpacePointsSeedMakerTool,
+                         ZvertexTool         = zVertexMakerTool, 
+                         useZvertexTool      = InDetFlags.useZvertexTool() and trackingCuts.mode() != "DBM",
+                         useNewStrategy      = InDetFlags.useNewSiSPSeededTF() and trackingCuts.mode() != "DBM",
+                         useMBTSTimeDiff     = InDetFlags.useMBTSTimeDiff(),
+                         useZBoundFinding    = trackingCuts.doZBoundary() and trackingCuts.mode() != "DBM" )
+   
+   
+   #Specific tracking settings 
+   if trackingCuts.mode() == "ForwardSLHCTracks" or trackingCuts.mode() == "ForwardTracks":
+      kwargs = setDefaults( kwargs,
+                            useNewStrategy     = False,
+                            useMBTSTimeDiff    = InDetFlags.useMBTSTimeDiff(),
+                            useZBoundFinding   = False,
+                            useZvertexTool     = InDetFlags.useZvertexTool() )
+   
+      if InDetFlags.doHeavyIon():
+            kwargs = setDefaults( kwargs, FreeClustersCut = 2) #Heavy Ion optimization from Igor
+
+   #-----------------------------------------------------
+
+
+   from SiSPSeededTrackFinder.SiSPSeededTrackFinderConf import InDet__SiSPSeededTrackFinder
+   return InDet__SiSPSeededTrackFinder(name = name,
+                                    **kwargs )
 
-- 
GitLab


From b9ee484626ed59115b1536fc57c0d3964122c7b7 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Mon, 21 Dec 2020 12:44:10 +0100
Subject: [PATCH 162/308] Added explicit dependencies on "future" in a couple
 of packages.

This was needed to make AthAnalysis depend on this LCG package.
---
 Control/AthenaCommon/CMakeLists.txt        | 9 ++++++---
 Control/AthenaConfiguration/CMakeLists.txt | 3 +++
 Control/AthenaPython/CMakeLists.txt        | 1 +
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Control/AthenaCommon/CMakeLists.txt b/Control/AthenaCommon/CMakeLists.txt
index f087ae817778..e0ffc081ed6b 100644
--- a/Control/AthenaCommon/CMakeLists.txt
+++ b/Control/AthenaCommon/CMakeLists.txt
@@ -3,6 +3,9 @@
 # Declare the package name:
 atlas_subdir( AthenaCommon )
 
+# External dependencies.
+find_package( future )
+
 # Set up specific Athena runtime environment:
 set( AthenaCommonEnvironment_DIR ${CMAKE_CURRENT_SOURCE_DIR}
    CACHE PATH "Location of AthenaCommonEnvironmentConfig.cmake" )
@@ -11,7 +14,7 @@ find_package( AthenaCommonEnvironment )
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/Utils
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
-atlas_install_joboptions( share/Preparation.py share/Execution.py share/Atlas.UnixStandardJob.py test/*.py 
+atlas_install_joboptions( share/Preparation.py share/Execution.py share/Atlas.UnixStandardJob.py test/*.py
                           share/zeroJO.py share/Atlas_Gen.UnixStandardJob.py share/MemTraceInclude.py share/runbatch.py)
 atlas_install_scripts( share/athena.py share/athena_preload.sh share/chappy.py share/test_cfg_pickling.py share/ThinCAWrapper.sh)
 atlas_install_runtime(share/*.pkl)
@@ -26,14 +29,14 @@ atlas_add_test( AthAppMgrUnitTests SCRIPT test/test_AthAppMgrUnitTests.sh
 atlas_add_test( ConfigurableUnitTests SCRIPT test/test_ConfigurableUnitTests.sh
                 PROPERTIES TIMEOUT 300
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
-atlas_add_test( JobOptionsUnitTests SCRIPT test/test_JobOptionsUnitTests.sh 
+atlas_add_test( JobOptionsUnitTests SCRIPT test/test_JobOptionsUnitTests.sh
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
 atlas_add_test( JobPropertiesUnitTests SCRIPT test/test_JobPropertiesUnitTests.sh
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
 atlas_add_test( KeyStoreUnitTests SCRIPT test/test_KeyStoreUnitTests.sh
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in|^outFileName: " )
 atlas_add_test( CFElementsTest SCRIPT python -m unittest -v AthenaCommon.CFElements
-		POST_EXEC_SCRIPT nopost.sh ) 
+		POST_EXEC_SCRIPT nopost.sh )
 
 atlas_add_test( GenerateBootstrapTest
    SCRIPT test/test_gen_bootstrap.sh
diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt
index dc6084e7b04f..a4f11c6aec07 100644
--- a/Control/AthenaConfiguration/CMakeLists.txt
+++ b/Control/AthenaConfiguration/CMakeLists.txt
@@ -3,6 +3,9 @@
 # Declare the package name:
 atlas_subdir( AthenaConfiguration )
 
+# External dependencies.
+find_package( future )
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/iconfTool
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Control/AthenaPython/CMakeLists.txt b/Control/AthenaPython/CMakeLists.txt
index 460c29c03f83..d4d363433040 100644
--- a/Control/AthenaPython/CMakeLists.txt
+++ b/Control/AthenaPython/CMakeLists.txt
@@ -7,6 +7,7 @@ atlas_subdir( AthenaPython )
 find_package( Python COMPONENTS Development )
 find_package( ROOT COMPONENTS Core PyROOT ROOTTPython
    cppyy${Python_VERSION_MAJOR}_${Python_VERSION_MINOR} )
+find_package( future )
 
 # Component(s) in the package:
 atlas_add_library( AthenaPython
-- 
GitLab


From cbcfcc1a78e8258fecf5ed35948ac8a2302959e1 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Mon, 21 Dec 2020 12:45:37 +0100
Subject: [PATCH 163/308] Taught the script to ignore warnings about unknown
 auxiliary variable types.

Converter tests in "mini-projects" (that do not have the full EDM
available to them) may print such warnings during the tests. Without
making the tests fail.
---
 .../AthenaPoolUtilities/share/post_tpcnvtest.sh          | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
index b016ef4abbb8..ffcc54830bdb 100755
--- a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 #/** @file post.sh
-# @brief sh script that check the return code of an executable and compares 
+# @brief sh script that check the return code of an executable and compares
 # its output with a reference (if available).
-# @param test_name 
+# @param test_name
 #
 # @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration.
 # $Id: post_check.sh,v 1.32 2009-05-06 18:10:12 ssnyder Exp $
@@ -248,11 +248,13 @@ PP="$PP"'|WARNING: new xAOD variables '
 # From MuonCondAlg.
 PP="$PP"'|Empty temporary A-line container'
 
+# Warnings from mini-projects, not holding all the EDM classes.
+PP="$PP"'|^RootAuxDynReader::init.*Could not find auxid for'
 
 test=$1
 if [ -z "$testStatus" ]; then
     echo "post.sh> Warning: athena exit status is not available "
-else 
+else
     # check exit status
     joblog=${test}.log
     if [ -r ${test}-SKIPPED ]; then
@@ -316,4 +318,3 @@ fi
 joblog=${test}.log
 
 exit $testStatus
-
-- 
GitLab


From 9b58009b388d32e3dc196c9571f317addc8f2b8c Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Mon, 21 Dec 2020 12:48:25 +0100
Subject: [PATCH 164/308] Made all (enabled) T/P converter tests succeed in
 AthAnalysis.

ROOT-10940 is hitting the AthAnalysis projects in this test, unlike
all the other projects weirdly enough.

At the same time also disabled some of the tests completely, as they
do not work correctly with the reduced EDM provided by AthAnalysis.
---
 .../test/xAODBTaggingAthenaPool_21.0.79_test.py           | 4 ++++
 Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt         | 6 ++++++
 .../test/xAODCaloEventAthenaPool_20.1.7.2_test.py         | 4 ++++
 .../test/xAODCaloEventAthenaPool_21.0.79_test.py          | 4 ++++
 .../test/xAODEgammaAthenaPool_20.1.7.2_test.py            | 4 ++++
 .../test/xAODEgammaAthenaPool_21.0.79_test.py             | 4 ++++
 .../test/xAODJetAthenaPool_20.7.2.2_test.py               | 4 ++++
 .../test/xAODJetAthenaPool_21.0.79_test.py                | 4 ++++
 .../test/xAODMissingETAthenaPool_20.1.7.2_test.py         | 4 ++++
 .../test/xAODMissingETAthenaPool_21.0.79_test.py          | 4 ++++
 Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt              | 6 ++++++
 .../test/xAODMuonAthenaPool_20.1.7.2_test.py              | 4 ++++
 .../test/xAODMuonAthenaPool_20.7.2.2_test.py              | 4 ++++
 .../test/xAODMuonAthenaPool_20.7.9.9_test.py              | 4 ++++
 .../test/xAODMuonAthenaPool_21.0.79_test.py               | 4 ++++
 .../test/xAODMuonAthenaPool_master-20190911_test.py       | 4 ++++
 .../test/xAODPFlowAthenaPool_21.0.79_test.py              | 4 ++++
 .../test/xAODParticleAthenaPool_21.0.79_test.py           | 4 ++++
 .../test/xAODTauAthenaPool_20.1.7.2_test.py               | 4 ++++
 .../test/xAODTauAthenaPool_20.7.2.2_test.py               | 4 ++++
 .../test/xAODTauAthenaPool_21.0.79_test.py                | 4 ++++
 Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt          | 6 ++++++
 .../test/xAODTrigCaloAthenaPool_20.0.0.3_test.py          | 4 ++++
 .../test/xAODTrigCaloAthenaPool_21.0.79_test.py           | 4 ++++
 .../test/xAODTrigEgammaAthenaPool_21.0.79_test.py         | 4 ++++
 .../test/xAODTrigMissingETAthenaPool_21.0.79_test.py      | 4 ++++
 .../test/xAODTrigMuonAthenaPool_20.1.7.2_test.py          | 4 ++++
 .../test/xAODTrigMuonAthenaPool_21.0.79_test.py           | 4 ++++
 .../test/xAODTriggerAthenaPool_20.1.7.2_test.py           | 4 ++++
 .../test/xAODTriggerAthenaPool_master-20190911_test.py    | 4 ++++
 .../test/xAODTruthAthenaPool_21.0.79_test.py              | 8 ++++++--
 31 files changed, 132 insertions(+), 2 deletions(-)

diff --git a/Event/xAOD/xAODBTaggingAthenaPool/test/xAODBTaggingAthenaPool_21.0.79_test.py b/Event/xAOD/xAODBTaggingAthenaPool/test/xAODBTaggingAthenaPool_21.0.79_test.py
index 1586a515aae1..5dbe62db82c8 100755
--- a/Event/xAOD/xAODBTaggingAthenaPool/test/xAODBTaggingAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODBTaggingAthenaPool/test/xAODBTaggingAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::BTaggingAuxContainer_v1
diff --git a/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt b/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt
index c9651a361957..5901acedf5bb 100644
--- a/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODCaloEventAthenaPool/CMakeLists.txt
@@ -26,6 +26,12 @@ atlas_add_poolcnv_library( xAODCaloEventAthenaPoolPoolCnv
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+# In AthAnalysis xAOD::CaloCluster doesn't know about its CaloCell link. Which
+# makes the converter tests fail in that project...
+if( XAOD_ANALYSIS )
+   return()
+endif()
+
 # Set up (a) test(s) for the converter(s):
 find_package( AthenaPoolUtilitiesTest )
 
diff --git a/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_20.1.7.2_test.py
index 2e4154e6f870..5d39af506619 100755
--- a/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #xAOD::CaloCluster
diff --git a/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_21.0.79_test.py b/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_21.0.79_test.py
index 2f7e4720ba46..2bd06fe7ecc1 100755
--- a/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODCaloEventAthenaPool/test/xAODCaloEventAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::CaloCluster
diff --git a/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_20.1.7.2_test.py
index 1a002c879aa1..56410043ddac 100755
--- a/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #xAOD::ElectronAuxContainer
diff --git a/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_21.0.79_test.py b/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_21.0.79_test.py
index 6d1e56c27f74..7321ff27d183 100755
--- a/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODEgammaAthenaPool/test/xAODEgammaAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::ElectronAuxContainer_v3
diff --git a/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_20.7.2.2_test.py b/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_20.7.2.2_test.py
index ce7b77031206..3f28b32a09b6 100755
--- a/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_20.7.2.2_test.py
+++ b/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_20.7.2.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.7.2.2/AOD-20.7.2.2-full.pool.root'
     keys = [
         #xAOD::JetTrigAuxContainer_v2
diff --git a/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_21.0.79_test.py b/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_21.0.79_test.py
index 98994b79d3bd..8fe437f40e5a 100755
--- a/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODJetAthenaPool/test/xAODJetAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::JetTrigAuxContainer_v2
diff --git a/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_20.1.7.2_test.py
index d933826d07db..eb457c8a619c 100755
--- a/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #xAOD::MissingETAssociationMap
diff --git a/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_21.0.79_test.py b/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_21.0.79_test.py
index f43f7b83428d..3b2e3aad5648 100755
--- a/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODMissingETAthenaPool/test/xAODMissingETAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::MissingETAuxAssociationMap_v2
diff --git a/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt b/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt
index 353c84b01d8f..9c8f759fcd66 100644
--- a/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt
@@ -25,6 +25,12 @@ atlas_add_poolcnv_library( xAODMuonAthenaPoolPoolCnv
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+# In AthAnalysis xAOD::Muon doesn't know about its MuonSegment link. Which
+# makes the converter tests fail in that project...
+if( XAOD_ANALYSIS )
+   return()
+endif()
+
 # Set up (a) test(s) for the converter(s):
 find_package( AthenaPoolUtilitiesTest )
 
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py
index 0b989d4954b6..d2748c20b966 100755
--- a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #Muons...
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py
index cc7882cc2a83..b732ce2c7a97 100755
--- a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.7.2.2/AOD-20.7.2.2-full.pool.root'
     keys = [
         #xAOD::MuonAuxContainer_v2
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py
index 35210998e699..784da1fbdb69 100755
--- a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.7.9.9/AOD-20.7.9.9-full.pool.root'
     keys = [
         #xAOD::MuonAuxContainer_v4
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py
index 742918ebc9be..95cf862fec0a 100755
--- a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::MuonAuxContainer_v4
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py
index 70a4d1ae5123..81a183add39e 100755
--- a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-master-20190911/AOD-master-20190911-full.pool.root'
     keys = [
         #xAOD::MuonAuxContainer_v5
diff --git a/Event/xAOD/xAODPFlowAthenaPool/test/xAODPFlowAthenaPool_21.0.79_test.py b/Event/xAOD/xAODPFlowAthenaPool/test/xAODPFlowAthenaPool_21.0.79_test.py
index a3d3f81fa19f..3a2042e8dd8f 100755
--- a/Event/xAOD/xAODPFlowAthenaPool/test/xAODPFlowAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODPFlowAthenaPool/test/xAODPFlowAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::PFOAuxContainer_v1
diff --git a/Event/xAOD/xAODParticleEventAthenaPool/test/xAODParticleAthenaPool_21.0.79_test.py b/Event/xAOD/xAODParticleEventAthenaPool/test/xAODParticleAthenaPool_21.0.79_test.py
index eaaf9cc1d31c..67fad4ce1b7c 100755
--- a/Event/xAOD/xAODParticleEventAthenaPool/test/xAODParticleAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODParticleEventAthenaPool/test/xAODParticleAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::ParticleAuxContainer_v1
diff --git a/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.1.7.2_test.py
index 8b2bbfeb0476..32ed933c6642 100755
--- a/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #xAOD::TauJetAuxContainer
diff --git a/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.7.2.2_test.py b/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.7.2.2_test.py
index dae8e87fa0d6..1a7a0f7667c1 100755
--- a/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.7.2.2_test.py
+++ b/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_20.7.2.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.7.2.2/AOD-20.7.2.2-full.pool.root'
     keys = [
         #xAOD::DiTauJetAuxContainer_v1
diff --git a/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_21.0.79_test.py b/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_21.0.79_test.py
index a65bbb30733d..224831477886 100755
--- a/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODTauAthenaPool/test/xAODTauAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::DiTauJetAuxContainer_v1
diff --git a/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt b/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt
index dd31c801fa82..de3f338d3359 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODTrackingAthenaPool/CMakeLists.txt
@@ -37,6 +37,12 @@ atlas_add_poolcnv_library( xAODTrackingAthenaPoolPoolCnv
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+# In AthAnalysis xAOD::TrackParticle doesn't know about its Trk::Track link.
+# Which makes the converter tests fail in that project...
+if( XAOD_ANALYSIS )
+   return()
+endif()
+
 # Set up (a) test(s) for the converter(s):
 find_package( AthenaPoolUtilitiesTest )
 
diff --git a/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_20.0.0.3_test.py b/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_20.0.0.3_test.py
index 91c4eb7011bb..4c854f1614d0 100755
--- a/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_20.0.0.3_test.py
+++ b/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_20.0.0.3_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.0.0.3/AOD-20.0.0.3-full.pool.root'
     keys = [
         #xAOD::TrigCaloClusterAuxContainer_v1
diff --git a/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_21.0.79_test.py b/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_21.0.79_test.py
index 3687da81dbee..5596c4ad8c9c 100755
--- a/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODTrigCaloAthenaPool/test/xAODTrigCaloAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::CaloClusterTrigAuxContainer_v1
diff --git a/Event/xAOD/xAODTrigEgammaAthenaPool/test/xAODTrigEgammaAthenaPool_21.0.79_test.py b/Event/xAOD/xAODTrigEgammaAthenaPool/test/xAODTrigEgammaAthenaPool_21.0.79_test.py
index 7564d3e52771..8e88594ce85d 100755
--- a/Event/xAOD/xAODTrigEgammaAthenaPool/test/xAODTrigEgammaAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODTrigEgammaAthenaPool/test/xAODTrigEgammaAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::ElectronTrigAuxContainer_v1
diff --git a/Event/xAOD/xAODTrigMissingETAthenaPool/test/xAODTrigMissingETAthenaPool_21.0.79_test.py b/Event/xAOD/xAODTrigMissingETAthenaPool/test/xAODTrigMissingETAthenaPool_21.0.79_test.py
index 658ee021b7ae..05e7b59a195c 100755
--- a/Event/xAOD/xAODTrigMissingETAthenaPool/test/xAODTrigMissingETAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODTrigMissingETAthenaPool/test/xAODTrigMissingETAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::TrigMissingETAuxContainer_v1
diff --git a/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_20.1.7.2_test.py
index a728cd133616..31b049dbc6e7 100755
--- a/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #xAOD::L2CombinedMuonAuxContainer
diff --git a/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_21.0.79_test.py b/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_21.0.79_test.py
index 0e157b4bf1af..296f9eeb4291 100755
--- a/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODTrigMuonAthenaPool/test/xAODTrigMuonAthenaPool_21.0.79_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::L2CombinedMuonAuxContainer_v1
diff --git a/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_20.1.7.2_test.py
index 476752fdba8e..67e184e1ae59 100755
--- a/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_20.1.7.2_test.py
+++ b/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_20.1.7.2_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-20.1.7.2/AOD-20.1.7.2-full.pool.root'
     keys = [
         #EmTauRoI
diff --git a/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_master-20190911_test.py b/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_master-20190911_test.py
index 7f2c7e0ceb2d..ff34d84ada56 100755
--- a/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_master-20190911_test.py
+++ b/Event/xAOD/xAODTriggerAthenaPool/test/xAODTriggerAthenaPool_master-20190911_test.py
@@ -3,10 +3,14 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
     infile = 'aod/AOD-master-20190911/AOD-master-20190911-full.pool.root'
     keys = [
         #EmTauRoI_v2
diff --git a/Event/xAOD/xAODTruthAthenaPool/test/xAODTruthAthenaPool_21.0.79_test.py b/Event/xAOD/xAODTruthAthenaPool/test/xAODTruthAthenaPool_21.0.79_test.py
index 0f6816c00729..22c15e5c3052 100755
--- a/Event/xAOD/xAODTruthAthenaPool/test/xAODTruthAthenaPool_21.0.79_test.py
+++ b/Event/xAOD/xAODTruthAthenaPool/test/xAODTruthAthenaPool_21.0.79_test.py
@@ -3,11 +3,15 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+import ROOT
 from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest
 
 if __name__ == "__main__":
-    infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
 
+    # Force-load some dictionaries. Needed to work around ROOT-10940.
+    ROOT.xAOD.CaloCluster()
+
+    infile = 'aod/AOD-21.0.79/AOD-21.0.79-full.pool.root'
     keys = [
         #xAOD::TruthEventAuxContainer_v1
         'TruthEvents',
@@ -19,4 +23,4 @@ if __name__ == "__main__":
         'TruthVertices',
     ]
 
-    TPCnvTest(infile, keys)#, useGeoModelSvc=True, doLAr=True, doTile=True)
+    TPCnvTest(infile, keys)
-- 
GitLab


From 4f37164b43037984920210a057fe7333f79f3677 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Mon, 21 Dec 2020 12:56:06 +0000
Subject: [PATCH 165/308] Remove extraneous lines from MuonRec_jobOptions.py
 These only made sense in the separate MuonCalibConfig.py. Remove them from
 here. Fixes ATLASRECTS-5848.

---
 .../MuonRecExample/share/MuonRec_jobOptions.py                 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
index 3ff7e1613a5e..965de10bed2c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
@@ -193,9 +193,6 @@ elif muonRecFlags.doCalib():
     from MuonRecExample import MuonAlignConfig
     from MuonCnvExample import setupMuonCalib
     setupMuonCalib()
-else:
-    logMuon.warning("Loading %s but not setting up any MuonCalibration or Ntuple" % __name__ )
-
 
 #--------------------------------------------------------------------------
 # Evaluate tracking performance
-- 
GitLab


From cb7db94c1523ab6886093c4d6f9d094203103124 Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Mon, 21 Dec 2020 12:57:25 +0000
Subject: [PATCH 166/308] Revert "Remove extraneous lines from
 MuonRec_jobOptions.py"

This reverts commit 4f37164b43037984920210a057fe7333f79f3677
---
 .../MuonRecExample/share/MuonRec_jobOptions.py                 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
index 965de10bed2c..3ff7e1613a5e 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
@@ -193,6 +193,9 @@ elif muonRecFlags.doCalib():
     from MuonRecExample import MuonAlignConfig
     from MuonCnvExample import setupMuonCalib
     setupMuonCalib()
+else:
+    logMuon.warning("Loading %s but not setting up any MuonCalibration or Ntuple" % __name__ )
+
 
 #--------------------------------------------------------------------------
 # Evaluate tracking performance
-- 
GitLab


From c6069d9c514b97ea496ad5aa01a69f97bb15468e Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Mon, 21 Dec 2020 14:02:39 +0100
Subject: [PATCH 167/308] Remove extraneous lines from MuonRec_jobOptions.py
 These only made sense in the separate MuonCalibConfig.py. Remove them from
 here. Fixes ATLASRECTS-5848.

---
 .../MuonRecExample/share/MuonRec_jobOptions.py                 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
index 3ff7e1613a5e..965de10bed2c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_jobOptions.py
@@ -193,9 +193,6 @@ elif muonRecFlags.doCalib():
     from MuonRecExample import MuonAlignConfig
     from MuonCnvExample import setupMuonCalib
     setupMuonCalib()
-else:
-    logMuon.warning("Loading %s but not setting up any MuonCalibration or Ntuple" % __name__ )
-
 
 #--------------------------------------------------------------------------
 # Evaluate tracking performance
-- 
GitLab


From 22089cf8abdb4bc432b8ee15a3e7a8cf6c7a26db Mon Sep 17 00:00:00 2001
From: Gabriel Facini <gabriel.facini@cern.ch>
Date: Mon, 21 Dec 2020 15:45:56 +0000
Subject: [PATCH 168/308] configuration to use correct (only) NN for Run I

---
 .../InDetExample/InDetRecExample/python/TrackingCommon.py     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
index 761913acf116..1512c01c43b2 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
@@ -325,6 +325,10 @@ def getNnClusterizationFactory(name='NnClusterizationFactory', **kwargs) :
     useTTrainedNetworks = InDetFlags.useNNTTrainedNetworks()
     from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as geoFlags
     do_runI = geoFlags.Run() not in ["RUN2", "RUN3"]
+
+    if do_runI and not useTTrainedNetworks:
+      log.debug("useNNTTrainedNetworks must be True for Run I. Contact CTIDE for questions.")
+      useTTrainedNetworks = True
     
     if useTTrainedNetworks :
       log.debug("Setting up TTrainedNetworks")
-- 
GitLab


From c7dfab974ccf2c57d9df23a4593b0ace8ae290c7 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Mon, 21 Dec 2020 17:25:56 +0100
Subject: [PATCH 169/308] Removed a memory leak from MdtSegmentT0Fitter.

At the same time cleaned the CMake configuration of the package
a bit as well.
---
 .../MdtSegmentT0Fitter/CMakeLists.txt         |  18 +-
 .../src/MdtSegmentT0Fitter.cxx                | 195 +++++++++---------
 2 files changed, 104 insertions(+), 109 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/CMakeLists.txt
index 4dc59bec52a2..e985bf243958 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/CMakeLists.txt
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/CMakeLists.txt
@@ -1,19 +1,15 @@
-################################################################################
-# Package: MdtSegmentT0Fitter
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MdtSegmentT0Fitter )
 
 # External dependencies:
-find_package( ROOT COMPONENTS Minuit Core Tree MathCore Hist RIO pthread MathMore Minuit2 Matrix Physics HistPainter Rint )
+find_package( ROOT COMPONENTS Core MathCore Minuit2 )
 
 # Component(s) in the package:
 atlas_add_component( MdtSegmentT0Fitter
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MdtCalibSvcLib TrkDriftCircleMath MdtCalibData MuonCalibToolsLib MuonReadoutGeometry MuonIdHelpersLib MuonPrepRawData MuonRIO_OnTrack MuonSegmentMakerInterfacesLib )
-
-# Install files from the package:
-atlas_install_headers( MdtSegmentT0Fitter )
+   MdtSegmentT0Fitter/*.h src/*.cxx src/components/*.cxx
+   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MdtCalibSvcLib
+   TrkDriftCircleMath MdtCalibData MuonReadoutGeometry MuonPrepRawData
+   MuonRIO_OnTrack MuonSegmentMakerInterfacesLib )
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
index 5c9ab78eaacf..e5a9311aec54 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MdtSegmentT0Fitter/src/MdtSegmentT0Fitter.cxx
@@ -57,15 +57,15 @@ namespace TrkDriftCircleMath {
       FunctionToMinimize(const int used) : m_data(),m_used(used),m_t0Error() {}
       ~FunctionToMinimize() {m_data.clear();}
       double DoEval(const double* xx) const {
-        double ang = xx[0];  
+        double ang = xx[0];
         double b = xx[1];
         double t0 = xx[2];
-        
+
         double cosin = std::cos(ang);
         double sinus = std::sin(ang);
-        
+
         double fval = 0.;
-        // Add t0 constraint 
+        // Add t0 constraint
         if (m_t0Error == WEAK_TOPO_T0ERROR ) {
          fval += xx[2]*xx[2]/(1.0 *m_t0Error*m_t0Error);
         }
@@ -79,7 +79,7 @@ namespace TrkDriftCircleMath {
           double uppercut = m_data[i].rt->tUpper();
           double lowercut = m_data[i].rt->tLower();
           // Penalty for t<lowercut and t >uppercut
-          if (t> uppercut ) { // too large 
+          if (t> uppercut ) { // too large
             fval += (t-uppercut)* (t-uppercut)*0.1;
           } else if (t < 0 ) {// too small
             fval += (t-lowercut)*(t-lowercut)*0.1;
@@ -112,7 +112,7 @@ namespace TrkDriftCircleMath {
 
   MdtSegmentT0Fitter::MdtSegmentT0Fitter(const std::string& ty,const std::string& na,const IInterface* pa)
   : AthAlgTool(ty,na,pa),
-    DCSLFitter(), 
+    DCSLFitter(),
     m_ntotalCalls(0),
     m_npassedNHits(0),
     m_npassedSelectionConsistency(0),
@@ -121,14 +121,14 @@ namespace TrkDriftCircleMath {
     m_npassedMinuitFit(0) {
     declareInterface <IDCSLFitProvider> (this);
   }
-  
+
   StatusCode MdtSegmentT0Fitter::initialize() {
     ATH_CHECK(m_calibrationDbTool.retrieve());
     return StatusCode::SUCCESS;
   }
-  
+
   StatusCode MdtSegmentT0Fitter::finalize() {
-    
+
     double scaleFactor = m_ntotalCalls != 0 ? 1./(double)m_ntotalCalls : 1.;
 
     ATH_MSG_INFO( "Summarizing fitter statistics " << "\n"
@@ -140,15 +140,15 @@ namespace TrkDriftCircleMath {
                   << " Passed Fit       " << std::setw(10) << m_npassedMinuitFit << "   " << scaleFactor*m_npassedMinuitFit  );
     return StatusCode::SUCCESS;
   }
-  
-  
+
+
   /***********************************************************************************/
   /// RT function from Craig Blocker
   /// ok for now, possibly replace with actual RT function used to calibrate run
-  
+
   constexpr double T2R_A[] = {1.184169e-1, 3.32382e-2, 4.179808e-4, -5.012896e-6, 2.61497e-8, -7.800677e-11, 1.407393e-13, -1.516193e-16, 8.967997e-20, -2.238627e-23};
   constexpr double RCORR_A[] = {234.3413, -5.803375, 5.061677e-2, -1.994959e-4, 4.017433e-7, -3.975037e-10, 1.522393e-13};
-  
+
   double rcorr(const double tin) {
     double rc;
     if(tin < 16.) {
@@ -162,25 +162,25 @@ namespace TrkDriftCircleMath {
       }
     }
     rc = rc*1e-3;
-    
+
     return rc;
   }
-  
+
   double t2r(const double tin) {
     if(tin < 0.) return 0.;
     if(tin > MAX_DRIFT) return 20.;
-    
+
     double tpow = 1.;
     double rc = 0.;
     for(int j = 0; j < 10; j++) {
       rc += T2R_A[j]*tpow;
       tpow *= tin;
     }
-    
+
     rc -= rcorr(tin);
     return rc;
   }
-  
+
   /// derivatives of RT function, use to get errors
   double rcorrprime(const double tin) {
     double rc;
@@ -195,26 +195,26 @@ namespace TrkDriftCircleMath {
       }
     }
     rc = rc*1e-3;
-    
+
     return rc;
   }
-  
+
   double t2rprime(const double tin) {
     if(tin < 0.) return 0.;
     if(tin > MAX_DRIFT) return 20.;
-    
+
     double tpow = 1.;
     double rc = 0.;
     for(int j = 1; j < 10; j++) {
       rc += j*T2R_A[j]*tpow;
       tpow *= tin;
     }
-    
+
     rc -= rcorrprime(tin);
     return rc;
   }
-  
-  
+
+
   /// use a binary search to get rt-inverse from rt
   /// assumes the function is monotonic, obviously not true for these polynomial parametrizations for all t
   double r2t(const double r) {
@@ -225,7 +225,7 @@ namespace TrkDriftCircleMath {
     } else if(r>t2r(tb)) {
       return R2TSPURIOUS;
     }
-    
+
     int itr = 0;
     while (ta <= tb) {
       double tm  = (ta + tb) / 2;  // compute mid point.
@@ -239,13 +239,13 @@ namespace TrkDriftCircleMath {
       else if (r < rtm ) {
         tb = tm; // repeat search in bottom half.
       }
-      
+
       itr++;
       if(itr>50) return -1;
     }
     return -1;    // failed to find key
   }
-  
+
   double r2t_ext(std::vector<const MuonCalib::IRtRelation*> *rtpointers, double r, int i) {
     const MuonCalib::IRtRelation* rtrel = rtpointers->at(i);
     double ta = rtrel->tLower();
@@ -255,7 +255,7 @@ namespace TrkDriftCircleMath {
     } else if(r>rtrel->radius(tb)) {
       return R2TSPURIOUS;
     }
-    
+
     int itr = 0;
     while (ta <= tb) {
       double tm  = (ta + tb) / 2;  // compute mid point.
@@ -269,7 +269,7 @@ namespace TrkDriftCircleMath {
       else if (r < rtm ) {
         tb = tm; // repeat search in bottom half.
       }
-      
+
       itr++;
       if(itr>50) return -1;
     }
@@ -285,18 +285,12 @@ namespace TrkDriftCircleMath {
 
     if(m_trace) ATH_MSG_DEBUG("New seg: ");
 
-    ROOT::Math::Minimizer* minimum = new ROOT::Minuit2::Minuit2Minimizer("algoName");
-    minimum->SetMaxFunctionCalls(1000000);
-    minimum->SetTolerance(0.001);
-    minimum->SetPrintLevel(-1);
-    if(msgLvl(MSG::VERBOSE)) minimum->SetPrintLevel(1);
- 
     const DCOnTrackVec& dcs_keep = dcs;
 
     unsigned int N = dcs_keep.size();
 
     result.setT0Shift(-99999,-99999);
-    
+
     if(N<2) {
       return false;
     }
@@ -304,7 +298,7 @@ namespace TrkDriftCircleMath {
     if( selection.size() != N ) {
       ATH_MSG_ERROR("MdtSegmentT0Fitter.cxx:fit with t0 <bad HitSelection>");
       return false;
-    }  
+    }
     ++m_npassedSelectionConsistency;
     int used=0;
     for(unsigned int i=0;i<N;++i){
@@ -320,12 +314,12 @@ namespace TrkDriftCircleMath {
 
       //
       //     Copy driftcircles and reset the drift radii as they might have been overwritten
-      //     after a succesfull t0 fit 
-      // 
+      //     after a succesfull t0 fit
+      //
 
       DCOnTrackVec::const_iterator it = dcs.begin();
       DCOnTrackVec::const_iterator it_end = dcs.end();
-      
+
       DCOnTrackVec dcs_new;
       dcs_new.reserve(dcs.size());
       double chi2p = 0.;
@@ -346,7 +340,7 @@ namespace TrkDriftCircleMath {
         }
       }
       if(m_trace&&chi2p>0) ATH_MSG_DEBUG("NO Minuit Fit TOO few hits Chi2 penalty " << chi2p);
-      bool oldrefit = DCSLFitter::fit( result, line, dcs_new, selection ); 
+      bool oldrefit = DCSLFitter::fit( result, line, dcs_new, selection );
       chi2p += result.chi2();
 // add chi2 penalty for too large or too small driftTimes  t < 0 or t> t upper
       result.set(chi2p, result.ndof(),  result.dtheta(),  result.dy0());
@@ -356,15 +350,15 @@ namespace TrkDriftCircleMath {
       return oldrefit;
     } else {
       if(m_trace) ATH_MSG_DEBUG("FITTING FOR T0 N "<<N<<" used " << used);
-    } 
+    }
 
     ++m_npassedMinHits;
-    
+
     if (m_trace) {
       ATH_MSG_DEBUG(" in  MdtSegmentT0Fitter::fit with N dcs "<< N << " hit selection size " <<  selection.size());
       ATH_MSG_DEBUG("in fit "<<result.hasT0Shift()<< " " <<result.t0Shift());
     }
-    
+
     double Zc(0);
     double Yc(0);
     double S(0);
@@ -372,7 +366,7 @@ namespace TrkDriftCircleMath {
     double Sy(0);
     std::vector<double> y(N);
     std::vector<double> z(N);
-    std::vector<double> w(N); 
+    std::vector<double> w(N);
     std::vector<double> r(N);
     std::vector<double> dr(N);
     std::vector<double> t(N);
@@ -393,7 +387,7 @@ namespace TrkDriftCircleMath {
         y[ii] = it->y();
         z[ii] = it->x();
         r[ii] = std::abs(roto->driftRadius());
-        dr[ii] = it->dr(); 
+        dr[ii] = it->dr();
         const Muon::MdtPrepData *peerd;
         peerd = dynamic_cast<const Muon::MdtPrepData*>(roto->prepRawData());
         if(!peerd) {
@@ -405,7 +399,7 @@ namespace TrkDriftCircleMath {
         rtpointers[ii] = rtInfo->rt();
         t[ii] = roto->driftTime();
 
-	double newerror = m_scaleErrors ? it->drPrecise() : it->dr();        
+	double newerror = m_scaleErrors ? it->drPrecise() : it->dr();
 
         if( newerror > 0.) w[ii] = 1./(newerror);
         else w[ii] = 0.;
@@ -416,7 +410,7 @@ namespace TrkDriftCircleMath {
         }
 
         if(m_trace) ATH_MSG_DEBUG("DC:  (" << y[ii] << "," << z[ii] << ") R = " << r[ii] << " W " << w[ii] <<" t " <<t[ii]<< " id: "<<it->id()<<" sel " << selection[ii]);
-        
+
         if( selection[ii] == 0 ){
           S+=w[ii];
           Sz+= w[ii]*z[ii];
@@ -430,15 +424,15 @@ namespace TrkDriftCircleMath {
     const double inv_S = 1. / S;
     Zc = Sz*inv_S;
     Yc = Sy*inv_S;
-    
+
     if(m_trace) ATH_MSG_DEBUG("Yc " << Yc << " Zc " << Zc);
-    
+
     /// go to coordinates centered at the average of the hits
     for(unsigned int i=0;i<N;++i) {
       y[i]  -= Yc;
       z[i]  -= Zc;
     }
-    
+
     int selcount(0);
     DCOnTrackVec::const_iterator it = dcs_keep.begin();
     DCOnTrackVec::const_iterator it_end = dcs_keep.end();
@@ -448,13 +442,13 @@ namespace TrkDriftCircleMath {
     // tlower_i < ti - t0 < tupper_i
     double min_tlower=1e10;
     double max_tupper=-1e10;
-    
+
     double t0seed=0; // the average t0 of the hit
     double st0 = 0; // the std deviation of the hit t0s
     double min_t0 = 1e10; // the smallest t0 seen
     double tee0, tl, th;
-    
-    
+
+
     for(int ii=0 ;it!=it_end; ++it, ++ii ){
       if( selection[ii] == 0 ) {
         double r2tval = r2t_ext(&rtpointers,  r[ii], ii) ;
@@ -481,7 +475,7 @@ namespace TrkDriftCircleMath {
         minFunct.addCoords(z[ii], t[ii], y[ii], w[ii], r[ii], rtpointers[ii]);
 
         selcount++;
-      } 
+      }
     }
     t0seed /= selcount;
     st0 = st0/selcount - t0seed*t0seed;
@@ -493,7 +487,7 @@ namespace TrkDriftCircleMath {
     double theta = line.phi();
     double cosin = std::cos(theta);
     double sinus = std::sin(theta);
-    
+
     if ( sinus < 0.0 ) {
       sinus = -sinus;
       cosin = -cosin;
@@ -501,17 +495,17 @@ namespace TrkDriftCircleMath {
       cosin = -cosin;
     }
     if(m_trace) ATH_MSG_DEBUG("before fit theta "<<theta<<" sinus "<<sinus<< " cosin "<< cosin);
-    
+
     double d = line.y0() + Zc*sinus-Yc*cosin;
-    
+
     if(m_trace) {
       ATH_MSG_DEBUG(" line x y "<<line.position().x()<<" "<<line.position().y());
       ATH_MSG_DEBUG(" Zc Yc "<< Zc <<" "<<Yc);
       ATH_MSG_DEBUG(" line x0 y0 "<<line.x0()<<" "<<line.y0());
       ATH_MSG_DEBUG(" hit shift " << -Zc*sinus+Yc*cosin);
-    } 
+    }
 
-// Calculate signed radii 
+// Calculate signed radii
 
     int nml1p = 0;
     int nml2p = 0;
@@ -539,12 +533,12 @@ namespace TrkDriftCircleMath {
       if(m_trace) ATH_MSG_DEBUG("Combination rejected for positive radii ML1 " <<  nml1p << " ML2 " <<  nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << used << " t0 Error " << t0Error);
       it = dcs.begin();
       it_end = dcs.end();
-      double chi2p = 0.; 
+      double chi2p = 0.;
       DCOnTrackVec dcs_new;
       dcs_new.reserve(dcs.size());
       for(int i=0; it!=it_end; ++it, ++i ){
 	const DriftCircle* ds  = & dcs[i];
-        if(std::abs(ds->r()-ds->rot()->driftRadius())>m_dRTol && m_trace) ATH_MSG_DEBUG("Different radii on dc " << ds->r() << " rot " << ds->rot()->driftRadius());  
+        if(std::abs(ds->r()-ds->rot()->driftRadius())>m_dRTol && m_trace) ATH_MSG_DEBUG("Different radii on dc " << ds->r() << " rot " << ds->rot()->driftRadius());
 	DriftCircle dc_keep(ds->position(), ds->rot()->driftRadius(), ds->dr(), ds->drPrecise(), ds->state(), ds->id(), ds->index(),ds->rot() );
 	DCOnTrack dc_new(dc_keep, 0., 0.);
 	dc_new.state(dcs[i].state());
@@ -556,15 +550,15 @@ namespace TrkDriftCircleMath {
           double tLow = rtInfo->rt()->tLower();
           if(t<tLow) chi2p += (t-tLow)*(t-tLow)*0.1;
           if(t>tUp) chi2p += (t-tUp)*(t-tUp)*0.1;
-        } 
+        }
       }
       if(m_trace&&chi2p>0) ATH_MSG_DEBUG(" Rejected weak topology Chi2 penalty " << chi2p);
-      bool oldrefit = DCSLFitter::fit( result, line, dcs_new, selection ); 
+      bool oldrefit = DCSLFitter::fit( result, line, dcs_new, selection );
       chi2p += result.chi2();
 // add chi2 penalty for too large or too small driftTimes  t < 0 or t> t upper
       result.set( chi2p, result.ndof(),  result.dtheta(),  result.dy0() );
       return oldrefit;
-    }  // end rejection of weak topologies  
+    }  // end rejection of weak topologies
 
     if(m_trace) ATH_MSG_DEBUG("positive radii ML1 " <<  nml1p << " ML2 " <<  nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << used << " t0 Error " << t0Error);
 
@@ -572,20 +566,26 @@ namespace TrkDriftCircleMath {
     // starting point
     Double_t variable[3] = {theta,d,0};
     // if t0Seed value from outside use this
-    if(t0Seed > -999.) variable[2] = t0Seed; 
+    if(t0Seed > -999.) variable[2] = t0Seed;
+
+    ROOT::Minuit2::Minuit2Minimizer minimum("algoName");
+    minimum.SetMaxFunctionCalls(1000000);
+    minimum.SetTolerance(0.001);
+    minimum.SetPrintLevel(-1);
+    if(msgLvl(MSG::VERBOSE)) minimum.SetPrintLevel(1);
 
-    minimum->SetVariable(0,"a",variable[0], step[0]);
-    minimum->SetVariable(1,"b",variable[1], step[1]);
-    minimum->SetVariable(2,"t0",variable[2], step[2]);
+    minimum.SetVariable(0,"a",variable[0], step[0]);
+    minimum.SetVariable(1,"b",variable[1], step[1]);
+    minimum.SetVariable(2,"t0",variable[2], step[2]);
 
-    minimum->SetFunction(minFunct);
+    minimum.SetFunction(minFunct);
 
     // do the minimization
-    minimum->Minimize();
+    minimum.Minimize();
 
-    const double *results = minimum->X();
-    const double *errors = minimum->Errors();
-    ATH_MSG_DEBUG("Minimum: f(" << results[0] << "+-" << errors[0] << "," << results[1]<< "+-" << errors[1]<< "," << results[2] << "+-" << errors[2]<< "): " << minimum->MinValue());
+    const double *results = minimum.X();
+    const double *errors = minimum.Errors();
+    ATH_MSG_DEBUG("Minimum: f(" << results[0] << "+-" << errors[0] << "," << results[1]<< "+-" << errors[1]<< "," << results[2] << "+-" << errors[2]<< "): " << minimum.MinValue());
 
     ++m_npassedMinuitFit;
 
@@ -609,7 +609,7 @@ namespace TrkDriftCircleMath {
     double t0=results[2];
     double t0Err=errors[2];
     double dy0 = cosin * bErr - b * sinus * aErr;
-    
+
     double del_t;
     del_t = std::abs(rtpointers[0]->radius((t0+t0Err)) - rtpointers[0]->radius(t0)) ;
 
@@ -623,7 +623,7 @@ namespace TrkDriftCircleMath {
       msg() << MSG::DEBUG <<"COVAR  ";
       for(int it1=0; it1<3; it1++) {
         for(int it2=0; it2<3; it2++) {
-          msg() << MSG::DEBUG <<minimum->CovMatrix(it1,it2)<<" ";
+          msg() << MSG::DEBUG <<minimum.CovMatrix(it1,it2)<<" ";
         }
         msg() << MSG::DEBUG << endmsg;
       }
@@ -643,34 +643,34 @@ namespace TrkDriftCircleMath {
     it = dcs_keep.begin();
     it_end = dcs_keep.end();
     ATH_MSG_DEBUG("------NEW HITS------");
-    
+
     for(int i=0; it!=it_end; ++it, ++i ){
       double rad, drad;
-      
+
       double uppercut = rtpointers[i]->tUpper();
       double lowercut = rtpointers[i]->tLower();
       rad = rtpointers[i]->radius(t[i]-t0);
-      if(t[i]-t0<lowercut) rad = rtpointers[i]->radius(lowercut);     
-      if(t[i]-t0>uppercut) rad = rtpointers[i]->radius(uppercut);     
+      if(t[i]-t0<lowercut) rad = rtpointers[i]->radius(lowercut);
+      if(t[i]-t0>uppercut) rad = rtpointers[i]->radius(uppercut);
       if (w[i]==0) {
         ATH_MSG_WARNING("w[i]==0, continuing");
         continue;
       }
-      drad = 1.0/std::sqrt(w[i]) ; 
-      
+      drad = 1.0/std::sqrt(w[i]) ;
+
       yl = (y[i] -  tana*z[i] - b);
       if(m_trace) {
         ATH_MSG_DEBUG("i "<<i<<" ");
       }
-      
+
       double dth = -(sinus*y[i] + cosin*z[i])*dtheta;
       double residuals = std::abs(yl)/std::sqrt(1+tana*tana) - rad;
       if(m_trace) {
         ATH_MSG_DEBUG(" dth "<<dth<<" dy0 "<<dy0<<" del_t "<<del_t);
       }
-      
+
       double errorResiduals = std::hypot(dth, dy0, del_t);
-      
+
       // derivatives of the residual 'R'
       double deriv[3];
       // del R/del theta
@@ -679,13 +679,13 @@ namespace TrkDriftCircleMath {
       // del R / del b
       deriv[1] = sign(dd) * cosin ;
       // del R / del t0
-      
+
       deriv[2] = -1* rtpointers[i]->driftvelocity(t[i]-t0);
-      
+
       double covsq=0;
       for(int rr=0; rr<3; rr++) {
         for(int cc=0; cc<3; cc++) {
-          covsq += deriv[rr]*minimum->CovMatrix(rr,cc)* deriv[cc];
+          covsq += deriv[rr]*minimum.CovMatrix(rr,cc)* deriv[cc];
         }
       }
       if(m_trace) {
@@ -693,21 +693,21 @@ namespace TrkDriftCircleMath {
 	if( covsq < 0. ){
 	  for(int rr=0; rr<3; rr++) {
 	    for(int cc=0; cc<3; cc++) {
-	      double dot = deriv[rr]*minimum->CovMatrix(rr,cc)* deriv[cc];
-	      ATH_MSG_DEBUG(" adding term " << dot << " dev1 " << deriv[rr] << " cov " << minimum->CovMatrix(rr,cc) << " dev2 " << deriv[cc]);
+	      double dot = deriv[rr]*minimum.CovMatrix(rr,cc)* deriv[cc];
+	      ATH_MSG_DEBUG(" adding term " << dot << " dev1 " << deriv[rr] << " cov " << minimum.CovMatrix(rr,cc) << " dev2 " << deriv[cc]);
 	    }
 	  }
 	}
       }
       covsq = covsq > 0. ? std::sqrt(covsq) : 0.;
       const DriftCircle* ds  = & dcs_keep[i];
-      if (m_propagateErrors) drad = dr[i]; 
+      if (m_propagateErrors) drad = dr[i];
       DriftCircle dc_newrad(dcs_keep[i].position(), rad, drad, ds->state(), dcs_keep[i].id(), dcs_keep[i].index(),ds->rot() );
       DCOnTrack dc_new(dc_newrad, residuals, covsq);
       dc_new.state(dcs_keep[i].state());
-      
+
       if(m_trace) ATH_MSG_DEBUG("T0 Segment hit res "<<residuals<<" eres "<<errorResiduals<<" covsq "<<covsq<<" ri " << r[i]<<" ro "<<rad<<" drad "<<drad << " sel "<<selection[i]<< " inv error " << w[i]);
-      
+
       if( selection[i] == 0 ) {
         ++nhits;
         if (!m_propagateErrors) {
@@ -717,15 +717,15 @@ namespace TrkDriftCircleMath {
         }
         if(m_trace) ATH_MSG_DEBUG("T0 Segment hit res "<<residuals<<" eres "<<errorResiduals<<" covsq "<<covsq<<" ri " << r[i]<<" radius after t0 "<<rad<<" radius error "<< drad <<  " original error " << dr[i]);
 // Put chi2 penalty for drift times outside window
-        if (t[i]-t0> uppercut ) { // too large 
+        if (t[i]-t0> uppercut ) { // too large
 	  chi2  += (t[i]-t0-uppercut)* (t[i]-t0-uppercut)*0.1;
         }else if (t[i]-t0 < lowercut ) {// too small
 	  chi2 += ((t[i]-t0-lowercut)*(t[i]-t0-lowercut))*0.1;
         }
-      } 
+      }
       result.dcs().push_back( dc_new );
     }
-    
+
     double oldshift;
     oldshift = result.t0Shift();
     if(m_trace) ATH_MSG_DEBUG("end fit old "<<oldshift<< " new " <<t0);
@@ -750,6 +750,5 @@ namespace TrkDriftCircleMath {
     }
     return true;
   }
-  
-}
 
+}
-- 
GitLab


From 08316e1e98ca058a4504f515f2ea4425cb2cb939 Mon Sep 17 00:00:00 2001
From: Peter Sherwood <peter.sherwood@cern.ch>
Date: Mon, 21 Dec 2020 19:01:47 +0000
Subject: [PATCH 170/308] Main theme: dividing jet vector inot jet groups now
 done in FastReducer according to the leaf node capacity.

Fix IJetGrouper interface: next() to return HypoJetVector,not HypoJetGroupVector
    AllJetsGrouper.h, cxx
    CombinationsGrouper.h, cxx
    IJetGrouper.h, cxx
    IndexedJetsGrouper.h, cxx
    SingleJetGrouper.h, cxx

New Helper class, with no Grouper (gorupsers now in the Matcher)
     python/ConditionsToolSetterFastReduction.py

Refactoring to aid debugging
	    python/ConditionsToolSetterFastReduction.py

testChainDictMaker.py
	add node tree dump

Jet Groupers now are instantiated according to leaf Condition cap ni FasdtReducer
    ITrigJetHypoToolNoGrouperConfig.h
    FastReducer.cxx

Clean up keeping track of index <-> job groups
      FastReducer.cxx
      new class: GrouperByCapacityFactory.h, cxx
      new class: JetGroupRegister.h, cxx
---
 .../TrigHLTJetHypoUtils/AllJetsGrouper.h      |   4 +-
 .../TrigHLTJetHypoUtils/CombinationsGrouper.h |   2 +-
 .../TrigHLTJetHypoUtils/IJetGrouper.h         |   2 +-
 .../TrigHLTJetHypoUtils/IndexedJetsGrouper.h  |   2 +-
 .../TrigHLTJetHypoUtils/SingleJetGrouper.h    |   6 +-
 .../ConditionsToolSetterFastReduction.py      | 140 +++++++++++++----
 .../python/TrigJetHypoToolConfig.py           |  29 ++--
 .../python/chainDict2jetLabel.py              |   4 +-
 .../TrigHLTJetHypo/python/node.py             |  25 ++-
 .../python/testChainDictMaker.py              |  26 +++-
 .../TrigHLTJetHypo/python/treeVisitors.py     |  47 +++++-
 .../TrigHLTJetHypo/src/ConditionFilter.cxx    |  57 +++++++
 .../TrigHLTJetHypo/src/ConditionFilter.h      |  27 ++++
 .../TrigHLTJetHypo/src/FastReducer.cxx        | 142 ++++++++----------
 .../TrigHLTJetHypo/src/FastReducer.h          |  27 +++-
 .../src/FastReductionMatcher.cxx              |  29 +++-
 .../TrigHLTJetHypo/src/FastReductionMatcher.h |  16 +-
 .../src/GrouperByCapacityFactory.cxx          |  28 ++++
 .../src/GrouperByCapacityFactory.h            |  15 ++
 .../src/HTConditionFastReduction.cxx          |  64 ++++++++
 .../src/HTConditionFastReduction.h            |  54 +++++++
 .../TrigHLTJetHypo/src/IJetsMatcherMT.h       |  43 ++++++
 .../src/ITrigJetHypoToolNoGrouperConfig.h     |  53 +++++++
 .../TrigHLTJetHypo/src/JetGroupRegister.cxx   |  20 +++
 .../TrigHLTJetHypo/src/JetGroupRegister.h     |  44 ++++++
 .../TrigHLTJetHypoUtils/AllJetsGrouper.cxx    |  11 +-
 .../CombinationsGrouper.cxx                   |   6 +-
 .../IndexedJetsGrouper.cxx                    |  16 +-
 .../TrigHLTJetHypoUtils/SingleJetGrouper.cxx  |  14 +-
 .../TrigJetConditionConfig_capacitychecked.h  |   4 +-
 .../src/TrigJetConditionConfig_htfr.cxx       |  49 ++++++
 .../src/TrigJetConditionConfig_htfr.h         |  45 ++++++
 .../TrigJetHypoToolConfig_fastreduction.cxx   |  42 ++++--
 .../src/TrigJetHypoToolConfig_fastreduction.h |  20 ++-
 .../src/TrigJetHypoToolHelperNoGrouper.cxx    | 134 +++++++++++++++++
 .../src/TrigJetHypoToolHelperNoGrouper.h      |  87 +++++++++++
 .../TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx  |  19 +--
 .../src/components/TrigHLTJetHypo_entries.cxx |   4 +
 .../src/groupsMatcherFactoryMT.cxx            |  11 --
 .../src/groupsMatcherFactoryMT.h              |   3 -
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    |   2 +-
 41 files changed, 1146 insertions(+), 227 deletions(-)
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/IJetsMatcherMT.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/ITrigJetHypoToolNoGrouperConfig.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.h
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/AllJetsGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/AllJetsGrouper.h
index 47cdba67e25b..ee90f6930057 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/AllJetsGrouper.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/AllJetsGrouper.h
@@ -10,13 +10,13 @@
 class AllJetsGrouper: public IJetGrouper{
  public:
   AllJetsGrouper();
-  AllJetsGrouper(const HypoJetIter& b, const HypoJetIter& e);
+  AllJetsGrouper(const HypoJetCIter& b, const HypoJetCIter& e);
   AllJetsGrouper(const HypoJetVector&);
   
   std::vector<HypoJetGroupVector> group(HypoJetIter&,
 					HypoJetIter&) const override;
   
-  virtual std::optional<HypoJetGroupVector> next() override;
+  virtual std::optional<HypoJetVector> next() override;
   
   std::string getName() const override; 
   std::string toString() const override;
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h
index 57f5f57d3a09..7f573fbb795e 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h
@@ -22,7 +22,7 @@ class CombinationsGrouper: public IJetGrouper{
   
   std::vector<HypoJetGroupVector> group(HypoJetIter&,
 					HypoJetIter&) const override;
-  std::optional<HypoJetGroupVector> next() override;
+  std::optional<HypoJetVector> next() override;
 
   std::string getName() const override; 
   std::string toString() const override;
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h
index 5830516dece0..02ff057f2e88 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h
@@ -25,7 +25,7 @@ class IJetGrouper{
    */
   virtual std::vector<HypoJetGroupVector> group(HypoJetIter&,
 						HypoJetIter&) const = 0;
-  virtual std::optional<HypoJetGroupVector> next() = 0;
+  virtual std::optional<HypoJetVector> next() = 0;
   virtual std::string toString() const = 0; 
   virtual std::string getName() const = 0; 
 };
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IndexedJetsGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IndexedJetsGrouper.h
index e26d29639fe8..670478e06c87 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IndexedJetsGrouper.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/IndexedJetsGrouper.h
@@ -36,7 +36,7 @@ public:
   std::vector<HypoJetGroupVector>
   group(HypoJetIter&, HypoJetIter&) const override;
   
-  std::optional<HypoJetGroupVector> next() override;
+  std::optional<HypoJetVector> next() override;
       
   std::string getName() const override;
   std::string toString() const override;
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h
index 5d0b474276c7..11323f411f1a 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h
@@ -16,13 +16,13 @@ class SingleJetGrouper: public IJetGrouper{
   std::vector<HypoJetGroupVector> group(HypoJetIter&,
 					HypoJetIter&) const override;
 
-  std::optional<HypoJetGroupVector> next() override;
+  std::optional<HypoJetVector> next() override;
   std::string getName() const override; 
   std::string toString() const override;
 
 private:
-  HypoJetVector m_jets;
-  std::size_t m_size;
+  HypoJetVector m_jets{};
+  std::size_t m_size{0};
   std::size_t m_index{0};
 };
 #endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
index 656f8236623f..9b3514a3d038 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
@@ -14,7 +14,7 @@ from AthenaCommon.Logging import logging
 log = logging.getLogger( 'ConditionsToolSetterFastReduction' )
 
 def is_leaf(node):
-    return node.scenario in  ('simple', 'etaet', 'dijet', 'qjet')
+    return node.scenario in  ('simple', 'etaet', 'dijet', 'qjet', 'agg')
 
 
 def is_inner(node):
@@ -46,11 +46,12 @@ class ConditionsToolSetterFastReduction(object):
             'qjmass': [CompFactory.TrigJetConditionConfig_qjet_mass, 0],
             'smc': [CompFactory.TrigJetConditionConfig_smc, 0],
             'jvt': [CompFactory.TrigJetConditionConfig_jvt, 0],
+            'ht': [CompFactory.TrigJetConditionConfig_htfr, 0],
             'all': [CompFactory.TrigJetConditionConfig_acceptAll, 0],
             'capacitychecked':
             [CompFactory.TrigJetConditionConfig_capacitychecked, 0],
             'fastreduction': [CompFactory.TrigJetHypoToolConfig_fastreduction, 0],
-            'helper': [CompFactory.TrigJetHypoToolHelperMT, 0],
+            'helper': [CompFactory.TrigJetHypoToolHelperNoGrouper, 0],
             }
         for var in self.JetMoments:
             self.tool_factories['mom'+var] = [CompFactory.TrigJetConditionConfig_moment, 0]
@@ -82,7 +83,63 @@ class ConditionsToolSetterFastReduction(object):
         self.tool_factories[key][1] += 1
         return tool
 
+    def _make_el_condition_tools(self, conf_dict):
+        """conf_dict: a dict containing names of elemental conditions 
+        and min, max valies. These will be used to instantiate
+        conditon building AlgTools, one for eac conditon 
+
+        for 2j80_2j60, the dictionaries are:
+        {'et': {'min': '80000.0', 'max': 'inf'}, 
+        'eta': {'min': '0.0', 'max': '3.2'}}
+
+        and 
+
+
+        {'et': {'min': '60000.0', 'max': 'inf'}, 
+        'eta': {'min': '0.0', 'max': '3.2'}})
+        
+        """
+
+        condition_tools = [] # a list of AlgTools that build elemental Conds.
+        
+        for k, v in conf_dict.items(): # loop over elemental conditions
+            # k in the condition name, v contains its min, max values.
+
+            # create the AlgTool that will build the elemental condition
+            condition_tool = self._get_tool_instance(k) 
+            for lim, val in v.items():  # lim: min, max
+                setattr(condition_tool, lim, val)
+
+            # SPECIAL CASE: Moment tool needs the name of the
+            # moment as well as the min. max cuts:
+            if (k.startswith ('mom')):
+                moment = k[len('mom'):]
+                if moment in self.JetMoments:
+                    condition_tool.moment = self.JetMoments[moment]
+                else: raise RuntimeError('%s not supported' % (moment))
+
+            # END SPECIAL CASE
+
+            condition_tools.append(condition_tool)
+
+        return condition_tools
+
+    
     def _make_compound_condition_tools(self, node):
+        """For each element of  node.conf_attrs, construct a 
+        CapacityChecledCondition. Example for chain HLT_2j80_3j60_L1J15:
+
+        First leaf node has 
+        conf_attrs [1]:
+        (defaultdict(<class 'dict'>, {
+        'et': {'min': '80000.0', 'max': 'inf'}, 
+        'eta': {'min': '0.0', 'max': '3.2'}}), 2)
+
+        Second leaf node has 
+        conf_attrs [1]:
+        (defaultdict(<class 'dict'>, {'et': {'min': '60000.0', 'max': 'inf'}, 
+        'eta': {'min': '0.0', 'max': '3.2'}}), 3)
+        """
 
         #  compound_condition_tools:
         # elemental condition maker AlgToolshelper by the compound condition
@@ -99,25 +156,9 @@ class ConditionsToolSetterFastReduction(object):
                 cpi = node.chainpartinds[i][0]
                 assert mult == node.chainpartinds[i][1]
                     
-                
-            condition_tools = [] # elemental conditions for this compounnd ct.
-            for k, v in c.items(): # loop over elemental conditions
-                condition_tool = self._get_tool_instance(k)
-                for lim, val in v.items():  # lim: min, max
-                    setattr(condition_tool, lim, val)
-
-                # SPECIAL CASE: Moment tool needs the name of the
-                # moment as well as the min. max cuts:
-                if (k.startswith ('mom')):
-                    moment = k[len('mom'):]
-                    if moment in self.JetMoments:
-                        condition_tool.moment = self.JetMoments[moment]
-                    else: raise RuntimeError('%s not supported' % (moment))
-
-                # END SPECIAL CASE
-
-                condition_tools.append(condition_tool)
 
+            el_condition_tools = self._make_el_condition_tools(c)
+ 
             # create capacitychecked condition from elemental condition
             condition_tool =self._get_tool_instance('capacitychecked')
 
@@ -126,16 +167,38 @@ class ConditionsToolSetterFastReduction(object):
                 # convert label from string to int for more efficient
                 # processing in C++ land.
                 condition_tool.chainPartInd = int(cpi[len('leg'):])
-            else:
-                condition_tool.chainPartInd = 0
             
-            condition_tool.conditionMakers = condition_tools
+            condition_tool.conditionMakers = el_condition_tools
             condition_tool.multiplicity = mult
             # add capacitychecked condition to list
             outer_condition_tools.append(condition_tool)
             
         return outer_condition_tools
 
+    
+    def _make_filter_tool(self, node):
+        """Condtion filters use a list of CompoundCondition containing
+        single jet elemental conditions  select a subset of the reco
+        jets to send to the a Condition"""
+        
+        el_condition_tools = []
+        for fc, mult in node.filter_conditions:
+            assert len(fc) == 1  # 1 elemental condition
+            assert mult == 1
+            el_condition_tools.extend(self._make_el_condition_tools(fc))
+
+        if not el_condition_tools:
+            el_condition_tools.append(self._get_tool_instance('all'))
+
+        capacitychecked_condition_tool = self._get_tool_instance(
+            'capacitychecked')
+
+        capacitychecked_condition_tool.conditionMakers = el_condition_tools
+        capacitychecked_condition_tool.multiplicity = 1
+        
+        return capacitychecked_condition_tool
+    
+
     def _mod_leaf(self, node):
         """ Add Condition tools to For a leaf node."""
 
@@ -155,6 +218,17 @@ class ConditionsToolSetterFastReduction(object):
         node.compound_condition_tools = self._make_compound_condition_tools(
             node)
 
+        # make condition builder AlgTools for the condition filters.
+        # condition filters select subsets of the input jets to present
+        # to a condition,
+        
+        node.filter_tool = self._make_filter_tool(node)
+
+    
+        # if node.scenario == 'agg':
+        #     print (node)
+        #    assert False
+            
     def report(self):
         wid = max(len(k) for k in self.tool_factories.keys())
         rep = '\n%s: ' % self.__class__.__name__
@@ -171,20 +245,27 @@ class ConditionsToolSetterFastReduction(object):
             self._fill_tree_map(cn, tmap)
 
             
-    def _fill_conditions_map(self, node, cmap):
+    def _fill_conditions_map(self, node, cmap, fmap):
         if is_leaf(node):
 
             assert (len(node.compound_condition_tools) == 1)
             cmap[node.node_id] = node.compound_condition_tools[0]
-
+            fmap[node.node_id] = node.filter_tool
+            
         else:
             # must have a tool for Gaudi to instantiate in
             cmap[node.node_id] = self._get_tool_instance('capacitychecked')
             cmap[node.node_id].conditionMakers = [self._get_tool_instance('all')]
             cmap[node.node_id].multiplicity = 1
+
+            fmap[node.node_id] = self._get_tool_instance('capacitychecked')
+            fmap[node.node_id].conditionMakers = [self._get_tool_instance('all')]
+            fmap[node.node_id].multiplicity = 1
+
+            
         
         for cn in node.children:
-            self._fill_conditions_map(cn, cmap)
+            self._fill_conditions_map(cn, cmap, fmap)
 
 
     def _map_2_vec(self, amap):
@@ -230,14 +311,17 @@ class ConditionsToolSetterFastReduction(object):
         treeVec = self._map_2_vec(tree_map)
 
         conditionsMap = {}
-        self._fill_conditions_map(tree, conditionsMap)
+        filterConditionsMap = {}
+        self._fill_conditions_map(tree, conditionsMap, filterConditionsMap)
         conditionsVec = self._map_2_vec(conditionsMap)
+        filterConditionsVec = self._map_2_vec(filterConditionsMap)
                
         # make a config tool and provide it with condition makers
         config_tool = self._get_tool_instance('fastreduction')
         config_tool.conditionMakers = conditionsVec
+        config_tool.filtConditionsMakers = filterConditionsVec
         config_tool.treeVector = treeVec
-
+        
         nodestr = 'n%dp%d' % (tree.node_id, tree.parent_id)
         helper_tool = self._get_tool_instance('helper', extra=nodestr)
         helper_tool.HypoConfigurer = config_tool
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
index 431a17d5877d..bb6155862780 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
@@ -8,8 +8,6 @@ from TrigHLTJetHypo.ConditionsToolSetterFastReduction import (
     ConditionsToolSetterFastReduction,
 )
 
-from TrigHLTJetHypo.ConditionsToolSetterHT import ConditionsToolSetterHT
-
 from  TrigHLTJetHypo.chainDict2jetLabel import chainDict2jetLabel
 
 from  TrigHLTJetHypo.ChainLabelParser import ChainLabelParser
@@ -20,10 +18,10 @@ from TrigHLTJetHypo.NodeSplitterVisitor import NodeSplitterVisitor
 from AthenaCommon.Logging import logging
 log = logging.getLogger( 'TrigJetHypoToolConfig' )
 
-def  trigJetHypoToolHelperFromDict_(
+def  nodeTreeFromChainLabel(
         chain_label, # simple([(260et,320eta490, leg000)])
         chain_name, # HLT_j260_320eta490_L1J75_31ETA49
-        toolSetter=None):
+        toolSetter):
 
     parser = ChainLabelParser(chain_label, debug=False)
 
@@ -59,12 +57,23 @@ def  trigJetHypoToolHelperFromDict_(
     log.info('trigJetHypoToolFromDict chain_name %s', chain_name)
 
     toolSetter.mod(tree)
-    tool = toolSetter.tool
+    return tree
 
-    log.debug(toolSetter.report())
 
-    return tool
+def trigJetHypoToolHelperFromDict_(
+        chain_label, # simple([(260et,320eta490, leg000)])
+        chain_name, # HLT_j260_320eta490_L1J75_31ETA49
+        toolSetter):
 
+    nodeTreeFromChainLabel(
+        chain_label,
+        chain_name,
+        toolSetter)
+    
+    tool = toolSetter.tool
+    log.debug(toolSetter.report())
+    
+    return tool
 
 def  trigJetHypoToolHelperFromDict(chain_dict):
     """Produce  a jet trigger hypo tool helper from a chainDict
@@ -91,11 +100,7 @@ def  trigJetHypoToolHelperFromDict(chain_dict):
 
     chain_name = chain_dict['chainName']
 
-    toolSetter = None
-    if 'agg' in chain_name:
-        toolSetter=ConditionsToolSetterHT()
-    else:
-        toolSetter=ConditionsToolSetterFastReduction()
+    toolSetter = ConditionsToolSetterFastReduction()
 
     return trigJetHypoToolHelperFromDict_(chain_label,
                                           chain_name,
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
index d01c48a63956..b78bc88bce17 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
@@ -297,9 +297,9 @@ def _make_agg_label(chain_parts, leg_label):
 
     argvals['leg_label'] = leg_label
     result =  """
-    ht([(%(htlo).0fht, %(leg_label)s)
+    agg([(%(htlo).0fht, %(leg_label)s)
         (%(etlo).0fet)
-        (%(etalo).0feta%(etahi).0f)
+    (%(etalo).0feta%(etahi).0f)
     ])"""  % argvals
     print (result)
     return result
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py
index 7b75c37525d0..9bc459c46b58 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/node.py
@@ -29,11 +29,14 @@ class Node(object):
 
         # filled in by a CondtionsTollSetter:
         self.compound_condition_tools = [] 
-        # self.tool = None
-        # self.compound_condition_tools = []
-        # self.tree_top kludge carensure top level tools get chain name
-        # as Tool name
         self.chainpartinds = []
+
+        # Condition objects may have filters
+        # eg HT may have an et filter. Filters are made up of conditions
+        # and are used to form jet subsets.
+        self.filter_conditions = []
+        self.filter_tool = None
+        
         self.tree_top = False
         self.tool = None
         
@@ -91,11 +94,17 @@ class Node(object):
         for ca in self.conf_attrs:
             s.append(indent + str(ca))
         
-            # this attribute added by flow network setter tool
-            s.append(indent + 'compound_condition_tools [%d]' % len(
-                self.compound_condition_tools))
+        s.append(indent + 'filter_conditions [%d]:' % (
+            len(self.filter_conditions),))
+                 
+        for fc in self.filter_conditions:
+            s.append(indent + str(fc))
+
+        s.append(indent + 'compoundConditionTools [%d]:' % len(
+            self.compound_condition_tools))
+
+        s.append(indent + 'filter_tool :' + str(self.filter_tool))
 
-        s.append(indent + 'AlgTool: %s' % str(self.tool))
         s.append(indent + 'No of children: %d\n' % len(self.children))
 
         return s
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
index 21a0691446e3..3166c3197c77 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
@@ -11,7 +11,13 @@ from TriggerMenuMT.HLTMenuConfig.Menu.ChainDefInMenu import ChainProp
 from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import dictFromChainName
 
 from chainDict2jetLabel import chainDict2jetLabel 
-from TrigJetHypoToolConfig import trigJetHypoToolFromDict
+from TrigJetHypoToolConfig import (trigJetHypoToolFromDict,
+                                   nodeTreeFromChainLabel)
+
+from TrigHLTJetHypo.ConditionsToolSetterFastReduction import (
+    ConditionsToolSetterFastReduction,
+)
+
 
 def testChainDictMaker():
 
@@ -43,7 +49,7 @@ def testChainDictMaker():
 
         ChainProp(name='HLT_j0_aggSEP1000htSEP30etSEP0eta320_L1J20',
                   groups=SingleJetGroup),
-
+        
         # ChainProp(name='HLT_j70_j50 _0eta490_invm1000j50_dphi20_deta40_L1J20',
         #          l1SeedThresholds=['FSNOSEED']*2,
         #          groups=MultiJetGroup),
@@ -70,6 +76,22 @@ if __name__ == '__main__':
         print (chainDict2jetLabel(d[1]))
         print ()
 
+        
+    print ('\n node trees:\n')
+    
+    for d in dicts:
+        print (d[0])
+        label = chainDict2jetLabel(d[1])
+        chain_name = d[1]['chainName']
+        
+        toolSetter=ConditionsToolSetterFastReduction()
+            
+        print (nodeTreeFromChainLabel(chain_name=d[0],
+                                      chain_label=label,
+                                      toolSetter=toolSetter).dump())
+        print ()
+        
+
     print ('\nMaking TrigJetHypoTool for each dictiomary\n')
     for d in dicts:
         print (d[0])
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py
index 3133ab0191db..a91db097e259 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py
@@ -34,13 +34,15 @@ def defaultParameters(parameter, default=''):  # default if parameter unknown
                 'smchi': 'inf',                
                 'jvtlo': '0',
                 'jvthi': 'inf',
+                'htlo' : '1000.',
+                'hthi' : 'inf',
     }
 
     if parameter.startswith('mom'):
         parameter = 'momCuts'
 
     if parameter not in  defaults:
-        print ('defaultParameters: unknown parameter, tryurning default ',
+        print ('defaultParameters: unknown parameter, returning default ',
                parameter)
 
     return defaults.get(parameter, default)
@@ -284,6 +286,47 @@ class TreeParameterExpander_simple(object):
         return '%s: ' % self.__class__.__name__ + '\n'.join(self.msgs) 
 
 
+class TreeParameterExpander_agg(object):
+    """Convert parameter string into duction holding low, high window
+        cut vals, as for the  'simple' scenario. Then place conditions
+        not in the agg list in the filters dict. These conditions wil be used
+        to select the subset of the jet collection to be presented to the agg
+        conditions."""
+
+    agg_conditions = ('ht',)
+    
+    def __init__(self):
+        self.msgs = []
+
+    def mod(self, node):
+
+        simple_expander = TreeParameterExpander_simple()
+        simple_expander.mod(node)
+
+        # example conf_attrs:
+        # conf_attrs [3]:
+        # (defaultdict(<class 'dict'>,
+        #              {'ht': {'min': '1000000.0', 'max': 'inf'}}), 1)
+        # (defaultdict(<class 'dict'>,
+        #              {'et': {'min': '30000.0', 'max': 'inf'}}), 1)
+        # (defaultdict(<class 'dict'>,
+        #             {'eta': {'min': '0.0', 'max': '3.2'}}), 1)
+
+
+        for ca in node.conf_attrs:
+            assert len(ca) == 2  # (dict, mult)
+            assert len(ca[0]) == 1  # one entry in dict
+            ca_keys = ca[0].keys()
+            cond_name = list(ca_keys)[0]
+            if cond_name not in self.agg_conditions:
+                node.filter_conditions.append(ca)
+        for fc in node.filter_conditions:
+            node.conf_attrs.remove(fc)
+
+    def report(self):
+        return '%s: ' % self.__class__.__name__ + '\n'.join(self.msgs) 
+
+
 class TreeParameterExpander_dijet(object):
     """Convert parameter string into tuples holding low, high window
     cut vals. Specialistaion for the dijet scenario
@@ -360,7 +403,7 @@ class TreeParameterExpander(object):
         'z': TreeParameterExpander_null,
         'root': TreeParameterExpander_null,
         'simple': TreeParameterExpander_simple,
-        'ht': TreeParameterExpander_simple,
+        'agg': TreeParameterExpander_agg,
         'dijet': TreeParameterExpander_dijet,
         'qjet': TreeParameterExpander_simple,
         'all': TreeParameterExpander_all,
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.cxx
new file mode 100644
index 000000000000..04d82ce07394
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.cxx
@@ -0,0 +1,57 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include <algorithm>
+
+#include "./ConditionFilter.h"
+
+ConditionFilter::ConditionFilter(ConditionPtrs& conditions):
+  m_conditions(std::move(conditions)) {
+}
+
+struct FilterPred{
+  FilterPred(const ConditionPtr& cptr,
+	     const std::unique_ptr<ITrigJetHypoInfoCollector>& collector):
+    m_cptr(cptr), m_collector(collector) {
+  }
+
+  bool operator() (pHypoJet pjet) {
+    auto hjv = HypoJetVector{pjet};
+    return m_cptr->isSatisfied(hjv, m_collector);
+  }
+
+  const ConditionPtr& m_cptr;
+  const std::unique_ptr<ITrigJetHypoInfoCollector>& m_collector;
+};
+
+HypoJetVector
+ConditionFilter::filter (const HypoJetCIter& begin,
+			 const HypoJetCIter& end,
+			 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
+
+  HypoJetVector in (begin, end);
+  auto new_end = in.end();
+  
+  for (const auto& cptr : m_conditions) {
+    new_end = std::partition(in.begin(),
+			 new_end,
+			 FilterPred(cptr, collector));
+  }
+  
+  return HypoJetVector(in.begin(), new_end);
+}
+
+std::string ConditionFilter::toString() const {
+  std::stringstream ss;
+  const void* address = static_cast<const void*>(this);
+  ss << "ConditionFilter: (" << address << ")\n"
+     << "Conditions [" << m_conditions.size() << "]:\n";
+  for (const auto& c : m_conditions) {
+     ss << " " << c->toString() << "\n\n";
+   }
+
+  return ss.str();
+}
+
+	   
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.h
new file mode 100644
index 000000000000..3911c3f5ff32
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ConditionFilter.h
@@ -0,0 +1,27 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_CONDITIONFILTER_H
+#define TRIGHLTJETHYPO_CONDITIONFILTER_H
+
+#include "./CapacityCheckedConditionsDefs.h"
+
+class ConditionFilter {
+ public:
+  ConditionFilter(ConditionPtrs&);
+
+  // find the subset of jets which satisfy a sequence of conditions
+  HypoJetVector filter (const HypoJetCIter& b,
+			const HypoJetCIter& e,
+			const std::unique_ptr<ITrigJetHypoInfoCollector>&
+			) const;
+  
+  std::string toString() const;  
+ private:
+  ConditionPtrs m_conditions;
+
+  
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.cxx
index 7e174e07d330..05dafc68253b 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.cxx
@@ -3,6 +3,7 @@
 */
 
 #include "./FastReducer.h"
+#include "./GrouperByCapacityFactory.h"
 #include "./ITrigJetHypoInfoCollector.h"
 
 #include <map>
@@ -36,13 +37,14 @@ struct IndexVecComp{
 };
 
 
-FastReducer::FastReducer(const HypoJetGroupCIter& groups_b,
-                         const HypoJetGroupCIter& groups_e,
+FastReducer::FastReducer(const HypoJetCIter& jets_b,
+                         const HypoJetCIter& jets_e,
                          const ConditionPtrs& conditions,
+			 const ConditionFilters& filters,
                          const Tree& tree,
                          xAODJetCollector& jetCollector,
                          const Collector& collector):
-  m_conditions(conditions),  m_tree(tree) {
+  m_conditions(conditions),  m_conditionFilters(filters), m_tree(tree) {
 
   // create an empty vector of indices of satisfying jet groups
   // for each Condition.
@@ -52,8 +54,8 @@ FastReducer::FastReducer(const HypoJetGroupCIter& groups_b,
   }
 
 
-  if(!findInitialJetGroups(groups_b,
-			   groups_e,
+  if(!findInitialJetGroups(jets_b,
+			   jets_e,
 			   collector)){
     if(collector){
       collector->collect("FastReducer early return",
@@ -162,57 +164,57 @@ void FastReducer::collectLeafJets(xAODJetCollector& jetCollector,
 }
 
 
-bool FastReducer::findInitialJetGroups(const HypoJetGroupCIter& groups_b,
-				       const HypoJetGroupCIter& groups_e,
+bool FastReducer::findInitialJetGroups(const HypoJetCIter& jets_b,
+				       const HypoJetCIter& jets_e,
 				       const Collector& collector) {
   
 
   /*
-    Will now test the incoming jet groups against the leaf conditions.
+    Will now test the incoming jets against the leaf conditions.
   */
 
   std::size_t ijg{0};
   auto leaves = m_tree.leaves();
 
-  for(auto iter = groups_b; iter != groups_e; ++iter){
-    auto jg = *iter;
-    
-    if(jg.size() != 1){
-      collector->collect("FastReducer", "Initial jet group size != 1");
-      return false;
-    }
-    
-    // if a jet group satisfies a condition, note the fact,
-    // and store it by index
-    bool jg_used{false};
+  // if a jet group satisfies a condition, note the fact,
+  // and store it by index
+
+  for(const auto& leaf: leaves){
+
+    auto& filter = m_conditionFilters[leaf];
+    auto filtered_jets = filter->filter(jets_b, jets_e, collector);
+
+    recordFiltering(leaf, jets_e-jets_b, filtered_jets.size(), collector);
+
     
-    auto cur_jg = m_jgIndAllocator(std::vector<std::size_t>{ijg});
-    for(const auto& leaf: leaves){
-      
-      m_testedBy[leaf].insert(cur_jg);
+    auto grouper = grouperByCapacityFactory(m_conditions[leaf]->capacity(),
+					    filtered_jets.begin(),
+					    filtered_jets.end());
+
+    while(true){
+      auto ojg = grouper->next();
+      if (!ojg.has_value()) {break;}
+
+      auto jg = *ojg;
+      auto jg_ind = m_jgRegister.record(jg);
+      m_testedBy[leaf].insert(jg_ind);
       if (m_conditions[leaf]->isSatisfied(jg, collector)){
-	jg_used= true;
-	if(collector){recordJetGroup(cur_jg, jg, collector);}
+	if(collector){recordJetGroup(jg_ind, jg, collector);}
 	// do the following for each satisfied condition ...
-	m_satisfiedBy[leaf].push_back(cur_jg);
+	m_satisfiedBy[leaf].push_back(jg_ind);
+	m_jg2elemjgs[jg_ind] =  std::vector<std::size_t>{jg_ind};
+	m_indJetGroup.emplace(jg_ind, jg);
+	++ijg;
       }
     }
-    
-    if(jg_used){
-      m_jg2elemjgs[cur_jg] =  std::vector<std::size_t>{cur_jg};
-      m_indJetGroup.emplace(cur_jg, jg);
-      ++ijg;
-    }
-    
   }
-  
+    
   if(collector){
     for(const auto& p : m_indJetGroup){
       recordJetGroup(p.first, p.second, collector);
     }
   }
-
-
+  
   // check all leaf conditions are satisfied
   for (const auto& i : leaves) {
     if (!capacitySatisfied(i, collector)) {
@@ -220,47 +222,9 @@ bool FastReducer::findInitialJetGroups(const HypoJetGroupCIter& groups_b,
     }
   }
   
-  /*
-    For the special but important case where all leaf nodes have
-    the root node as a parent, check that there are enough jets
-    to pass the hypo. This prevents doing a long calculation 
-    to discover that the hypo will fail. For example, if the chain
-    requires 10j40, and there are 5 jets that pass the condition,
-    each condition will be satisfied by th 5 jets, and 5^10 combinations
-    will be attempted in th seach for a successful combination. As there
-    are only 5 jets involved, such a combination does not exist.
-
-    Such trees have a tree vector with all entries == 0.
-
-    This check cannot be applied in the general case. For example,
-    if the root condition requires 4 jets, and has three children,
-    two of which are leaf nodes, while the other is not, then the
-    check will fail the event as no jets have yet ben assigned to the
-    second child, while the full popagation through the tree may pass the
-    event.
-
-    A possible way to tighten the chck would be to forbid children to be
-    separated from thir parent by more than 1 generation.
-  */
-
-  if (std::all_of(m_tree.cbegin(),
-		  m_tree.cend(),
-		  [](std::size_t i){return i == 0;})) {
-    
-    if (m_conditions[0]->capacity() > ijg) {
-      
-      if (collector){
-	collector->collect("FastReducer", "too few children. root capacity "
-			   + std::to_string(m_conditions[0]->capacity()) +
-			   " no of children: " + std::to_string(ijg));
-      }
-
-      return false;
-    }
-  }
-  
   return true;
 }  
+  
 
 bool FastReducer::propagateJetGroups(const Collector& collector){
   
@@ -395,18 +359,20 @@ bool FastReducer::propagate_(std::size_t child,
     }
 
     HypoJetVector jg;
-
+    for(const auto& i : elem_jgs){
+      jg.push_back(m_indJetGroup.at(i)[0]);  // why [0]? assume elemental jg has size 1
+    }
+    
     // obtain an index for the new jet group.
-    auto cur_jg = m_jgIndAllocator(elem_jgs);
+    // auto cur_jg = m_jgIndAllocator(elem_jgs);
+    auto cur_jg = m_jgRegister.record(jg);
     if(m_testedBy[par].find(cur_jg) != m_testedBy[par].end()){
       next = jg_product.next(collector);
       continue;
     }
     m_testedBy[par].insert(cur_jg);
 	
-    for(const auto& i : elem_jgs){
-      jg.push_back(m_indJetGroup.at(i)[0]);  // why [0]? assume elemental jg has size 1
-    }
+
 
     if (m_conditions[par]->isSatisfied(jg, collector)){// par is a tree ind.
 
@@ -526,6 +492,22 @@ void FastReducer::recordJetGroup(std::size_t ind,
   collector->collect(ss0.str(), ss1.str());
 }
 
+void FastReducer::recordFiltering(std::size_t leaf_ind,
+				  std::size_t n_injets,
+				  int n_filteredjets,
+				  const Collector& collector) const {
+
+  if(!collector) {return;}
+  
+  std::stringstream ss0;
+  ss0  << "FastReducer filtering Condition index: "  << leaf_ind;
+  
+  std::stringstream ss1;
+  ss1  << "n jets. in: " << n_injets << " filtered: " << n_filteredjets << '\n';
+  
+  collector->collect(ss0.str(), ss1.str());
+}
+
 bool FastReducer::pass() const { return m_pass; }
 
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.h
index 7f3d1191fdd1..99a374e9093c 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReducer.h
@@ -11,7 +11,10 @@
 #include "./JetGroupIndAllocator.h"
 #include "./xAODJetCollector.h"
 #include "./ITrigJetHypoInfoCollector.h"
+#include "./JetGroupRegister.h"
+#include "./ConditionFilter.h"
 #include <string>
+#include <map>
 
 using TreeVec = std::vector<std::size_t>;
 using IDJetGroup = std::map<std::size_t, HypoJetVector>;
@@ -22,14 +25,16 @@ typedef std::unique_ptr<ITrigJetHypoInfoCollector> Collector;
 */
 
 using JetGroupInd2ElemInds = std::map<int, std::vector<std::size_t>>;
+using  ConditionFilters = std::vector<std::unique_ptr<ConditionFilter>>;
 
 
 class FastReducer {
  public:
 
-  FastReducer(const HypoJetGroupCIter& groups_b,
-              const HypoJetGroupCIter& groups_e,
+  FastReducer(const HypoJetCIter& jets_b,
+              const HypoJetCIter& jets_e,
               const ConditionPtrs& conditionObjects,
+	      const ConditionFilters& conditionFilters,
               const Tree& conditionsTree,
               xAODJetCollector& jetCollector,
               const Collector& collector);
@@ -45,8 +50,12 @@ class FastReducer {
 
  private:
 
+  // conditions owned by the matcher
   const ConditionPtrs& m_conditions;
 
+  // conditionFilters owned by the matcher
+  const ConditionFilters& m_conditionFilters;
+
   /** tree structure for Conditions objects.
    The conditions tree gives relations among conditions (eg parent-child
    and siblings-of)
@@ -75,15 +84,16 @@ class FastReducer {
 
   HypoJetVector m_passingJets;
 
-  JetGroupIndAllocator m_jgIndAllocator;
-  
+  //  JetGroupIndAllocator m_jgIndAllocator;
+
+  JetGroupRegister m_jgRegister;
   /** set up the data structures for propagation. Propagation is the
    act of combining jet groups satisfying children
    in preparration for testing against parent conditions.
   */
   
-  bool findInitialJetGroups(const HypoJetGroupCIter& groups_b,
-			    const HypoJetGroupCIter& groups_e,
+  bool findInitialJetGroups(const HypoJetCIter& jets_b,
+			    const HypoJetCIter& jets_e,
 			    const Collector& collector);
   
   
@@ -102,6 +112,11 @@ class FastReducer {
 		      const HypoJetVector& jg,
 		      const Collector& collector) const;
 
+  void recordFiltering(std::size_t leaf_ind,
+		       std::size_t n_inputjets,
+		       int n_filteredjets,
+		       const Collector& collector) const;
+
   void collectLeafJets(xAODJetCollector& jetCollector,
 		       const Collector& collector) const;
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.cxx
index 81c85760c254..d30fb5d240ad 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.cxx
@@ -10,9 +10,11 @@
 #include <algorithm>
 #include <sstream>
 
-FastReductionMatcher::FastReductionMatcher(ConditionPtrs conditions,
+FastReductionMatcher::FastReductionMatcher(ConditionPtrs& conditions,
+					   ConditionFilters& filters,
 					   const Tree& tree):
   m_conditions(std::move(conditions)),
+  m_conditionFilters(std::move(filters)),
   m_tree(tree){
 
   for (const auto& il : m_tree.leaves()){
@@ -20,12 +22,16 @@ FastReductionMatcher::FastReductionMatcher(ConditionPtrs conditions,
       throw std::runtime_error("Tree leaf condition  but not from ChainPart");
     }
   }
+  if (filters.size() != conditions.size()) {
+    throw std::runtime_error("Conditions and ConditionFilters sequence sizes differ");
+  }
+
 }
 	 
 
 std::optional<bool>
-FastReductionMatcher::match(const HypoJetGroupCIter& groups_b,
-			    const HypoJetGroupCIter& groups_e,
+FastReductionMatcher::match(const HypoJetCIter& jets_b,
+			    const HypoJetCIter& jets_e,
 			    xAODJetCollector& jetCollector,
 			    const std::unique_ptr<ITrigJetHypoInfoCollector>& collector,
 			    bool) const {
@@ -43,9 +49,10 @@ FastReductionMatcher::match(const HypoJetGroupCIter& groups_b,
    */
 
 
-  FastReducer reducer(groups_b,
-                      groups_e,
+  FastReducer reducer(jets_b,
+                      jets_e,
                       m_conditions,
+		      m_conditionFilters,
                       m_tree,
                       jetCollector,
                       collector);
@@ -68,5 +75,17 @@ std::string FastReductionMatcher::toString() const {
     ss << sc <<": "<< c->toString() + '\n';
   }
 
+  ss << "FastReductionMatcher ConditionFilters ["
+     << m_conditionFilters.size() << "]: \n";
+
+
+  count = 0;
+  for(const auto& c : m_conditionFilters){
+    auto sc = std::to_string(count++);
+    sc.insert(sc.begin(), 3-sc.length(), ' ');
+    ss << sc <<": "<< c->toString() + '\n';
+  }
+  
+
   return ss.str();
 }
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.h
index 9b1e68b8a6ff..ec33356e0245 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/FastReductionMatcher.h
@@ -6,17 +6,21 @@
 #define TRIGHLTJETHYPO_FASTREDUCTIONMATCHER_H
 
 
-#include "./IGroupsMatcherMT.h"
+#include "./IJetsMatcherMT.h"
 #include "./CapacityCheckedConditionsDefs.h"
+#include "./ConditionFilter.h"
 #include "./Tree.h"
 
 using TreeVec = std::vector<std::size_t>;
 class ITrigJetHypoInfoCollector;
 
-class FastReductionMatcher: public IGroupsMatcherMT {
+using  ConditionFilters = std::vector<std::unique_ptr<ConditionFilter>>;
+
+class FastReductionMatcher: public IJetsMatcherMT {
  public:
 
-  FastReductionMatcher(ConditionPtrs,
+  FastReductionMatcher(ConditionPtrs&,
+		       ConditionFilters&,
 		       const Tree&);
 
 
@@ -30,8 +34,8 @@ class FastReductionMatcher: public IGroupsMatcherMT {
   */
   
   virtual std::optional<bool>
-    match(const HypoJetGroupCIter& groups_b,
-	  const HypoJetGroupCIter& groups_e,
+    match(const HypoJetCIter& jets_b,
+	  const HypoJetCIter& jets_e,
 	  xAODJetCollector&,
 	  const std::unique_ptr<ITrigJetHypoInfoCollector>& collector,
 	  bool
@@ -42,7 +46,7 @@ class FastReductionMatcher: public IGroupsMatcherMT {
  private:
 
   ConditionPtrs m_conditions;
-
+  std::vector<std::unique_ptr<ConditionFilter>> m_conditionFilters;
   /** tree structure for Conditions objects.
    The conditions tree gives relations among conditions (eg parent-child
    and siblings-of)
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.cxx
new file mode 100644
index 000000000000..f2c7e5b82698
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.cxx
@@ -0,0 +1,28 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GrouperByCapacityFactory.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/AllJetsGrouper.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+
+std::unique_ptr<IJetGrouper> grouperByCapacityFactory(unsigned int cap,
+						      const HypoJetCIter& b,
+						      const HypoJetCIter& e){
+
+  std::unique_ptr<IJetGrouper> pGrouper(nullptr);
+  
+  if (cap == 0) {
+    throw std::runtime_error("groupByMultFactory - attempting ctrct grouper with mult == 0");
+  } else if (cap == 1) {
+    pGrouper.reset(new SingleJetGrouper(b, e));
+  } else if (cap == std::numeric_limits<int>::max()) {
+    pGrouper.reset(new AllJetsGrouper(b, e));
+  } else {
+    pGrouper.reset(new CombinationsGrouper(cap, b, e));
+  }
+
+  return pGrouper;
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.h
new file mode 100644
index 000000000000..cf227df628d2
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/GrouperByCapacityFactory.h
@@ -0,0 +1,15 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_GROUPERBYCAPACITYFACTORY_H
+#define TRIGHLTJETHYPO_GROUPERBYCAPACITYFACTORY_H
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h"
+#include <memory>
+
+std::unique_ptr<IJetGrouper> grouperByCapacityFactory(unsigned int capacity,
+						      const HypoJetCIter& b,
+						      const HypoJetCIter& e);
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.cxx
new file mode 100644
index 000000000000..639cb3f465d4
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.cxx
@@ -0,0 +1,64 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "./HTConditionFastReduction.h"
+#include "./ITrigJetHypoInfoCollector.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+
+#include <sstream>
+#include <cmath>
+#include <algorithm>
+#include <numeric>
+
+HTConditionFastReduction::HTConditionFastReduction(double ht_min,
+						   double ht_max):
+  m_htMin(ht_min), m_htMax(ht_max) {
+}
+
+
+bool
+HTConditionFastReduction::isSatisfied(const HypoJetVector& ips,
+				      const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
+  
+  auto htsum =  std::accumulate(ips.begin(),
+				ips.end(),
+				0.0,
+				[](double sum, const pHypoJet& jp){
+				  return sum + jp->et();});
+  bool pass = htsum > m_htMin;
+  
+  if(collector){
+    std::stringstream ss0;
+    const void* address = static_cast<const void*>(this);
+    ss0 << "HTCondition: (" << address << ") Sum(et) "
+	<< htsum << " "
+	<< std::boolalpha << pass <<  " jet group: \n";
+    
+    std::stringstream ss1;
+    
+    for(const auto& ip : ips){
+      address = static_cast<const void*>(ip.get());
+      ss1 << "    "  << address << " " << ip->eta() << " e " << ip->e() << '\n';
+    }
+    ss1 << '\n';
+    collector -> collect(ss0.str(), ss1.str());
+  }
+  
+  return pass;
+  
+}
+    
+
+std::string HTConditionFastReduction::toString() const {
+  std::stringstream ss;
+  ss << "HTConditionFastReduction: htMin: "
+     << m_htMin;
+
+  
+
+  ss <<'\n';
+
+  return ss.str();
+}
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.h
new file mode 100644
index 000000000000..ec67e2b76765
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/HTConditionFastReduction.h
@@ -0,0 +1,54 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_HTCONDITIONFASTREDUCTION_H
+#define TRIGHLTJETHYPO_HTCONDITIONFASTREDUCTION_H
+
+/********************************************************************
+ *
+ * NAME:     HTConditionFastReduction.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *********************************************************************/
+
+#include "./IConditionMT.h"
+
+#include <string>
+#include <limits>
+// #include <memory>
+
+namespace HypoJet{
+  class IJet;
+}
+
+
+class ITrigJetHypoInfoCollector;
+
+class HTConditionFastReduction: public IConditionMT{
+ public:
+
+  
+  HTConditionFastReduction(double htMin, double htMax);
+
+  
+  ~HTConditionFastReduction() override {}
+
+  bool isSatisfied(const HypoJetVector&,
+                   const std::unique_ptr<ITrigJetHypoInfoCollector>&) const override;
+
+  std::string toString() const override;
+  virtual unsigned int capacity() const override {return s_capacity;}
+
+ private:
+  
+  double m_htMin;
+  double m_htMax;
+  
+  const static  unsigned int s_capacity{std::numeric_limits<int>::max()};
+  
+  
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/IJetsMatcherMT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/IJetsMatcherMT.h
new file mode 100644
index 000000000000..14e38d363cb6
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/IJetsMatcherMT.h
@@ -0,0 +1,43 @@
+
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_IJETSMATCHERMT_H
+#define TRIGHLTJETHYPO_IJETSMATCHERMT_H
+/********************************************************************
+ *
+ * NAME:     IJetsMatcherMT.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ * CREATED:  March 21, 2015
+ *           
+ *
+ *  PABC for matching gropups of jets with Conditions.
+ *********************************************************************/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h"
+#include "./ConditionsDefsMT.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+#include <string>
+
+class ITrigJetHypoInfoCollector;
+class xAODJetCollector;
+
+class IJetsMatcherMT{
+ public:
+
+  virtual ~IJetsMatcherMT(){}
+  virtual std::optional<bool> match(const HypoJetCIter&,
+				    const HypoJetCIter&,
+				    xAODJetCollector&,
+				    const std::unique_ptr<ITrigJetHypoInfoCollector>&,
+				    bool debug=false) const = 0;
+  
+  virtual std::string toString() const = 0;
+};
+
+#endif
+
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ITrigJetHypoToolNoGrouperConfig.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ITrigJetHypoToolNoGrouperConfig.h
new file mode 100644
index 000000000000..c2b5b1974a99
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/ITrigJetHypoToolNoGrouperConfig.h
@@ -0,0 +1,53 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGHLTJETHYPO_ITRIGJETHYPOTOOLNOGROUPERCONFIG_H
+#define TRIGHLTJETHYPO_ITRIGJETHYPOTOOLNOGROUPERCONFIG_H
+
+
+#include "GaudiKernel/IAlgTool.h"
+#include "./ConditionsDefsMT.h"
+#include "./IJetsMatcherMT.h"
+#include "./ConditionFilter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h"
+#include <optional>
+
+class ITrigJetHypoToolNoGrouperConfig : virtual public ::IAlgTool {
+  /** PABC (Pure Abstract Base Class) for JetHypoTool Condiguration classes.
+   TrigJetHypoToolHelperMT is a general purpose class to run
+   parts of a jet hypo. The Condiguration tools supply them
+   with the components according to the hypo scenario. */
+public:
+  DeclareInterfaceID(ITrigJetHypoToolNoGrouperConfig, 1, 0);
+  virtual ~ITrigJetHypoToolNoGrouperConfig(){};
+
+
+  /** check the input values */
+  virtual StatusCode checkVals()  const = 0;
+
+
+  /** Provide cleaner objects to sdiscard "dirty" jets before preocessing. */
+  virtual std::vector<std::shared_ptr<ICleaner>> getCleaners() const = 0;
+
+  /** return an object that tests jet group - Conditions matching */
+  virtual std::unique_ptr<IJetsMatcherMT> getMatcher() const = 0;
+
+  /** return the Conditions (which check whether a jet group satisfies one
+      or more requirements 
+  */
+   virtual std::optional<ConditionsMT> getConditions() const = 0;
+
+  /** return the ConditionFilters. These reduce the input jet collection
+      before it is passed to a Condition. Example: HT conditions sometimes
+      need and eta - Et filtered vector on which to do the Et sum.
+  */
+  
+  virtual std::vector<std::unique_ptr<ConditionFilter>>
+  getConditionFilters() const = 0;
+
+  /*( Gives the minimum number of jets the helper using this Confiog
+   class will require to pass the event. */
+  virtual std::size_t requiresNJets() const =0;
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.cxx
new file mode 100644
index 000000000000..aa873c6764c6
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.cxx
@@ -0,0 +1,20 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "./JetGroupRegister.h"
+
+std::size_t JetGroupRegister::record(HypoJetVector v){
+
+  std::sort(v.begin(), v.end(), HypoJetLess());
+  
+  auto it = m_reg.find(v);
+  
+  if (it == m_reg.end()){
+    auto new_ind = m_reg.size();
+    m_reg[v] = new_ind;
+    return new_ind;
+  } else {
+    return it->second;
+  }
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.h
new file mode 100644
index 000000000000..7ca0aec6c1a2
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/JetGroupRegister.h
@@ -0,0 +1,44 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_JETGROUPREGISTER_H
+#define TRIGHLTJETHYPO_JETGROUPREGISTER_H
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+
+#include <map>
+#include <algorithm>
+
+// maintain a register of ordered vectors HypoJets 
+
+struct HypoJetLess{
+  bool operator() (const HypoJetVector::value_type& l,
+		   const HypoJetVector::value_type& r) const {
+    return l.get() < r.get();
+  }
+};
+
+struct HypoJetVectorLess{
+  bool operator() (const HypoJetVector& l,
+		   const HypoJetVector& r) const {
+    
+    return std::lexicographical_compare(l.begin(),
+					l.end(),
+					r.begin(),
+					r.end(),
+					HypoJetLess());
+  }
+};
+
+
+class JetGroupRegister {
+ public:
+
+  std::size_t record(HypoJetVector v);  // copy vector
+
+ private:
+  std::map<HypoJetVector, std::size_t, HypoJetVectorLess> m_reg;
+    
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/AllJetsGrouper.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/AllJetsGrouper.cxx
index fcbfca501e77..17a701f3e9ff 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/AllJetsGrouper.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/AllJetsGrouper.cxx
@@ -7,8 +7,8 @@
 
 AllJetsGrouper:: AllJetsGrouper(){}
 
-AllJetsGrouper:: AllJetsGrouper(const HypoJetIter& b,
-				const HypoJetIter& e): m_jets(b, e){
+AllJetsGrouper:: AllJetsGrouper(const HypoJetCIter& b,
+				const HypoJetCIter& e): m_jets(b, e){
 }
 
 AllJetsGrouper:: AllJetsGrouper(const HypoJetVector& jets): m_jets{jets}{
@@ -23,14 +23,13 @@ std::vector<HypoJetGroupVector> AllJetsGrouper::group(HypoJetIter& begin,
   return std::vector<HypoJetGroupVector>{hjgv};
 }
 
-std::optional<HypoJetGroupVector> AllJetsGrouper::next(){
+std::optional<HypoJetVector> AllJetsGrouper::next(){
   if (m_done){
-    return std::optional<HypoJetGroupVector>();
+    return std::optional<HypoJetVector>();
   }
   
-  HypoJetGroupVector hjgv{HypoJetVector(m_jets)};
   m_done = true;
-  return std::make_optional<HypoJetGroupVector>(hjgv);
+  return std::make_optional<HypoJetVector>(m_jets);
 }
 
 std::string AllJetsGrouper::getName() const {
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/CombinationsGrouper.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/CombinationsGrouper.cxx
index e05b643e00c4..31a4a8e36731 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/CombinationsGrouper.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/CombinationsGrouper.cxx
@@ -46,7 +46,7 @@ CombinationsGrouper::group(HypoJetIter& begin, HypoJetIter& end) const {
   return std::vector<HypoJetGroupVector>{hjgv};
 }
 
-std::optional<HypoJetGroupVector>
+std::optional<HypoJetVector>
 CombinationsGrouper::next() {
   HypoJetGroupVector hjgv;
   
@@ -56,13 +56,13 @@ CombinationsGrouper::next() {
   
   auto combs = combgen.next();
   if (combs.second == false){
-    std::optional<HypoJetGroupVector>();
+    std::optional<HypoJetVector>();
   }
   
   HypoJetVector v;
   for(auto i : combs.first){ v.push_back(*(m_jets.begin() + i));}
   
-  return std::make_optional<HypoJetGroupVector>(hjgv);
+  return std::make_optional<HypoJetVector>(v);
 }
 
 std::string CombinationsGrouper::getName() const {
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/IndexedJetsGrouper.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/IndexedJetsGrouper.cxx
index 1abd209d030c..c905fc57409a 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/IndexedJetsGrouper.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/IndexedJetsGrouper.cxx
@@ -78,7 +78,7 @@ IndexedJetsGrouper::group(HypoJetIter& begin, HypoJetIter& end) const{
 }
 
 
-std::optional<HypoJetGroupVector>
+std::optional<HypoJetVector>
 IndexedJetsGrouper::next(){
 
   // exhausts after a single group
@@ -86,14 +86,13 @@ IndexedJetsGrouper::next(){
   // check if there are enough jets find the highest (last, as the vector is
   // ordered) and see if it lies within the jet vector
 
-  if (m_done) { return std::optional<HypoJetGroupVector>(); }
-  if (m_indices.empty()) { return std::optional<HypoJetGroupVector>(); }
+  if (m_done) { return std::optional<HypoJetVector>(); }
+  if (m_indices.empty()) { return std::optional<HypoJetVector>(); }
   
-  auto hjgv = HypoJetGroupVector();
   auto last_jet_pos =  m_indices.back();
   if (m_jets.size() <= last_jet_pos) {
     m_done = true;
-    return std::optional<HypoJetGroupVector>();
+    return std::optional<HypoJetVector>();
   }
   
   // sort jets by descending Et
@@ -103,13 +102,12 @@ IndexedJetsGrouper::next(){
                      DescendingEt());
   
   // place the jets at positions in the index vector into the inner vector
-  HypoJetVector inner;
-  for (auto i : m_indices){inner.push_back(*(m_jets.begin() + i));}
+  HypoJetVector hjv;
+  for (auto i : m_indices){hjv.push_back(*(m_jets.begin() + i));}
   
   // push the inner vector into the outer vector
-  hjgv.push_back(inner);
   m_done = true;
-  return std::make_optional<HypoJetGroupVector>(hjgv);
+  return std::make_optional<HypoJetVector>(hjv);
 }
 
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetGrouper.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetGrouper.cxx
index 80441003fc07..54de42f78560 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetGrouper.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetGrouper.cxx
@@ -7,12 +7,13 @@
 
 SingleJetGrouper::SingleJetGrouper(){}
 
-SingleJetGrouper::SingleJetGrouper(const HypoJetVector& v): m_jets(v){
+SingleJetGrouper::SingleJetGrouper(const HypoJetVector& v):
+  m_jets(v), m_size{v.size()}{
 }
 
 SingleJetGrouper::SingleJetGrouper(const HypoJetCIter& b,
 				   const HypoJetCIter& e):
-  m_jets(b, e){
+  m_jets(b, e), m_size{m_jets.size()}{
 }
 
 std::vector<HypoJetGroupVector> SingleJetGrouper::group(HypoJetIter& begin,
@@ -28,15 +29,14 @@ std::vector<HypoJetGroupVector> SingleJetGrouper::group(HypoJetIter& begin,
   return std::vector<HypoJetGroupVector>{hjgv};
 }
 
-std::optional<HypoJetGroupVector>
+std::optional<HypoJetVector>
 SingleJetGrouper::next() {
   if (m_index == m_size){
-    return std::optional<HypoJetGroupVector>();
+    return std::optional<HypoJetVector>();
   }
   
-  HypoJetGroupVector result;
-  result.push_back(HypoJetVector{m_jets[m_index++]});
-  return std::make_optional<HypoJetGroupVector>(result);
+  HypoJetVector result{m_jets[m_index++]};
+  return std::make_optional<HypoJetVector>(result);
 }
 
 std::string SingleJetGrouper::getName() const {
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_capacitychecked.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_capacitychecked.h
index 77e0dcb6c7aa..3daf31fa6970 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_capacitychecked.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_capacitychecked.h
@@ -37,9 +37,9 @@ public extends<AthAlgTool, ITrigJetCapacityCheckedConditionConfig> {
 
   
 
-  Gaudi::Property<std::size_t> m_chainPartInd {this,
+  Gaudi::Property<int> m_chainPartInd {this,
     "chainPartInd",
-    {0},
+    {-1},
     "identifier for chain leg - used to group jets for jet hypo clients "};
 
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.cxx
new file mode 100644
index 000000000000..6f0878909c7b
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.cxx
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/*
+  Instantiator for Htfr Conditions
+ */
+#include "TrigJetConditionConfig_htfr.h"
+#include "GaudiKernel/StatusCode.h"
+#include "./HTConditionFastReduction.h"
+#include "./ArgStrToDouble.h"
+
+TrigJetConditionConfig_htfr::TrigJetConditionConfig_htfr(const std::string& type,
+                                                 const std::string& name,
+                                                 const IInterface* parent) :
+  base_class(type, name, parent){
+
+}
+
+
+StatusCode TrigJetConditionConfig_htfr::initialize() {
+  CHECK(checkVals());
+
+  return StatusCode::SUCCESS;
+}
+
+
+ConditionMT TrigJetConditionConfig_htfr::getCondition() const {
+  auto a2d = ArgStrToDouble();
+  return std::make_unique<HTConditionFastReduction>(a2d(m_min), a2d(m_max));
+}
+
+
+StatusCode TrigJetConditionConfig_htfr::checkVals() const {
+    auto a2d = ArgStrToDouble();
+  if (a2d(m_min) > a2d(m_max)){
+    ATH_MSG_ERROR("htMin > htMax");
+    return StatusCode::FAILURE;
+  }
+  return StatusCode::SUCCESS;
+}
+
+bool TrigJetConditionConfig_htfr::addToCapacity(std::size_t) {
+  return false;
+}
+
+std::size_t TrigJetConditionConfig_htfr::capacity() const {
+  return getCondition()->capacity();
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.h
new file mode 100644
index 000000000000..8f2f9ec06794
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_htfr.h
@@ -0,0 +1,45 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGJETCONDITIONCONFIG_HTFR_H
+#define TRIGJETCONDITIONCONFIG_HTFR_H
+
+/*
+Condiguration AlgTool for ht conditions to be run in FastReduction
+PS 
+*/
+
+#include "ITrigJetConditionConfig.h"
+#include "./ConditionsDefsMT.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigJetConditionConfig_htfr:
+public extends<AthAlgTool, ITrigJetConditionConfig> {
+
+ public:
+  
+  TrigJetConditionConfig_htfr(const std::string& type,
+			      const std::string& name,
+			      const IInterface* parent);
+
+  virtual StatusCode initialize() override;
+  virtual ConditionMT getCondition() const override;
+
+  virtual bool addToCapacity(std::size_t) override;
+  virtual std::size_t capacity() const override;
+
+ private:
+
+
+  Gaudi::Property<std::string>
+    m_min{this, "min", {}, "min HT"};
+
+  Gaudi::Property<std::string>
+    m_max{this, "max", {}, "max HT"};
+
+  StatusCode checkVals()  const;
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.cxx
index c819ee3580b1..eb8b9b40796a 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.cxx
@@ -9,12 +9,12 @@
 
 #include "./conditionsFactoryMT.h"
 
-#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/xAODJetAsIJetFactory.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h"
-#include "./groupsMatcherFactoryMT.h"
 #include "./CapacityCheckedCondition.h"
+#include "./FastReductionMatcher.h"
+#include "./Tree.h"
 
 #include "TrigCompositeUtils/TrigCompositeUtils.h"
 
@@ -134,29 +134,49 @@ TrigJetHypoToolConfig_fastreduction::getConditions() const {
   return std::make_optional<ConditionsMT>(std::move(conditions));
 }
 
+
+std::vector<std::unique_ptr<ConditionFilter>>
+TrigJetHypoToolConfig_fastreduction::getConditionFilters() const {
+
+  auto filters = std::vector<std::unique_ptr<ConditionFilter>>();
+  
+  for(const auto& cm : m_filtConditionMakers){
+    ConditionPtrs filterConditions;  // will contain a single Condition
+    filterConditions.push_back(std::move(cm->getCapacityCheckedCondition()));
+    auto cf = std::make_unique<ConditionFilter>(filterConditions);
+    filters.push_back(std::move(cf));
+  }
+  
+  return filters;
+}
+
 // following function not used for treeless hypos
 std::size_t
 TrigJetHypoToolConfig_fastreduction::requiresNJets() const {
   return 0;
 }
 
- 
-std::unique_ptr<IJetGrouper>
-TrigJetHypoToolConfig_fastreduction::getJetGrouper() const {
-  return std::make_unique<SingleJetGrouper>();
-}
 
-std::unique_ptr<IGroupsMatcherMT>
+std::unique_ptr<IJetsMatcherMT>
 TrigJetHypoToolConfig_fastreduction::getMatcher () const {
 
   auto opt_conds = getCapacityCheckedConditions();
 
   if(!opt_conds.has_value()){
-    return std::unique_ptr<IGroupsMatcherMT>(nullptr);
+    return std::unique_ptr<IJetsMatcherMT>(nullptr);
   }
 
-  return groupsMatcherFactoryMT_FastReduction(std::move(*opt_conds),
-					      m_treeVec);
+  auto matcher =  std::unique_ptr<IJetsMatcherMT>();
+  //  matcher.reset(new FastReductionMatcher(std::move(*opt_conds),
+  //					 Tree(m_treeVec)));
+
+  auto conditions = std::move(*opt_conds);
+  auto filters = getConditionFilters();
+  auto fpm = new FastReductionMatcher(conditions,
+				      filters,
+				      Tree(m_treeVec));
+  matcher.reset(fpm);
+  return matcher;
 }
 
 StatusCode TrigJetHypoToolConfig_fastreduction::checkVals() const {
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.h
index 26a33fe89d6c..91622b23b550 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolConfig_fastreduction.h
@@ -13,22 +13,23 @@
  *********************************************************************/
 
 
-#include "ITrigJetHypoToolConfig.h"
+#include "ITrigJetHypoToolNoGrouperConfig.h"
 #include "./CapacityCheckedConditionsDefs.h"
 #include "TrigCompositeUtils/HLTIdentifier.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "TrigCompositeUtils/TrigCompositeUtils.h"
 #include "AthenaMonitoringKernel/GenericMonitoringTool.h"
 
+#include "./IJetsMatcherMT.h"
 #include "./ConditionsDefsMT.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h"
-#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
 #include "./ITrigJetCapacityCheckedConditionConfig.h"
+#include "./ConditionFilter.h"
 
 class TrigJetHypoToolConfig_fastreduction:
-public extends<AthAlgTool, ITrigJetHypoToolConfig> {
+public extends<AthAlgTool, ITrigJetHypoToolNoGrouperConfig> {
 
  public:
   
@@ -39,17 +40,24 @@ public extends<AthAlgTool, ITrigJetHypoToolConfig> {
 
   virtual StatusCode initialize() override;
   virtual std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
-  virtual std::unique_ptr<IJetGrouper> getJetGrouper() const override;
-  virtual std::unique_ptr<IGroupsMatcherMT> getMatcher() const override;
+  virtual std::unique_ptr<IJetsMatcherMT> getMatcher() const override;
   virtual std::optional<ConditionsMT> getConditions() const override;
+
+  virtual std::vector<std::unique_ptr<ConditionFilter>>
+  getConditionFilters() const override;
+
   virtual std::size_t requiresNJets() const override;
   virtual StatusCode checkVals() const override;
 
 
  private:
   ToolHandleArray<ITrigJetCapacityCheckedConditionConfig> m_conditionMakers{
-    this, "conditionMakers", {}, "hypo tree node to conditiionMaker map"};
+    this, "conditionMakers", {}, "hypo tree Condition builder AlgTools"};
 
+  ToolHandleArray<ITrigJetCapacityCheckedConditionConfig> m_filtConditionMakers{
+    this, "filtConditionsMakers", {},
+    "hypo tree Condition builder AlgTools for Condition filters"};
+  
   Gaudi::Property<std::vector<std::size_t>> m_treeVec{
     this, "treeVector", {}, "integer sequence representation of jet hypo tree"};
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx
new file mode 100644
index 000000000000..b7e7a2025889
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx
@@ -0,0 +1,134 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "./TrigJetHypoToolHelperNoGrouper.h"
+#include "./ITrigJetHypoInfoCollector.h"
+#include "./xAODJetCollector.h"
+#include "./JetTrigTimer.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/xAODJetAsIJet.h"  // TLorentzVec
+#include "./nodeIDPrinter.h"
+#include "./DebugInfoCollector.h"
+#include <algorithm>
+#include <sstream>
+
+TrigJetHypoToolHelperNoGrouper::TrigJetHypoToolHelperNoGrouper(const std::string& type,
+							       const std::string& name,
+							       const IInterface* parent) :
+  base_class(type, name, parent){
+}
+
+StatusCode TrigJetHypoToolHelperNoGrouper::initialize() {
+
+  m_matcher = m_config->getMatcher();
+  if(!m_matcher){
+    ATH_MSG_ERROR("Error setting matcher");
+    return StatusCode::FAILURE;
+  }
+		  
+  return StatusCode::SUCCESS;
+}
+
+void
+TrigJetHypoToolHelperNoGrouper::collectData(const std::string& exetime,
+					    const std::unique_ptr<ITrigJetHypoInfoCollector>& collector,
+					    const std::optional<bool>& pass) const {
+  if(!collector){return;}
+  auto helperInfo = nodeIDPrinter("TrigJetHypoToolHelperNoGrouper",
+                                  m_nodeID,
+                                  m_parentNodeID,
+                                  pass,
+                                  exetime
+                                  );
+  
+  collector->collect(name(), helperInfo);
+}
+
+
+bool
+TrigJetHypoToolHelperNoGrouper::pass(HypoJetVector& jets,
+				     xAODJetCollector& jetCollector,
+				     const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
+  
+  if(collector){
+    std::stringstream ss;
+    ss <<  "No of jets " + std::to_string(jets.size()) + '\n';
+    ss << jets; 
+    collector->collect(name(), ss.str());
+  }
+
+  JetTrigTimer timer;
+  timer.start();
+  
+  if(jets.empty()){   
+    timer.stop();
+    bool pass = false;
+    collectData(timer.readAndReset(), collector, pass);
+    return pass;
+  }
+
+  HypoJetIter jets_begin = jets.begin(); 
+  HypoJetIter jets_end = jets.end(); 
+  for(auto cleaner: m_cleaners){
+    jets_end = std::partition(jets_begin,
+			      jets_end,
+			      [cleaner](const pHypoJet& j){
+				return cleaner->select(j);}
+			      );
+  }
+  
+  auto pass = m_matcher->match(jets_begin,
+			       jets_end,
+			       jetCollector,
+			       collector);
+  
+  timer.stop();
+  
+  collectData(timer.readAndReset(), collector, pass);
+  
+  if(!pass.has_value()){
+    ATH_MSG_ERROR("Matcher cannot determine result. Config error?");
+    return false;
+  }
+    
+  return *pass;
+}
+
+std::string TrigJetHypoToolHelperNoGrouper::toString() const {
+  
+  
+  std::stringstream ss;
+  ss << nodeIDPrinter(name(),
+                      m_nodeID,
+                      m_parentNodeID);
+  
+  
+  ss << "Cleaners:\n No of cleaners: "  << m_cleaners.size() << '\n';
+  
+  for(auto cleaner : m_cleaners) {
+    ss << cleaner->toString() 
+       << '\n';
+  }
+  
+  ss << "\nMatcher:\n";
+  ss << m_matcher -> toString();
+  
+  return ss.str();
+}
+
+
+StatusCode
+TrigJetHypoToolHelperNoGrouper::getDescription(ITrigJetHypoInfoCollector& c) const {
+  c.collect(name(), toString());
+  return StatusCode::SUCCESS;
+}
+
+
+std::size_t TrigJetHypoToolHelperNoGrouper::requiresNJets() const {
+  return m_config->requiresNJets();
+}
+
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h
new file mode 100644
index 000000000000..f4e58f9a0ac0
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h
@@ -0,0 +1,87 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_TRIGJETHYPOHELPERNOGROUPER_H
+#define TRIGHLTJETHYPO_TRIGJETHYPOHELPERNOGROUPER_H
+
+/**
+ * A configurable helper class to implement Jet Trigger algorithms.
+ * Initial jet removal from incomming container is done using the ICleaner predicates.
+ * The surviving jets are grouped into subsets by the IJetGroup object.
+ *
+ * The IMatcher objector owns a set of Conditions objects. 
+ * The Matcher determines 
+ * whether the container of jet groups satisfies the Conditions. If so,
+ * the event passes, otherwise it fails.
+ *
+ */
+
+#include <vector>
+#include <memory>
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleanerTool.h"
+#include "./IJetsMatcherMT.h"
+#include "./ConditionsDefsMT.h"
+
+#include "TrigHLTJetHypo/ITrigJetHypoToolHelperMT.h"
+#include "ITrigJetHypoToolNoGrouperConfig.h"
+
+class ITrigJetHypoInfoCollector;
+class xAODJetCollector;
+
+class TrigJetHypoToolHelperNoGrouper:
+public extends<AthAlgTool, ITrigJetHypoToolHelperMT> {
+
+ public:
+  TrigJetHypoToolHelperNoGrouper(const std::string& type,
+                          const std::string& name,
+                          const IInterface* parent);
+
+  StatusCode initialize() override;
+  virtual bool
+
+    // pass - tests wethewr a jet collection passes cuts, and collects
+    // information about the decision.
+    pass(HypoJetVector&,
+	 xAODJetCollector&,
+	 const std::unique_ptr<ITrigJetHypoInfoCollector>&) const override;
+  
+  virtual std::size_t requiresNJets() const override;
+  
+  virtual StatusCode getDescription(ITrigJetHypoInfoCollector&) const override;
+
+ private:
+
+  // Object that matches jet groups with Conditions
+  std::unique_ptr<IJetsMatcherMT> m_matcher;
+
+  // Bridge objects to ICleaner predicate function objects to allow polymorphic
+  // pointers to be used with the STL (pass by value).
+  ToolHandleArray<ICleanerTool> m_cleaners;
+
+  ///////////////////////////////
+
+ // Used to generate helper objects foe TrigHLTJetHelper
+ // from user supplied values
+ ToolHandle<ITrigJetHypoToolNoGrouperConfig> m_config {
+   this, "HypoConfigurer", {}, "Configurer to set up TrigHLTJetHypoHelper2"}; 
+
+ Gaudi::Property<int>
+  m_parentNodeID {this, "parent_id", {0}, "hypo tool tree parent node id"};
+
+Gaudi::Property<int>
+  m_nodeID {this, "node_id", {0}, "hypo tool tree node id"};
+
+Gaudi::Property<bool>
+  m_debug {this, "debug", false, "instantantiate helpers with this debug flag"};
+
+
+ void collectData(const std::string& exetime,
+                  const std::unique_ptr<ITrigJetHypoInfoCollector>&,
+                  const std::optional<bool>& pass) const;
+
+ virtual std::string toString() const override;
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx
index d573062d7aae..05e2bf6d986d 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx
@@ -42,17 +42,18 @@ TrigJetHypoToolMT::~TrigJetHypoToolMT(){
 }
 
 StatusCode TrigJetHypoToolMT::initialize(){
-  DebugInfoCollector collector(name());
-  CHECK(m_helper->getDescription(collector));
-  auto s = collector.toString();
-  
-  for(const auto& l : lineSplitter(s)){
-    ATH_MSG_INFO(l);
-  }
-  
+
   if (m_visitDebug){
-    collector.write();
+
+    DebugInfoCollector collector(name());
+    CHECK(m_helper->getDescription(collector));
+    auto s = collector.toString();
+  
+    for(const auto& l : lineSplitter(s)){
+      ATH_MSG_INFO(l);
+    }
   }
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx
index 2ef7d1045234..4974748f7260 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx
@@ -20,6 +20,7 @@
 #include "../TrigJetConditionConfig_signed_eta.h"
 #include "../TrigJetConditionConfig_et.h"
 #include "../TrigJetConditionConfig_ht.h"
+#include "../TrigJetConditionConfig_htfr.h"
 #include "../TrigJetConditionConfig_dijet_mass.h"
 #include "../TrigJetConditionConfig_dijet_dphi.h"
 #include "../TrigJetConditionConfig_dijet_deta.h"
@@ -34,6 +35,7 @@
 //
 #include "../TrigJetHypoToolMT.h"
 #include "../TrigJetHypoToolHelperMT.h"
+#include "../TrigJetHypoToolHelperNoGrouper.h"
 #include "../TrigJetTLAHypoAlgMT.h"
 #include "../TrigJetTLAHypoToolMT.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/BasicCleanerTool.h"
@@ -64,6 +66,7 @@ DECLARE_COMPONENT(TrigJetConditionConfig_signed_eta)
 DECLARE_COMPONENT(TrigJetConditionConfig_abs_eta)
 DECLARE_COMPONENT(TrigJetConditionConfig_et)
 DECLARE_COMPONENT(TrigJetConditionConfig_ht)
+DECLARE_COMPONENT(TrigJetConditionConfig_htfr)
 DECLARE_COMPONENT(TrigJetConditionConfig_dijet_mass)
 DECLARE_COMPONENT(TrigJetConditionConfig_dijet_deta)
 DECLARE_COMPONENT(TrigJetConditionConfig_dijet_dphi)
@@ -80,6 +83,7 @@ DECLARE_COMPONENT(TrigJetHypoToolMT)
 DECLARE_COMPONENT(TrigJetTLAHypoAlgMT)
 DECLARE_COMPONENT(TrigJetTLAHypoToolMT)
 DECLARE_COMPONENT(TrigJetHypoToolHelperMT)
+DECLARE_COMPONENT(TrigJetHypoToolHelperNoGrouper)
 
 DECLARE_COMPONENT(BasicCleanerTool)
 DECLARE_COMPONENT(AntiCleanerTool)
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.cxx
index b34ebadffb58..c7baef98e498 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.cxx
@@ -17,17 +17,6 @@ groupsMatcherFactoryMT_SingleCondition (ConditionsMT&& conditions){
 }
 
 
-std::unique_ptr<IGroupsMatcherMT> 
-groupsMatcherFactoryMT_FastReduction (ConditionPtrs&& conditions,
-				      const std::vector<std::size_t>& treeVec){
-  
-  if (conditions.size() == 1) {
-    return std::make_unique<SingleConditionMatcherMT>(std::move(conditions[0]));
-  } else {
-    return std::make_unique<FastReductionMatcher>(std::move(conditions),
-						  treeVec);
-  } 
-}
 
 
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.h
index b91b74c3df27..cde9b776796e 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/groupsMatcherFactoryMT.h
@@ -16,7 +16,4 @@ groupsMatcherFactoryMT_SingleCondition(ConditionsMT&&);
 std::unique_ptr<IGroupsMatcherMT>
 groupsMatcherFactoryMT_MaxBipartite(ConditionsMT&&);
 
-std::unique_ptr<IGroupsMatcherMT>
-groupsMatcherFactoryMT_FastReduction(ConditionPtrs&&,
-				     const std::vector<std::size_t>& treeVec);
 #endif
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 3d09ef19cbbe..201a8038ae04 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -1469,7 +1469,7 @@ HLT_j0_aggSEP500htSEP30etSEP0eta320_L1J20:
   stepCounts:
     0: 1
   stepFeatures:
-    0: 50
+    0: 5
 HLT_j0_perf_L1J12_EMPTY:
   eventCount: 0
 HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20:
-- 
GitLab


From 503b5a9065c8dc400c2d30f19bd3c9e239018e0d Mon Sep 17 00:00:00 2001
From: amete <serhanmete@gmail.com>
Date: Mon, 21 Dec 2020 20:07:18 +0100
Subject: [PATCH 171/308] Fix athena preload logic

---
 Control/AthenaCommon/share/athena.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/AthenaCommon/share/athena.py b/Control/AthenaCommon/share/athena.py
index f114cbed608e..2140470dc901 100755
--- a/Control/AthenaCommon/share/athena.py
+++ b/Control/AthenaCommon/share/athena.py
@@ -27,7 +27,7 @@ do
 	--stdcmath)      USEIMF=0;;
 	--imf)           USEIMF=1;;
 	--preloadlib*)     export ATHENA_ADD_PRELOAD=${a#*=};;
-	--drop-and-reload) export ATHENA_DROP_RELOAD=1;;
+	--drop-and-reload) ATHENA_DROP_RELOAD=1;;
 	--CA)              USECA=1;;
 	*)               otherargs="$otherargs $a";;
     esac
-- 
GitLab


From 89da29eb6b020d5ae7548287e95c6da6984a522c Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 22 Dec 2020 00:03:56 +0100
Subject: [PATCH 172/308] MuonTrackSteeringTools: Another attempt to fix
 dangling Surface references.

finalize() is still to late to clean up the garbage in MuPatCandidateTool,
as we also clean stores in step.  Try moving deleting the garbage
to stop().

See ATLASRECTS-5843.
---
 .../MuonTrackSteeringTools/src/MuPatCandidateTool.cxx    | 6 +++++-
 .../MuonTrackSteeringTools/src/MuPatCandidateTool.h      | 9 ++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
index 4bf8325d4afe..d12909b845c2 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx
@@ -58,9 +58,13 @@ namespace Muon {
   }
 
   StatusCode MuPatCandidateTool::finalize() {
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode MuPatCandidateTool::stop() {
 
     // Clean up all garbage now.
-    // If we leave it for the dtor, we may end up with dangling references
+    // If we leave it for later, we may end up with dangling references
     // to Surface objects that have already been deleted.
     for (CacheEntry& ent : m_cache) {
       ent.cleanUp();
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h
index 9408b03df006..da0186c3a723 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h
@@ -65,13 +65,16 @@ namespace Muon {
     MuPatCandidateTool(const std::string&, const std::string&, const IInterface*);
     
     /** destructor */
-    ~MuPatCandidateTool() = default;
+    virtual ~MuPatCandidateTool() = default;
     
     /** initialize method, method taken from bass-class AlgTool */
-    StatusCode initialize();
+    virtual StatusCode initialize() override;
 
     /** finialize method, method taken from bass-class AlgTool */
-    StatusCode finalize();
+    virtual StatusCode finalize() override;
+
+    /** stop method, used to clean up garbage */
+    virtual StatusCode stop() override;
     
     /** @brief access to tool interface */
     static const InterfaceID& interfaceID() { return IID_MuPatCandidateTool; }
-- 
GitLab


From dd8cd5e2296f9e2609a20532e873786a97631151 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 8 Dec 2020 22:34:42 -0500
Subject: [PATCH 173/308] TrigHLTJetHypo: Fix debug logging.

Missing format string arguments.
Was generating errors with py 3.8.
---
 .../TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
index 656f8236623f..4cbe8323990c 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
@@ -225,7 +225,7 @@ class ConditionsToolSetterFastReduction(object):
         self._fill_tree_map(tree, tree_map)
 
         for k, v in tree_map.items():
-            log.debug("Tree map debug ", str(k), str(v))
+            log.debug("Tree map debug %s %s", str(k), str(v))
             
         treeVec = self._map_2_vec(tree_map)
 
-- 
GitLab


From 314d539b9c4433d644e4e9e5962e3224a1f2f79e Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sat, 19 Dec 2020 11:06:33 -0500
Subject: [PATCH 174/308] TrkPatternParameters: Protect against passing null
 surface pointers.

Needed to fix null pointer dereference warning in TRT_TrajectoryElement_xk,
where we have

```
  Tp.setParametersWithCovariance(0,P,V);
```
---
 .../TrkPatternParameters/PatternTrackParameters.h             | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Tracking/TrkEvent/TrkPatternParameters/TrkPatternParameters/PatternTrackParameters.h b/Tracking/TrkEvent/TrkPatternParameters/TrkPatternParameters/PatternTrackParameters.h
index 977d9bfda6ff..846dcd841605 100755
--- a/Tracking/TrkEvent/TrkPatternParameters/TrkPatternParameters/PatternTrackParameters.h
+++ b/Tracking/TrkEvent/TrkPatternParameters/TrkPatternParameters/PatternTrackParameters.h
@@ -206,7 +206,7 @@ namespace Trk {
   inline void PatternTrackParameters::setParameters
     (const Surface* s,const double* p)
     {
-      m_surface.reset(s->isFree() ? s->clone() : s);
+      m_surface.reset(s && s->isFree() ? s->clone() : s);
       m_parameters[ 0] = p[ 0];
       m_parameters[ 1] = p[ 1];
       m_parameters[ 2] = p[ 2];
@@ -250,7 +250,7 @@ namespace Trk {
   inline void PatternTrackParameters::setParametersWithCovariance
     (const Surface* s,const double* p,const double* c)
     {
-      m_surface.reset(s->isFree() ? s->clone() : s);
+      m_surface.reset(s && s->isFree() ? s->clone() : s);
       m_parameters[ 0] = p[ 0];
       m_parameters[ 1] = p[ 1];
       m_parameters[ 2] = p[ 2];
-- 
GitLab


From d59d10d40cc3da7c7fd9698b19abb89aeb069e57 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 10 Dec 2020 17:16:35 -0500
Subject: [PATCH 175/308] ActsGeometry: Fix clang warnings.

class/struct mismatch.
unused alias.
---
 .../Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h     | 2 +-
 .../ActsGeometry/ActsGeometry/IActsPropStepRootWriterSvc.h    | 4 ++--
 Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx  | 4 +---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
index d87153490dbf..887764140859 100755
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/ActsExtrapolationAlg.h
@@ -25,7 +25,7 @@
 namespace Acts {
   class TrackingGeometry;
   namespace detail {
-    class Step;
+    struct Step;
   }
 }
 
diff --git a/Tracking/Acts/ActsGeometry/ActsGeometry/IActsPropStepRootWriterSvc.h b/Tracking/Acts/ActsGeometry/ActsGeometry/IActsPropStepRootWriterSvc.h
index abcde5cd7fa2..e7653a923bcf 100644
--- a/Tracking/Acts/ActsGeometry/ActsGeometry/IActsPropStepRootWriterSvc.h
+++ b/Tracking/Acts/ActsGeometry/ActsGeometry/IActsPropStepRootWriterSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ACTSGEOMETRY_IACTSPROPSTEPROOTWRITERSVC_H
@@ -10,7 +10,7 @@
 
 namespace Acts {
   namespace detail {
-    class Step;
+    struct Step;
   }
 }
 
diff --git a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
index 6229793ec97c..5e8c33835bd5 100644
--- a/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsPropStepRootWriterSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ActsGeometry/ActsPropStepRootWriterSvc.h"
@@ -120,8 +120,6 @@ ActsPropStepRootWriterSvc::writeThread()
 void
 ActsPropStepRootWriterSvc::doWrite(const StepVector& steps, size_t evtNum)
 {
-  using ag = Acts::GeometryIdentifier;
-
   m_eventNum = evtNum;
   m_s_pX.clear();
   m_s_pY.clear();
-- 
GitLab


From 9fae3e0e9e9fa49dabae51155aa93a1e27c4bb78 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Tue, 15 Dec 2020 15:05:19 -0500
Subject: [PATCH 176/308] CxxUtils: Fix copyright for MurmurHash2.

It's non-ATLAS, public-domain code.
Remove ATLAS copyright; restore original copyright notice that
had been mangled.
---
 Control/CxxUtils/CxxUtils/MurmurHash2.h | 5 +----
 Control/CxxUtils/Root/MurmurHash2.cxx   | 4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/Control/CxxUtils/CxxUtils/MurmurHash2.h b/Control/CxxUtils/CxxUtils/MurmurHash2.h
index f07a1e86b92b..27169c86d279 100644
--- a/Control/CxxUtils/CxxUtils/MurmurHash2.h
+++ b/Control/CxxUtils/CxxUtils/MurmurHash2.h
@@ -1,7 +1,4 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
 /*
  * Public domain; see below.
  */
@@ -21,7 +18,7 @@
 
 //-----------------------------------------------------------------------------
 // MurmurHash2 was written by Austin Appleby, and is placed in the public
-
+// domain. The author hereby disclaims copyright to this source code.
 
 //-----------------------------------------------------------------------------
 // Platform-specific functions and macros
diff --git a/Control/CxxUtils/Root/MurmurHash2.cxx b/Control/CxxUtils/Root/MurmurHash2.cxx
index 64d27e4a1185..4311c5b2a00e 100644
--- a/Control/CxxUtils/Root/MurmurHash2.cxx
+++ b/Control/CxxUtils/Root/MurmurHash2.cxx
@@ -1,6 +1,3 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
 /*
  * Public domain; see below.
  */
@@ -16,6 +13,7 @@
 
 //-----------------------------------------------------------------------------
 // MurmurHash2 was written by Austin Appleby, and is placed in the public
+// domain. The author hereby disclaims copyright to this source code.
 
 // Note - This code makes a few assumptions about how your machine behaves -
 
-- 
GitLab


From 7752570ff7fe29203305fd3c2c3dc39aa951f8f7 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 14 Dec 2020 16:48:49 -0500
Subject: [PATCH 177/308] CxxUtils: Fix a typo in comments.

Fix a typo in comments.
---
 Control/CxxUtils/CxxUtils/ConcurrentRangeMap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/CxxUtils/CxxUtils/ConcurrentRangeMap.h b/Control/CxxUtils/CxxUtils/ConcurrentRangeMap.h
index b4aaaef30cee..b7b0a3c82928 100644
--- a/Control/CxxUtils/CxxUtils/ConcurrentRangeMap.h
+++ b/Control/CxxUtils/CxxUtils/ConcurrentRangeMap.h
@@ -390,7 +390,7 @@ public:
 
   /**
    * @brief Update all range objects.
-   * @param rangeUpater Functional to call on each range object.
+   * @param rangeUpdater Functional to call on each range object.
    * @param ctx Execution context.
    *
    * This will iterate through the list of entries and call @c rangeUpdater
-- 
GitLab


From e02abb936b6e7f3da0b8ba627b19181f6763a1f2 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 21 Dec 2020 04:54:20 +0100
Subject: [PATCH 178/308] StoreGateBindings: Protect against missing
 hasStore().

In the pythonization of SG retrieve, don't assume that having a setStore()
method implies that we have a hasStore() method.  That's not true if we're
explicitly retrieving an auxiliary store object.
---
 Control/StoreGateBindings/python/Bindings.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/StoreGateBindings/python/Bindings.py b/Control/StoreGateBindings/python/Bindings.py
index 07d8c9b46fd5..9797e0490a0b 100644
--- a/Control/StoreGateBindings/python/Bindings.py
+++ b/Control/StoreGateBindings/python/Bindings.py
@@ -85,7 +85,7 @@ def _setup():
             ret = py_sg_getitem(self, str(key).encode())
         except LookupError as err:
             raise KeyError(str(err))
-        if ret and hasattr(ret,'setStore') and not ret.hasStore():
+        if ret and hasattr(ret,'setStore') and hasattr(ret,'hasStore') and not ret.hasStore():
             if not hasattr(ret,'trackIndices') or ret.trackIndices():
                 if py_sg_contains (self, 'SG::IConstAuxStore', key + 'Aux.'):
                     aux = py_retrieve (self, 'SG::IConstAuxStore', key + 'Aux.')
-- 
GitLab


From 3c4d55c841e8b778ab5975a6b875ec4a7069dfde Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 21 Dec 2020 05:01:15 +0100
Subject: [PATCH 179/308] egammaD3PDMaker: Restore some required imports.

The imports of resolveSGKey are required, even though flake8 doesn't
know it.
---
 .../egammaD3PDMaker/python/CorrectionClusterD3PDObject.py        | 1 +
 .../D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py       | 1 +
 .../D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py         | 1 +
 3 files changed, 3 insertions(+)

diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
index 2528bbe8c2e4..1efcd7c3c021 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/CorrectionClusterD3PDObject.py
@@ -12,6 +12,7 @@
 from D3PDMakerCoreComps.D3PDObject    import make_SGDataVector_D3PDObject
 from egammaD3PDAnalysis.TileGapConfig import TileGapConfig
 from D3PDMakerCoreComps.D3PDObject    import DeferArg
+from D3PDMakerCoreComps.resolveSGKey  import resolveSGKey # noqa: F401
 import EventCommonD3PDMaker
 import D3PDMakerCoreComps
 import CaloD3PDMaker
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
index b0df9756add6..42c49237a45b 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/ElectronD3PDObject.py
@@ -15,6 +15,7 @@ from D3PDMakerCoreComps.D3PDObject          import DeferArg
 from D3PDMakerCoreComps.SimpleAssociation   import SimpleAssociation
 from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
 from D3PDMakerCoreComps.resolveSGKey        import testSGKey
+from D3PDMakerCoreComps.resolveSGKey        import resolveSGKey # noqa: F401
 from D3PDMakerConfig.D3PDMakerFlags         import D3PDMakerFlags
 from RecExConfig.RecFlags                   import rec
 import egammaD3PDMaker
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
index fbf504ce8a1c..81757134e46a 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/python/PhotonD3PDObject.py
@@ -14,6 +14,7 @@ from D3PDMakerCoreComps.D3PDObject           import DeferArg
 from D3PDMakerCoreComps.SimpleAssociation    import SimpleAssociation
 from D3PDMakerConfig.D3PDMakerFlags          import D3PDMakerFlags
 from D3PDMakerCoreComps.resolveSGKey         import testSGKey
+from D3PDMakerCoreComps.resolveSGKey         import resolveSGKey # noqa: F401
 from TrackD3PDMaker.xAODTrackSummaryFiller   import xAODTrackSummaryFiller
 from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
 from RecExConfig.RecFlags                    import rec
-- 
GitLab


From 3e80eb56d4096aa1293e7de8847aff661357fc25 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 21 Dec 2020 05:09:44 +0100
Subject: [PATCH 180/308] D3PDMakerConfig: configuration fixes

 - Need to make sure that aux ids are defined in MergeElectrons.
 - Don't import CondDB before including RecExCommon_topOptions.py;
   otherwise, the database instance can be set wrong.
---
 .../D3PDMakerConfig/python/egammaD3PD.py         | 16 ++++------------
 .../D3PDMakerConfig/share/AODToEgammaD3PD.py     |  5 +++--
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py
index 29bf2a9878c5..4e13f4f8639f 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py
@@ -205,18 +205,10 @@ class MergeElectrons (PyAthena.Alg):
         sg.record (enew, 'AllElectrons')
         cfgKeyStore.addTransient ('xAOD::ElectronContainer', 'AllElectrons')
 
-        #e1 = sg['StacoMuonCollection']
-        e1 = sg.retrieve (ROOT.DataVector(ROOT.xAOD.Electron_v1), 'AllElectrons')
-        #if e1.size() > 0:
-        #    reg = ROOT.SG.AuxTypeRegistry.instance()
-        #    auxids = list(e1[0].getAuxIDs())
-        #    auxids = [(reg.getName(id), id) for id in auxids]
-        #    auxids.sort()
-        #    print 'aaa', auxids
-        # if e2.size() > 0:
-        #     acc = ROOT.SG.AuxElement.TypelessConstAccessor ('Loose')
-        #     print 'bbb2', acc.isAvailable(e2[0])
-
+        # Make sure these aux variables are defined at this point.
+        ROOT.xAOD.ElectronAuxContainer()
+        ROOT.xAOD.CaloClusterAuxContainer()
+               
         return StatusCode.Success
         
 
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py
index dfa8e02ffd39..f573679f8666 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py
@@ -57,6 +57,9 @@ muonRecFlags.doMSVertex.set_Value_and_Lock( False )
 
 #from xAODJetCnv import ParticleJetCompatibility
 
+
+include( "RecExCommon/RecExCommon_topOptions.py" )
+
 # Block loading conditions folders we won't need.
 blocked_folders = [
     '/CALO/Identifier/CaloTTOnAttrIdMapAtlas',
@@ -80,5 +83,3 @@ for f in blocked_folders:
     conddb.blockFolder (f)
 
 
-include( "RecExCommon/RecExCommon_topOptions.py" )
-
-- 
GitLab


From 71641de68d7a12339a7837ed3a011b92528ab005 Mon Sep 17 00:00:00 2001
From: MatousVozak <matous.vozak@cern.ch>
Date: Tue, 22 Dec 2020 07:59:35 +0100
Subject: [PATCH 181/308] adding getter for propagator

---
 Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py
index f4ae49837955..4f4fe1ffa3c7 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetTrigCommon.py
@@ -48,6 +48,10 @@ def trackSummaryTool_getter( doTRT ):
    else:
       return InDetTrigTrackSummaryTool
 
+def trigPropagator_getter():
+   from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPropagator
+   return InDetTrigPropagator
+
 #--------------------------------------------------------------------------------------
 
 
-- 
GitLab


From 35a424beb7dba41eb5163356d87bfe9c44bb7ea0 Mon Sep 17 00:00:00 2001
From: MatousVozak <matous.vozak@cern.ch>
Date: Tue, 22 Dec 2020 08:18:47 +0100
Subject: [PATCH 182/308] Adapting naming from MR39144

---
 .../TrigInDetConfig/python/InDetPT.py         | 41 ++++++++-----------
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
index 89c583c4d709..8be9a444754c 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
@@ -27,29 +27,24 @@ def makeInDetPrecisionTracking( config = None,
 
   #-----------------------------------------------------------------------------
   #                        Naming conventions
+  doTRT = config.PT.setting.doTRT
 
   algNamePrefix = "InDetTrigMT" 
   #Add suffix to the algorithms
   signature =  "_{}".format( config.name )
-  
-  #Name settings for output Tracks/TrackParticles
-  #This first part is for ambiguity solver tracks
-  nameAmbiTrackCollection = config.PT.trkTracksAS() 
-  
-  #Tracks from TRT extension
-  nameExtTrackCollection = config.PT.trkTracksTE() 
 
-  outPTTracks             = config.PT.trkTracksPT()
-  outPTTrackParticles     = config.PT.tracksPT( doRecord = config.isRecordable )
+
+  #Name settings for output Tracks/TrackParticles
+  outTrkTracks        = config.PT.trkTracksPT() #Final output Track collection
+  outTrackParticles   = config.PT.tracksPT( doRecord = config.isRecordable ) #Final output xAOD::TrackParticle collection
+  ambiTrackCollection = config.PT.trkTracksAS()  #Ambiguity solver tracks
 
   #Atm there are mainly two output track collections one from ambiguity solver stage and one from trt,
   #we want to have the output name of the track collection the same whether TRT was run or not,
   #Therefore, we have to adapt output names of the algorithm which produces last collection
   #However, this condition should be handled internally in configuration of the algs once TRT is configured with builders as well
-  if config.PT.setting.doTRT:
-     nameExtTrackCollection = outPTTracks
-  else:
-     nameAmbiTrackCollection = outPTTracks
+  if not doTRT:
+     ambiTrackCollection = outTrkTracks
 
   #-----------------------------------------------------------------------------
   #                        Verifying input data for the algorithms
@@ -77,7 +72,7 @@ def makeInDetPrecisionTracking( config = None,
   
   #Obsolete, will be eventually replaced
   #Note: keep Parameter_config!
-  if config.PT.setting.doTRT:
+  if doTRT:
       if "electron" in config.name  or "tau" in config.name:
          trigTrackSummaryTool.TRT_ElectronPidTool = InDetTrigTRT_ElectronPidTool
 
@@ -102,7 +97,7 @@ def makeInDetPrecisionTracking( config = None,
                            ambiguitySolverAlg_builder( name                  = get_full_name( core = 'TrkAmbiguitySolver', suffix = config.name ),
                                                        config                = config,
                                                        inputTrackScoreMap    = get_scoremap_name( config.name ), #Map of tracks and their scores, 
-                                                       outputTrackCollection = nameAmbiTrackCollection  )
+                                                       outputTrackCollection = ambiTrackCollection  )
                         ]
    
 
@@ -111,7 +106,7 @@ def makeInDetPrecisionTracking( config = None,
 
   from InDetTrigRecExample.InDetTrigConfigRecLoadTools import  InDetTrigExtrapolator
   #TODO:implement builders and getters for TRT (WIP)
-  if config.PT.setting.doTRT:
+  if doTRT:
 
             #-----------------------------------------------------------------------------
             #                        TRT data preparation
@@ -234,7 +229,7 @@ def makeInDetPrecisionTracking( config = None,
  
             from TRT_TrackExtensionAlg.TRT_TrackExtensionAlgConf import InDet__TRT_TrackExtensionAlg
             InDetTrigTRTextensionAlg = InDet__TRT_TrackExtensionAlg( name = "%sTrackExtensionAlg%s"%(algNamePrefix, signature),
-                                                            InputTracksLocation    = nameAmbiTrackCollection,
+                                                            InputTracksLocation    = ambiTrackCollection,
                                                             TrackExtensionTool     = InDetTrigTRTExtensionTool,
                                                             ExtendedTracksLocation = 'ExtendedTrackMap'
                                                              )
@@ -271,10 +266,10 @@ def makeInDetPrecisionTracking( config = None,
             from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackFitter
             from InDetExtensionProcessor.InDetExtensionProcessorConf import InDet__InDetExtensionProcessor   
             InDetTrigExtensionProcessor = InDet__InDetExtensionProcessor (name               = "%sExtensionProcessor%s"%(algNamePrefix, signature),
-                                                                          TrackName          = nameAmbiTrackCollection,
+                                                                          TrackName          = ambiTrackCollection,
                                                                           #Cosmics           = InDetFlags.doCosmics(),
                                                                           ExtensionMap       = 'ExtendedTrackMap',
-                                                                          NewTrackName       = nameExtTrackCollection,
+                                                                          NewTrackName       = outTrkTracks,
                                                                           TrackFitter        = InDetTrigTrackFitter,
                                                                           TrackSummaryTool   = SummaryTool_config,
                                                                           ScoringTool        = InDetTrigExtScoringTool, #TODO do I provide the same tool as for ambiguity solver?
@@ -296,8 +291,8 @@ def makeInDetPrecisionTracking( config = None,
   from .InDetTrigCommon import trackParticleCnv_builder
   trackParticleCnvAlg = trackParticleCnv_builder(name                 = get_full_name( 'xAODParticleCreatorAlg',config.name + '_IDTrig' ), #IDTrig suffix signifies that this is for precision tracking
                                                  config               = config,
-                                                 inTrackCollectionKey = outPTTracks,
-                                                 outTrackParticlesKey = outPTTrackParticles,
+                                                 inTrackCollectionKey = outTrkTracks,
+                                                 outTrackParticlesKey = outTrackParticles,
                                                  )
   log.debug(trackParticleCnvAlg)
   ptAlgs.append(trackParticleCnvAlg)
@@ -308,8 +303,8 @@ def makeInDetPrecisionTracking( config = None,
   
   #Potentialy other algs with more collections? 
   #Might Drop the list in the end and keep just one output key
-  nameTrackCollections =[ outPTTracks ]
-  nameTrackParticles =  [ outPTTrackParticles ]
+  nameTrackCollections =[ outTrkTracks ]
+  nameTrackParticles =  [ outTrackParticles ]
 
   
   #Return list of Track keys, TrackParticle keys, and PT algs
-- 
GitLab


From 64d438ffe57af9858a34b213f72c0facdb8d0d96 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Tue, 22 Dec 2020 08:56:36 +0000
Subject: [PATCH 183/308] Hepmc3 nightly fixes 18122020 part 1

---
 .../InDetOverlay/test/TRTOverlay_test.cxx     | 20 +++++++++----------
 .../src/D2PDTruthParticleSelector.cxx         | 20 +++++++------------
 .../G4AtlasTests/src/TruthTestTool.cxx        |  6 +++---
 3 files changed, 20 insertions(+), 26 deletions(-)

diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
index a21c8c8b41db..c458c6acb97a 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
@@ -277,7 +277,7 @@ namespace OverlayTesting {
       return digit;
     }
 
-    bool initMcEventCollection(std::vector<HepMC::GenParticle*>& genPartList)
+    bool initMcEventCollection(std::vector<HepMC::GenParticlePtr>& genPartList)
     {
       // create dummy input McEventCollection with a name that
       // HepMcParticleLink knows about
@@ -286,7 +286,7 @@ namespace OverlayTesting {
       // Add a dummy GenEvent
       const int process_id1(20);
       const int event_number1(17);
-      inputTestDataHandle->push_back(new HepMC::GenEvent(process_id1, event_number1));
+      inputTestDataHandle->push_back(HepMC::newGenEvent(process_id1, event_number1));
       HepMC::GenEvent& ge1 = *(inputTestDataHandle->at(0));
       populateGenEvent(ge1,-11,11,genPartList);
       populateGenEvent(ge1,-13,13,genPartList);
@@ -297,26 +297,26 @@ namespace OverlayTesting {
       return true;
     }
 
-    void populateGenEvent(HepMC::GenEvent & ge, int pdgid1, int pdgid2, std::vector<HepMC::GenParticle*>& genPartList)
+    void populateGenEvent(HepMC::GenEvent & ge, int pdgid1, int pdgid2, std::vector<HepMC::GenParticlePtr>& genPartList)
     {
-      CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0);
-      HepMC::GenVertex *myVertex = new HepMC::GenVertex( myPos, -1 );
+      HepMC::FourVector myPos( 0.0, 0.0, 0.0, 0.0);
+      HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 );
       HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV);
-      HepMC::GenParticle* inParticle1 = new HepMC::GenParticle(fourMomentum1, pdgid1, 2);
+      HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2);
       myVertex->add_particle_in(inParticle1);
       HepMC::FourVector fourMomentum2( 0.0, 0.0, -1.0, 1.0*CLHEP::TeV);
-      HepMC::GenParticle* inParticle2 = new HepMC::GenParticle(fourMomentum2, pdgid2, 2);
+      HepMC::GenParticlePtr inParticle2 = HepMC::newGenParticlePtr(fourMomentum2, pdgid2, 2);
       myVertex->add_particle_in(inParticle2);
       HepMC::FourVector fourMomentum3( 0.0, 1.0, 0.0, 1.0*CLHEP::TeV);
-      HepMC::GenParticle* inParticle3 = new HepMC::GenParticle(fourMomentum3, pdgid1, 1);
+      HepMC::GenParticlePtr inParticle3 = HepMC::newGenParticlePtr(fourMomentum3, pdgid1, 1);
       myVertex->add_particle_out(inParticle3);
       genPartList.push_back(inParticle3);
       HepMC::FourVector fourMomentum4( 0.0, -1.0, 0.0, 1.0*CLHEP::TeV);
-      HepMC::GenParticle* inParticle4 = new HepMC::GenParticle(fourMomentum4, pdgid2, 1);
+      HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1);
       myVertex->add_particle_out(inParticle4);
       genPartList.push_back(inParticle4);
       ge.add_vertex( myVertex );
-      ge.set_signal_process_vertex( myVertex );
+      HepMC::set_signal_process_vertex( &ge, myVertex );
       ge.set_beam_particles(inParticle1,inParticle2);
     }
 
diff --git a/PhysicsAnalysis/D2PDMaker/src/D2PDTruthParticleSelector.cxx b/PhysicsAnalysis/D2PDMaker/src/D2PDTruthParticleSelector.cxx
index e9649d217765..1e655dc0d917 100644
--- a/PhysicsAnalysis/D2PDMaker/src/D2PDTruthParticleSelector.cxx
+++ b/PhysicsAnalysis/D2PDMaker/src/D2PDTruthParticleSelector.cxx
@@ -297,14 +297,11 @@ StatusCode D2PDTruthParticleSelector::processObject( const TruthParticle* part,
           if( genPart->end_vertex() )
             {
               int barcode = HepMC::barcode(genPart);
-              auto childItrBegin =    genPart->end_vertex()->particles_begin(HepMC::children);
-              auto childItrEnd = genPart->end_vertex()->particles_end(HepMC::children);
-              for (auto childItr=childItrBegin; childItr!=childItrEnd; ++childItr )
+              for (auto child: *(genPart->end_vertex()))
                 {
-                  auto child = (*childItr);
                   if( child->pdg_id() == pdgID
-                      && child->barcode() != barcode
-                      && child->barcode() < 200000 )
+                      && HepMC::barcode(child) != barcode
+                      && HepMC::barcode(child) < 200000 )
                     {
                       isPassed = false;
                     }
@@ -605,17 +602,14 @@ bool D2PDTruthParticleSelector::getDaughters( HepMC::ConstGenParticlePtr genPart
   if( genPart->end_vertex() )
     {
       int pdgID   = genPart->pdg_id();
-      int barcode = genPart->barcode();
+      int barcode = HepMC::barcode(genPart);
 
       // Loop over all children
-      auto childItrBegin = genPart->end_vertex()->particles_begin(HepMC::children);
-      auto  childItrEnd = genPart->end_vertex()->particles_end(HepMC::children);
-      for (auto childItr=childItrBegin; childItr != childItrEnd; ++childItr )
+      for (auto child: *(genPart->end_vertex()))
         {
-          auto child = (*childItr);
           if( child->pdg_id() == pdgID
-              && child->barcode() != barcode
-              && child->barcode() < 200000 )
+              && HepMC::barcode(child) != barcode
+              && HepMC::barcode(child) < 200000 )
             {
               return getDaughters( child, daughters );
             }
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/TruthTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/TruthTestTool.cxx
index a5dac7b791ca..454f5bf9adb2 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/TruthTestTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasTests/src/TruthTestTool.cxx
@@ -224,7 +224,6 @@ StatusCode TruthTestTool::processEvent()
       }
 
       int npart_prim=0, npart_sec=0;
-      HepMC::GenEvent::particle_const_iterator currentGenParticleIter;
       for (auto currentGenParticle: *(*currentGenEventIter)) {
 
         const HepMC::FourVector mom = currentGenParticle->momentum();
@@ -284,8 +283,9 @@ StatusCode TruthTestTool::processEvent()
         m_particle_type->Fill( particleType );
 
         if ( HepMC::barcode(currentGenParticle)<200000 ) {
-          m_p_gen->Fill( mom.rho() );
-          m_log_p_gen->Fill( log(mom.rho()) );
+          double momentum=std::sqrt(mom.x()*mom.x()+mom.y()*mom.y()+mom.z()*mom.z());
+          m_p_gen->Fill( momentum );
+          m_log_p_gen->Fill( std::log(momentum) );
           m_eta_gen->Fill( mom.eta() );
           m_phi_gen->Fill( mom.phi() );
           ++npart_prim;
-- 
GitLab


From c423ce08c9a541668ed71bd0be0f78fdfbe54ef9 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Tue, 22 Dec 2020 10:18:16 +0000
Subject: [PATCH 184/308] Hepmc3 nightly fixes 20122020 part 1 tracking

---
 .../TrkToolInterfaces/ITruthToTrack.h         |  4 +-
 .../ITruthTrajectoryBuilder.h                 |  6 +-
 .../src/DecayInFlyTruthTrajectoryBuilder.cxx  | 34 ++++-----
 .../src/DetailedTrackTruthBuilder.cxx         |  8 +-
 .../IPRD_TruthTrajectoryBuilder.h             |  2 +-
 .../PRD_TruthTrajectory.h                     |  4 +-
 .../src/PRD_TruthTrajectoryBuilder.cxx        | 10 +--
 .../src/PRD_TruthTrajectoryBuilder.h          |  4 +-
 .../src/TruthTrackBuilder.cxx                 |  2 +-
 .../TrkValAlgs/TrackValidationNtupleWriter.h  |  2 +-
 .../src/RecMomentumQualityValidation.cxx      |  2 +-
 .../src/TrackValidationNtupleWriter.cxx       | 10 +--
 .../TrkValInterfaces/IGenParticleJetFinder.h  |  2 +-
 .../TrkValInterfaces/IGenParticleSelector.h   |  2 +-
 .../TrkValInterfaces/ITrackTruthClassifier.h  |  4 +-
 .../TrkValTools/PrimaryTruthClassifier.h      |  5 +-
 .../src/PrimaryTruthClassifier.cxx            | 19 +++--
 .../src/TrkPriVxPurityTool.cxx                | 73 ++++++++++++-------
 18 files changed, 103 insertions(+), 90 deletions(-)

diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthToTrack.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthToTrack.h
index ff2438d11c26..2e0801ba13a2 100644
--- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthToTrack.h
+++ b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthToTrack.h
@@ -51,7 +51,7 @@ namespace Trk {
      *  object. (Wrapping it into a smart pointer may be the most
      *  convenient way to make sure the memory is freed.)
      */
-    virtual const Trk::TrackParameters* makeProdVertexParameters(const HepMC::GenParticle* part) const = 0;
+    virtual const Trk::TrackParameters* makeProdVertexParameters(HepMC::ConstGenParticlePtr part) const = 0;
     virtual const Trk::TrackParameters* makeProdVertexParameters(const xAOD::TruthParticle* part) const = 0;
 
     /** This function extrapolates track to the perigee, and returns
@@ -61,7 +61,7 @@ namespace Trk {
      * operator new.  The caller is responsible for deletion of the
      * object.
      */
-    virtual const Trk::TrackParameters* makePerigeeParameters(const HepMC::GenParticle* part) const = 0;
+    virtual const Trk::TrackParameters* makePerigeeParameters(HepMC::ConstGenParticlePtr part) const = 0;
     virtual const Trk::TrackParameters* makePerigeeParameters(const xAOD::TruthParticle* part) const = 0;
 
   };
diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthTrajectoryBuilder.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthTrajectoryBuilder.h
index 61e708ffe730..b67b81d0c43d 100644
--- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthTrajectoryBuilder.h
+++ b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/ITruthTrajectoryBuilder.h
@@ -29,13 +29,13 @@ namespace Trk {
     /** Build a TruthTrajectory this particle belongs to.  
      *  The result may be an empty TruthTrajectory (in case input did not pass the cuts).
      */
-    virtual void buildTruthTrajectory(TruthTrajectory *result, const HepMC::GenParticle *input) const = 0;
+    virtual void buildTruthTrajectory(TruthTrajectory *result, HepMC::ConstGenParticlePtr input) const = 0;
 
     /** Previous particle on the truth trajectory or 0 */
-    virtual const HepMC::GenParticle *getMother(const HepMC::GenParticle *part) const = 0;
+    virtual HepMC::ConstGenParticlePtr getMother(HepMC::ConstGenParticlePtr part) const = 0;
 
     /** Next particle on the truth trajectory or 0 */
-    virtual const HepMC::GenParticle *getDaughter(const HepMC::GenParticle *part) const = 0;
+    virtual HepMC::ConstGenParticlePtr getDaughter(HepMC::ConstGenParticlePtr part) const = 0;
   };
   
 } // namespace Trk
diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
index 9e25de02879f..6752fe0d1b6a 100644
--- a/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
@@ -71,34 +71,32 @@ buildTruthTrajectory(TruthTrajectory *result, HepMC::ConstGenParticlePtr input)
 DecayInFlyTruthTrajectoryBuilder::MotherDaughter
 DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(HepMC::ConstGenVertexPtr vtx) const
 {
-  HepMC::GenParticlePtr mother{nullptr};
-  HepMC::GenParticlePtr daughter{nullptr};
-  // only truth vertices with 1 incoming particle
+  HepMC::ConstGenParticlePtr mother{nullptr};
+  HepMC::ConstGenParticlePtr daughter{nullptr};
+     // only truth vertices with 1 incoming particle     
+      // Restrict to quasi-elastic processes (e.g. brems, delta-rays, pi->pi+Delta).
+      // 
+      // Require not more than 2 outgoing particles. Note that
+      // delta-rays for primary==electron is a special case, because we have two
+      // outgoing particles with the same PDG id.  The "correct" one
+      // is that with the higher energy (NOT pt).
+      // 
+      // allow 1 outgoing to cover possible vertexes from interaction in detector material
 #ifdef HEPMC3
-  if(vtx && (vtx->particles_in().size() == 1)) {
+  if(vtx && (vtx->particles_in().size() == 1) && (vtx->particles_out().size() <= 2)  ) {
 
     mother = vtx->particles_in().front();
 #else 
-  if(vtx && (vtx->particles_in_size() == 1)) {
+  if(vtx && (vtx->particles_in_size() == 1) && (vtx->particles_out_size() <= 2) ) {
 
     mother = *vtx->particles_in_const_begin();
 #endif    
     // Allow status code 1 and 2.  E.g. a pion that produced a long track can decay  outside of InDet and have status==2.
     if( mother && (mother->status() < 3) ) {
-    
-      // Restrict to quasi-elastic processes (e.g. brems, delta-rays, pi->pi+Delta).
-      // 
-      // Require not more than 2 outgoing particles. Note that
-      // delta-rays for primary==electron is a special case, because we have two
-      // outgoing particles with the same PDG id.  The "correct" one
-      // is that with the higher energy (NOT pt).
-      // 
-      // allow 1 outgoing to cover possible vertexes from interaction in detector material
-      if (vtx->particles_out_size() <= 2) {
 
 	int num_passed_cuts = 0;
-	HepMC::GenParticlePtr passed_cuts{nullptr};
-	for(HepMC::GenParticlePtr candidate: *vtx){
+	HepMC::ConstGenParticlePtr passed_cuts{nullptr};
+	for(HepMC::ConstGenParticlePtr candidate: *vtx){
 	  if(candidate->pdg_id() == mother->pdg_id()) {
 
 	    if(passed_cuts && (mother->pdg_id() == 11)) { // second negative electron is a special case
@@ -121,8 +119,6 @@ DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(HepMC::ConstGenVertexPtr v
 	if(num_passed_cuts==1) { // disallow hadronic pi->N*pi etc.
 	  daughter = passed_cuts;
 	}
-
-      } // if (vtx->particles_out_size() <= 2)
     } // if( mother && (mother->status() == 1) )
   }
   
diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx
index e560005102d3..04e2724ff88c 100755
--- a/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx
+++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/DetailedTrackTruthBuilder.cxx
@@ -165,7 +165,7 @@ buildDetailedTrackTruth(DetailedTrackTruthCollection *output,
       const TruthTrajectory& t = i->second.trajectory();
       msg(MSG::VERBOSE)<<"Particles on the trajectory:\n";
       for(unsigned k=0; k<t.size(); ++k) {
-	msg(MSG::VERBOSE)<<*t[k]<<"\n";
+	msg(MSG::VERBOSE)<<t[k]<<"\n";
       }
       msg(MSG::VERBOSE)<<"\n"<<endmsg;
     }
@@ -353,12 +353,12 @@ void DetailedTrackTruthBuilder::addTrack(DetailedTrackTruthCollection *output,
   while(!seeds.empty()) {
     HepMcParticleLink link = *seeds.begin();
     Sprout current_sprout;
-    std::queue<const HepMC::GenParticle*> tmp;
+    std::queue<HepMC::ConstGenParticlePtr> tmp;
     ExtendedEventIndex eventIndex(link, proxy);
     const HepMC::GenParticle *current = link.cptr();
 
     do {
-      HepMcParticleLink curlink( eventIndex.makeLink(current->barcode(), proxy));
+      HepMcParticleLink curlink( eventIndex.makeLink(HepMC::barcode(current), proxy));
 
       // remove the current particle from the list of particles to consider (if it is still there)
       seeds.erase(curlink);
@@ -410,7 +410,7 @@ void DetailedTrackTruthBuilder::addTrack(DetailedTrackTruthCollection *output,
     // This may add only hits that are *not* on the current track.
     // Thus no need to update stats track and stats common.
 
-    const HepMC::GenParticle* current = *s->second.begin();
+    auto current = *s->second.begin();
     while( (current = m_truthTrajBuilder->getDaughter(current)) ) {
       s->second.push_front(current);
     }
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/IPRD_TruthTrajectoryBuilder.h b/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/IPRD_TruthTrajectoryBuilder.h
index 309d14623515..58365fe22133 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/IPRD_TruthTrajectoryBuilder.h
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/IPRD_TruthTrajectoryBuilder.h
@@ -38,7 +38,7 @@ namespace Trk {
        static const InterfaceID& interfaceID() { return IID_IPRD_TruthTrajectoryBuilder; }
 
        /** return a vector of PrepRawData trajectories - uses internal cache**/
-       virtual const std::map< const HepMC::GenParticle*, PRD_TruthTrajectory >& truthTrajectories() const = 0;
+       virtual const std::map< HepMC::ConstGenParticlePtr, PRD_TruthTrajectory >& truthTrajectories() const = 0;
        
        /** Event refresh - can't be an IIncident, because it has to run after PRD creation and PRD truth creation */
        virtual StatusCode refreshEvent() = 0;       
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/PRD_TruthTrajectory.h b/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/PRD_TruthTrajectory.h
index 21ff251f2e43..2d3a9df02060 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/PRD_TruthTrajectory.h
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackInterfaces/TrkTruthTrackInterfaces/PRD_TruthTrajectory.h
@@ -28,7 +28,7 @@ namespace Trk {
       
      /**  public members */ 
      std::vector<const Trk::PrepRawData* > prds;
-     const HepMC::GenParticle*             genParticle;
+     HepMC::ConstGenParticlePtr             genParticle;
      size_t                                nDoF;
 
      /** defualt constructor */
@@ -39,7 +39,7 @@ namespace Trk {
      
      /** fast constructor */
      PRD_TruthTrajectory( const std::vector<const Trk::PrepRawData* >& prdVec,
-                          const HepMC::GenParticle* gP    = 0,
+                          HepMC::ConstGenParticlePtr gP    = nullptr,
                           size_t numberOfDegreesOfFreedom = 0) :
       prds(prdVec),
       genParticle(gP),
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
index 7b60f9c4c5d8..628c472caefa 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
@@ -97,7 +97,7 @@ StatusCode Trk::PRD_TruthTrajectoryBuilder::refreshEvent()  {
    
 }
 
-const std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >& Trk::PRD_TruthTrajectoryBuilder::truthTrajectories() const {
+const std::map<HepMC::ConstGenParticlePtr, Trk::PRD_TruthTrajectory >& Trk::PRD_TruthTrajectoryBuilder::truthTrajectories() const {
     // ndof
     size_t ndofTotal = 0;
     size_t ndof      = 0;
@@ -111,7 +111,7 @@ const std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >& Trk::PRD_
         PRD_MultiTruthCollection::const_iterator prdMtCIterE = (*pmtCollIter)->end();
         for ( ; prdMtCIter != prdMtCIterE; ++ prdMtCIter ){
             // check if entry exists and if   
-            const HepMC::GenParticle* curGenP       = (*prdMtCIter).second;
+            auto curGenP       = (*prdMtCIter).second;
             Identifier                curIdentifier = (*prdMtCIter).first;
             // apply the min pT cut 
             if ( curGenP->momentum().perp() < m_minPt ) continue;
@@ -123,7 +123,7 @@ const std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >& Trk::PRD_
             // stuff it into the trajectory if you found a PRD
             if (prd){
                 // try to find the entry for this GenParticle 
-                std::map< const HepMC::GenParticle*, PRD_TruthTrajectory >::iterator prdTrajIter = m_gpPrdTruthTrajectories.find(curGenP);
+                auto prdTrajIter = m_gpPrdTruthTrajectories.find(curGenP);
                 if ( prdTrajIter ==  m_gpPrdTruthTrajectories.end() ){
                     // first PRD associated to this: create PRD_TruthTrajectory object
                     Trk::PRD_TruthTrajectory newPrdTruthTrajectory;
@@ -147,8 +147,8 @@ const std::map< const HepMC::GenParticle*, Trk::PRD_TruthTrajectory >& Trk::PRD_
     }
     // PART 2 --------------------------------------------------------------------------------------------------------
     // loop through the provided list of manipulators ( sorter is included )
-    std::map< const HepMC::GenParticle*, PRD_TruthTrajectory >::iterator prdTruthTrajIter  = m_gpPrdTruthTrajectories.begin();
-    std::map< const HepMC::GenParticle*, PRD_TruthTrajectory >::iterator prdTruthTrajIterE = m_gpPrdTruthTrajectories.end();
+    auto prdTruthTrajIter  = m_gpPrdTruthTrajectories.begin();
+    auto prdTruthTrajIterE = m_gpPrdTruthTrajectories.end();
     for ( ; prdTruthTrajIter != prdTruthTrajIterE; ++prdTruthTrajIter ){
     //std::cout << "sorting, barcode: " << prdTruthTrajIter->first->barcode() << std::endl;
         if ( m_prdTruthTrajectoryManipulators.size() ){
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h
index 3199d6c9ed38..6112ea9f8370 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h
@@ -53,7 +53,7 @@ namespace Trk {
        StatusCode  finalize();
 
        /** return a vector of PrepRawData trajectories - uses internal cache**/
-       const std::map< const HepMC::GenParticle*, PRD_TruthTrajectory >& truthTrajectories() const;
+       const std::map< HepMC::ConstGenParticlePtr, PRD_TruthTrajectory >& truthTrajectories() const;
 
        /** Event refresh - can't be an IIncident, because it has to run after PRD creation and PRD truth creation */
        StatusCode refreshEvent();
@@ -71,7 +71,7 @@ namespace Trk {
         
 	Gaudi::Property<double>                             m_minPt {this,"MinimumPt",400.,"minimum pT to be even considered"};
 	Gaudi::Property<bool>                               m_geantinos {this,"Geantinos",false,"Track geantinos or not"};
-        mutable std::map< const HepMC::GenParticle*, PRD_TruthTrajectory > m_gpPrdTruthTrajectories; //!< the cache for the return (cleared by Incident)
+        mutable std::map< HepMC::ConstGenParticlePtr, PRD_TruthTrajectory > m_gpPrdTruthTrajectories; //!< the cache for the return (cleared by Incident)
         
   };
 
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx
index 1940d483abe3..bda9841b728f 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx
@@ -130,7 +130,7 @@ Trk::Track* Trk::TruthTrackBuilder::createTrack(const PRD_TruthTrajectory& prdTr
     ATH_MSG_VERBOSE("The PRD Truth trajectory contains " << prdTraj.prds.size() << " PRDs.");
 
     // get the associated GenParticle
-    const HepMC::GenParticle* genPart = prdTraj.genParticle;
+    auto genPart = prdTraj.genParticle;
     if (!genPart) {
         ATH_MSG_WARNING("No GenParticle associated to this PRD_TruthTrajectory. Ignoring track creation.");
         return 0;
diff --git a/Tracking/TrkValidation/TrkValAlgs/TrkValAlgs/TrackValidationNtupleWriter.h b/Tracking/TrkValidation/TrkValAlgs/TrkValAlgs/TrackValidationNtupleWriter.h
index b5fe26995e4d..98e06ad91b6e 100644
--- a/Tracking/TrkValidation/TrkValAlgs/TrkValAlgs/TrackValidationNtupleWriter.h
+++ b/Tracking/TrkValidation/TrkValAlgs/TrkValAlgs/TrackValidationNtupleWriter.h
@@ -96,7 +96,7 @@ protected:
   bool                      m_doTruth;                     //!< Switch to turn on / off truth
   bool                      m_doTrackParticle;             //!  Switch to turn on/pff recording track particle trees into Ntuple 
 
-  const HepMC::GenParticle* m_visibleParticleWithoutTruth; //!< cludge to treat G4's "fake fakes"
+  HepMC::GenParticlePtr m_visibleParticleWithoutTruth; //!< cludge to treat G4's "fake fakes"
   std::vector<unsigned int>           m_nTrackTreeRecords;
   std::vector<TTree*>       m_trees;                 //!< Pointer to the NTuple trees (one for each input track collection)
   TTree*                    m_eventLinkTree;         //!< pointer to event-wise ntuple trees (one for all input track collections + truth)
diff --git a/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx b/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx
index 6b6d9248f5e5..9e37c70845e0 100644
--- a/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx
+++ b/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx
@@ -135,7 +135,7 @@ StatusCode Trk::RecMomentumQualityValidation::execute()
 
       // find matching truth particle
       const TrackTruth* trackTruth = 0;
-      const HepMC::GenParticle* genParticle = 0;
+      HepMC::ConstGenParticlePtr genParticle{nullptr};
       TrackTruthCollection::const_iterator truthIterator 
         = trackTruthCollection->find( trackIterator - (*trackCollection).begin() );
       if ( truthIterator == trackTruthCollection->end() ){
diff --git a/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx b/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx
index d24e09758980..7ebe04335e8e 100644
--- a/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx
+++ b/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx
@@ -219,7 +219,7 @@ StatusCode Trk::TrackValidationNtupleWriter::initialize() {
         sc = m_truthNtupleTool->initBranches(m_trackTruthClassifiers, include_jets, m_inputTrackCollection);
         if (sc.isFailure()) return sc;
 
-        m_visibleParticleWithoutTruth = new HepMC::GenParticle(HepLorentzVector(), 0);
+        m_visibleParticleWithoutTruth = HepMC::newGenParticlePtr(HepMC::FourVector(), 0);
 
     } // if truth is activated
 
@@ -332,7 +332,7 @@ StatusCode Trk::TrackValidationNtupleWriter::execute() {
 
     unsigned int nTruthTreeRecordsAtCurrentEvent = 0;
     std::vector<Trk::ValidationTrackTruthData>  truthData;
-    std::vector<const HepMC::GenParticle*>*  selecParticles = 0;
+    std::vector<HepMC::ConstGenParticlePtr>*  selecParticles = nullptr;
     //std::vector<const Trk::TrackParameters*> extrapolatedTruthPerigees;
     //std::vector<std::vector<unsigned int> >  classifications;
     std::vector< Trk::GenParticleJet >*      genParticleJets = 0;
@@ -377,7 +377,7 @@ StatusCode Trk::TrackValidationNtupleWriter::execute() {
                 if ( genParticle->production_vertex() )
                   {
                     generatedTrackPerigee = m_truthToTrack->makePerigeeParameters( genParticle );
-                    if (generatedTrackPerigee == NULL && genParticle->barcode() > 1000000 ) {
+                    if (generatedTrackPerigee == NULL && HepMC::barcode(genParticle) > 1000000 ) {
                       ATH_MSG_DEBUG ("No perigee available for interacting truth particle."
                                      <<" -> This is OK for particles from the TrackRecord, but probably"
                                      <<" a bug for production vertex particles.");
@@ -389,7 +389,7 @@ StatusCode Trk::TrackValidationNtupleWriter::execute() {
                 partData.classifications.reserve(m_trackTruthClassifiers.size());
                 for (unsigned int toolIndex = 0 ; toolIndex < m_trackTruthClassifiers.size(); ++toolIndex ) 
                   {
-                    partData.classifications.push_back(m_trackTruthClassifiers[toolIndex]->classify(*genParticle));
+                    partData.classifications.push_back(m_trackTruthClassifiers[toolIndex]->classify(genParticle));
                   }
                 // resize the truth to track vectors to the number of input track collections:
                 partData.truthToTrackIndices.resize(m_inputTrackCollection.size());
@@ -594,7 +594,7 @@ StatusCode Trk::TrackValidationNtupleWriter::writeTrackData(unsigned int trackCo
             if (m_doTruth){
                 // find matching truth particle
                 const TrackTruth* trackTruth = 0;
-                const HepMC::GenParticle* genParticle = 0;
+                HepMC::ConstGenParticlePtr genParticle{nullptr};
                 TrackTruthCollection::const_iterator truthIterator = trackTruthCollection->find( trackIterator - (*tracks).begin() );
                 if ( truthIterator == trackTruthCollection->end() ){
                   ATH_MSG_DEBUG ("No matching truth particle found for track");
diff --git a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleJetFinder.h b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleJetFinder.h
index fde30d484a15..b16a3ab46f3c 100644
--- a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleJetFinder.h
+++ b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleJetFinder.h
@@ -47,7 +47,7 @@ class IGenParticleJetFinder : virtual public IAlgTool {
         This method is a factory, i.e. vector ownership is given back and
         on failure condition returns NULL. */
     virtual std::vector< Trk::GenParticleJet >*  jetMCFinder
-      (std::vector <const HepMC::GenParticle *>& ) const=0;
+      (std::vector <HepMC::ConstGenParticlePtr>& ) const=0;
 
   };
 
diff --git a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleSelector.h b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleSelector.h
index 0e58912b073f..ac8d6b138ee4 100644
--- a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleSelector.h
+++ b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/IGenParticleSelector.h
@@ -33,7 +33,7 @@ class IGenParticleSelector : virtual public IAlgTool {
     static const InterfaceID& interfaceID();
     
     /** explain */
-    virtual std::vector<const HepMC::GenParticle *>*
+    virtual std::vector<HepMC::ConstGenParticlePtr>*
       selectGenSignal (const McEventCollection*) const=0;
   };
 
diff --git a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITrackTruthClassifier.h b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITrackTruthClassifier.h
index 56af45805d49..c557707b4470 100644
--- a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITrackTruthClassifier.h
+++ b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITrackTruthClassifier.h
@@ -33,9 +33,9 @@ class ITrackTruthClassifier : virtual public IAlgTool {
     
     /** explain */
     virtual void initClassification(const McEventCollection&,
-                                    const std::vector<const HepMC::GenParticle *>*) const=0;
+                                    const std::vector<HepMC::ConstGenParticlePtr>*) const=0;
 
-    virtual unsigned int classify(const HepMC::GenParticle&) const = 0;
+    virtual unsigned int classify(HepMC::ConstGenParticlePtr) const = 0;
 
     virtual std::string nameOfClassifier() const = 0;
 
diff --git a/Tracking/TrkValidation/TrkValTools/TrkValTools/PrimaryTruthClassifier.h b/Tracking/TrkValidation/TrkValTools/TrkValTools/PrimaryTruthClassifier.h
index 496e2a09b8d7..c3eaf26f51fe 100644
--- a/Tracking/TrkValidation/TrkValTools/TrkValTools/PrimaryTruthClassifier.h
+++ b/Tracking/TrkValidation/TrkValTools/TrkValTools/PrimaryTruthClassifier.h
@@ -18,6 +18,7 @@
 #include "TrkValEvent/TruthClassificationDefs.h"
 
 #include "AtlasHepMC/GenParticle.h"
+#include "AtlasHepMC/SimpleVector.h"
 
 namespace Trk {
 
@@ -40,9 +41,9 @@ namespace Trk {
 
       /** explain */
       virtual void initClassification(const McEventCollection&,
-                                      const std::vector<const HepMC::GenParticle *>*) const;
+                                      const std::vector<HepMC::ConstGenParticlePtr>*) const;
 
-      virtual unsigned int classify(const HepMC::GenParticle&) const;
+      virtual unsigned int classify(HepMC::ConstGenParticlePtr) const;
 
       virtual std::string nameOfClassifier() const;
 
diff --git a/Tracking/TrkValidation/TrkValTools/src/PrimaryTruthClassifier.cxx b/Tracking/TrkValidation/TrkValTools/src/PrimaryTruthClassifier.cxx
index bd344c64e570..01c8f65d5657 100644
--- a/Tracking/TrkValidation/TrkValTools/src/PrimaryTruthClassifier.cxx
+++ b/Tracking/TrkValidation/TrkValTools/src/PrimaryTruthClassifier.cxx
@@ -53,7 +53,7 @@ StatusCode Trk::PrimaryTruthClassifier::finalize() {
 
 void Trk::PrimaryTruthClassifier::initClassification
 (const McEventCollection& /*SimTracks*/,
- const std::vector<const HepMC::GenParticle *>* /*genSignal*/) const {
+ const std::vector<HepMC::ConstGenParticlePtr>* /*genSignal*/) const {
 
   // nothing to prepare as local data at start of collection analysis
   return;
@@ -62,7 +62,7 @@ void Trk::PrimaryTruthClassifier::initClassification
 //////////////////////////////////////////
 // classification from InDetRecStatistics
 //////////////////////////////////////////
-unsigned int Trk::PrimaryTruthClassifier::classify(const HepMC::GenParticle& genParticle) const {
+unsigned int Trk::PrimaryTruthClassifier::classify(HepMC::ConstGenParticlePtr genParticle) const {
 
  
   /* note on using HepMC::FourVector/3Vector against HepGeom::Point3D<double>: The versions from HepMC2 do not know
@@ -74,17 +74,17 @@ unsigned int Trk::PrimaryTruthClassifier::classify(const HepMC::GenParticle& gen
   bool  secondary=false;
   bool  truncated=false;
 
-  if (genParticle.production_vertex()) {
-    HepMC::FourVector      startVertex = genParticle.production_vertex()->position();
+  if (genParticle->production_vertex()) {
+    HepMC::FourVector      startVertex = genParticle->production_vertex()->position();
 
     // primary vertex inside innermost layer?
     if ( fabs(startVertex.perp()) < m_maxRStartPrimary 
          && fabs(startVertex.z()) < m_maxZStartPrimary)
       {
-        if (genParticle.end_vertex() == 0) {  
+        if (genParticle->end_vertex() == 0) {  
           primary=true;
         } else {
-          HepMC::FourVector endVertex = genParticle.end_vertex()->position();
+          HepMC::FourVector endVertex = genParticle->end_vertex()->position();
           if (  endVertex.perp()         > m_minREndPrimary 
                 || fabs(startVertex.z()) > m_minZEndPrimary)
             primary=true; else truncated = true;
@@ -93,10 +93,10 @@ unsigned int Trk::PrimaryTruthClassifier::classify(const HepMC::GenParticle& gen
     else if ( startVertex.perp()    <  m_maxRStartSecondary && 
               fabs(startVertex.z()) <  m_maxZStartSecondary)
       {
-        if (genParticle.end_vertex() == 0) {  
+        if (genParticle->end_vertex() == 0) {  
           secondary=true;
         } else {
-          HepMC::FourVector endVertex = genParticle.end_vertex()->position();
+          HepMC::FourVector endVertex = genParticle->end_vertex()->position();
           if (endVertex.perp()            > m_minREndSecondary
               || fabs(endVertex.z())      > m_minZEndSecondary) {
             secondary=true;
@@ -108,8 +108,7 @@ unsigned int Trk::PrimaryTruthClassifier::classify(const HepMC::GenParticle& gen
   if (truncated) return Trk::TruthClassification::Truncated;
   if (secondary) return Trk::TruthClassification::Secondary;
   if (primary) return Trk::TruthClassification::Primary;
-  ATH_MSG_DEBUG ( "Could not classify this particle: " 
-        << genParticle );
+  ATH_MSG_DEBUG ( "Could not classify this particle: " << genParticle );
   return Trk::TruthClassification::OutsideClassification;
 
 }
diff --git a/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx b/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx
index b0effec98c42..9a9d2eb64510 100755
--- a/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx
+++ b/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx
@@ -79,36 +79,47 @@ namespace Trk {
 //getting the signal event itself
                 McEventCollection::const_iterator it = mcCollection->begin();
                 const HepMC::GenEvent* genEvent= ( *it );
+#ifdef HEPMC3
+                if( genEvent->vertices().empty() ) {
+                  ATH_MSG_DEBUG( "No vertices found in first GenEvent" );
+                  return 0;
+                }
+               auto pv = genEvent->vertices()[0];
+#else
 //        std::cout<<"The ID of the first event of the collection: "<<genEvent->event_number()<<std::endl;
                 if( genEvent->vertices_empty() ) {
                   ATH_MSG_DEBUG( "No vertices found in first GenEvent" );
                   return 0;
                 }
+               auto pv = *(genEvent->vertices_begin());
+#endif
 
 //analysing the MC event to create PV candidate
 //first finding the vertex of primary pp interaction
-                HepMC::GenEvent::vertex_const_iterator pv = genEvent->vertices_begin();
 
 //and storing its position
-                CLHEP::HepLorentzVector pv_pos ( ( *pv )->position().x(),
-                                          ( *pv )->position().y(),
-                                          ( *pv )->position().z(),
-                                          ( *pv )->position().t() );
+                CLHEP::HepLorentzVector pv_pos ( pv ->position().x(),
+                                          pv ->position().y(),
+                                          pv ->position().z(),
+                                          pv ->position().t() );
                 double pv_r = pv_pos.perp();
                 double pv_z = pv_pos.z();
 
 // storing all the ids of vertices reasonably close to the primary one.
 // here the region of interest is selected.
-                std::map<int,HepMC::GenVertex *> vertex_ids;
-
-                for ( HepMC::GenEvent::vertex_const_iterator i = genEvent->vertices_begin();
-                      i != genEvent->vertices_end()  ;++i ) {
-                    CLHEP::HepLorentzVector lv_pos ( ( *i )->position().x(),
-                                              ( *i )->position().y(),
-                                              ( *i )->position().z(),
-                                              ( *i )->position().t() );
-                    if ( fabs ( lv_pos.perp() - pv_r ) <m_r_tol  && fabs ( lv_pos.z() - pv_z ) <m_z_tol ) {
-                        vertex_ids[ ( *i )->barcode() ]= ( *i );
+                std::map<int,HepMC::ConstGenVertexPtr> vertex_ids;
+#ifdef HEPMC3
+                for (auto vtx: genEvent->vertices()){
+#else
+                for ( HepMC::GenEvent::vertex_const_iterator i = genEvent->vertices_begin(); i != genEvent->vertices_end()  ;++i ) {
+                    auto vtx=*i;
+#endif
+                    CLHEP::HepLorentzVector lv_pos ( vtx->position().x(),
+                                              vtx->position().y(),
+                                              vtx->position().z(),
+                                              vtx->position().t() );
+                    if ( std::abs ( lv_pos.perp() - pv_r ) <m_r_tol  && std::abs ( lv_pos.z() - pv_z ) <m_z_tol ) {
+                        vertex_ids[ HepMC::barcode(vtx) ]= vtx;
                     }//end of accepted vertices check
                 }//end  of loop over all the vertices
 
@@ -128,7 +139,6 @@ namespace Trk {
 //looping over the tracks to find those matched to the GenParticle originating from signal PV
                 std::vector<Trk::VxTrackAtVertex *>::const_iterator vt = tracks->begin();
                 std::vector<Trk::VxTrackAtVertex *>::const_iterator ve = tracks->end();
-//         unsigned int total_size = 0;
                 unsigned int n_failed = 0;
                 std::vector<double> in_weights ( 0 );
                 std::vector<double> out_weights ( 0 );
@@ -147,7 +157,6 @@ namespace Trk {
                             // get to the original track particle
                             LinkToTrackParticleBase * tr_part = dynamic_cast< LinkToTrackParticleBase * > ( origLink );
                             if ( tr_part !=0  && tr_part->isValid()) {
-//                 ++total_size;
                 
 
                                 std::map< Rec::TrackParticleTruthKey, TrackParticleTruth>::const_iterator ttItr = trackParticleTruthCollection->end();
@@ -166,22 +175,22 @@ namespace Trk {
 
                                 if (ttItr != trackParticleTruthCollection->end() ) {
                                     const HepMcParticleLink& particleLink = ttItr->second.particleLink();
-                                    const HepMC::GenParticle* genParticle = particleLink.cptr();
+                                    HepMC::ConstGenParticlePtr genParticle = particleLink.cptr();
 
-                                    if(genParticle !=0) {
-                                        HepMC::GenEvent * tpEvent = genParticle->parent_event();
+                                    if(genParticle) {
+                                        auto tpEvent = genParticle->parent_event();
                                         if(tpEvent==genEvent) { 
-                                            const HepMC::GenVertex * pVertex(0);
-                                            if (genParticle!=0) pVertex = genParticle->production_vertex();
-                                            if ( pVertex != 0 ) {
+                                            HepMC::ConstGenVertexPtr pVertex{nullptr};
+                                            if (genParticle) pVertex = genParticle->production_vertex();
+                                            if ( pVertex) {
                                                 int link_pid = genParticle->pdg_id();
                                                 bool primary_track = false;
                                                 bool secondary_track = false;
                   
 //loop over the particles until decision is really taken
                                                 do {
-                                                    int tvrt_code = pVertex->barcode();
-                                                    std::map<int, HepMC::GenVertex *>::const_iterator idf_res = vertex_ids.find ( tvrt_code );
+                                                    int tvrt_code = HepMC::barcode(pVertex);
+                                                    auto idf_res = vertex_ids.find ( tvrt_code );
 
 //for the HepMcParticle Link, the signal event has an index 0.
 // tagging on it
@@ -193,11 +202,19 @@ namespace Trk {
 //this vertex is not from the central region.
 //checking whether it is a bremsstrahlung
 //if so, propagating track to its origin, otherwise rejecting it completely.
+#ifdef HEPMC3
+                                                        if ( pVertex->particles_in().size() == 1 ) {
+#else
                                                         if ( pVertex->particles_in_size() == 1 ) {
+#endif
 // one mother particle: is it a brem of some kind?
-                                                            HepMC::GenVertex::particles_in_const_iterator inp = pVertex->particles_in_const_begin() ;
-                                                            HepMC::GenVertex * tmpVertex_loc = ( *inp )->production_vertex();
-                                                            if ( ( *inp )->pdg_id() == link_pid  && tmpVertex_loc) {
+#ifdef HEPMC3
+                                                            auto inp = pVertex->particles_in()[0] ;
+#else
+                                                            auto inp =*(pVertex->particles_in_const_begin()) ;
+#endif
+                                                            auto tmpVertex_loc = inp ->production_vertex();
+                                                            if ( inp ->pdg_id() == link_pid  && tmpVertex_loc) {
 // seems like a brem (this can be generator/simulation dependent unfortunately)
 // continue iterating
                                                                 pVertex = tmpVertex_loc;
-- 
GitLab


From fbf266bcc649f252937d7f69b9e792d585ad8273 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 22 Dec 2020 11:59:37 +0100
Subject: [PATCH 185/308] Better memory handling in PseudoJetContainer

---
 .../Jet/JetRec/JetRec/PseudoJetContainer.h    | 20 +++++-------
 .../Jet/JetRec/Root/JetByVertexFinder.cxx     |  4 +--
 .../Jet/JetRec/Root/PseudoJetContainer.cxx    | 31 +++++++------------
 .../src/MuonSegmentPseudoJetAlgorithm.cxx     |  2 +-
 .../Jet/JetRec/src/PseudoJetAlgorithm.cxx     |  2 +-
 .../test/PseudoJetContainerOfflineTest.cxx    | 12 +++----
 .../test/PseudoJetContainerTriggerTest.cxx    | 12 +++----
 Reconstruction/Jet/JetRec/test/testHelpers.h  | 12 +++----
 .../TrigHLTJetRec/src/TriggerJetBuildTool.cxx | 20 ++++++------
 .../src/TriggerPseudoJetGetter2.cxx           |  8 ++---
 10 files changed, 53 insertions(+), 70 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h b/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
index b4b47d1ef4fe..ff826d001bd6 100644
--- a/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
+++ b/Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
@@ -40,6 +40,7 @@
 #include <vector>
 #include <string>
 #include <set>
+#include <memory>
 
 typedef std::vector<fastjet::PseudoJet> PseudoJetVector;
 
@@ -51,12 +52,10 @@ public:
 
   // Constructor from a ConstituentExtractor and vector<PseudoJet>
   // PseudoJet OWNS their ConstituentExtractors
-  PseudoJetContainer(const IConstituentExtractor* c, 
+  PseudoJetContainer(std::unique_ptr<const IConstituentExtractor> c, 
                      const std::vector<PseudoJet> & vecPJ,
                      bool debug=false);
 
-  ~PseudoJetContainer();
-
   // fill xAOD jet with constit&ghosts extracted from final PSeudoJet
   bool extractConstituents(xAOD::Jet&, const std::vector<PseudoJet>&) const;
   bool extractConstituents(xAOD::Jet& jet, const PseudoJet &finalPJ) const;
@@ -103,8 +102,8 @@ private:
   struct ExtractorRange {
     ExtractorRange(unsigned int lo, 
                    unsigned int hi, 
-                   const IConstituentExtractor* e):
-      m_lo(lo), m_hi(hi), m_e(e){
+                   std::unique_ptr<const IConstituentExtractor> e):
+      m_lo(lo), m_hi(hi), m_e(std::move(e)){
     }
 
     ExtractorRange(const ExtractorRange& other)
@@ -125,19 +124,14 @@ private:
       swap(*this, other);
       return *this;
     }
-      
-           
-    ~ExtractorRange(){
-      delete m_e;
-    } 
     
     ExtractorRange bump(int step) const {
-      return ExtractorRange(m_lo + step, m_hi + step, m_e->clone());
+      return ExtractorRange(m_lo + step, m_hi + step, std::unique_ptr<const IConstituentExtractor>(m_e->clone()));
     }
 
     int m_lo;
     int m_hi;
-    const IConstituentExtractor* m_e;
+    std::unique_ptr<const IConstituentExtractor> m_e{};
   };
 
   std::vector<ExtractorRange> m_extractorRanges;
@@ -146,7 +140,7 @@ private:
   // created by the creating PseudoJetGetter. We need to keep track
   // of the empty extractors to fill zero information (such as 0 counts)
   // into the jets.
-  std::set<const IConstituentExtractor*> m_emptyExtractors;
+  std::set<std::unique_ptr<const IConstituentExtractor>> m_emptyExtractors;
 
   mutable bool m_debug{false};
 };
diff --git a/Reconstruction/Jet/JetRec/Root/JetByVertexFinder.cxx b/Reconstruction/Jet/JetRec/Root/JetByVertexFinder.cxx
index 37803539ab0e..0c4cabcd51bc 100644
--- a/Reconstruction/Jet/JetRec/Root/JetByVertexFinder.cxx
+++ b/Reconstruction/Jet/JetRec/Root/JetByVertexFinder.cxx
@@ -84,9 +84,7 @@ int JetByVertexFinder::find_(const PseudoJetContainer& cont,
   string sinp0 = xAOD::JetInput::typeName(inputtype);
   ATH_MSG_DEBUG("  Input type: " << sinp0);
 
-  // FIXME - bypass const of cont parameter
-  PseudoJetContainer content = cont;
-  const std::vector<PseudoJet>* vpj = content.casVectorPseudoJet();
+  const std::vector<PseudoJet>* vpj = cont.casVectorPseudoJet();
 
   std::vector<PseudoJetVector> psjvectors;
   std::vector<const Vertex*> vertices;
diff --git a/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx b/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
index 104ede8af881..7536c404f364 100644
--- a/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
+++ b/Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
@@ -20,15 +20,15 @@ using fastjet::PseudoJet;
 PseudoJetContainer::PseudoJetContainer() {
   checkInvariants("PseudoJetContainer()");
 }
-  
-PseudoJetContainer::PseudoJetContainer(const IConstituentExtractor* c,
+
+PseudoJetContainer::PseudoJetContainer(std::unique_ptr<const IConstituentExtractor> c,
                                        const std::vector<PseudoJet> & vecPJ,
                                        bool debug){
 
   m_debug = debug;
   
   if (vecPJ.empty()){
-    m_emptyExtractors.insert(c);
+    m_emptyExtractors.insert(std::move(c));
     return;
   }
 
@@ -37,21 +37,12 @@ PseudoJetContainer::PseudoJetContainer(const IConstituentExtractor* c,
 
   // the limits of the Extractor index range correposnd to the 
   // numbering of the EDM objects in th extractors.
-  m_extractorRanges.push_back(ExtractorRange(0, 
-                                             vecPJ.back().user_index(), 
-                                             c));
+  m_extractorRanges.emplace_back(0, 
+                                 vecPJ.back().user_index(), 
+                                 std::move(c));
   if (m_debug){checkInvariants("PseudoJetContainer(vcPJ, c)");}
 }
 
-
-PseudoJetContainer::~PseudoJetContainer()
-{
-  for (const IConstituentExtractor* e : m_emptyExtractors) {
-    delete e;
-  }
-}
-
-
 bool
 PseudoJetContainer::extractConstituents(xAOD::Jet& jet, 
                                         const std::vector<PseudoJet>& inConstits) const
@@ -69,12 +60,12 @@ PseudoJetContainer::extractConstituents(xAOD::Jet& jet,
   // to the extractor is received. But an empty list is used 
   // by the extractors to fill zeros into the jet.
   for(const auto& er : m_extractorRanges){
-    sorter.emplace(er.m_e, std::vector<int>{});
+    sorter.emplace(er.m_e.get(), std::vector<int>{});
   }
 
   // see header file for explanation of empty extractors.
   for(const auto& e : m_emptyExtractors){
-    sorter.emplace(e, std::vector<int>{});
+    sorter.emplace(e.get(), std::vector<int>{});
   }
 
   // check whether inputs are lgal if m_debug == true
@@ -100,7 +91,7 @@ PseudoJetContainer::extractConstituents(xAOD::Jet& jet,
 
     if(e == m_extractorRanges.end()){return false;}
    
-    sorter[(*e).m_e].push_back(pj_ind - (*e).m_lo);
+    sorter[(*e).m_e.get()].push_back(pj_ind - (*e).m_lo);
   }
 
   // send the jet to the each extractor with a vector of EDM
@@ -145,7 +136,7 @@ void PseudoJetContainer::append(const PseudoJetContainer* other) {
                    pj.set_user_index(pj.user_index() + offset);return pj;}
                  );
 
-  for(auto e : other->m_emptyExtractors){m_emptyExtractors.insert(e->clone());}
+  for(const auto &e : other->m_emptyExtractors){m_emptyExtractors.emplace(e->clone());}
 
   if (m_debug){checkInvariants("append()");}
 }
@@ -166,7 +157,7 @@ std::string PseudoJetContainer::toString(int level, int extLevel) const {
     oss << "\n Extractor dump: \n";
     for(const auto& er : m_extractorRanges){
       oss << "Extractor at [" ;
-      oss << er.m_e;
+      oss << er.m_e.get();
       oss << "]\n";
       oss << er.m_e->toString(extLevel) << '\n';
     }
diff --git a/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx b/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx
index 16eee29f7331..3fa800047b8c 100644
--- a/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx
+++ b/Reconstruction/Jet/JetRec/src/MuonSegmentPseudoJetAlgorithm.cxx
@@ -43,7 +43,7 @@ StatusCode MuonSegmentPseudoJetAlgorithm::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG("Created extractor: "  << extractor->toString(0));
 
   // Put the PseudoJetContainer together
-  auto pjcont = std::make_unique<PseudoJetContainer>(extractor.release(), vpj);
+  auto pjcont = std::make_unique<PseudoJetContainer>(std::move(extractor), vpj);
   
   auto outcoll = SG::makeHandle<PseudoJetContainer>(m_outcoll,ctx);
   ATH_MSG_DEBUG("New PseudoJetContainer size " << pjcont->size());
diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
index 25f09cf804f9..92ece334c49a 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
@@ -81,7 +81,7 @@ std::unique_ptr<PseudoJetContainer> PseudoJetAlgorithm::createPJContainer(const
   }
   
   // Put the PseudoJetContainer together
-  auto pjcont = std::make_unique<PseudoJetContainer>(extractor.release(), vpj);
+  auto pjcont = std::make_unique<PseudoJetContainer>(std::move(extractor), vpj);
   ATH_MSG_DEBUG("New PseudoJetContainer size " << pjcont->size());
 
   return pjcont;
diff --git a/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx b/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx
index 1015c929096c..fc5c97f6feb8 100644
--- a/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx
+++ b/Reconstruction/Jet/JetRec/test/PseudoJetContainerOfflineTest.cxx
@@ -77,8 +77,8 @@ protected:
   std::vector<PseudoJet> m_pjVec0;
   std::vector<PseudoJet> m_pjVec1;
 
-  IParticleExtractor* m_pExtractor_noghost;
-  IParticleExtractor* m_pExtractor_ghost;
+  std::unique_ptr<const IParticleExtractor> m_pExtractor_noghost{};
+  std::unique_ptr<const IParticleExtractor> m_pExtractor_ghost{};
 
   Jet* m_testjet0;
   Jet* m_testjet1;
@@ -103,7 +103,7 @@ TEST_F(PseudoJetContainerOfflineTest, test_noghost) {
 
 
   // create the PseudoContainer
-  PseudoJetContainer psc(m_pExtractor_noghost, m_pjVec0);
+  PseudoJetContainer psc(std::move(m_pExtractor_noghost), m_pjVec0);
 
   // check the pseudojet accessors
   // EXPECT_TRUE(psc.asVectorPseudoJet() == m_pjVec0);  
@@ -134,7 +134,7 @@ TEST_F(PseudoJetContainerOfflineTest, test_ghost) {
   // The jet containers have a JetAuxContainer, and are stored in the test store
 
   // create the PseudoContainer
-  PseudoJetContainer psc(m_pExtractor_ghost, m_pjVec0);
+  PseudoJetContainer psc(std::move(m_pExtractor_ghost), m_pjVec0);
 
   // check the pseudojet accessors
   // EXPECT_TRUE(psc.asVectorPseudoJet() == m_pjVec0);  
@@ -171,8 +171,8 @@ TEST_F(PseudoJetContainerOfflineTest, test_append) {
   bool debug{false};
   
   // create the PseudoContainers
-  PseudoJetContainer psc0(m_pExtractor_noghost, m_pjVec0);
-  PseudoJetContainer psc1(m_pExtractor_ghost, m_pjVec1);
+  PseudoJetContainer psc0(std::move(m_pExtractor_noghost), m_pjVec0);
+  PseudoJetContainer psc1(std::move(m_pExtractor_ghost), m_pjVec1);
 
   psc0.append(&psc1);
 
diff --git a/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx b/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx
index 17119ffe7482..df243563d2b0 100644
--- a/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx
+++ b/Reconstruction/Jet/JetRec/test/PseudoJetContainerTriggerTest.cxx
@@ -82,8 +82,8 @@ protected:
   std::vector<PseudoJet> m_pjVec0;
   std::vector<PseudoJet> m_pjVec1;
 
-  IParticleExtractor* m_pExtractor_noghost;
-  IParticleExtractor* m_pExtractor_ghost;
+  std::unique_ptr<const IParticleExtractor> m_pExtractor_noghost{};
+  std::unique_ptr<const IParticleExtractor> m_pExtractor_ghost{};
 
   Jet* m_testjet0;
   Jet* m_testjet1;
@@ -108,7 +108,7 @@ TEST_F(PseudoJetContainerTriggerTest, test_noghost) {
 
 
   // create the PseudoContainer
-  PseudoJetContainer psc(m_pExtractor_noghost, m_pjVec0);
+  PseudoJetContainer psc(std::move(m_pExtractor_noghost), m_pjVec0);
 
   // check the pseudojet accessors
   EXPECT_TRUE(*psc.casVectorPseudoJet() == m_pjVec0);
@@ -138,7 +138,7 @@ TEST_F(PseudoJetContainerTriggerTest, test_ghost) {
   // The jet containers have a JetAuxContainer, and are stored in the test store
 
   // create the PseudoContainer
-  PseudoJetContainer psc(m_pExtractor_ghost, m_pjVec0);
+  PseudoJetContainer psc(std::move(m_pExtractor_ghost), m_pjVec0);
 
   // check the pseudojet accessors
   EXPECT_TRUE(*psc.casVectorPseudoJet() == m_pjVec0);
@@ -174,8 +174,8 @@ TEST_F(PseudoJetContainerTriggerTest, test_append) {
   bool debug{true};
   
   // create the PseudoContainers
-  PseudoJetContainer psc0(m_pExtractor_noghost, m_pjVec0);
-  PseudoJetContainer psc1(m_pExtractor_ghost, m_pjVec1);
+  PseudoJetContainer psc0(std::move(m_pExtractor_noghost), m_pjVec0);
+  PseudoJetContainer psc1(std::move(m_pExtractor_ghost), m_pjVec1);
 
   psc0.append(&psc1);
 
diff --git a/Reconstruction/Jet/JetRec/test/testHelpers.h b/Reconstruction/Jet/JetRec/test/testHelpers.h
index 801642910012..ad264b0c51f4 100644
--- a/Reconstruction/Jet/JetRec/test/testHelpers.h
+++ b/Reconstruction/Jet/JetRec/test/testHelpers.h
@@ -19,6 +19,7 @@
 
 #include <iostream>
 #include <sstream>
+#include <memory>
 
 int JetContainerIndex (0);
 
@@ -80,15 +81,14 @@ struct IPtoPSConverter{
   }
 };
 
-IParticleExtractor* makeExtractor(const xAOD::IParticleContainer* iparticles,
+std::unique_ptr<const IParticleExtractor> makeExtractor(const xAOD::IParticleContainer* iparticles,
                                   bool isGhost, bool isTrigger=false){
   
   // Create an Extractor
   std::string label("EMTopo");
-  IParticleExtractor* extractor = new IParticleExtractor(iparticles,
-                                                         label,
-                                                         isGhost,
-                                                         isTrigger);
-  return extractor;
+  return std::make_unique<const IParticleExtractor>(iparticles,
+                                                    label,
+                                                    isGhost,
+                                                    isTrigger);
 }
 
diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx
index 14e591edb494..b17a79d563e9 100644
--- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx
@@ -144,10 +144,10 @@ void TriggerJetBuildTool::prime(const xAOD::IParticleContainer* inputs){
   ATH_MSG_DEBUG("Entering prime(), call " << ++m_nprime);
 
   constexpr bool isGhost = false;
-  IParticleExtractor* extractor = new IParticleExtractor(inputs,
-                                                         m_concreteTypeStr,
-                                                         isGhost,
-                                                         m_isTrigger);
+  auto extractor = std::make_unique<const IParticleExtractor>(inputs,
+                                                             m_concreteTypeStr,
+                                                             isGhost,
+                                                             m_isTrigger);
 
   
   ATH_MSG_DEBUG("No of IParticle inputs: " << inputs->size());
@@ -180,7 +180,7 @@ void TriggerJetBuildTool::prime(const xAOD::IParticleContainer* inputs){
                 
                 
 
-  PseudoJetContainer pjc(extractor, vpj);
+  PseudoJetContainer pjc(std::move(extractor), vpj);
   m_inContainer.append(&pjc);
 }
 
@@ -194,10 +194,10 @@ void TriggerJetBuildTool::primeGhost(const xAOD::IParticleContainer* inputs, std
   ATH_MSG_DEBUG("Entering primeGhost(), call " << ++m_nprime);
 
   constexpr bool isGhost = true;
-  IParticleExtractor* extractor = new IParticleExtractor(inputs,
-                                                         ghostlabel,
-                                                         isGhost,
-                                                         m_isTrigger);
+  auto extractor = std::make_unique<const IParticleExtractor>(inputs,
+                                                              ghostlabel,
+                                                              isGhost,
+                                                              m_isTrigger);
 
   
   ATH_MSG_DEBUG("No of ghost IParticle inputs: " << inputs->size());
@@ -231,7 +231,7 @@ void TriggerJetBuildTool::primeGhost(const xAOD::IParticleContainer* inputs, std
                 
                 
 
-  PseudoJetContainer pjc(extractor, vpj);
+  PseudoJetContainer pjc(std::move(extractor), vpj);
   m_inContainer.append(&pjc);
 }
 
diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerPseudoJetGetter2.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerPseudoJetGetter2.cxx
index 0e4f80cdc59b..f3b9126a4d96 100644
--- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerPseudoJetGetter2.cxx
+++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerPseudoJetGetter2.cxx
@@ -37,9 +37,9 @@ void TriggerPseudoJetGetter2::prime(const xAOD::CaloClusterContainer* inputs) {
   // to determine the function used to select the incomming IParticles.
 
   constexpr bool isGhost = false;
-  IConstituentExtractor* extractor = new IParticleExtractor(inputs,
-                                                            m_label,
-                                                            isGhost);
+  auto extractor = std::make_unique<const IParticleExtractor>(inputs,
+                                                              m_label,
+                                                              isGhost);
   
   constexpr bool noRejection = true;
   std::vector<fastjet::PseudoJet> vpj = 
@@ -48,7 +48,7 @@ void TriggerPseudoJetGetter2::prime(const xAOD::CaloClusterContainer* inputs) {
                                                 m_noNegE,
                                                 noRejection);
   
-  auto ppjc(std::make_unique<const PseudoJetContainer>(extractor, vpj));
+  auto ppjc(std::make_unique<const PseudoJetContainer>(std::move(extractor), vpj));
   m_pseudoJetContainer.swap(ppjc);
 }
 
-- 
GitLab


From 791174fdc87936cb69e89398e0de8a51c1261436 Mon Sep 17 00:00:00 2001
From: Zach Marshall <ZLMarshall@lbl.gov>
Date: Tue, 22 Dec 2020 15:02:14 +0100
Subject: [PATCH 186/308] Patch to ESDtoDPD configuration for IDTIDE

This patch brings in the same solution as used elsewhere for ATR-22504.

It fixes the crash currently blocking ATLPHYSVAL-654.
---
 .../PATJobTransforms/share/skeleton.ESDtoDPD_tf.py          | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/PhysicsAnalysis/PATJobTransforms/share/skeleton.ESDtoDPD_tf.py b/PhysicsAnalysis/PATJobTransforms/share/skeleton.ESDtoDPD_tf.py
index 995cee0bfd60..db29173e9193 100644
--- a/PhysicsAnalysis/PATJobTransforms/share/skeleton.ESDtoDPD_tf.py
+++ b/PhysicsAnalysis/PATJobTransforms/share/skeleton.ESDtoDPD_tf.py
@@ -38,19 +38,25 @@ rec.DPDMakerScripts.append(SetupOutputDPDs(runArgs,listOfFlags))
 
 rec.OutputFileNameForRecoStep="ESDtoDPD"
 
+# New-style config
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+
 ## Input
 if hasattr(runArgs,"inputFile"): athenaCommonFlags.FilesInput.set_Value_and_Lock( runArgs.inputFile )
 if hasattr(runArgs,"inputBSFile"):
     globalflags.InputFormat.set_Value_and_Lock('bytestream')
     athenaCommonFlags.BSRDOInput.set_Value_and_Lock( runArgs.inputBSFile )
+    ConfigFlags.Input.Files = athenaCommonFlags.BSRDOInput()
 if hasattr(runArgs,"inputRDOFile"):
     rec.readRDO.set_Value_and_Lock( True )
     globalflags.InputFormat.set_Value_and_Lock('pool')
     athenaCommonFlags.PoolRDOInput.set_Value_and_Lock( runArgs.inputRDOFile )
+    ConfigFlags.Input.Files = athenaCommonFlags.PoolRDOInput()
 if hasattr(runArgs,"inputESDFile"):
     globalflags.InputFormat.set_Value_and_Lock('pool')
     rec.readESD.set_Value_and_Lock( True )
     athenaCommonFlags.PoolESDInput.set_Value_and_Lock( runArgs.inputESDFile )
+    ConfigFlags.Input.Files = athenaCommonFlags.PoolESDInput()
 if hasattr(runArgs,"inputTAGFile"):
     rec.readTAG.set_Value_and_Lock( True )
     rec.readESD.set_Value_and_Lock( True )
-- 
GitLab


From dd2d3ba7244cbe355259a46ce8c12dc823228fe4 Mon Sep 17 00:00:00 2001
From: John Derek Chapman <chapman@hep.phy.cam.ac.uk>
Date: Tue, 22 Dec 2020 15:17:16 +0000
Subject: [PATCH 187/308] Overriding Run Numbers in Component Accumulator based
 configuration

---
 .../python/AllConfigFlags.py                  |  12 +-
 .../python/AutoConfigFlags.py                 |  17 +++
 .../python/RunToTimestampData.py              |   0
 .../python/EventIdOverrideConfig.py           | 131 ++++++++++++++++++
 .../AthenaPoolCnvSvc/python/PoolReadConfig.py |  52 ++++++-
 .../python/DigitizationConfigFlags.py         |   3 -
 .../python/DigitizationParametersConfig.py    |  18 +--
 .../Digitization/python/PileUpConfigNew.py    |   2 +-
 .../python/RunDependentConfigNew.py           |  84 +----------
 .../test/DigitizationPUConfigNew_test.py      |   2 +-
 .../G4AtlasApps/python/G4Atlas_MetadataNew.py |  16 +--
 .../G4AtlasApps/python/SimConfigFlags.py      |   8 --
 .../ISF_SimulationSelectorsConfigNew.py       | 110 +++++++--------
 .../SimuJobTransforms/python/ISF_Skeleton.py  |  60 +-------
 14 files changed, 271 insertions(+), 244 deletions(-)
 rename {Simulation/G4Atlas/G4AtlasApps => Control/AthenaConfiguration}/python/RunToTimestampData.py (100%)
 create mode 100644 Control/AthenaKernel/python/EventIdOverrideConfig.py

diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index 137186d0313e..83e2ed707f96 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -4,7 +4,7 @@ from __future__ import print_function
 
 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
 from AthenaCommon.SystemOfUnits import TeV
-from AthenaConfiguration.AutoConfigFlags import GetFileMD
+from AthenaConfiguration.AutoConfigFlags import GetFileMD, getInitialTimeStampsFromRunNumbers, getRunToTimestampDict
 from PyUtils.moduleExists import moduleExists
 
 
@@ -29,8 +29,14 @@ def _createCfgFlags():
     acf.addFlag('Input.Files', ["_ATHENA_GENERIC_INPUTFILE_NAME_",] ) # former global.InputFiles
     acf.addFlag('Input.SecondaryFiles', []) # secondary input files for DoubleEventSelector
     acf.addFlag('Input.isMC', lambda prevFlags : "IS_SIMULATION" in GetFileMD(prevFlags.Input.Files).get("eventTypes",[]) ) # former global.isMC
+    acf.addFlag('Input.OverrideRunNumber', False )
     acf.addFlag('Input.RunNumber', lambda prevFlags : list(GetFileMD(prevFlags.Input.Files).get("runNumbers",[]))) # former global.RunNumber
     acf.addFlag('Input.LumiBlockNumber', lambda prevFlags : list(GetFileMD(prevFlags.Input.Files).get("lumiBlockNumbers",[]))) # former global.RunNumber
+    acf.addFlag('Input.TimeStamp', lambda prevFlags : [] if not prevFlags.Input.OverrideRunNumber else getInitialTimeStampsFromRunNumbers(prevFlags.Input.RunNumber))
+    # Configure EvtIdModifierSvc with a list of dictionaries of the form:
+    # {'run': 152166, 'lb': 202, 'starttstamp': 1269948352889940910, 'dt': 104.496, 'evts': 1, 'mu': 0.005, 'force_new': False}
+    acf.addFlag("Input.RunAndLumiOverrideList", [])
+
     acf.addFlag('Input.ProjectName', lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("project_name","data17_13TeV") ) # former global.ProjectName
     acf.addFlag('Input.Format', lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("file_type","") ) # former global.InputFormat
 
@@ -137,6 +143,10 @@ def _createCfgFlags():
     acf.addFlag("IOVDb.GlobalTag",lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("IOVDbGlobalTag",None) or "CONDBR2-BLKPA-2017-05")
     from IOVDbSvc.IOVDbAutoCfgFlags import getDatabaseInstanceDefault
     acf.addFlag("IOVDb.DatabaseInstance",getDatabaseInstanceDefault)
+    # Run dependent simulation
+    # map from runNumber to timestamp; migrated from RunDMCFlags.py
+    acf.addFlag("IOVDb.RunToTimestampDict", lambda prevFlags: getRunToTimestampDict())
+
 
     def __bfield():
         from MagFieldConfig.BFieldConfigFlags import createBFieldConfigFlags
diff --git a/Control/AthenaConfiguration/python/AutoConfigFlags.py b/Control/AthenaConfiguration/python/AutoConfigFlags.py
index 5ac59444e947..12958a31c184 100644
--- a/Control/AthenaConfiguration/python/AutoConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AutoConfigFlags.py
@@ -55,3 +55,20 @@ def DetDescrInfo(geoTag):
     detDescrInfo = _initializeGeometryParameters(geoTag)
     detDescrInfo["geomTag"] = geoTag
     return detDescrInfo
+
+
+# Based on RunDMCFlags.py
+def getRunToTimestampDict():
+    # this wrapper is intended to avoid an initial import
+    from .RunToTimestampData import RunToTimestampDict
+    return RunToTimestampDict
+
+
+def getInitialTimeStampsFromRunNumbers(runNumbers):
+    """This is used to hold a dictionary of the form
+    {152166:1269948352889940910, ...} to allow the
+    timestamp to be determined from the run.
+    """
+    run2timestampDict =  getRunToTimestampDict()
+    timeStamps = [run2timestampDict.get(runNumber,1) for runNumber in runNumbers] # Add protection here?
+    return timeStamps
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/RunToTimestampData.py b/Control/AthenaConfiguration/python/RunToTimestampData.py
similarity index 100%
rename from Simulation/G4Atlas/G4AtlasApps/python/RunToTimestampData.py
rename to Control/AthenaConfiguration/python/RunToTimestampData.py
diff --git a/Control/AthenaKernel/python/EventIdOverrideConfig.py b/Control/AthenaKernel/python/EventIdOverrideConfig.py
new file mode 100644
index 000000000000..d49a61ab6280
--- /dev/null
+++ b/Control/AthenaKernel/python/EventIdOverrideConfig.py
@@ -0,0 +1,131 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+# based on https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/Control/AthenaServices/python/Configurables.py#0247
+def add_modifier(run_nbr=None, evt_nbr=None, time_stamp=None, lbk_nbr=None, nevts=1):
+
+    if run_nbr is None:
+        modify_run_nbr = 0
+        run_nbr = 0
+    else:
+        modify_run_nbr = 1
+
+    if evt_nbr is None:
+        modify_evt_nbr = 0
+        evt_nbr = 0
+    else:
+        modify_evt_nbr = 1
+
+    if time_stamp is None:
+        modify_time_stamp = 0
+        time_stamp = 0
+    else:
+        modify_time_stamp = 1
+
+    if lbk_nbr is None:
+        modify_lbk_nbr = 0
+        lbk_nbr = 0
+    else:
+        modify_lbk_nbr = 1
+
+    mod_bit = int(0b0000
+                  | (modify_run_nbr << 0)
+                  | (modify_evt_nbr << 1)
+                  | (modify_time_stamp << 2)
+                  | (modify_lbk_nbr << 3))
+
+    return [run_nbr, evt_nbr, time_stamp, lbk_nbr, nevts, mod_bit]
+
+
+def buildListOfModifiers(ConfigFlags):
+    # migrated from RunDMCFlags.py
+    Modifiers = []
+    pDicts = ConfigFlags.Input.RunAndLumiOverrideList
+    DataRunNumber = ConfigFlags.Digitization.DataRunNumber
+
+    if pDicts:
+        for el in pDicts:
+            evt_nbr = el.get("evt_nbr", None)
+            Modifiers += add_modifier(run_nbr=el["run"], evt_nbr=evt_nbr, time_stamp=el["starttstamp"], lbk_nbr=el["lb"], nevts=el["evts"])
+    elif DataRunNumber>0:
+        assert DataRunNumber >= 0, (
+            "ConfigFlags.Digitization.DataRunNumber %d is negative. "
+            "Use a real run number from data." % DataRunNumber)
+
+        # Using event numbers to avoid "some very large number" setting
+        totalNumber = 1000000
+        if ConfigFlags.Exec.MaxEvents > 0:
+            totalNumber = ConfigFlags.Exec.MaxEvents + 1
+        if ConfigFlags.Exec.SkipEvents > 0:
+            totalNumber += ConfigFlags.Exec.SkipEvents
+
+        InitialTimeStamp = ConfigFlags.IOVDb.RunToTimestampDict.get(DataRunNumber, 1) # TODO fix repeated configuration
+
+        FirstLB = 1
+        Modifiers += add_modifier(run_nbr=DataRunNumber, lbk_nbr=FirstLB, time_stamp=InitialTimeStamp, nevts=totalNumber)
+    elif ConfigFlags.Input.RunNumber:
+        # Behaviour for Simulation jobs. For standard Simulation we
+        # override the run number once per job. TODO Still need to deal with the specific case of DataOverlay
+        myRunNumber = ConfigFlags.Input.RunNumber[0]
+        assert myRunNumber >= 0, (
+            "ConfigFlags.Input.RunNumber[0] %d is negative. "
+            "Use a real run number from data." % myRunNumber)
+        myFirstLB = ConfigFlags.Input.LumiBlockNumber[0]
+        myInitialTimeStamp = ConfigFlags.Input.TimeStamp[0]
+
+        # Using event numbers to avoid "some very large number" setting
+        totalNumber = 1000000
+        if ConfigFlags.Exec.MaxEvents > 0:
+            totalNumber = ConfigFlags.Exec.MaxEvents + 1
+        if ConfigFlags.Exec.SkipEvents > 0:
+            totalNumber += ConfigFlags.Exec.SkipEvents
+        Modifiers += add_modifier(run_nbr=myRunNumber, lbk_nbr=myFirstLB, time_stamp=myInitialTimeStamp, nevts=totalNumber)
+    return Modifiers
+
+
+def getMinMaxRunNumbers(ConfigFlags):
+    """Get a pair (firstrun,lastrun + 1) for setting ranges in IOVMetaData """
+    mini = 1
+    maxi = 2147483647
+    pDicts = ConfigFlags.Input.RunAndLumiOverrideList
+    if pDicts:
+        # Behaviour for Digitization jobs using RunAndLumiOverrideList
+        allruns = [element['run'] for element in pDicts]
+        mini = min(allruns) + 0
+        maxi = max(allruns) + 1
+    elif ConfigFlags.Digitization.DataRunNumber>0:
+        # Behaviour for Digitization jobs using DataRunNumber
+        DataRunNumber = ConfigFlags.Digitization.DataRunNumber
+        assert DataRunNumber >= 0, (
+            "ConfigFlags.Digitization.DataRunNumber %d is negative. "
+            "Use a real run number from data." % DataRunNumber)
+        mini = DataRunNumber
+        maxi = DataRunNumber+1
+    elif ConfigFlags.Input.RunNumber:
+        # Behaviour for Simulation jobs
+        myRunNumber = ConfigFlags.Input.RunNumber[0]
+        assert myRunNumber >= 0, (
+            "ConfigFlags.Input.RunNumber[0] %d is negative. "
+            "Use a real run number from data." % myRunNumber)
+        mini = myRunNumber
+        maxi = 2147483647
+    return (mini,maxi)
+
+
+def EvtIdModifierSvcCfg(ConfigFlags, name="EvtIdModifierSvc", **kwargs):
+    acc = ComponentAccumulator()
+    if ConfigFlags.Digitization.Pileup or ConfigFlags.Sim.DoFullChain:
+        kwargs.setdefault("EvtStoreName", "OriginalEvent_SG")
+    else:
+        kwargs.setdefault("EvtStoreName", "StoreGateSvc")
+
+    Modifiers = buildListOfModifiers(ConfigFlags)
+    if len(Modifiers) > 0:
+        kwargs.setdefault("Modifiers", Modifiers)
+    acc.addService(CompFactory.EvtIdModifierSvc(name, **kwargs), create=True)
+    iovDbMetaDataTool = CompFactory.IOVDbMetaDataTool()
+    iovDbMetaDataTool.MinMaxRunNumbers = getMinMaxRunNumbers(ConfigFlags)
+    acc.addPublicTool(iovDbMetaDataTool)
+    return acc
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolReadConfig.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolReadConfig.py
index de15a350b0e8..8779b2921140 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolReadConfig.py
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolReadConfig.py
@@ -2,6 +2,50 @@
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
+from AthenaKernel.EventIdOverrideConfig import EvtIdModifierSvcCfg
+
+def EventSelectorAthenaPoolCfg(configFlags):
+    result=ComponentAccumulator()
+    EventSelectorAthenaPool=CompFactory.EventSelectorAthenaPool
+    evSel=EventSelectorAthenaPool("EventSelector",
+                                  InputCollections = configFlags.Input.Files,
+                                  SkipEvents=configFlags.Exec.SkipEvents)
+    if configFlags.Input.OverrideRunNumber:
+        if not configFlags.Input.RunAndLumiOverrideList:
+            DataRunNumber = -1
+            FirstLB = 1
+            InitialTimeStamp = 1
+            OldRunNumber = -1
+            if configFlags.Digitization.DataRunNumber>0:
+                # Behaviour for Digitization jobs using DataRunNumber
+                DataRunNumber = configFlags.Digitization.DataRunNumber
+                FirstLB = 1
+                InitialTimeStamp = configFlags.IOVDb.RunToTimestampDict.get(DataRunNumber, 1) # TODO fix repeated configuration
+                if not configFlags.Sim.DoFullChain:
+                    OldRunNumber = configFlags.Input.RunNumber[0] # CHECK this should be the Run Number from the HITS file
+            elif configFlags.Input.RunNumber:
+                # Behaviour for Simulation jobs
+                DataRunNumber = configFlags.Input.RunNumber[0]
+                FirstLB = configFlags.Input.LumiBlockNumber[0]
+                InitialTimeStamp = configFlags.Input.TimeStamp[0]
+            assert DataRunNumber >= 0, (
+                "configFlags.Input.OverrideRunNumber was True, but provided DataRunNumber (%d) is negative. "
+                "Use a real run number from data." % DataRunNumber)
+            evSel.OverrideRunNumber = configFlags.Input.OverrideRunNumber
+            evSel.RunNumber = DataRunNumber
+            evSel.FirstLB = FirstLB
+            evSel.InitialTimeStamp = InitialTimeStamp # Necessary to avoid a crash
+            if hasattr(evSel, "OverrideRunNumberFromInput"):
+                evSel.OverrideRunNumberFromInput = configFlags.Input.OverrideRunNumber
+            if OldRunNumber > 0:
+                evSel.OldRunNumber = OldRunNumber
+        else:
+            # Behaviour for Digitization jobs using RunAndLumiOverrideList
+            pass
+        result.merge(EvtIdModifierSvcCfg(configFlags))
+    result.addService(evSel)
+    return result
+
 
 def PoolReadCfg(configFlags):
     """
@@ -70,17 +114,15 @@ def PoolReadCfg(configFlags):
                                                    IsSecondary=True,
                                                    InputCollections=filenamesSecondary)
             result.addService(secondarySel)
+        result.addService(evSel)
     else:
         # We have only primary inputs
         apaps=AthenaPoolAddressProviderSvc()
         result.addService(apaps)
         result.addService(ProxyProviderSvc(ProviderNames=[apaps.getFullJobOptName(),])) #No service handle yet???
+        result.merge(EventSelectorAthenaPoolCfg(configFlags))
+        evSel = result.getService("EventSelector")
 
-        evSel=EventSelectorAthenaPool("EventSelector", 
-                                      InputCollections = filenames, 
-                                      SkipEvents=configFlags.Exec.SkipEvents)
-
-    result.addService(evSel)
     result.setAppProperty("EvtSel",evSel.getFullJobOptName())
 
     #(possibly) missing: MetaDataSvc
diff --git a/Simulation/Digitization/python/DigitizationConfigFlags.py b/Simulation/Digitization/python/DigitizationConfigFlags.py
index 9bd2e33ff737..b89326551cc6 100644
--- a/Simulation/Digitization/python/DigitizationConfigFlags.py
+++ b/Simulation/Digitization/python/DigitizationConfigFlags.py
@@ -140,9 +140,6 @@ def createDigitizationCfgFlags():
     flags.addFlag("Digitization.PU.NumberOfCavern", 0.0)
     # Repeating pattern to determine which events to simulate when using Stepping Cache
     flags.addFlag("Digitization.PU.SignalPatternForSteppingCache", [])
-    # Configure EvtIdModifierSvc with a list of dictionaries of the form:
-    # {'run': 152166, 'lb': 202, 'starttstamp': 1269948352889940910, 'dt': 104.496, 'evts': 1, 'mu': 0.005, 'force_new': False}
-    flags.addFlag("Digitization.PU.RunAndLumiOverrideList", [])
     
     return flags
 
diff --git a/Simulation/Digitization/python/DigitizationParametersConfig.py b/Simulation/Digitization/python/DigitizationParametersConfig.py
index 87f1fc7848f8..07779269ecc5 100644
--- a/Simulation/Digitization/python/DigitizationParametersConfig.py
+++ b/Simulation/Digitization/python/DigitizationParametersConfig.py
@@ -1,27 +1,13 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
+from AthenaKernel.EventIdOverrideConfig import getMinMaxRunNumbers
 from AthenaCommon.Logging import logging
 logDigitizationWriteMetadata = logging.getLogger( 'DigitizationParametersConfig' )
 
-myRunNumber = 0
-myEndRunNumber = 2147483647 # the max run number
-
-def getRunNumberRangeForOutputMetadata(ConfigFlags):
-    myRunNumber = ConfigFlags.Input.RunNumber[0]
-    myEndRunNumber = 2147483647 # the max run number
-
-    if myRunNumber > 0 :
-        logDigitizationWriteMetadata.info('Found Run Number %s in hits file metadata.', str(myRunNumber) )
-        myEndRunNumber = myRunNumber+1 # got a reasonable run number so set end run to be the next run after this one.
-    else :
-        logDigitizationWriteMetadata.info('Found unexpected Run Number %s in hits file metadata. Not overriding RunNumber to match hits file for this job.', str(myRunNumber) )
-        myRunNumber = 0
-    return myRunNumber, myEndRunNumber
-
 def writeDigitizationMetadata(ConfigFlags):
     from IOVDbMetaDataTools import ParameterDbFiller
     dbFiller = ParameterDbFiller.ParameterDbFiller()
-    myRunNumber, myEndRunNumber = getRunNumberRangeForOutputMetadata(ConfigFlags)
+    myRunNumber, myEndRunNumber = getMinMaxRunNumbers(ConfigFlags)
     logDigitizationWriteMetadata.debug('ParameterDbFiller BeginRun = %s', str(myRunNumber) )
     dbFiller.setBeginRun(myRunNumber)
     logDigitizationWriteMetadata.debug('ParameterDbFiller EndRun   = %s', str(myEndRunNumber) )
diff --git a/Simulation/Digitization/python/PileUpConfigNew.py b/Simulation/Digitization/python/PileUpConfigNew.py
index 72194f7b362e..691d9ed10021 100644
--- a/Simulation/Digitization/python/PileUpConfigNew.py
+++ b/Simulation/Digitization/python/PileUpConfigNew.py
@@ -311,7 +311,7 @@ def PileUpEventLoopMgrCfg(flags, name="PileUpEventLoopMgr", **kwargs):
     kwargs.setdefault("firstXing", flags.Digitization.PU.InitialBunchCrossing)
     kwargs.setdefault("lastXing", flags.Digitization.PU.FinalBunchCrossing)
 
-    if flags.Digitization.PU.RunAndLumiOverrideList:
+    if flags.Input.RunAndLumiOverrideList:
         kwargs.setdefault("MaxMinBiasCollPerXing", maxNevtsPerXing(flags))
         acc.merge(LumiProfileSvcCfg(flags))
         kwargs.setdefault("BeamLuminosity", acc.getService("LumiProfileSvc"))
diff --git a/Simulation/Digitization/python/RunDependentConfigNew.py b/Simulation/Digitization/python/RunDependentConfigNew.py
index 8aa31ec86093..84273ffbe660 100644
--- a/Simulation/Digitization/python/RunDependentConfigNew.py
+++ b/Simulation/Digitization/python/RunDependentConfigNew.py
@@ -8,74 +8,10 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
 # Auxiliary
-def add_modifier(run_nbr=None, evt_nbr=None, time_stamp=None, lbk_nbr=None, nevts=1):
-    
-    if run_nbr is None:
-        modify_run_nbr = 0
-        run_nbr = 0
-    else:
-        modify_run_nbr = 1
-
-    if evt_nbr is None:
-        modify_evt_nbr = 0
-        evt_nbr = 0
-    else:
-        modify_evt_nbr = 1
-
-    if time_stamp is None:
-        modify_time_stamp = 0
-        time_stamp = 0
-    else:
-        modify_time_stamp = 1
-
-    if lbk_nbr is None:
-        modify_lbk_nbr = 0
-        lbk_nbr = 0
-    else:
-        modify_lbk_nbr = 1
-
-    mod_bit = int(0b0000
-                  | (modify_run_nbr << 0)
-                  | (modify_evt_nbr << 1)
-                  | (modify_time_stamp << 2)
-                  | (modify_lbk_nbr << 3))
-
-    return [run_nbr, evt_nbr, time_stamp, lbk_nbr, nevts, mod_bit]
-
-
-def buildListOfModifiers(flags):
-    # migrated from RunDMCFlags.py
-    Modifiers = []
-    pDicts = flags.Digitization.PU.RunAndLumiOverrideList
-    DataRunNumber = flags.Digitization.DataRunNumber
-    
-    if pDicts:
-        for el in pDicts:
-            evt_nbr = el.get("evt_nbr", None)
-            Modifiers += add_modifier(run_nbr=el["run"], evt_nbr=evt_nbr, time_stamp=el["starttstamp"], lbk_nbr=el["lb"], nevts=el["evts"])
-    elif DataRunNumber:
-        assert DataRunNumber >= 0, (
-            "flags.Digitization.DataRunNumber %d is negative. "
-            "Use a real run number from data." % DataRunNumber)
-        
-        # Using event numbers to avoid "some very large number" setting
-        totalNumber = 1000000
-        if flags.Exec.MaxEvents > 0:
-            totalNumber = flags.Exec.MaxEvents + 1
-        if flags.Exec.SkipEvents > 0:
-            totalNumber += flags.Exec.SkipEvents
-            
-        InitialTimeStamp = flags.Sim.RunToTimestampDict.get(DataRunNumber, 1)
-
-        FirstLB = 1
-        Modifiers += add_modifier(run_nbr=DataRunNumber, lbk_nbr=FirstLB, time_stamp=InitialTimeStamp, nevts=totalNumber)
-    return Modifiers
-
-
 def maxNevtsPerXing(flags):
     """Return the largest minbias pileup value, for PileUpEvtLoopMgr caches"""
     # migrated from DigitizationFlags.py
-    pDicts = flags.Digitization.PU.RunAndLumiOverrideList
+    pDicts = flags.Input.RunAndLumiOverrideList
     return max(element["mu"] for element in pDicts)
 
 
@@ -83,7 +19,7 @@ def runLumiListAndScaleFactorLists(flags):
     # migrated from DigitizationFlags.py
     runLumiList = []
     scaleFactorList = []
-    pDicts = flags.Digitization.PU.RunAndLumiOverrideList
+    pDicts = flags.Input.RunAndLumiOverrideList
     MaxCollisionsPerXing = maxNevtsPerXing(flags)
     for element in pDicts:
         run = element["run"]
@@ -99,22 +35,6 @@ def runLumiListAndScaleFactorLists(flags):
 
 
 # Config
-def EvtIdModifierSvcCfg(flags, name="EvtIdModifierSvc", **kwargs):
-    acc = ComponentAccumulator()
-    
-    if flags.Sim.DoFullChain:
-        kwargs.setdefault("EvtStoreName", "OriginalEvent_SG")
-    else:
-        kwargs.setdefault("EvtStoreName", "StoreGateSvc")
-
-    Modifiers = buildListOfModifiers(flags)
-    if len(Modifiers) > 0:
-        kwargs.setdefault("Modifiers", Modifiers)
-
-    acc.addService(CompFactory.EvtIdModifierSvc(name, **kwargs), create=True)
-    return acc
-
-
 def LumiProfileSvcCfg(flags, name="LumiProfileSvc", **kwargs):
     acc = ComponentAccumulator()
     runLumiList, scaleFactorList = runLumiListAndScaleFactorLists(flags)
diff --git a/Simulation/Digitization/test/DigitizationPUConfigNew_test.py b/Simulation/Digitization/test/DigitizationPUConfigNew_test.py
index 74545bff0733..6f34bdafd0d2 100755
--- a/Simulation/Digitization/test/DigitizationPUConfigNew_test.py
+++ b/Simulation/Digitization/test/DigitizationPUConfigNew_test.py
@@ -126,7 +126,7 @@ ConfigFlags.Tile.correctTime = False
 ConfigFlags.lock()
 
 # test this flag
-ConfigFlags.Sim.RunToTimestampDict
+ConfigFlags.IOVDb.RunToTimestampDict
 
 # Core components
 acc = MainServicesCfg(ConfigFlags)
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_MetadataNew.py b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_MetadataNew.py
index f075b62cf844..d37613c34c0b 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_MetadataNew.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_MetadataNew.py
@@ -2,6 +2,7 @@
 
 ### This module contains functions which may need to peek at the input file metadata
 
+from AthenaKernel.EventIdOverrideConfig import getMinMaxRunNumbers
 ## Get the logger
 from AthenaCommon.Logging import logging
 simMDlog = logging.getLogger('Sim_Metadata')
@@ -26,7 +27,6 @@ def fillAtlasMetadata(ConfigFlags, dbFiller):
 
     #---------  
     ## Simulated detector flags: add each enabled detector to the simulatedDetectors list
-    from AthenaCommon.DetFlags import DetFlags  # noqa: F401
     simDets = []
     for det in ['Pixel','SCT','TRT','BCM','Lucid','ZDC','ALFA','AFP','FwdRegion','LAr','HGTD','Tile','MDT','CSC','TGC','RPC','MM','sTGC','Truth','LVL1']:
         attrname = "Detector.Geometry"+det
@@ -50,22 +50,10 @@ def fillISFMetadata(dbFiller):
     dbFiller.addSimParam('Simulator', ISF_Flags.Simulator())
 
 
-def getRunNumberRangeForOutputMetadata(ConfigFlags):
-    myRunNumber = ConfigFlags.Input.RunNumber[0]
-    myEndRunNumber = 2147483647 # the max run number
-
-    #if myRunNumber > 0 :
-    #    simMDlog.info('Found Run Number %s in hits file metadata.', str(myRunNumber) )
-    #    myEndRunNumber = myRunNumber+1 # got a reasonable run number so set end run to be the next run after this one.
-    #else :
-    #    simMDlog.info('Found unexpected Run Number %s in hits file metadata. Not overriding RunNumber to match hits file for this job.', str(myRunNumber) )
-    #    myRunNumber = 0
-    return myRunNumber, myEndRunNumber
-
 def writeSimulationParametersMetadata(ConfigFlags):
     from IOVDbMetaDataTools import ParameterDbFiller
     dbFiller = ParameterDbFiller.ParameterDbFiller()
-    myRunNumber, myEndRunNumber = getRunNumberRangeForOutputMetadata(ConfigFlags)
+    myRunNumber, myEndRunNumber = getMinMaxRunNumbers(ConfigFlags)
     simMDlog.debug('ParameterDbFiller BeginRun = %s', str(myRunNumber) )
     dbFiller.setBeginRun(myRunNumber)
     simMDlog.debug('ParameterDbFiller EndRun   = %s', str(myEndRunNumber) )
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py
index 764ce875c6da..c9eac2b62a4c 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/SimConfigFlags.py
@@ -127,14 +127,6 @@ def createSimConfigFlags():
     scf.addFlag("Sim.Fatras.GaussianMixtureModel", True) # use Gaussian mixture model for Multiple Scattering
     scf.addFlag("Sim.Fatras.BetheHeitlerScale", 1.) # scale to Bethe-Heitler contribution
 
-    # Run dependent simulation
-    # map from runNumber to timestamp; migrated from RunDMCFlags.py
-    def getRunToTimestampDict():
-        # this wrapper is intended to avoid an initial import
-        from G4AtlasApps.RunToTimestampData import RunToTimestampDict
-        return RunToTimestampDict
-    scf.addFlag("Sim.RunToTimestampDict", lambda prevFlags: getRunToTimestampDict())
-
     scf.addFlag("Sim.BeamPipeCut", 100.0)
     scf.addFlag("Sim.TightMuonStepping", False)
 
diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py
index 2031035e3a0f..5085814f5c98 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py
+++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigNew.py
@@ -33,7 +33,7 @@ def DefaultSimSelectorCfg(flags, name="ISF_DefaultSimSelector", **kwargs):
 
 def DefaultParticleKillerSelectorCfg(flags, name="ISF_DefaultParticleKillerSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -43,7 +43,7 @@ def DefaultParticleKillerSelectorCfg(flags, name="ISF_DefaultParticleKillerSelec
 def PileupParticleKillerSelectorCfg(flags, name="ISF_PileupParticleKillerSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
     kwargs.setdefault("PileupBCID", [1])
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.ParticleKiller)
     acc.addPublicTool(CompFactory.ISF.KinematicPileupSimSelector(name, **kwargs))
@@ -52,7 +52,7 @@ def PileupParticleKillerSelectorCfg(flags, name="ISF_PileupParticleKillerSelecto
 
 def DefaultGeant4SelectorCfg(flags, name="ISF_DefaultGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -61,7 +61,7 @@ def DefaultGeant4SelectorCfg(flags, name="ISF_DefaultGeant4Selector", **kwargs):
 
 def DefaultAFIIGeant4SelectorCfg(flags, name="ISF_DefaultAFIIGeant4Selector", **kwargs):
     acc = AFIIGeant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     acc.merge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -69,7 +69,7 @@ def DefaultAFIIGeant4SelectorCfg(flags, name="ISF_DefaultAFIIGeant4Selector", **
 
 def DefaultLongLivedGeant4SelectorCfg(flags, name="ISF_DefaultLongLivedGeant4Selector", **kwargs):
     acc = LongLivedGeant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_LongLivedGeant4SimSvc"))
     acc.merge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -77,7 +77,7 @@ def DefaultLongLivedGeant4SelectorCfg(flags, name="ISF_DefaultLongLivedGeant4Sel
 
 def DefaultAFII_QS_Geant4SelectorCfg(flags, name="ISF_DefaultAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(DefaultGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -85,7 +85,7 @@ def DefaultAFII_QS_Geant4SelectorCfg(flags, name="ISF_DefaultAFII_QS_Geant4Selec
 
 def FullGeant4SelectorCfg(flags, name="ISF_FullGeant4Selector", **kwargs):
     acc = ComponentAccumulator()
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         acc.merge(FullGeant4SimCfg(flags))
         kwargs.setdefault("Simulator", acc.getService("ISF_FullGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
@@ -95,7 +95,7 @@ def FullGeant4SelectorCfg(flags, name="ISF_FullGeant4Selector", **kwargs):
 
 def PassBackGeant4SelectorCfg(flags, name="ISF_PassBackGeant4Selector", **kwargs):
     acc = PassBackGeant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_PassBackGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -104,7 +104,7 @@ def PassBackGeant4SelectorCfg(flags, name="ISF_PassBackGeant4Selector", **kwargs
 
 def DefaultFastCaloSimSelectorCfg(flags, name="ISF_DefaultFastCaloSimSelector", **kwargs):
     acc = FastCaloSimSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -113,7 +113,7 @@ def DefaultFastCaloSimSelectorCfg(flags, name="ISF_DefaultFastCaloSimSelector",
 
 def DefaultLegacyAFIIFastCaloSimSelectorCfg(flags, name="ISF_DefaultLegacyAFIIFastCaloSimSelector", **kwargs):
     acc = LegacyAFIIFastCaloSimSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_LegacyAFIIFastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -122,7 +122,7 @@ def DefaultLegacyAFIIFastCaloSimSelectorCfg(flags, name="ISF_DefaultLegacyAFIIFa
 
 def DefaultFastCaloSimV2SelectorCfg(flags, name="ISF_DefaultFastCaloSimV2Selector", **kwargs):
     acc = FastCaloSimV2SvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvcV2"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimV2)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -131,7 +131,7 @@ def DefaultFastCaloSimV2SelectorCfg(flags, name="ISF_DefaultFastCaloSimV2Selecto
 
 def DefaultDNNCaloSimSelectorCfg(flags, name="ISF_DefaultDNNCaloSimSelector", **kwargs):
     acc = DNNCaloSimSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_DNNCaloSimSvc"))
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
     return acc
@@ -140,7 +140,7 @@ def DefaultDNNCaloSimSelectorCfg(flags, name="ISF_DefaultDNNCaloSimSelector", **
 def FastHitConvAlgFastCaloSimSelectorCfg(flags, name="ISF_FastHitConvAlgFastCaloSimSelector", **kwargs):
     acc = ComponentAccumulator()
     acc.merge(FastHitConvAlgFastCaloSimSvcCfg(flags))
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastHitConvAlgFastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -150,7 +150,7 @@ def FastHitConvAlgFastCaloSimSelectorCfg(flags, name="ISF_FastHitConvAlgFastCalo
 def FastHitConvAlgLegacyAFIIFastCaloSimSelectorCfg(flags, name="ISF_FastHitConvAlgLegacyAFIIFastCaloSimSelector", **kwargs):
     acc = ComponentAccumulator()
     acc.merge(FastHitConvAlgLegacyAFIIFastCaloSimSvcCfg(flags))
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastHitConvAlgLegacyAFIIFastCaloSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSim)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -159,7 +159,7 @@ def FastHitConvAlgLegacyAFIIFastCaloSimSelectorCfg(flags, name="ISF_FastHitConvA
 
 def DefaultFatrasSelectorCfg(flags, name="ISF_DefaultFatrasSelector", **kwargs):
     acc = fatrasSimServiceIDCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -169,7 +169,7 @@ def DefaultFatrasSelectorCfg(flags, name="ISF_DefaultFatrasSelector", **kwargs):
 def DefaultFatrasNewExtrapolationSelectorCfg(flags, name="ISF_DefaultFatrasNewExtrapolationSelector", **kwargs):
     acc = ComponentAccumulator()
     acc.merge(fatrasNewExtrapolationSimServiceIDCfg(flags))
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasNewExtrapolationSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -178,7 +178,7 @@ def DefaultFatrasNewExtrapolationSelectorCfg(flags, name="ISF_DefaultFatrasNewEx
 
 def DefaultParametricSimulationSelectorCfg(flags, name="ISF_DefaultParametricSimulationSelector", **kwargs):
     acc = ComponentAccumulator()
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", "ISF_ParametricSimSvc") # TODO
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Parametric)
     acc.merge(DefaultSimSelectorCfg(flags, name, **kwargs))
@@ -196,7 +196,7 @@ def FatrasPileupSelectorCfg(flags, name="ISF_FatrasPileupSelector", **kwargs):
     acc = ComponentAccumulator()
     acc.merge(fatrasPileupSimServiceIDCfg(flags))
     kwargs.setdefault("PileupBCID", [1])
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasPileupSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FatrasPileup)
     acc.merge(PileupSimSelectorCfg(flags, name, **kwargs))
@@ -210,7 +210,7 @@ def FatrasPileupSelectorCfg(flags, name="ISF_FatrasPileupSelector", **kwargs):
 def FastCaloSimPileupSelectorCfg(flags, name="ISF_FastCaloSimPileupSelector", **kwargs):
     acc = FastCaloSimPileupSvcCfg(flags)
     kwargs.setdefault("PileupBCID"  , flags.Sim.FastChain.BCID)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimPileupSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimPileup)
     acc.merge(PileupSimSelectorCfg(flags, name, **kwargs))
@@ -220,7 +220,7 @@ def FastCaloSimPileupSelectorCfg(flags, name="ISF_FastCaloSimPileupSelector", **
 def FastCaloSimPileupOTSelectorCfg(flags, name="ISF_FastCaloSimPileupOTSelector", **kwargs):
     acc = FastCaloSimPileupOTSvcCfg(flags)
     kwargs.setdefault("PileupBCID", flags.Sim.FastChain.BCID)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimPileupOTSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.FastCaloSimPileup)
     acc.merge(PileupSimSelectorCfg(flags, name, **kwargs))
@@ -231,7 +231,7 @@ def FastCaloSimPileupOTSelectorCfg(flags, name="ISF_FastCaloSimPileupOTSelector"
 def ElectronGeant4SelectorCfg(flags, name="ISF_ElectronGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("ParticlePDG", 11)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
@@ -241,7 +241,7 @@ def ElectronGeant4SelectorCfg(flags, name="ISF_ElectronGeant4Selector", **kwargs
 def NeutralGeant4SelectorCfg(flags, name="ISF_NeutralGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("Charge", 0)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
@@ -252,7 +252,7 @@ def ProtonAFIIGeant4SelectorCfg(flags, name="ISF_ProtonAFIIGeant4Selector", **kw
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 750)
     kwargs.setdefault("ParticlePDG", 2212)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
@@ -261,7 +261,7 @@ def ProtonAFIIGeant4SelectorCfg(flags, name="ISF_ProtonAFIIGeant4Selector", **kw
 
 def ProtonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ProtonAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(ProtonAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -271,7 +271,7 @@ def PionAFIIGeant4SelectorCfg(flags, name="ISF_PionAFIIGeant4Selector", **kwargs
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 200)
     kwargs.setdefault("ParticlePDG", 211)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
@@ -282,7 +282,7 @@ def PionG4FastCaloGeant4Selector(flags, name="ISF_PionG4FastCaloGeant4Selector",
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxEkin", 200)
     kwargs.setdefault("ParticlePDG", 211)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -292,7 +292,7 @@ def ProtonG4FastCaloGeant4Selector(flags, name="ISF_ProtonG4FastCaloGeant4Select
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxEkin", 400)
     kwargs.setdefault("ParticlePDG", 2212)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -302,7 +302,7 @@ def NeutronG4FastCaloGeant4Selector(flags, name="ISF_NeutronG4FastCaloGeant4Sele
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxEkin", 400)
     kwargs.setdefault("ParticlePDG", 2112)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -312,7 +312,7 @@ def ChargedKaonG4FastCaloGeant4Selector(flags, name="ISF_ChargedKaonG4FastCaloGe
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxEkin", 400)
     kwargs.setdefault("ParticlePDG", 321)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -322,7 +322,7 @@ def KLongG4FastCaloGeant4Selector(flags, name="ISF_KLongG4FastCaloGeant4Selector
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxEkin", 400)
     kwargs.setdefault("ParticlePDG", 130)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
     return acc
@@ -330,7 +330,7 @@ def KLongG4FastCaloGeant4Selector(flags, name="ISF_KLongG4FastCaloGeant4Selector
 
 def PionAFII_QS_Geant4SelectorCfg(flags, name="ISF_PionAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(PionAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -340,7 +340,7 @@ def ChargedKaonAFIIGeant4SelectorCfg(flags, name="ISF_ChargedKaonAFIIGeant4Selec
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 750)
     kwargs.setdefault("ParticlePDG", 321)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
@@ -349,7 +349,7 @@ def ChargedKaonAFIIGeant4SelectorCfg(flags, name="ISF_ChargedKaonAFIIGeant4Selec
 
 def ChargedKaonAFII_QS_Geant4SelectorCfg(flags, name="ISF_ChargedKaonAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(ChargedKaonAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -359,7 +359,7 @@ def KLongAFIIGeant4SelectorCfg(flags, name="ISF_KLongAFIIGeant4Selector", **kwar
     acc = AFIIGeant4SimCfg(flags)
     kwargs.setdefault("MaxMom", 750)
     kwargs.setdefault("ParticlePDG", 130)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.KinematicSimSelector(name, **kwargs))
@@ -368,7 +368,7 @@ def KLongAFIIGeant4SelectorCfg(flags, name="ISF_KLongAFIIGeant4Selector", **kwar
 
 def KLongAFII_QS_Geant4SelectorCfg(flags, name="ISF_KLongAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(KLongAFIIGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -383,7 +383,7 @@ def MuonSelectorCfg(flags, name="ISF_MuonSelector", **kwargs):
 
 def MuonGeant4SelectorCfg(flags, name="ISF_MuonGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(MuonSelectorCfg(flags, name, **kwargs))
@@ -392,7 +392,7 @@ def MuonGeant4SelectorCfg(flags, name="ISF_MuonGeant4Selector", **kwargs):
 
 def MuonAFIIGeant4SelectorCfg(flags, name="ISF_MuonAFIIGeant4Selector", **kwargs):
     acc = AFIIGeant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFIIGeant4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(MuonGeant4SelectorCfg(flags, name, **kwargs))
@@ -401,7 +401,7 @@ def MuonAFIIGeant4SelectorCfg(flags, name="ISF_MuonAFIIGeant4Selector", **kwargs
 
 def MuonAFII_QS_Geant4SelectorCfg(flags, name="ISF_MuonAFII_QS_Geant4Selector", **kwargs):
     acc = AFII_QS_Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_AFII_QS_Geant4SimSvc"))
     acc.merge(MuonGeant4SelectorCfg(flags, name, **kwargs))
     return acc
@@ -409,7 +409,7 @@ def MuonAFII_QS_Geant4SelectorCfg(flags, name="ISF_MuonAFII_QS_Geant4Selector",
 
 def MuonFatrasSelectorCfg(flags, name="ISF_MuonFatrasSelector", **kwargs):
     acc = fatrasSimServiceIDCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
     acc.merge(MuonSelectorCfg(flags, name, **kwargs))
@@ -419,7 +419,7 @@ def MuonFatrasSelectorCfg(flags, name="ISF_MuonFatrasSelector", **kwargs):
 def MuonFatrasPileupSelectorCfg(flags, name="ISF_MuonFatrasPileupSelector", **kwargs):
     acc = ComponentAccumulator()
     acc.merge(fatrasPileupSimServiceIDCfg(flags))
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasPileupSimSvc"))
     kwargs.setdefault("PileupBCID", [1])
     kwargs.setdefault("ParticlePDG", 13)
@@ -430,7 +430,7 @@ def MuonFatrasPileupSelectorCfg(flags, name="ISF_MuonFatrasPileupSelector", **kw
 
 def WithinEta5FastCaloSimSelectorCfg(flags, name="ISF_WithinEta5FastCaloSimSelector", **kwargs):
     acc = FastCaloSimSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FastCaloSimSvc"))
     kwargs.setdefault("MinPosEta", -5.0)
     kwargs.setdefault("MaxPosEta",  5.0)
@@ -441,7 +441,7 @@ def WithinEta5FastCaloSimSelectorCfg(flags, name="ISF_WithinEta5FastCaloSimSelec
 
 def EtaGreater5ParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("MinPosEta", -5.0)
     kwargs.setdefault("MaxPosEta",  5.0)
@@ -453,7 +453,7 @@ def EtaGreater5ParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5Particle
 
 def EtaGreater5PileupParticleKillerSimSelectorCfg(flags, name="ISF_EtaGreater5PileupParticleKillerSimSelector", **kwargs):
     acc = ParticleKillerSvcCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_ParticleKillerSvc"))
     kwargs.setdefault("MinPosEta", -5.0)
     kwargs.setdefault("MaxPosEta",  5.0)
@@ -476,7 +476,7 @@ def PhotonConeSelectorCfg(flags, name="ISF_PhotonConeSelector", **kwargs):
 
 def PhotonConeFatrasSelectorCfg(flags, name="ISF_PhotonConeFatrasSelector", **kwargs):
     acc = fatrasSimServiceIDCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
     acc.merge(PhotonConeSelectorCfg(flags, name, **kwargs))
@@ -485,7 +485,7 @@ def PhotonConeFatrasSelectorCfg(flags, name="ISF_PhotonConeFatrasSelector", **kw
 
 def PhotonConeGeant4SelectorCfg(flags, name="ISF_PhotonConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(PhotonConeSelectorCfg(flags, name, **kwargs))
@@ -508,7 +508,7 @@ def HiggsLeptonsConeSimSelectorCfg(flags, name="ISF_HiggsLeptonsConeSimSelector"
 
 def HiggsLeptonsConeGeant4SelectorCfg(flags, name="ISF_HiggsLeptonsConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(HiggsLeptonsConeSimSelectorCfg(flags, name, **kwargs))
@@ -530,7 +530,7 @@ def HiggsLeptonsConeGeant4CaloSelectorCfg(flags, name="ISF_HiggsLeptonsConeGeant
 
 def WLeptonsConeGeant4SelectorCfg(flags, name="ISF_WLeptonsConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     kwargs.setdefault("ConeCreatorMinPt", 0.)
@@ -548,7 +548,7 @@ def ZLeptonsDirectionConeGeant4SelectorCfg(flags, name="ISF_ZLeptonsDirectionCon
     # this selector picks all particles with a mometum direction
     # within DeltaR<ConeSize relative to the Z decay lepton directions
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     kwargs.setdefault("ConeCreatorMinPt", 0.)
@@ -571,7 +571,7 @@ def ZLeptonsPositionConeGeant4SelectorCfg(flags, name="ISF_ZLeptonsPositionConeG
 
 def JPsiLeptonsConeGeant4SelectorCfg(flags, name="ISF_JPsiLeptonsConeGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     kwargs.setdefault("ConeCreatorMinPt", 0.)
@@ -603,7 +603,7 @@ def BHadronProductsSimSelectorCfg(flags, name="ISF_BHadronProductsSimSelector",
 
 def BHadronProductsGeant4SelectorCfg(flags, name="ISF_BHadronProductsGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(BHadronProductsSimSelectorCfg(flags, name, **kwargs))
@@ -612,7 +612,7 @@ def BHadronProductsGeant4SelectorCfg(flags, name="ISF_BHadronProductsGeant4Selec
 
 def BHadronProductsFatrasSelectorCfg(flags, name="ISF_BHadronProductsFatrasSelector", **kwargs):
     acc = fatrasSimServiceIDCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISF_FatrasSimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Fatras)
     acc.merge(BHadronProductsSimSelectorCfg(flags, name, **kwargs))
@@ -631,7 +631,7 @@ def TauProductsSimSelectorCfg(flags, name="ISF_TauProductsSimSelector", **kwargs
 
 def TauProductsGeant4SelectorCfg(flags, name="ISF_TauProductsGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(TauProductsSimSelectorCfg(flags, name, **kwargs))
@@ -650,7 +650,7 @@ def ZProductsSimSelectorCfg(flags, name="ISF_ZProductsSimSelector", **kwargs):
 
 def ZProductsGeant4SelectorCfg(flags, name="ISF_ZProductsGeant4Selector", **kwargs):
     acc = Geant4SimCfg(flags)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.merge(ZProductsSimSelectorCfg(flags, name, **kwargs))
@@ -661,7 +661,7 @@ def ZProductsGeant4SelectorCfg(flags, name="ISF_ZProductsGeant4Selector", **kwar
 def SubDetStickyGeant4SimSelectorCfg(flags, name="ISF_SubDetStickyGeant4SimSelector", **kwargs):
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("RequiresUnchangedGeoID", True)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc"))
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
@@ -673,7 +673,7 @@ def GlobalStickyGeant4SimSelectorCfg(flags, name="ISF_GlobalStickyGeant4SimSelec
     acc = Geant4SimCfg(flags)
     kwargs.setdefault("PrevSimSvc", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("RequiresUnchangedGeoID", False)
-    if flags.Concurrency.NumThreads == 0:
+    if flags.Concurrency.NumThreads == 0 and 'MT' not in flags.Sim.ISF.Simulator:
         kwargs.setdefault("Simulator", acc.getService("ISFG4SimSvc"))
     kwargs.setdefault("SimulationFlavor", SimulationFlavor.Geant4)
     acc.addPublicTool(CompFactory.ISF.HistorySimSelector(name, **kwargs))
diff --git a/Simulation/SimuJobTransforms/python/ISF_Skeleton.py b/Simulation/SimuJobTransforms/python/ISF_Skeleton.py
index 2073c899f084..a5396254fdfa 100644
--- a/Simulation/SimuJobTransforms/python/ISF_Skeleton.py
+++ b/Simulation/SimuJobTransforms/python/ISF_Skeleton.py
@@ -4,44 +4,6 @@ import sys
 from PyJobTransforms.CommonRunArgsToFlags import commonRunArgsToFlags
 from OverlayConfiguration.OverlayHelpers import accFromFragment
 
-# based on https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/Control/AthenaServices/python/Configurables.py#0247
-def EvtIdModifierSvc_add_modifier(svc,
-        run_nbr=None, evt_nbr=None, time_stamp=None, lbk_nbr=None,
-        nevts=1):
-    if run_nbr is None:
-        modify_run_nbr = 0
-        run_nbr = 0
-    else:
-        modify_run_nbr = 1
-
-
-    if evt_nbr is None:
-        modify_evt_nbr = 0
-        evt_nbr = 0
-    else:
-        modify_evt_nbr = 1
-
-    if time_stamp is None:
-        modify_time_stamp = 0
-        time_stamp = 0
-    else:
-        modify_time_stamp = 1
-
-    if lbk_nbr is None:
-        modify_lbk_nbr = 0
-        lbk_nbr = 0
-    else:
-        modify_lbk_nbr = 1
-
-    mod_bit = int(0b0000
-                | (modify_run_nbr << 0)
-                | (modify_evt_nbr << 1)
-                | (modify_time_stamp << 2)
-                | (modify_lbk_nbr << 3))
-
-    svc.Modifiers += [run_nbr, evt_nbr, time_stamp, lbk_nbr,
-                    nevts, mod_bit]
-
 def defaultSimulationFlags(ConfigFlags):
     """Fill default simulation flags"""
     # TODO: how to autoconfigure those
@@ -137,6 +99,8 @@ def fromRunArgs(runArgs):
 
     if hasattr(runArgs, 'DataRunNumber'):
         ConfigFlags.Input.RunNumber = [runArgs.DataRunNumber] # is it updating?
+        ConfigFlags.Input.OverrideRunNumber = True
+        ConfigFlags.Input.LumiBlockNumber = [1] # dummy value
 
     if hasattr(runArgs, 'outputHITSFile'):
         ConfigFlags.Sim.PhysicsList = runArgs.physicsList
@@ -180,26 +144,6 @@ def fromRunArgs(runArgs):
     from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
     cfg.merge(PoolReadCfg(ConfigFlags))
     cfg.merge(PoolWriteCfg(ConfigFlags))
-    # todo its own cfg ...
-    #todo check evtMax=-1 works with this method
-    myRunNumber = 284500
-    myFirstLB = 1
-    myInitialTimeStamp = 1446539185
-    from AthenaConfiguration.ComponentFactory import CompFactory
-    evtIdModifierSvc = CompFactory.EvtIdModifierSvc(EvtStoreName="StoreGateSvc")
-    iovDbMetaDataTool = CompFactory.IOVDbMetaDataTool()
-    iovDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, 2147483647]
-    cfg.addPublicTool(iovDbMetaDataTool)
-    EvtIdModifierSvc_add_modifier(evtIdModifierSvc, run_nbr=myRunNumber, lbk_nbr=myFirstLB, time_stamp=myInitialTimeStamp, nevts=evtMax)
-    eventSelector = cfg.getService("EventSelector")
-    eventSelector.OverrideRunNumber = True
-    eventSelector.RunNumber = myRunNumber
-    eventSelector.FirstLB = myFirstLB
-    eventSelector.InitialTimeStamp = myInitialTimeStamp # Necessary to avoid a crash
-    if hasattr(eventSelector, "OverrideRunNumberFromInput"):
-        eventSelector.OverrideRunNumberFromInput = True
-    cfg.addService(evtIdModifierSvc, create=True)
-    # ... up to here?
 
     # add BeamEffectsAlg
     from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
-- 
GitLab


From 03a10aae3f8edffc8508d1d5417ebc3e86ae654b Mon Sep 17 00:00:00 2001
From: Fernando Monticelli <fernando.monticelli@cern.ch>
Date: Tue, 22 Dec 2020 15:18:39 +0000
Subject: [PATCH 188/308] Fixed Flake8 warning

---
 .../TrigEgammaAnalysisTools/CMakeLists.txt    |   3 +-
 .../python/TrigEgammaAnalysisToolsConfig.py   |  24 +-
 .../python/TrigEgammaMonToolConfig.py         |  95 ---
 .../python/TrigEgammaMonToolConfig50ns.py     | 112 ---
 .../python/TrigEgammaPhysValMonToolConfig.py  |  94 ---
 .../python/TrigEgammaProbelist.py             | 786 +++++++++---------
 .../share/testTrigEgammaAnalysisTools.py      | 117 ---
 .../share/testTrigEgammaAnalysisToolsGRL.py   | 200 -----
 .../testTrigEgammaAnalysisTools_emulator.py   | 250 ------
 .../share/testTrigEgammaEventSelectionTool.py | 195 -----
 10 files changed, 397 insertions(+), 1479 deletions(-)
 delete mode 100644 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig.py
 delete mode 100644 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig50ns.py
 delete mode 100644 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaPhysValMonToolConfig.py
 delete mode 100755 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools.py
 delete mode 100755 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisToolsGRL.py
 delete mode 100644 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools_emulator.py
 delete mode 100644 Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaEventSelectionTool.py

diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
index a0bcc2ad4760..e1a73b62b672 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
@@ -22,8 +22,7 @@ atlas_add_component( TrigEgammaAnalysisTools
    LINK_LIBRARIES AsgTools AthenaBaseComps AthenaMonitoringLib TrigEgammaAnalysisToolsLib xAODEgamma )
 
 # Install files from the package:
-atlas_install_python_modules( python/TrigEgamma*.py )
-atlas_install_joboptions( share/test*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_generic( share/trigEgammaDQ.py share/get_trigEgammaDQ.sh 
    DESTINATION share
    EXECUTABLE )
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py
index e9cba421f6d3..c914e5a01165 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py
@@ -8,25 +8,19 @@ from TrigEgammaAnalysisTools import TrigEgammaAnalysisToolsConf
 from AthenaCommon import CfgMgr
 from AthenaCommon.AppMgr import ToolSvc
 
-from egammaRec.Factories import PublicToolFactory,FcnWrapper,AlgFactory, getPropertyValue 
+from egammaRec.Factories import PublicToolFactory
 
 import PyUtils.RootUtils as ru
 ROOT = ru.import_root()
 import cppyy
 cppyy.load_library('libElectronPhotonSelectorToolsDict')
-from ROOT import LikeEnum
-from ROOT import egammaPID
 
 # Following loads the online selectors
 from TrigEgammaHypo.TrigEgammaPidTools import ElectronPidTools
 from TrigEgammaHypo.TrigEgammaPidTools import PhotonPidTools
-from TrigEgammaHypo.TrigEgammaPidTools import ElectronToolName
 ElectronPidTools()
 PhotonPidTools()
 
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector, AsgElectronLikelihoodTool
-from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
-
 # Offline selectors -- taken from latest conf
 LooseElectronSelector             = CfgMgr.AsgElectronIsEMSelector("T0HLTLooseElectronSelector")
 MediumElectronSelector            = CfgMgr.AsgElectronIsEMSelector("T0HLTMediumElectronSelector")
@@ -67,7 +61,7 @@ LuminosityCondAlgOnlineDefault (suffix = 'Online')
 IneffLabels=["ClusterEtaRange","ConversionMatch","ClusterHadronicLeakage","ClusterMiddleEnergy","ClusterMiddleEratio37","ClusterMiddleEratio33","ClusterMiddleWidth","f3","ClusterStripsEratio","ClusterStripsDeltaEmax2","ClusterStripsDeltaE","ClusterStripsWtot","ClusterStripsFracm","ClusterStripsWeta1c","empty14","ClusterStripsDEmaxs1","TrackBlayer","TrackPixel","TrackSi","TrackA0","TrackMatchEta","TrackMatchPhi","TrackMatchEoverP","TrackTRTeProbabilityHT_Electron","TrackTRThits","TrackTRTratio","TrackTRTratio90","TrackA0Tight","TrackMatchEtaTight","Isolation","ClusterIsolation","TrackIsolation","No Track","No Cluster","No Object"]
 
 from TrigEgammaAnalysisTools.TrigEgammaProbelist import monitoring_mam, monitoring_electron, monitoring_photon 
-from TrigEgammaAnalysisTools.TrigEgammaProbelist import monitoringTP_electron, monitoringTP_electronZee, monitoringTP_electronJpsiee 
+from TrigEgammaAnalysisTools.TrigEgammaProbelist import monitoringTP_electron,  monitoringTP_electronJpsiee 
 
 from TrigEgammaMatchingTool.TrigEgammaMatchingToolConf import Trig__TrigEgammaMatchingTool
 
@@ -197,9 +191,6 @@ TrigEgammaNavAnalysisTool = PublicToolFactory(TrigEgammaAnalysisToolsConf.TrigEg
 #############################################################################################
 # Functions
 
-# Function to return triggerlist tools
-def getAllTools():
-    return [TrigEgammaNavZeeTPCounts(),TrigEgammaNavZeeTPEff(),TrigEgammaNavZeeTPIneff(),TrigEgammaNavZeeTPRes(),]
 
 
 def setRunFlag( runFlag ):
@@ -230,12 +221,6 @@ def setRunFlag( runFlag ):
 
 
 
-# The main algorithm
-# Add triggerlist tools to ToolHandleArray 
-TrigEgammaAnalysisAlg = AlgFactory(TrigEgammaAnalysisToolsConf.TrigEgammaAnalysisAlg, 
-        name='TrigEgammaAnalysisAlg',
-        Tools = FcnWrapper(getAllTools),
-        )
 
 
 
@@ -246,10 +231,7 @@ def getEventSelectionTool(runFlag):
   from TrigEgammaEmulationTool.TrigEgammaEmulationPidToolsConfig import getEgammaIsEMSelectorCaloOnly, \
                                                                         getElectronIsEMSelector,\
                                                                         getEgammaLikelihoodSelectorCaloOnly, \
-                                                                        getElectronLikelihoodSelector2015,\
                                                                         getElectronLikelihoodSelectorNoD0
-  from AthenaCommon import CfgMgr
-  from AthenaCommon.AppMgr import ToolSvc
   # create all selector list. Here, the order is matter. Please check the 
   
   setRunFlag(runFlag)
@@ -277,7 +259,7 @@ def getEventSelectionTool(runFlag):
           ElectronKey = 'Electrons',
           MatchTool = EgammaMatchTool,
           PlotTool=TrigEgammaPlotTool,
-          EmulationTool=EmulationTool, # The emulation must be on in this tool.
+          #EmulationTool=EmulationTool, # The emulation must be on in this tool.
           doEmulation=True,
           Tools=[],
           isEMResultNames=["Tight","Medium","Loose"],
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig.py
deleted file mode 100644
index 96f9961fb6f5..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig.py
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-def TrigEgammaMonTool():
-    #from AthenaCommon.AppMgr import ToolSvc
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaNavAnalysisTool,TrigEgammaNavTPAnalysisTool,TrigEgammaNavTPJpsieeAnalysisTool
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaPlotTool
-    from TrigEgammaAnalysisTools.TrigEgammaProbelist import monitoring_mam, monitoring_electron, monitoring_photon 
-    from TrigEgammaAnalysisTools.TrigEgammaProbelist import monitoringTP_electron, monitoringTP_electronZee, monitoringTP_electronJpsiee 
-
-
-    #Define the base path for all histograms
-    basePath = '/HLT/Egamma'
-    
-    tagItems     = ['HLT_e24_lhmedium_iloose_L1EM18VH',
-                    'HLT_e24_lhmedium_iloose_L1EM20VH',
-                    'HLT_e24_lhtight_iloose',
-                    'HLT_e26_lhtight_iloose',
-                    # Primary cut-based electron triggers
-                    'HLT_e24_medium_iloose_L1EM18VH',
-                    'HLT_e24_medium_iloose_L1EM20VH',
-                    'HLT_e24_tight_iloose',
-                    'HLT_e26_tight_iloose']
-
-    JpsitagItems = ['HLT_e5_tight_e4_etcut',
-                    'HLT_e9_tight_e4_etcut',
-                    'HLT_e14_tight_e4_etcut',
-                    'HLT_e9_etcut_e5_tight',
-                    'HLT_e14_etcut_e5_tight',
-                    # Primary cut-based electron triggers
-                    'HLT_e5_tight_e4_etcut_Jpsiee',
-                    'HLT_e9_tight_e4_etcut_Jpsiee',
-                    'HLT_e14_tight_e4_etcut_Jpsiee',
-                    'HLT_e9_etcut_e5_tight_Jpsiee',
-                    'HLT_e14_etcut_e5_tight_Jpsiee']
-
-    #Configure the TrigEgammaPlotTool
-    PlotTool = TrigEgammaPlotTool.copy(name="TrigEgammaPlotTool",
-            DirectoryPath=basePath,
-            MaM=monitoring_mam,
-            Efficiency=["eff_et","eff_eta","eff_mu"],
-            Distribution=["et","eta","d0","d0sig"],
-            Resolution=["res_et","res_eta","res_Rhad","res_Rphi","res_Reta"])
-
-    #Configure emulation tools
-    #from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig import TrigEgammaEmulationTool
-    #EmulationPhotonTool     = TrigEgammaEmulationTool.copy( TriggerList = monitoring_photon          , name = "EmulationPhotonTool"     )
-    #EmulationElectronTool   = TrigEgammaEmulationTool.copy( TriggerList = monitoring_electron        , name = "EmulationElectronTool"   )
-    #EmulationTPElectronTool = TrigEgammaEmulationTool.copy( TriggerList = monitoringTP_electron      , name = "EmulationTPElectronTool" )
-    #EmulationJpsieeTool     = TrigEgammaEmulationTool.copy( TriggerList = monitoringTP_electronJpsiee, name = "EmulationJpsieeTool"     )
-
-
-    ElectronAnalysis = TrigEgammaNavAnalysisTool(name='NavElectronAnalysis',
-            Analysis='Electrons',
-            PlotTool=PlotTool,
-            TriggerList=monitoring_electron,
-            File="",
-            #doEmulation=True,
-            #EmulationTool=EmulationElectronTool,
-            OutputLevel=0,DetailedHistograms=False)
-    PhotonAnalysis = TrigEgammaNavAnalysisTool(name='NavPhotonAnalysis',
-            Analysis='Photons',
-            PlotTool=PlotTool,
-            TriggerList=monitoring_photon,
-            File="",
-            #doEmulation=True,
-            #EmulationTool=EmulationPhotonTool,
-            OutputLevel=0,DetailedHistograms=False)
-    TPAnalysis = TrigEgammaNavTPAnalysisTool(name='NavTPAnalysis',
-            Analysis='Zee',
-            PlotTool=PlotTool,
-            TriggerList=monitoringTP_electron,
-            File="",
-            TagTriggerList=tagItems,
-            #doEmulation=True,
-            #EmulationTool=EmulationTPElectronTool,
-            RemoveCrack=False,
-            OutputLevel=0,DetailedHistograms=False)
-    JpsiTPAnalysis = TrigEgammaNavTPJpsieeAnalysisTool(name='NavTPJpsieeAnalysis',
-                                                        Analysis='Jpsiee',
-                                                        PlotTool=PlotTool,
-                                                        TriggerList=monitoringTP_electronJpsiee,
-                                                        File="",
-                                                        #doEmulation=True,
-                                                        #EmulationTool=EmulationJpsieeTool,
-                                                        TagTriggerList= JpsitagItems)
-
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConf import TrigEgammaMonTool
-    TrigEgammaMonTool = TrigEgammaMonTool( name = "HLTEgammaMon", 
-            histoPathBase=basePath,
-            Tools=[
-                "TrigEgammaNavAnalysisTool/NavPhotonAnalysis",
-                "TrigEgammaNavAnalysisTool/NavElectronAnalysis",
-                "TrigEgammaNavTPAnalysisTool/NavTPAnalysis",
-                "TrigEgammaNavTPAnalysisTool/NavTPJpsieeAnalysis"])
-    #ToolSvc += TrigEgammaMonTool
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig50ns.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig50ns.py
deleted file mode 100644
index 7af1f7b52df4..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaMonToolConfig50ns.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-def TrigEgammaMonTool():
-    #from AthenaCommon.AppMgr import ToolSvc
-    from AthenaCommon import CfgMgr
-    from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
-    from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaNavAnalysisTool,TrigEgammaNavTPAnalysisTool,TrigEgammaNavTPJpsieeAnalysisTool
-    from TrigEgammaAnalysisTools.TrigEgammaProbelist import default,defaultJpsi # to import probelist
-    #from TrigHLTMonitoring.HLTMonTriggerList import hltmonList # import MaM trigger list, not available!!!!
-   
-    # Import full trigger menu, requires setup of both MC and Physics
-    # Makes available all possible triggers which can be in any dataset
-    # Set final list from triggers available in data
-    import TriggerMenu.menu.Physics_pp_v5 as physics_menu
-    from TriggerJobOpts.TriggerFlags import TriggerFlags
-
-    # Offline selectors -- taken from latest conf
-    # Offline tunes for 50 ns
-    LooseElectronSelector=CfgMgr.AsgElectronIsEMSelector("LooseElectron50nsSelector")
-    LooseElectronSelector.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150429/ElectronIsEMLooseSelectorCutDefs.conf"
-    ToolSvc+=LooseElectronSelector
-    MediumElectronSelector=CfgMgr.AsgElectronIsEMSelector("MediumElectron50nsSelector")
-    MediumElectronSelector.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150429/ElectronIsEMMediumSelectorCutDefs.conf"
-    ToolSvc+=MediumElectronSelector
-    TightElectronSelector=CfgMgr.AsgElectronIsEMSelector("TightElectron50nsSelector")
-    TightElectronSelector.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150429/ElectronIsEMTightSelectorCutDefs.conf"
-    ToolSvc+=TightElectronSelector
-
-    LooseLHSelector=CfgMgr.AsgElectronLikelihoodTool("LooseLH50nsSelector")
-    LooseLHSelector.ConfigFile="ElectronPhotonSelectorTools/offline/mc15_20150429/ElectronLikelihoodLooseOfflineConfig2015.conf"
-    ToolSvc+=LooseLHSelector
-    MediumLHSelector=CfgMgr.AsgElectronLikelihoodTool("MediumLH50nsSelector")
-    MediumLHSelector.ConfigFile="ElectronPhotonSelectorTools/offline/mc15_20150429/ElectronLikelihoodMediumOfflineConfig2015.conf"
-    ToolSvc+=MediumLHSelector
-    TightLHSelector=CfgMgr.AsgElectronLikelihoodTool("TightLH50nsSelector")
-    TightLHSelector.ConfigFile="ElectronPhotonSelectorTools/offline/mc15_20150429/ElectronLikelihoodTightOfflineConfig2015.conf"
-    ToolSvc+=TightLHSelector
-
-    physics_menu.setupMenu()
-    egammaMenu = TriggerFlags.EgammaSlice.signatures()
-    egammaChains = []
-    l1Items = []
-    addItems = []
-    for egchain in egammaMenu:
-        egammaChains.append(egchain[0])
-        l1Items.append(egchain[1])
-        addItems.append(egchain[3])
-    # Set list to full menu
-    #probelist = egammaChains
-    probelist = default
-    Jpsiprobelist = defaultJpsi
-    #probelist=['e5_loose_idperf','e5_lhloose_idperf','e0_perf_L1EM15','g0_perf_L1EM15']
-
-    basePath = '/HLT/Egamma/'
-    tagItems = ['e24_lhmedium_iloose_L1EM18VH',
-        'e24_lhmedium_iloose_L1EM20VH',
-        'e24_lhtight_iloose',
-        'e26_lhtight_iloose',
-        # Primary cut-based electron triggers
-        'e24_medium_iloose_L1EM18VH',
-        'e24_medium_iloose_L1EM20VH',
-        'e24_tight_iloose',
-        'e26_tight_iloose']
-
-    JpsitagItems = ['e5_tight_e4_etcut',
-                    'e9_tight_e4_etcut',
-                    'e14_tight_e4_etcut',
-                    'e9_etcut_e5_tight',
-                    'e14_etcut_e5_tight',
-                    # Primary cut-based electron triggers
-                    'e5_tight_e4_etcut_Jpsiee',
-                    'e9_tight_e4_etcut_Jpsiee',
-                    'e14_tight_e4_etcut_Jpsiee',
-                    'e9_etcut_e5_tight_Jpsiee',
-                    'e14_etcut_e5_tight_Jpsiee']
-    Analysis = TrigEgammaNavAnalysisTool(name='NavAnalysis',
-            DirectoryPath=basePath+'Analysis',
-            TriggerList=probelist, 
-            ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector],
-            ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector], 
-            File="",
-            OutputLevel=0,DetailedHistograms=False)
-    TPAnalysis = TrigEgammaNavTPAnalysisTool(name='NavTPAnalysis',
-            DirectoryPath=basePath+'TPAnalysis',
-            TriggerList=probelist, 
-            ElectronIsEMSelector =[TightElectronSelector,MediumElectronSelector,LooseElectronSelector],
-            ElectronLikelihoodTool =[TightLHSelector,MediumLHSelector,LooseLHSelector], 
-            File="",
-            TagTriggerList=tagItems,
-            RemoveCrack=False,
-            OutputLevel=0,DetailedHistograms=True)
-    JpsiTPAnalysis = TrigEgammaNavTPJpsieeAnalysisTool(name='NavTPJpsieeAnalysis',
-                                                        DirectoryPath=basePath+'TPJpsieeAnalysis',
-                                                        TriggerList=Jpsiprobelist,
-                                                        File="",
-                                                        TagTriggerList= JpsitagItems,
-                                                        RemoveCrack=True,
-                                                        ZeeLowerMass=2,
-                                                        ZeeUpperMass=5,
-                                                        OfflineTagMinEt=5,
-                                                        OfflineProbeMinEt=5,
-                                                        OutputLevel=0,
-                                                        DetailedHistograms=False,
-                                                        doJpsiee=True)
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConf import TrigEgammaMonTool
-    TrigEgammaMonTool = TrigEgammaMonTool( name = "TrigEgammaMonTool", 
-            histoPathBase=basePath,
-            Tools=["TrigEgammaNavAnalysisTool/NavAnalysis",
-                "TrigEgammaNavTPAnalysisTool/NavTPAnalysis",
-                "TrigEgammaNavTPAnalysisTool/NavTPJpsieeAnalysis"])
-    #ToolSvc += TrigEgammaMonTool
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaPhysValMonToolConfig.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaPhysValMonToolConfig.py
deleted file mode 100644
index 9ef1c9d44531..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaPhysValMonToolConfig.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-def TrigEgammaPhysValMonTool():
-    #from AthenaCommon.AppMgr import ToolSvc
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaEmulationTool
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaNavAnalysisTool,TrigEgammaNavTPAnalysisTool, TrigEgammaNavNtuple, TrigEgammaNavTPNtuple
-    from TrigEgammaAnalysisTools.TrigEgammaProbelist import default, probeListLowMidPtPhysicsTriggers # to import probelist
-    
-    #from TrigHLTMonitoring.HLTMonTriggerList import hltmonList # import MaM trigger list not available!!!!
-    import TriggerMenu.menu.Physics_pp_v5 as physics_menu
-    import TriggerMenu.menu.MC_pp_v5 as mc_menu
-    from TriggerJobOpts.TriggerFlags import TriggerFlags
-
-   
-    physics_menu.setupMenu()
-    mc_menu.setupMenu()
-    egammaMenu = TriggerFlags.EgammaSlice.signatures()
-    egammaChains = []
-    l1Items = []
-    addItems = []
-    for egchain in egammaMenu:
-        egammaChains.append(egchain[0])
-        l1Items.append(egchain[1])
-        addItems.append(egchain[3])
-    # Set list to full menu
-    #probelist = egammaChains
-    probelist = default
-    #probelist = list(set(default+probeListLowMidPtPhysicsTriggers))
-    
-
-    basePath = 'Trigger/HLT/Egamma/'
-    tagItems = [
-        'e24_lhmedium_iloose_L1EM18VH',
-        'e24_lhmedium_iloose_L1EM20VH',
-        'e24_lhtight_iloose'
-        'e26_lhtight_iloose',
-        #Primary cut-based electron triggers
-        'e24_medium_iloose_L1EM18VH',
-        'e24_medium_iloose_L1EM20VH',
-        'e24_tight_iloose',
-        'e26_tight_iloose'
-        ]
-    Analysis = TrigEgammaNavAnalysisTool(name='NavAnalysis',
-            DirectoryPath=basePath+'Analysis',
-            TriggerList=probelist, 
-            File="PhysVal")
-    
-    TPAnalysis = TrigEgammaNavTPAnalysisTool(name='NavTPAnalysis',
-            DirectoryPath=basePath+'TPAnalysis',
-            TriggerList=probelist, 
-            File="PhysVal",
-            TagTriggerList=tagItems,
-            OutputLevel=0)
- 
-    Emulation = TrigEgammaEmulationTool("Emulation",TriggerList=probelist)
- 
-
-    Ntuple    = TrigEgammaNavNtuple(name="NavNtuple",
-            DirectoryPath=basePath+'Ntuple',
-            TriggerList=probelist,
-            DoOfflineDump=False,
-            ForcePidSelection=True,
-            ForceProbeIsolation=False,
-            ForceEtThreshold=True,
-            RemoveCrack=True,
-            #ForceFilterSelection=False,
-            #ElectronFilterType="Tight",
-            File="PhysVal",
-            OutputLevel=0)
-
-   
-    TPNtuple  = TrigEgammaNavTPNtuple(name="NavTPNtuple",
-            DirectoryPath=basePath+'TPNtuple',
-            TriggerList=probelist,
-            File="PhysVal",
-            TagTriggerList=tagItems,
-            OutputLevel=0)
-
-
-    from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConf import TrigEgammaPhysValMonTool
-    TrigEgammaPhysValMonTool = TrigEgammaPhysValMonTool( name = "TrigEgammaPhysValMonTool", 
-            histoPathBase=basePath,
-            Tools=[
-                "TrigEgammaNavAnalysisTool/NavAnalysis",
-                "TrigEgammaNavTPAnalysisTool/NavTPAnalysis",
-                "TrigEgammaEmulationTool/Emulation",
-                "TrigEgammaNavNtuple/NavNtuple",
-                "TrigEgammaNavTPNtuple/NavTPNtuple"
-                ])
-
-    #ToolSvc += TrigEgammaPhysValMonTool
-
-
-
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py
index be86a3aa05ae..ed20ee82f66c 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py
@@ -9,132 +9,132 @@
 
 #Tag items
 triggerTags = [ 
-  'HLT_e24_lhmedium_iloose_L1EM18VH',
-  'HLT_e24_lhmedium_iloose_L1EM20VH',
-  'HLT_e24_lhtight_iloose',
-  'HLT_e26_lhtight_iloose',
-  # Primary cut-based electron triggers
-  'HLT_e24_medium_iloose_L1EM18VH',
-  'HLT_e24_medium_iloose_L1EM20VH',
-  'HLT_e24_tight_iloose',
-  'HLT_e26_tight_iloose'
-]
+        'HLT_e24_lhmedium_iloose_L1EM18VH',
+        'HLT_e24_lhmedium_iloose_L1EM20VH',
+        'HLT_e24_lhtight_iloose',
+        'HLT_e26_lhtight_iloose',
+        # Primary cut-based electron triggers
+        'HLT_e24_medium_iloose_L1EM18VH',
+        'HLT_e24_medium_iloose_L1EM20VH',
+        'HLT_e24_tight_iloose',
+        'HLT_e26_tight_iloose'
+        ]
 
 
 monitoring_mam = {
-  'primary_single_ele'      : 'HLT_e26_lhtight_iloose',
-  'primary_single_cut_ele'  : 'HLT_e24_tight_iloose',
-  'primary_single_pho'      : 'HLT_g120_loose'}
+        'primary_single_ele'      : 'HLT_e26_lhtight_iloose',
+        'primary_single_cut_ele'  : 'HLT_e24_tight_iloose',
+        'primary_single_pho'      : 'HLT_g120_loose'}
 
 # L1 Items
 monitoring_L1Calo = [
-  'L1_EM20VH',
-  'L1_EM20VHI']
+        'L1_EM20VH',
+        'L1_EM20VHI']
 
 # High pt electron triggers that cannot be monitored with TP Analysis
 monitoring_electron=[
-  'HLT_e60_lhmedium',
-  'HLT_e60_medium',
-  'HLT_e120_lhloose',
-  'HLT_e120_loose',
-  'HLT_e140_lhloose'
-]
+        'HLT_e60_lhmedium',
+        'HLT_e60_medium',
+        'HLT_e120_lhloose',
+        'HLT_e120_loose',
+        'HLT_e140_lhloose'
+        ]
 
 # Full list of monitoring for photons
 monitoring_photon=[
-  'HLT_g25_loose',
-  'HLT_g35_loose',
-  "HLT_g25_medium",
-  "HLT_g35_medium",
-  'HLT_g20_tight',
-  'HLT_g120_loose',
-  'HLT_g140_loose'
-]
+        'HLT_g25_loose',
+        'HLT_g35_loose',
+        "HLT_g25_medium",
+        "HLT_g35_medium",
+        'HLT_g20_tight',
+        'HLT_g120_loose',
+        'HLT_g140_loose'
+        ]
 
 # Lowest single electron triggers for TP analysis
 monitoringTP_electron =[
-  'HLT_e24_lhmedium_L1EM18VH',
-  'HLT_e24_lhmedium_L1EM20VH',
-  'HLT_e24_medium_L1EM20VH',
-  'HLT_e24_lhmedium_iloose',
-  'HLT_e24_medium_iloose',
-  'HLT_e24_lhmedium_nod0_iloose',
-  'HLT_e24_lhtight_iloose',
-  'HLT_e24_tight_iloose',
-  'HLT_e26_lhtight_iloose',
-  'HLT_e26_lhtight_nod0_iloose',
-  'HLT_e26_lhtight_nod0_ivarloose',
-  'HLT_e26_lhtight_nod0_ringer_iloose',
-  'HLT_e26_lhtight_nod0_ringer_ivarloose',
-  'HLT_e28_lhtight_nod0_iloose',
-]
+        'HLT_e24_lhmedium_L1EM18VH',
+        'HLT_e24_lhmedium_L1EM20VH',
+        'HLT_e24_medium_L1EM20VH',
+        'HLT_e24_lhmedium_iloose',
+        'HLT_e24_medium_iloose',
+        'HLT_e24_lhmedium_nod0_iloose',
+        'HLT_e24_lhtight_iloose',
+        'HLT_e24_tight_iloose',
+        'HLT_e26_lhtight_iloose',
+        'HLT_e26_lhtight_nod0_iloose',
+        'HLT_e26_lhtight_nod0_ivarloose',
+        'HLT_e26_lhtight_nod0_ringer_iloose',
+        'HLT_e26_lhtight_nod0_ringer_ivarloose',
+        'HLT_e28_lhtight_nod0_iloose',
+        ]
 
 #Zee TP triggers
 monitoringTP_electronZee = [
-  'HLT_e24_lhtight_L1EM20VH_e15_etcut_Zee',
-  'HLT_e26_lhtight_e15_etcut_Zee',
-]
+        'HLT_e24_lhtight_L1EM20VH_e15_etcut_Zee',
+        'HLT_e26_lhtight_e15_etcut_Zee',
+        ]
 
 #Jpsiee TP triggers
 monitoringTP_electronJpsiee = [
-  "HLT_e5_loose",
-  "HLT_e5_lhloose",
-  "HLT_e5_vloose",
-  "HLT_e5_lhvloose",
-]
+        "HLT_e5_loose",
+        "HLT_e5_lhloose",
+        "HLT_e5_vloose",
+        "HLT_e5_lhvloose",
+        ]
 
 default = [
-  'HLT_e24_lhmedium_iloose_L1EM18VH',# Primary LH electron triggers
-  'HLT_e24_lhmedium_iloose_L1EM20VH',
-  'HLT_e24_lhtight_iloose',
-  'HLT_e24_lhtight_iloose_L1EM20VH',
-  'HLT_e26_lhtight_iloose',
-  'HLT_e26_lhtight_smooth_iloose',
-  'HLT_e60_lhmedium',
-  'HLT_e120_lhloose',
-  'HLT_e140_lhloose',
-  # Primary cut-based electron triggers
-  'HLT_e24_medium_iloose_L1EM18VH',
-  'HLT_e24_medium_iloose_L1EM20VH',
-  'HLT_e24_tight_iloose',
-  'HLT_e26_tight_iloose',
-  'HLT_e60_medium',
-  'HLT_e120_loose',
-  'HLT_e140_loose',
-  # Non-isolated
-  'HLT_e24_lhmedium_L1EM18VH',
-  'HLT_e24_medium_L1EM18VH',
-  'HLT_e24_lhtight_L1EM20VH',
-  'HLT_e24_tight_L1EM20VH',
-  'HLT_e24_lhmedium_L1EM20VHI',
-  # Single photon
-  'HLT_g120_loose',
-  'HLT_g140_loose',
-  # Suppporting triggers for alignment studies / LH ineffiency
-  'HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM18VH',
-  'HLT_e24_lhmedium_nod0_iloose_L1EM18VH',
-  'HLT_e24_lhmedium_nodeta_iloose_L1EM18VH',
-  'HLT_e24_lhmedium_nodphires_iloose_L1EM18VH',
-  'HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM20VH',
-  'HLT_e24_lhmedium_nod0_iloose_L1EM20VH',
-  'HLT_e24_lhmedium_nodeta_iloose_L1EM20VH',
-  'HLT_e24_lhmedium_nodphires_iloose_L1EM20VH',
-  'HLT_e24_lhmedium_iloose_HLTCalo_L1EM18VH',
-  'HLT_e24_lhmedium_iloose_HLTCalo_L1EM20VH',
-  'HLT_e24_lhmedium_iloose_L2EFCalo_L1EM18VH',
-  'HLT_e24_lhmedium_iloose_L2EFCalo_L1EM20VH',
-  'HLT_e26_lhtight_cutd0dphideta_iloose',
-  'HLT_e26_lhtight_iloose_HLTCalo',
-  'HLT_e26_lhtight_iloose_L2EFCalo',
-  'HLT_e24_lhtight_iloose_HLTCalo_L1EM20VH',
-  'HLT_e24_lhtight_iloose_L2EFCalo_L1EM20VH',
-  'HLT_e60_lhmedium_HLTCalo',
-  'HLT_e60_lhmedium_L2EFCalo',
-  'HLT_e60_lhmedium_nod0',
-  'HLT_e60_lhmedium_cutd0dphideta',
-  # Supporting trigger for background
-  #'HLT_e24_vloose_L1EM18VH', 
-  #'HLT_e24_vloose_L1EM20VH',  
+        'HLT_e24_lhmedium_iloose_L1EM18VH',# Primary LH electron triggers
+        'HLT_e24_lhmedium_iloose_L1EM20VH',
+        'HLT_e24_lhtight_iloose',
+        'HLT_e24_lhtight_iloose_L1EM20VH',
+        'HLT_e26_lhtight_iloose',
+        'HLT_e26_lhtight_smooth_iloose',
+        'HLT_e60_lhmedium',
+        'HLT_e120_lhloose',
+        'HLT_e140_lhloose',
+        # Primary cut-based electron triggers
+        'HLT_e24_medium_iloose_L1EM18VH',
+        'HLT_e24_medium_iloose_L1EM20VH',
+        'HLT_e24_tight_iloose',
+        'HLT_e26_tight_iloose',
+        'HLT_e60_medium',
+        'HLT_e120_loose',
+        'HLT_e140_loose',
+        # Non-isolated
+        'HLT_e24_lhmedium_L1EM18VH',
+        'HLT_e24_medium_L1EM18VH',
+        'HLT_e24_lhtight_L1EM20VH',
+        'HLT_e24_tight_L1EM20VH',
+        'HLT_e24_lhmedium_L1EM20VHI',
+        # Single photon
+        'HLT_g120_loose',
+        'HLT_g140_loose',
+        # Suppporting triggers for alignment studies / LH ineffiency
+        'HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM18VH',
+        'HLT_e24_lhmedium_nod0_iloose_L1EM18VH',
+        'HLT_e24_lhmedium_nodeta_iloose_L1EM18VH',
+        'HLT_e24_lhmedium_nodphires_iloose_L1EM18VH',
+        'HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM20VH',
+        'HLT_e24_lhmedium_nod0_iloose_L1EM20VH',
+        'HLT_e24_lhmedium_nodeta_iloose_L1EM20VH',
+        'HLT_e24_lhmedium_nodphires_iloose_L1EM20VH',
+        'HLT_e24_lhmedium_iloose_HLTCalo_L1EM18VH',
+        'HLT_e24_lhmedium_iloose_HLTCalo_L1EM20VH',
+        'HLT_e24_lhmedium_iloose_L2EFCalo_L1EM18VH',
+        'HLT_e24_lhmedium_iloose_L2EFCalo_L1EM20VH',
+        'HLT_e26_lhtight_cutd0dphideta_iloose',
+        'HLT_e26_lhtight_iloose_HLTCalo',
+        'HLT_e26_lhtight_iloose_L2EFCalo',
+        'HLT_e24_lhtight_iloose_HLTCalo_L1EM20VH',
+        'HLT_e24_lhtight_iloose_L2EFCalo_L1EM20VH',
+        'HLT_e60_lhmedium_HLTCalo',
+        'HLT_e60_lhmedium_L2EFCalo',
+        'HLT_e60_lhmedium_nod0',
+        'HLT_e60_lhmedium_cutd0dphideta',
+        # Supporting trigger for background
+        #'HLT_e24_vloose_L1EM18VH', 
+#'HLT_e24_vloose_L1EM20VH',  
   #'HLT_e24_lhvloose_L1EM18VH', 
   #'HLT_e24_lhvloose_L1EM20VH',  
   #'HLT_e26_lhvloose_L1EM20VH',
@@ -150,7 +150,7 @@ default = [
   'HLT_e17_loose_L1EM15',
   'HLT_e17_lhloose_L1EM15',
   'HLT_e13_etcut_trkcut',
-	# Rerun mode for photon
+        # Rerun mode for photon
   # Performance and supporting triggers 
   #"HLT_g0_perf_L1EM3_EMPTY",
   #"HLT_e0_perf_L1EM3_EMPTY",
@@ -193,190 +193,190 @@ default = [
 # Samples to run - Zee and a background such as dijet or JF17 or any JF sample
 
 probeListLowMidPtSupportingTriggers = [
-	"HLT_e0_L2Star_perf_L1EM15",
-	"HLT_e0_L2Star_perf_L1EM3",
-	"HLT_e0_perf_L1EM15",
-	"HLT_e0_perf_L1EM3",
-	"HLT_e10_etcut_L1EM7",
-	"HLT_e13_etcut_L1EM10_W-MT25",
-	"HLT_e13_etcut_L1EM10_W-MT30",
-	"HLT_e13_etcut_L1W-NOMATCH",
-	"HLT_e13_etcut_L1W-NOMATCH_W-05RO-XEEMHT",
-	"HLT_e13_etcut_trkcut",
-	"HLT_e14_etcut",
-	"HLT_e17_etcut_L1EM15",
-	"HLT_e17_etcut_L2StarA_L1EM15",
-	"HLT_e17_etcut_L2StarB_L1EM15",
-	"HLT_e17_etcut_L2StarC_L1EM15",
-	"HLT_e17_etcut_L2Star_idperf_L1EM15",
-	"HLT_e17_etcut_idperf_L1EM15",
-	"HLT_e18_etcut_L1EM15_W-MT35",
-	"HLT_e18_etcut_trkcut",
-	"HLT_e20_etcut_L1EM12",
-	"HLT_e30_etcut_L1EM15",
-	"HLT_e3_etcut",
-	"HLT_e3_etcut_L1EM3_EMPTY",
-	"HLT_e4_etcut",
-	"HLT_e5_etcut",
-	"HLT_e9_etcut",
-  "HLT_e24_etcut",
-  "HLT_e25_etcut_L1EM15",
-]
+        "HLT_e0_L2Star_perf_L1EM15",
+        "HLT_e0_L2Star_perf_L1EM3",
+        "HLT_e0_perf_L1EM15",
+        "HLT_e0_perf_L1EM3",
+        "HLT_e10_etcut_L1EM7",
+        "HLT_e13_etcut_L1EM10_W-MT25",
+        "HLT_e13_etcut_L1EM10_W-MT30",
+        "HLT_e13_etcut_L1W-NOMATCH",
+        "HLT_e13_etcut_L1W-NOMATCH_W-05RO-XEEMHT",
+        "HLT_e13_etcut_trkcut",
+        "HLT_e14_etcut",
+        "HLT_e17_etcut_L1EM15",
+        "HLT_e17_etcut_L2StarA_L1EM15",
+        "HLT_e17_etcut_L2StarB_L1EM15",
+        "HLT_e17_etcut_L2StarC_L1EM15",
+        "HLT_e17_etcut_L2Star_idperf_L1EM15",
+        "HLT_e17_etcut_idperf_L1EM15",
+        "HLT_e18_etcut_L1EM15_W-MT35",
+        "HLT_e18_etcut_trkcut",
+        "HLT_e20_etcut_L1EM12",
+        "HLT_e30_etcut_L1EM15",
+        "HLT_e3_etcut",
+        "HLT_e3_etcut_L1EM3_EMPTY",
+        "HLT_e4_etcut",
+        "HLT_e5_etcut",
+        "HLT_e9_etcut",
+        "HLT_e24_etcut",
+        "HLT_e25_etcut_L1EM15",
+        ]
 
 # ProbeList 2 Low/mid pt physics triggers
 # EmulationTool,Eff,Counts,Perf
 # Samples to run Zee and any background sample dijet, JFXX
 probeListLowMidPtPhysicsTriggers = [
-	"HLT_e10_lhvloose_L1EM7",
-	"HLT_e10_vloose_L1EM7",
-	"HLT_e12_lhloose",
-	"HLT_e12_loose",
-	"HLT_e12_lhvloose_L1EM10VH",
-	"HLT_e12_vloose_L1EM10VH",
-	"HLT_e15_lhloose_L1EM13VH",
-	"HLT_e15_lhvloose_L1EM13VH",
-	"HLT_e15_lhvloose_L1EM7",
-	"HLT_e15_loose_L1EM13VH",
-	"HLT_e15_vloose_L1EM13VH",
-	"HLT_e15_vloose_L1EM7",
-	"HLT_e17_lhloose",
-	"HLT_e17_lhmedium",
-	"HLT_e17_lhmedium_iloose",
-	"HLT_e17_lhvloose",
-	"HLT_e17_loose",
-	"HLT_e17_medium",
-	"HLT_e17_medium_iloose",
-	"HLT_e17_vloose",
-	"HLT_e20_lhmedium",
-	"HLT_e20_lhvloose",
-	"HLT_e20_medium",
-	"HLT_e20_vloose",
-	"HLT_e20_vloose_L1EM12",
-	"HLT_e24_lhmedium_L1EM15VH",
-	"HLT_e24_lhmedium_L1EM18VH",
-	"HLT_e24_lhmedium_iloose_L1EM18VH",
-	"HLT_e24_lhmedium_iloose_L1EM20VH",
-	"HLT_e24_lhtight_iloose",
-	"HLT_e24_lhvloose_L1EM18VH",
-	"HLT_e24_lhvloose_L1EM20VH",
-	"HLT_e24_medium_L1EM15VH",
-	"HLT_e24_medium_L1EM18VH",
-	"HLT_e24_medium_iloose_L1EM18VH",
-	"HLT_e24_medium_iloose_L1EM20VH",
-	"HLT_e24_tight_L1EM20VH",
-	"HLT_e24_tight_iloose",
-	"HLT_e24_vloose_L1EM18VH",
-	"HLT_e24_vloose_L1EM20VH",
-	"HLT_e25_lhvloose_L1EM15",
-	"HLT_e25_vloose_L1EM15",
-	"HLT_e26_lhtight_iloose",
-	"HLT_e26_lhvloose_L1EM20VH",
-	"HLT_e26_tight_iloose",
-	"HLT_e26_vloose_L1EM20VH",
-	"HLT_e30_lhvloose_L1EM15",
-	"HLT_e30_vloose_L1EM15",
-]
+        "HLT_e10_lhvloose_L1EM7",
+        "HLT_e10_vloose_L1EM7",
+        "HLT_e12_lhloose",
+        "HLT_e12_loose",
+        "HLT_e12_lhvloose_L1EM10VH",
+        "HLT_e12_vloose_L1EM10VH",
+        "HLT_e15_lhloose_L1EM13VH",
+        "HLT_e15_lhvloose_L1EM13VH",
+        "HLT_e15_lhvloose_L1EM7",
+        "HLT_e15_loose_L1EM13VH",
+        "HLT_e15_vloose_L1EM13VH",
+        "HLT_e15_vloose_L1EM7",
+        "HLT_e17_lhloose",
+        "HLT_e17_lhmedium",
+        "HLT_e17_lhmedium_iloose",
+        "HLT_e17_lhvloose",
+        "HLT_e17_loose",
+        "HLT_e17_medium",
+        "HLT_e17_medium_iloose",
+        "HLT_e17_vloose",
+        "HLT_e20_lhmedium",
+        "HLT_e20_lhvloose",
+        "HLT_e20_medium",
+        "HLT_e20_vloose",
+        "HLT_e20_vloose_L1EM12",
+        "HLT_e24_lhmedium_L1EM15VH",
+        "HLT_e24_lhmedium_L1EM18VH",
+        "HLT_e24_lhmedium_iloose_L1EM18VH",
+        "HLT_e24_lhmedium_iloose_L1EM20VH",
+        "HLT_e24_lhtight_iloose",
+        "HLT_e24_lhvloose_L1EM18VH",
+        "HLT_e24_lhvloose_L1EM20VH",
+        "HLT_e24_medium_L1EM15VH",
+        "HLT_e24_medium_L1EM18VH",
+        "HLT_e24_medium_iloose_L1EM18VH",
+        "HLT_e24_medium_iloose_L1EM20VH",
+        "HLT_e24_tight_L1EM20VH",
+        "HLT_e24_tight_iloose",
+        "HLT_e24_vloose_L1EM18VH",
+        "HLT_e24_vloose_L1EM20VH",
+        "HLT_e25_lhvloose_L1EM15",
+        "HLT_e25_vloose_L1EM15",
+        "HLT_e26_lhtight_iloose",
+        "HLT_e26_lhvloose_L1EM20VH",
+        "HLT_e26_tight_iloose",
+        "HLT_e26_vloose_L1EM20VH",
+        "HLT_e30_lhvloose_L1EM15",
+        "HLT_e30_vloose_L1EM15",
+        ]
 
 # Compare LHTrigger to IsEMTrigger
 probeListLHTriggers = [
-  "HLT_e10_lhvloose_L1EM7",
-  "HLT_e12_lhloose",
-  "HLT_e17_lhloose",
-  "HLT_e17_lhmedium",
-  "HLT_e17_lhmedium_iloose",
-  "HLT_e17_lhvloose",
-  "HLT_e20_lhmedium",
-  "HLT_e20_lhvloose",
-  "HLT_e24_lhtight_iloose",
-  "HLT_e26_lhtight_iloose",
-  "HLT_e30_lhvloose_L1EM15",
-  "HLT_e60_lhmedium",
-]
+        "HLT_e10_lhvloose_L1EM7",
+        "HLT_e12_lhloose",
+        "HLT_e17_lhloose",
+        "HLT_e17_lhmedium",
+        "HLT_e17_lhmedium_iloose",
+        "HLT_e17_lhvloose",
+        "HLT_e20_lhmedium",
+        "HLT_e20_lhvloose",
+        "HLT_e24_lhtight_iloose",
+        "HLT_e26_lhtight_iloose",
+        "HLT_e30_lhvloose_L1EM15",
+        "HLT_e60_lhmedium",
+        ]
 
 # Compare with LH trigger above
 probeListIsEMTriggers = [
-  "HLT_e10_vloose_L1EM7",
-  "HLT_e12_loose",
-  "HLT_e17_loose",
-	"HLT_e17_medium",
-	"HLT_e17_medium_iloose",
-  "HLT_e17_vloose",
-	"HLT_e20_medium",
-	"HLT_e20_vloose",
-  "HLT_e24_tight_iloose",
-  "HLT_e26_tight_iloose",
-  "HLT_e30_vloose_L1EM15",
-  "HLT_e60_medium",
-]
+        "HLT_e10_vloose_L1EM7",
+        "HLT_e12_loose",
+        "HLT_e17_loose",
+        "HLT_e17_medium",
+        "HLT_e17_medium_iloose",
+        "HLT_e17_vloose",
+        "HLT_e20_medium",
+        "HLT_e20_vloose",
+        "HLT_e24_tight_iloose",
+        "HLT_e26_tight_iloose",
+        "HLT_e30_vloose_L1EM15",
+        "HLT_e60_medium",
+        ]
 
 # Compare with same items without L1 seed
 probeListAltL1Seeds = [
-	"HLT_e12_lhloose_L1EM10VH",
-  "HLT_e12_loose_L1EM10VH",
-  "HLT_e17_lhloose_L1EM15",
-  "HLT_e17_loose_L1EM15",
-  "HLT_e20_lhvloose_L1EM12",
-  "HLT_e24_lhtight_L1EM20VH",
-	"HLT_e24_lhtight_iloose_L1EM20VH",
-	"HLT_e24_tight_iloose_L1EM20VH",
-	"HLT_e24_tight_iloose_etisem_L1EM20VH",
-]
+        "HLT_e12_lhloose_L1EM10VH",
+        "HLT_e12_loose_L1EM10VH",
+        "HLT_e17_lhloose_L1EM15",
+        "HLT_e17_loose_L1EM15",
+        "HLT_e20_lhvloose_L1EM12",
+        "HLT_e24_lhtight_L1EM20VH",
+        "HLT_e24_lhtight_iloose_L1EM20VH",
+        "HLT_e24_tight_iloose_L1EM20VH",
+        "HLT_e24_tight_iloose_etisem_L1EM20VH",
+        ]
 
 # Special triggers for hlt id performance
 probeListPerfTriggers = [
-	"HLT_e24_lhmedium_L2Star_idperf_L1EM20VH",
-	"HLT_e24_lhmedium_idperf_L1EM20VH",
-  "HLT_e24_medium1_L2Star_idperf_L1EM18VH",
-  "HLT_e24_medium1_idperf_L1EM18VH",
-  "HLT_e24_medium_L2Star_idperf_L1EM20VH",
-  "HLT_e24_medium_idperf_L1EM20VH",
-]
+        "HLT_e24_lhmedium_L2Star_idperf_L1EM20VH",
+        "HLT_e24_lhmedium_idperf_L1EM20VH",
+        "HLT_e24_medium1_L2Star_idperf_L1EM18VH",
+        "HLT_e24_medium1_idperf_L1EM18VH",
+        "HLT_e24_medium_L2Star_idperf_L1EM20VH",
+        "HLT_e24_medium_idperf_L1EM20VH",
+        ]
 
 # Run1 tracking triggers, for rate estimates
 # Compare with same triggers w/o L2StarA
 probeListRun1TrkTriggers = [
-  "HLT_e24_lhmedium_iloose_L2StarA_L1EM20VH",
-  "HLT_e24_medium1_iloose_L2StarA_L1EM18VH",
-  "HLT_e24_medium_iloose_L2StarA_L1EM20VH",
-]
+        "HLT_e24_lhmedium_iloose_L2StarA_L1EM20VH",
+        "HLT_e24_medium1_iloose_L2StarA_L1EM18VH",
+        "HLT_e24_medium_iloose_L2StarA_L1EM20VH",
+        ]
 
 # Run1 Pid, compare with same Run2 items
 probeListRun1PidTriggers = [
-	"HLT_e24_medium1_L1EM18VH",
-	"HLT_e24_medium1_iloose_L1EM18VH",
-	"HLT_e24_tight1_iloose",
-	"HLT_e24_tight1_iloose_L1EM20VH",
-  "HLT_e26_tight1_iloose",
-]
+        "HLT_e24_medium1_L1EM18VH",
+        "HLT_e24_medium1_iloose_L1EM18VH",
+        "HLT_e24_tight1_iloose",
+        "HLT_e24_tight1_iloose_L1EM20VH",
+        "HLT_e26_tight1_iloose",
+        ]
 
 # To be compared with the default items
 probeListMisalignmentTriggers = [
-	"HLT_e24_lhmedium_cutd0dphideta_L1EM18VH",
-	"HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM18VH",
-	"HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM20VH",
-	"HLT_e24_lhmedium_nod0_L1EM18VH",
-	"HLT_e24_lhmedium_nod0_iloose_L1EM18VH",
-	"HLT_e24_lhmedium_nodeta_L1EM18VH",
-	"HLT_e24_lhmedium_nodeta_iloose_L1EM18VH",
-	"HLT_e24_lhmedium_nodphires_L1EM18VH",
-	"HLT_e24_lhmedium_nodphires_iloose_L1EM18VH",
-	"HLT_e24_lhtight_cutd0dphideta_iloose",
-	"HLT_e24_lhtight_cutd0dphideta_iloose_L1EM20VH",
-  "HLT_e26_lhtight_cutd0dphideta_iloose",
-  "HLT_e60_lhmedium_cutd0dphideta",
-]
+        "HLT_e24_lhmedium_cutd0dphideta_L1EM18VH",
+        "HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM18VH",
+        "HLT_e24_lhmedium_cutd0dphideta_iloose_L1EM20VH",
+        "HLT_e24_lhmedium_nod0_L1EM18VH",
+        "HLT_e24_lhmedium_nod0_iloose_L1EM18VH",
+        "HLT_e24_lhmedium_nodeta_L1EM18VH",
+        "HLT_e24_lhmedium_nodeta_iloose_L1EM18VH",
+        "HLT_e24_lhmedium_nodphires_L1EM18VH",
+        "HLT_e24_lhmedium_nodphires_iloose_L1EM18VH",
+        "HLT_e24_lhtight_cutd0dphideta_iloose",
+        "HLT_e24_lhtight_cutd0dphideta_iloose_L1EM20VH",
+        "HLT_e26_lhtight_cutd0dphideta_iloose",
+        "HLT_e60_lhmedium_cutd0dphideta",
+        ]
 
 # Compare with default items
 probeListAltSequence = [
-	"HLT_e24_lhmedium_iloose_HLTCalo_L1EM18VH",
-	"HLT_e24_lhmedium_iloose_HLTCalo_L1EM20VH",
-	"HLT_e24_lhtight_iloose_HLTCalo",
-	"HLT_e24_lhtight_iloose_HLTCalo_L1EM20VH",
-  "HLT_e24_lhtight_iloose_L2EFCalo_L1EM20VH",
-  "HLT_e24_tight_iloose_HLTCalo_L1EM20VH",
-  "HLT_e24_tight_iloose_L2EFCalo_L1EM20VH",
-  "HLT_e26_lhtight_iloose_HLTCalo",
-]
+        "HLT_e24_lhmedium_iloose_HLTCalo_L1EM18VH",
+        "HLT_e24_lhmedium_iloose_HLTCalo_L1EM20VH",
+        "HLT_e24_lhtight_iloose_HLTCalo",
+        "HLT_e24_lhtight_iloose_HLTCalo_L1EM20VH",
+        "HLT_e24_lhtight_iloose_L2EFCalo_L1EM20VH",
+        "HLT_e24_tight_iloose_HLTCalo_L1EM20VH",
+        "HLT_e24_tight_iloose_L2EFCalo_L1EM20VH",
+        "HLT_e26_lhtight_iloose_HLTCalo",
+        ]
 
 #ProbeList 3 High pt triggers
 #Should run with Zprime and / or WPrime samples
@@ -387,164 +387,164 @@ probeListAltSequence = [
 
 # Etcut Trigger list
 probeListHighPtSupportingTriggers = [
-	"HLT_e100_etcut",
-	"HLT_e120_etcut",
-	"HLT_e40_etcut_L1EM15",
-	"HLT_e60_etcut",
-	"HLT_e80_etcut",
-	"HLT_e50_etcut_L1EM15",
-]
+        "HLT_e100_etcut",
+        "HLT_e120_etcut",
+        "HLT_e40_etcut_L1EM15",
+        "HLT_e60_etcut",
+        "HLT_e80_etcut",
+        "HLT_e50_etcut_L1EM15",
+        ]
 
 # The Primary Trigger List
 probeListHighPtPhysicsTriggers = [
-	"HLT_e120_lhloose",
-	"HLT_e120_lhloose_HLTCalo",
-	"HLT_e120_lhvloose",
-	"HLT_e120_loose",
-	"HLT_e120_loose1",
-	"HLT_e120_vloose",
-	"HLT_e140_lhloose",
-	"HLT_e140_lhloose_HLTCalo",
-	"HLT_e140_loose",
-	"HLT_e40_lhvloose_L1EM15",
-	"HLT_e40_vloose_L1EM15",
-	"HLT_e50_lhvloose_L1EM15",
-	"HLT_e50_vloose_L1EM15",
-	"HLT_e60_lhloose",
-	"HLT_e60_lhmedium",
-	"HLT_e60_lhmedium_HLTCalo",
-	"HLT_e60_lhmedium_cutd0dphideta",
-	"HLT_e60_lhvloose",
-	"HLT_e60_loose",
-	"HLT_e60_medium",
-	"HLT_e60_medium1",
-	"HLT_e60_vloose",
-	"HLT_e70_lhloose",
-	"HLT_e70_lhvloose",
-	"HLT_e70_loose",
-	"HLT_e70_vloose",
-	"HLT_e80_lhvloose",
-	"HLT_e80_vloose",
-]
+        "HLT_e120_lhloose",
+        "HLT_e120_lhloose_HLTCalo",
+        "HLT_e120_lhvloose",
+        "HLT_e120_loose",
+        "HLT_e120_loose1",
+        "HLT_e120_vloose",
+        "HLT_e140_lhloose",
+        "HLT_e140_lhloose_HLTCalo",
+        "HLT_e140_loose",
+        "HLT_e40_lhvloose_L1EM15",
+        "HLT_e40_vloose_L1EM15",
+        "HLT_e50_lhvloose_L1EM15",
+        "HLT_e50_vloose_L1EM15",
+        "HLT_e60_lhloose",
+        "HLT_e60_lhmedium",
+        "HLT_e60_lhmedium_HLTCalo",
+        "HLT_e60_lhmedium_cutd0dphideta",
+        "HLT_e60_lhvloose",
+        "HLT_e60_loose",
+        "HLT_e60_medium",
+        "HLT_e60_medium1",
+        "HLT_e60_vloose",
+        "HLT_e70_lhloose",
+        "HLT_e70_lhvloose",
+        "HLT_e70_loose",
+        "HLT_e70_vloose",
+        "HLT_e80_lhvloose",
+        "HLT_e80_vloose",
+        ]
 
 # ProbeList 4 Photon triggers
 # EmulationTool,Perf
 # Sample ggH125 and background dijet / JFXX
 
 probeListPhotonTriggers = [
-	"HLT_g0_hiptrt_L1EM18VH",
-	"HLT_g0_hiptrt_L1EM20VH",
-	"HLT_g0_hiptrt_L1EM20VHI",
-	"HLT_g0_hiptrt_L1EM22VHI",
-	"HLT_g0_perf_L1EM15",
-	"HLT_g0_perf_L1EM3",
-	"HLT_g100_loose",
-	"HLT_g10_etcut",
-	"HLT_g10_loose",
-	"HLT_g10_medium",
-	"HLT_g120_loose",
-	"HLT_g120_loose1",
-	"HLT_g120_loose_HLTCalo",
-	"HLT_g140_loose",
-	"HLT_g15_loose",
-	"HLT_g15_loose_L1EM3",
-	"HLT_g15_loose_L1EM7",
-	"HLT_g200_etcut",
-	"HLT_g20_etcut_L1EM12",
-	"HLT_g20_loose",
-	"HLT_g20_loose_L1EM12",
-	"HLT_g20_loose_L1EM15",
-	"HLT_g20_tight",
-	"HLT_g25_loose",
-	"HLT_g25_loose_L1EM15",
-	"HLT_g25_medium",
-	"HLT_g35_loose",
-	"HLT_g35_loose_L1EM15",
-	"HLT_g35_loose_L1EM15_g25_loose_L1EM15",
-	"HLT_g35_loose_g25_loose",
-	"HLT_g35_medium",
-	"HLT_g3_etcut",
-	"HLT_g3_etcut_L1EM3_EMPTY",
-	"HLT_g40_loose_L1EM15",
-	"HLT_g40_tight",
-	"HLT_g45_loose_L1EM15",
-	"HLT_g45_tight",
-	"HLT_g50_loose",
-	"HLT_g50_loose_L1EM15",
-	"HLT_g60_loose",
-	"HLT_g60_loose_L1EM15VH",
-	"HLT_g70_loose",
-	"HLT_g80_loose",
-]
+        "HLT_g0_hiptrt_L1EM18VH",
+        "HLT_g0_hiptrt_L1EM20VH",
+        "HLT_g0_hiptrt_L1EM20VHI",
+        "HLT_g0_hiptrt_L1EM22VHI",
+        "HLT_g0_perf_L1EM15",
+        "HLT_g0_perf_L1EM3",
+        "HLT_g100_loose",
+        "HLT_g10_etcut",
+        "HLT_g10_loose",
+        "HLT_g10_medium",
+        "HLT_g120_loose",
+        "HLT_g120_loose1",
+        "HLT_g120_loose_HLTCalo",
+        "HLT_g140_loose",
+        "HLT_g15_loose",
+        "HLT_g15_loose_L1EM3",
+        "HLT_g15_loose_L1EM7",
+        "HLT_g200_etcut",
+        "HLT_g20_etcut_L1EM12",
+        "HLT_g20_loose",
+        "HLT_g20_loose_L1EM12",
+        "HLT_g20_loose_L1EM15",
+        "HLT_g20_tight",
+        "HLT_g25_loose",
+        "HLT_g25_loose_L1EM15",
+        "HLT_g25_medium",
+        "HLT_g35_loose",
+        "HLT_g35_loose_L1EM15",
+        "HLT_g35_loose_L1EM15_g25_loose_L1EM15",
+        "HLT_g35_loose_g25_loose",
+        "HLT_g35_medium",
+        "HLT_g3_etcut",
+        "HLT_g3_etcut_L1EM3_EMPTY",
+        "HLT_g40_loose_L1EM15",
+        "HLT_g40_tight",
+        "HLT_g45_loose_L1EM15",
+        "HLT_g45_tight",
+        "HLT_g50_loose",
+        "HLT_g50_loose_L1EM15",
+        "HLT_g60_loose",
+        "HLT_g60_loose_L1EM15VH",
+        "HLT_g70_loose",
+        "HLT_g80_loose",
+        ]
 
 defaultJpsi=[
-  "HLT_e5_loose",
-  "HLT_e5_lhloose",
-  "HLT_e5_vloose",
-  "HLT_e5_lhvloose",
-]
+        "HLT_e5_loose",
+        "HLT_e5_lhloose",
+        "HLT_e5_vloose",
+        "HLT_e5_lhvloose",
+        ]
 
 
 # Lowest single electron triggers for TP analysis
 monitoringTP_electron_extra =[
-  'HLT_e24_lhmedium_L1EM18VH',
-  'HLT_e24_lhmedium_nod0_L1EM18VH',
-  'HLT_e24_lhmedium_nod0_L1EM20VH',
-  'HLT_e24_medium_nod0_L1EM20VH',
-  'HLT_e24_lhmedium_iloose',
-  'HLT_e24_medium_iloose',
-  'HLT_e24_lhmedium_nod0_iloose',
-  'HLT_e24_lhtight_nod0_iloose',
-  'HLT_e24_lhmedium_nod0_ivarloose',
-  'HLT_e24_lhtight_nod0_ivarloose',
-  'HLT_e24_lhtight_iloose',
-  'HLT_e24_tight_iloose',
-  'HLT_e26_lhtight_iloose',
-  'HLT_e26_lhtight_nod0_iloose',
-  'HLT_e26_lhtight_nod0_ivarloose',
-  'HLT_e24_lhmedium_nod0_ringer_L1EM20VH',
-  'HLT_e24_lhmedium_nod0_ringer_iloose',
-  'HLT_e24_lhtight_nod0_ringer_iloose',
-  'HLT_e24_lhmedium_nod0_ringer_ivarloose',
-  'HLT_e24_lhtight_nod0_ringer_ivarloose',
-  'HLT_e26_lhtight_nod0_ringer_iloose',
-  'HLT_e26_lhtight_nod0_ringer_ivarloose',
-  'HLT_e28_lhtight_nod0_iloose',
-  'HLT_e28_lhtight_nod0_ringer_iloose',
-  'HLT_e28_lhtight_nod0_ringer_ivarloose',
-]
+        'HLT_e24_lhmedium_L1EM18VH',
+        'HLT_e24_lhmedium_nod0_L1EM18VH',
+        'HLT_e24_lhmedium_nod0_L1EM20VH',
+        'HLT_e24_medium_nod0_L1EM20VH',
+        'HLT_e24_lhmedium_iloose',
+        'HLT_e24_medium_iloose',
+        'HLT_e24_lhmedium_nod0_iloose',
+        'HLT_e24_lhtight_nod0_iloose',
+        'HLT_e24_lhmedium_nod0_ivarloose',
+        'HLT_e24_lhtight_nod0_ivarloose',
+        'HLT_e24_lhtight_iloose',
+        'HLT_e24_tight_iloose',
+        'HLT_e26_lhtight_iloose',
+        'HLT_e26_lhtight_nod0_iloose',
+        'HLT_e26_lhtight_nod0_ivarloose',
+        'HLT_e24_lhmedium_nod0_ringer_L1EM20VH',
+        'HLT_e24_lhmedium_nod0_ringer_iloose',
+        'HLT_e24_lhtight_nod0_ringer_iloose',
+        'HLT_e24_lhmedium_nod0_ringer_ivarloose',
+        'HLT_e24_lhtight_nod0_ringer_ivarloose',
+        'HLT_e26_lhtight_nod0_ringer_iloose',
+        'HLT_e26_lhtight_nod0_ringer_ivarloose',
+        'HLT_e28_lhtight_nod0_iloose',
+        'HLT_e28_lhtight_nod0_ringer_iloose',
+        'HLT_e28_lhtight_nod0_ringer_ivarloose',
+        ]
 
 
 ### Make supproting trigger list for the emulation e/g tool
 supportingTriggerList = probeListLowMidPtSupportingTriggers+probeListHighPtSupportingTriggers
 # Update the supporting list with very loose chains. This will be used in data collisin matches
 for trig in probeListLowMidPtPhysicsTriggers+probeListHighPtPhysicsTriggers:
-  if 'vloose' in trig:  supportingTriggerList.append(trig)
+    if 'vloose' in trig:  supportingTriggerList.append(trig)
 
 supportingTriggerList.extend( [
-  'HLT_e24_lhvloose_nod0_L1EM20VH',
-  'HLT_e26_lhvloose_nod0_L1EM20VH',
-  'HLT_e28_lhvloose_nod0_L1EM20VH',
-  'HLT_e140_lhvloose_nod0',
-  'HLT_e10_lhvloose_nod0_L1EM7',
-  'HLT_e10_lhvloose_nod0_L1EM7',
-  'HLT_e15_lhvloose_nod0_L1EM7',
-  'HLT_e20_lhvloose_nod0_L1EM12',
-  'HLT_e25_lhvloose_nod0_L1EM15',
-  'HLT_e30_lhvloose_nod0_L1EM15',
-  'HLT_e40_lhvloose_nod0_L1EM15',
-  'HLT_e50_lhvloose_nod0_L1EM15',
-  'HLT_e70_lhvloose_nod0',
-  'HLT_e80_lhvloose_nod0',
-  'HLT_e100_lhvloose_nod0',
-  'HLT_e120_lhvloose_nod0',
-  'HLT_e5_lhvloose_nod0',
-  'HLT_e12_lhvloose_nod0_L1EM10VH',
-  'HLT_e17_lhvloose_nod0',
-  'HLT_e20_lhvloose_nod0',
-  'HLT_e40_lhvloose_nod0',
-  'HLT_e60_lhvloose_nod0',
-] )
+    'HLT_e24_lhvloose_nod0_L1EM20VH',
+    'HLT_e26_lhvloose_nod0_L1EM20VH',
+    'HLT_e28_lhvloose_nod0_L1EM20VH',
+    'HLT_e140_lhvloose_nod0',
+    'HLT_e10_lhvloose_nod0_L1EM7',
+    'HLT_e10_lhvloose_nod0_L1EM7',
+    'HLT_e15_lhvloose_nod0_L1EM7',
+    'HLT_e20_lhvloose_nod0_L1EM12',
+    'HLT_e25_lhvloose_nod0_L1EM15',
+    'HLT_e30_lhvloose_nod0_L1EM15',
+    'HLT_e40_lhvloose_nod0_L1EM15',
+    'HLT_e50_lhvloose_nod0_L1EM15',
+    'HLT_e70_lhvloose_nod0',
+    'HLT_e80_lhvloose_nod0',
+    'HLT_e100_lhvloose_nod0',
+    'HLT_e120_lhvloose_nod0',
+    'HLT_e5_lhvloose_nod0',
+    'HLT_e12_lhvloose_nod0_L1EM10VH',
+    'HLT_e17_lhvloose_nod0',
+    'HLT_e20_lhvloose_nod0',
+    'HLT_e40_lhvloose_nod0',
+    'HLT_e60_lhvloose_nod0',
+    ] )
 
 
 
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools.py
deleted file mode 100755
index 763707849410..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools.py
+++ /dev/null
@@ -1,117 +0,0 @@
-# Job options for standalone and Tier0 running of AnalysisTools 
-# Authors: 
-# Ryan Mackenzie White <ryan.white@cern.ch>
-# 
-# Tool and algorithm configuration done using egamma Factories
-# Default configurations found in TrigEgammaAnalysisToolsConfig
-
-# To run
-# athena -l DEBUG -c "DIR='/afs/cern.ch/work/j/jolopezl/datasets/valid1.147406.PowhegPythia8_AZNLO_Zee.recon.AOD.e3099_s2578_r6220_tid05203475_00'" -c "NOV=50" test_ZeeElectronLowPtSupportingTrigAnalysis.py
-# where NOV is the number of events to run
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from RecExConfig.RecFlags import rec
-from RecExConfig.RecAlgsFlags import recAlgs
-from AthenaCommon.AppMgr import ToolSvc
-
-import os
-
-#print 'Set some variables for job'
-dirtouse = str()
-
-finallist=[]
-
-if 'FILE' in dir() :
-     finallist.append(FILE)
-elif 'DIR' in dir() :
-     dirtouse=DIR       
-     while( dirtouse.endswith('/') ) :
-          dirtouse= dirtouse.rstrip('/')
-     listfiles=os.listdir(dirtouse)
-     for ll in listfiles:
-          finallist.append(dirtouse+'/'+ll)
-
-if 'NOV' in dir():
-    nov=NOV
-else :
-    nov=-1
-
-if 'RTT' in dir():
-    rttfile='root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/rtt/prod/rtt/'+RTT+'/x86_64-slc6-gcc49-opt/offline/TrigEgammaValidation/RDOtoAOD_MC_transform_Zee_25ns_pileup/AOD.Zee.25ns.pileup.pool.root'
-    finallist.append(rttfile)
-
-if 'GRL' in dir():
-    grl=GRL
-
-
-athenaCommonFlags.FilesInput=finallist
-athenaCommonFlags.EvtMax=nov
-rec.readAOD=True
-# switch off detectors
-rec.doForwardDet=False
-rec.doInDet=False
-rec.doCalo=False
-rec.doMuon=False
-rec.doEgamma=False
-rec.doTrigger = True; recAlgs.doTrigger=False # disable trigger (maybe necessary if detectors switched off)
-rec.doMuon=False
-rec.doMuonCombined=False
-rec.doWriteAOD=True
-rec.doWriteESD=False
-rec.doDPD=False
-rec.doTruth=False
-
-# autoconfiguration might trigger undesired feature
-rec.doESD.set_Value_and_Lock(False) # uncomment if do not run ESD making algorithms
-rec.doWriteESD.set_Value_and_Lock(False) # uncomment if do not write ESD
-rec.doAOD.set_Value_and_Lock(True) # uncomment if do not run AOD making algorithms
-rec.doWriteAOD.set_Value_and_Lock(True) # uncomment if do not write AOD
-rec.doWriteTAG.set_Value_and_Lock(False) # uncomment if do not write TAG
-
-# main jobOption
-include ("RecExCommon/RecExCommon_topOptions.py")
-MessageSvc.debugLimit = 20000000
-MessageSvc.infoLimit  = 20000000
-# TDT
-from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-ToolSvc += Trig__TrigDecisionTool( "TrigDecisionTool" )
-ToolSvc.TrigDecisionTool.TrigDecisionKey='xTrigDecision'
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-# Use GRL selection 
-if 'GRL' in dir():
-    # Configure the goodrunslist selector tool
-    from GoodRunsLists.GoodRunsListsConf import *
-    ToolSvc += GoodRunsListSelectorTool() 
-    GoodRunsListSelectorTool.GoodRunsListVec = [grl]
-    GoodRunsListSelectorTool.OutputLevel = DEBUG
-    from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-    topSequence = AlgSequence()
-    seq = AthSequencer("AthMasterSeq")
-    from GoodRunsListsUser.GoodRunsListsUserConf import *
-    seq += GRLTriggerSelectorAlg('GRLTriggerAlg1')
-    seq.GRLTriggerAlg1.GoodRunsListArray = ['PHYS_StandardGRL_All_Good']        ## pick up correct name from inside xml file!
-
-from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-topSequence += AthenaMonManager( "HLTMonManager")
-HLTMonManager = topSequence.HLTMonManager
-
-################ Mon Tools #################
-#Global HLTMonTool
-
-from TrigHLTMonitoring.TrigHLTMonitoringConf import HLTMonTool
-HLTMon = HLTMonTool(name               = 'HLTMon',
-               histoPathBase      = "HLT");
-
-#ToolSvc += HLTMon;
-HLTMonManager.AthenaMonTools += [ HLTMon ];
-    
-from TrigEgammaAnalysisTools import TrigEgammaMonToolConfig
-HLTEgammaMon = TrigEgammaMonToolConfig.TrigEgammaMonTool()
-HLTMonManager.AthenaMonTools += [ HLTEgammaMon ]
-HLTMonManager.FileKey = "GLOBAL"
-
-
-    
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisToolsGRL.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisToolsGRL.py
deleted file mode 100755
index cb574e9530c7..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisToolsGRL.py
+++ /dev/null
@@ -1,200 +0,0 @@
-# Job options for standalone and Tier0 running of AnalysisTools 
-# Authors: 
-# Ryan Mackenzie White <ryan.white@cern.ch>
-# 
-# Tool and algorithm configuration done using egamma Factories
-# Default configurations found in TrigEgammaAnalysisToolsConfig
-
-# To run
-# athena -l DEBUG -c "DIR='/afs/cern.ch/work/j/jolopezl/datasets/valid1.147406.PowhegPythia8_AZNLO_Zee.recon.AOD.e3099_s2578_r6220_tid05203475_00'" -c "NOV=50" test_ZeeElectronLowPtSupportingTrigAnalysis.py
-# where NOV is the number of events to run
-
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.ConditionsTag="CONDBR2-BLKPA-2014-00"
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from RecExConfig.RecFlags import rec
-from RecExConfig.RecAlgsFlags import recAlgs
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doSecVertexFinder.set_Value_and_Lock(False)
-from AthenaCommon.AppMgr import ToolSvc
-
-import os
-
-# Use the parser
-import argparse
-#print 'Setup parser'
-parser = argparse.ArgumentParser()
-#parser.add_argument("--file", action="store",help="input file name")
-#parser.add_argument("--dirname", action="store",help="input directory")
-#parser.add_argument("--nev",default=-1,action=store,type=int,help="number of events to process")
-#parser.add_argument("--output",default="Validation",action=store,help="output file name")
-#parser.add_argument("--t0",default=False,action=store_true,help="run T0 monitoring")
-#parser.add_argument("--tagTrigger",default="e26_lhtight_iloose",action=store,help="Tag trigger to TP")
-#parser.add_argument("--useMCMenu",default=False,action=store_true,help="Use MC menu to generate trigger list")
-#parser.add_argument("--usePhysicsMenu",default=False,action=store_true,help="Use MC menu to generate trigger list")
-
-#print 'Set some variables for job'
-dirtouse = str()
-
-finallist=[]
-#print 'Now parser'
-#args = parser.parse_args()
-#print 'Now setup filelist'
-#finallist.append(args.file)
-#print 'Or set the directory'
-#dirtouse=args.dirname
-#nov=args.nev
-#while( dirtouse.endswith('/') ) :
-#    dirtouse= dirtouse.rstrip('/')
-#    listfiles=os.listdir(dirtouse)
-#    for ll in listfiles:
-#        finallist.append(dirtouse+'/'+ll)
-#outputName = args.output
-#tagItem = args.Tagtrigger
-
-if 'FILE' in dir() :
-     finallist.append(FILE)
-elif 'DIR' in dir() :
-     dirtouse=DIR       
-     while( dirtouse.endswith('/') ) :
-          dirtouse= dirtouse.rstrip('/')
-     listfiles=os.listdir(dirtouse)
-     for ll in listfiles:
-          finallist.append(dirtouse+'/'+ll)
-
-if 'NOV' in dir():
-    nov=NOV
-else :
-    nov=-1
-
-if 'OUTPUT' in dir():
-    outputName = OUTPUT
-elif 'DOTIER0' in dir():
-    outputName = ''
-else:
-    outputName = 'Validation'
-
-if('TAG' in dir()):
-    tagItem = TAG 
-else: 
-    tagItem = 'e26_tight_iloose'
-
-
-athenaCommonFlags.FilesInput=finallist
-athenaCommonFlags.EvtMax=nov
-#athenaCommonFlags.EvtMax=-1
-rec.readAOD=True
-# switch off detectors
-rec.doForwardDet=False
-rec.doInDet=False
-rec.doCalo=False
-rec.doMuon=False
-rec.doEgamma=False
-rec.doTrigger = True; recAlgs.doTrigger=False # disable trigger (maybe necessary if detectors switched off)
-rec.doMuon=False
-rec.doMuonCombined=False
-rec.doWriteAOD=False
-rec.doWriteESD=False
-rec.doDPD=False
-rec.doTruth=False
-
-
-# autoconfiguration might trigger undesired feature
-rec.doESD.set_Value_and_Lock(False) # uncomment if do not run ESD making algorithms
-rec.doWriteESD.set_Value_and_Lock(False) # uncomment if do not write ESD
-rec.doAOD.set_Value_and_Lock(False) # uncomment if do not run AOD making algorithms
-rec.doWriteAOD.set_Value_and_Lock(False) # uncomment if do not write AOD
-rec.doWriteTAG.set_Value_and_Lock(False) # uncomment if do not write TAG
-
-# main jobOption
-include ("RecExCommon/RecExCommon_topOptions.py")
-
-# TDT
-from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-ToolSvc += Trig__TrigDecisionTool( "TrigDecisionTool" )
-ToolSvc.TrigDecisionTool.TrigDecisionKey='xTrigDecision'
-
-# Configure the goodrunslist selector tool
-from GoodRunsLists.GoodRunsListsConf import *
-ToolSvc += GoodRunsListSelectorTool() 
-GoodRunsListSelectorTool.GoodRunsListVec = ['data15_13TeV.periodAllYear_DetStatus-v63-pro18-01_DQDefects-00-01-02_PHYS_StandardGRL_All_Good.xml']
-GoodRunsListSelectorTool.OutputLevel = DEBUG
-# Set base path for monitoring/validation tools        
-basePath = '/HLT/Egamma/'
-
-if 'DOTIER0' in dir():
-    from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-    topSequence = AlgSequence()
-    seq = AthSequencer("AthMasterSeq")
-    from GoodRunsListsUser.GoodRunsListsUserConf import *
-    seq += GRLTriggerSelectorAlg('GRLTriggerAlg1')
-    seq.GRLTriggerAlg1.GoodRunsListArray = ['PHYS_StandardGRL_All_Good']        ## pick up correct name from inside xml file!
-    
-    from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-    topSequence += AthenaMonManager( "HLTMonManager")
-    HLTMonManager = topSequence.HLTMonManager
-
-    ################ Mon Tools #################
-
-    #Global HLTMonTool
-
-    from TrigHLTMonitoring.TrigHLTMonitoringConf import HLTMonTool
-    HLTMon = HLTMonTool(name               = 'HLTMon',
-                   histoPathBase      = "HLT");
-
-
-    #ToolSvc += HLTMon;
-    HLTMonManager.AthenaMonTools += [ HLTMon ];
-    
-    from TrigEgammaAnalysisTools import TrigEgammaMonToolConfig
-    TrigEgammaMonTool = TrigEgammaMonToolConfig.TrigEgammaMonTool()
-    HLTMonManager.AthenaMonTools += [ TrigEgammaMonTool ]
-    HLTMonManager.FileKey = "GLOBAL"
-
-elif 'DO50ns' in dir():
-    from AthenaCommon.AlgSequence import AlgSequence,AthSequencer
-    topSequence = AlgSequence()
-    seq = AthSequencer("AthMasterSeq")
-    from GoodRunsListsUser.GoodRunsListsUserConf import *
-    seq += GRLTriggerSelectorAlg('GRLTriggerAlg1')
-    seq.GRLTriggerAlg1.GoodRunsListArray = ['PHYS_StandardGRL_All_Good']        ## pick up correct name from inside xml file!
-
-    from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-    topSequence += AthenaMonManager( "HLTMonManager")
-    HLTMonManager = topSequence.HLTMonManager
-
-    ################ Mon Tools #################
-
-    #Global HLTMonTool
-
-    from TrigHLTMonitoring.TrigHLTMonitoringConf import HLTMonTool
-    HLTMon = HLTMonTool(name               = 'HLTMon',
-                   histoPathBase      = "HLT");
-
-
-    #ToolSvc += HLTMon;
-    HLTMonManager.AthenaMonTools += [ HLTMon ];
-    
-    from TrigEgammaAnalysisTools import TrigEgammaMonToolConfig50ns
-    TrigEgammaMonTool = TrigEgammaMonToolConfig50ns.TrigEgammaMonTool()
-    HLTMonManager.AthenaMonTools += [ TrigEgammaMonTool ]
-    HLTMonManager.FileKey = "GLOBAL"
-elif 'DOPHYSVAL' in dir():
-    from AthenaCommon.AlgSequence import AlgSequence
-    topSequence = AlgSequence()
-    
-    from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-    monMan= AthenaMonManager( "PhysValMonManager")
-    monMan.FileKey = "PhysVal"
-    topSequence += monMan
-
-    from GaudiSvc.GaudiSvcConf import THistSvc
-    ServiceMgr += THistSvc()
-    
-    ServiceMgr.THistSvc.Output += ["PhysVal DATAFILE='PhysVal.root' OPT='RECREATE'"]
-    from TrigEgammaAnalysisTools import TrigEgammaPhysValMonToolConfig
-    TrigEgammaPhysValMonToolConfig.TrigEgammaPhysValMonTool()
-    monMan.AthenaMonTools += [ "TrigEgammaPhysValMonTool" ]
-else:
-   print "No job configured, options DOPHYSVAL=True or DOTIER0=True" 
-    
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools_emulator.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools_emulator.py
deleted file mode 100644
index d935bbb645d2..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaAnalysisTools_emulator.py
+++ /dev/null
@@ -1,250 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-####################################################################################################
-# Job options for standalone and Tier0 running of AnalysisTools 
-# Authors: 
-# Ryan Mackenzie White <ryan.white@cern.ch>
-# Joao Victor Pinto    <jodafons@cern.ch>
-# 
-# Tool and algorithm configuration done using egamma Factories
-#
-# To run
-# athena -l DEBUG -c "DIR='/afs/cern.ch/work/j/jolopezl/datasets/\
-#                     valid1.147406.PowhegPythia8_AZNLO_Zee.recon.AOD.e3099_s2578_r6220_tid05203475_00'" 
-#                 -c "NOV=50" test_ZeeElectronLowPtSupportingTrigAnalysis.py
-# where NOV is the number of events to run
-####################################################################################################
-
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from RecExConfig.RecFlags import rec
-from RecExConfig.RecAlgsFlags import recAlgs
-from AthenaCommon.AppMgr import ToolSvc
-import os
-
-# Define triggers for tagging 
-tagList = ['HLT_e24_lhtight_nod0_ivarloose',
-           'HLT_e26_lhtight_nod0_ivarloose',
-           'HLT_e28_lhtight_nod0_ivarloose']
-
-triggerList_commissioning_v1 = [
-          
-         # standard monitoring chains
-         #'HLT_e17_lhvloose_nod0_L1EM15VHI',
-         'HLT_e17_lhvloose_nod0',
-         'HLT_e26_lhloose_nod0',
-         'HLT_e26_lhmedium_nod0',
-         #'HLT_e26_lhtight_nod0',
-         #'HLT_e26_lhtight_nod0_ivarloose',
-         'HLT_e28_lhtight_nod0_ivarloose',
-         'HLT_e60_lhmedium_nod0_L1EM24VHI',
-         'HLT_e140_lhloose_nod0_L1EM24VHI',
-         # ringer chains for the commissioning...
-         #'HLT_e17_lhvloose_nod0_ringer_L1EM15VHI',
-         'HLT_e17_lhvloose_nod0_ringer',
-         'HLT_e26_lhloose_nod0_ringer',
-         'HLT_e26_lhmedium_nod0_ringer',
-         #'HLT_e26_lhtight_nod0_ringer',
-         #'HLT_e26_lhtight_nod0_ringer_ivarloose',
-         'HLT_e28_lhtight_nod0_ringer_ivarloose',
-         'HLT_e60_lhmedium_nod0_ringer_L1EM24VHI',
-         'HLT_e140_lhloose_nod0_ringer_L1EM24VHI',
-    ]
-
-
-triggerList_monitoring_v1 = [
-         # standard monitoring chains
-         'HLT_e17_lhvloose_nod0_L1EM15VHI',
-         'HLT_e26_lhtight_nod0_ivarloose',
-         'HLT_e28_lhtight_nod0_icaloloose',
-         'HLT_e60_lhmedium_nod0_L1EM24VHI',
-         'HLT_e140_lhloose_nod0_L1EM24VHI',
-         # no ringer chains for pos-commissioning...
-         'HLT_e17_lhvloose_nod0_noringer_L1EM15VHI',
-         'HLT_e26_lhtight_nod0_noringer_ivarloose',
-         'HLT_e28_lhtight_nod0_noringer_ivarloose',
-         'HLT_e60_lhmedium_nod0_noringer_L1EM24VHI',
-         'HLT_e140_lhloose_nod0_noringer_L1EM24VHI',
-
-      ]
-
-
-triggerList = triggerList_monitoring_v1
-
-doGRL=False
-doEmulation=True
-DetailedHistograms=False
-####################################################################################################
-dirtouse = str()
-finallist=[]
-grllist=[]
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf
-from glob import glob
-
-if ('FILE' in dir()):
-    acf.FilesInput=[FILE]
-elif ('DIR' in dir()):
-    inputFiles = glob(DIR+'*')
-    acf.FilesInput=inputFiles
-if 'NOV' in dir():
-    nov=NOV
-else :
-    nov=500
-if 'GRL' in dir():
-  grllist.append(GRL)
-else:
-  #grllist.append('/afs/cern.ch/work/j/jodafons/public/data/data15_13TeV.periodAllYear_DetStatus-v79-repro20-02_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.xml')
-  #grllist.append('data15_13TeV.periodAllYear_DetStatus-v79-repro20-02_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.xml')
-  #grllist.append('/afs/cern.ch/work/j/jodafons/public/data/data16_13TeV.periodAllYear_DetStatus-v81-pro20-10_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.xml')
-  #grllist.append('data16_13TeV.periodAllYear_DetStatus-v81-pro20-10_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.xml')
-  grllist.append('data17_13TeV.periodAllYear_DetStatus-v92-pro21-05_Unknown_PHYS_StandardGRL_All_Good_25ns_Triggerno17e33prim.xml')
-
-####################################################################################################
-
-acf.EvtMax=nov
-rec.readAOD=True
-# switch off detectors
-rec.doForwardDet=False
-rec.doInDet=False
-rec.doCalo=False
-rec.doMuon=False
-rec.doEgamma=False
-rec.doTrigger=True
-recAlgs.doTrigger=False # disable trigger (maybe necessary if detectors switched off)
-rec.doMuon=False
-rec.doMuonCombined=False
-rec.doWriteAOD=True
-rec.doWriteESD=False
-rec.doDPD=False
-rec.doTruth=False
-# autoconfiguration might trigger undesired feature
-rec.doESD.set_Value_and_Lock(False)      # uncomment if do not run ESD making algorithms
-rec.doWriteESD.set_Value_and_Lock(False) # uncomment if do not write ESD
-rec.doAOD.set_Value_and_Lock(True)       # uncomment if do not run AOD making algorithms
-rec.doWriteAOD.set_Value_and_Lock(False) # uncomment if do not write AOD
-rec.doWriteTAG.set_Value_and_Lock(False) # uncomment if do not write TAG
-
-# main jobOption
-include ("RecExCommon/RecExCommon_topOptions.py")
-MessageSvc.debugLimit = 20000000
-MessageSvc.infoLimit  = 20000000
-
-# Add Trigger Decision Tool 
-from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-tdt = Trig__TrigDecisionTool( "TrigDecisionTool" )
-tdt.TrigDecisionKey='xTrigDecision'
-tdt.Navigation.ReadonlyHolders=True
-ToolSvc+=tdt
-
-try:
-  include ("AthenaMonitoring/DataQualityInit_jobOptions.py")
-except Exception:
-  treatException("Could not load AthenaMonitoring/DataQualityInit_jobOptions.py")
-
-
-
-
-# Call top sequence
-from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
-topSequence = AlgSequence()
-
-
-##################################### GRL Tools ##########################################
-# Good Run List (GRL)
-if doGRL:
-    from PyUtils.MetaReaderPeeker import metadata
-    try:
-        if metadata['eventTypes'][0] == 'IS_DATA':
-            from GoodRunsLists.GoodRunsListsConf import *
-            ToolSvc += GoodRunsListSelectorTool()
-            GoodRunsListSelectorTool.GoodRunsListVec = grllist
-            from GoodRunsListsUser.GoodRunsListsUserConf import *
-            seq = AthSequencer("AthFilterSeq")
-            seq += GRLTriggerSelectorAlg('GRLTriggerAlg1')
-            #seq.GRLTriggerAlg1.GoodRunsListArray = ['PHYS_StandardGRL_All_Good_25ns']
-            seq.GRLTriggerAlg1.GoodRunsListArray = [grllist[0].replace('.xml','')]
-    except:
-        print("GRL not available!")
-  
-##################################### Mon Tools ##########################################
-
-from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-topSequence += AthenaMonManager( "HLTMonManager")
-HLTMonManager = topSequence.HLTMonManager
-################ Mon Tools #################
-#Global HLTMonTool
-from TrigHLTMonitoring.TrigHLTMonitoringConf import HLTMonTool
-HLTMon = HLTMonTool(name  = 'HLTMon', histoPathBase = "HLT");
-ToolSvc += HLTMon;
-HLTMonManager.AthenaMonTools += [ "HLTMonTool/HLTMon" ];
-
-####################################################################################################
-#Define the base path for all histograms
-
-
-
-basePath = '/HLT/Egamma'
-#Configure the TrigEgammaPlotTool
-from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaNavTPAnalysisTool, TrigEgammaPlotTool, EfficiencyTool, DistTool, ResolutionTool
-from TrigEgammaAnalysisTools.TrigEgammaProbelist           import monitoring_mam, monitoring_electron, monitoring_photon 
-from TrigEgammaAnalysisTools.TrigEgammaProbelist           import probeListLowMidPtSupportingTriggers, probeListHighPtSupportingTriggers
-
-PlotTool = TrigEgammaPlotTool.copy( name="TrigEgammaPlotTool",
-                                    DirectoryPath=basePath,
-                                    MaM=monitoring_mam,
-                                    Efficiency=[],
-                                    Distribution=[],
-                                    Resolution=[])
-
-EffTool = EfficiencyTool.copy(name="EfficiencyTool",
-                              PlotTool=PlotTool,
-                              isEMResultNames=["Tight","Medium","Loose"],
-                              LHResultNames=["LHTight","LHMedium","LHLoose"],
-                              OutputLevel=0)
-
-
-
-####################################################################################################
-from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig import TrigEgammaEmulationTool
-from TrigEgammaEmulationTool.TrigEgammaEmulationEFConfig   import EgammaEFElectronDefaultEmulator,EgammaEFElectronNoD0Emulator
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-
-# Force this emulation selector path
-TriggerFlags.EgammaSlice.pidVersion.set_Value_and_Lock("ElectronPhotonSelectorTools/trigger/rel21_20170217/")
-TriggerFlags.EgammaSlice.ringerVersion.set_Value_and_Lock("RingerSelectorTools/TrigL2_20170505_v6")
-
-EmulationElectronTool = TrigEgammaEmulationTool.copy( name="TrigEgammaEmulationTool",
-                                                      TriggerList = triggerList,
-                                                      DoL2ElectronFex=True,
-                                                      DoEFCaloPid=False,
-                                                      DoRinger=True,
-                                                      OutputLevel=0)
-
-####################################################################################################
-
-AnalysisTool = TrigEgammaNavTPAnalysisTool( name = "TrigEgammaNavTPAnalysisTool",
-                                            Analysis='Zee',
-                                            PlotTool=PlotTool,
-                                            Tools=[EffTool],
-                                            OfflineTagSelector='Tight', # 1=tight, 2=medium, 3=loose
-                                            OfflineProbeSelector='Loose', 
-                                            DefaultProbePid='LHMedium',
-                                            doEmulation=doEmulation,
-                                            DetailedHistograms=DetailedHistograms,
-                                            EmulationTool=EmulationElectronTool,
-                                            TPTrigger=False,
-                                            RemoveCrack=False,
-                                            TagTriggerList=tagList,
-                                            TriggerList=triggerList,
-                                            OutputLevel=0)
-
-####################################################################################################
-Tools=['TrigEgammaNavTPAnalysisTool/TrigEgammaNavTPAnalysisTool']
-from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConf import TrigEgammaMonTool
-TrigEgammaMonTool = TrigEgammaMonTool( name = "HLTEgammaMon", histoPathBase=basePath, Tools=Tools)
-ToolSvc += TrigEgammaMonTool
-HLTMonManager.AthenaMonTools += [ "TrigEgammaMonTool/HLTEgammaMon" ]
-HLTMonManager.FileKey = "GLOBAL"
-ToolSvc.TrigDecisionTool.Navigation.OutputLevel = WARNING
-####################################################################################################
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaEventSelectionTool.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaEventSelectionTool.py
deleted file mode 100644
index ba72df178c83..000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/testTrigEgammaEventSelectionTool.py
+++ /dev/null
@@ -1,195 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-# Job options for standalone and Tier0 running of AnalysisTools 
-# Authors: 
-# Ryan Mackenzie White <ryan.white@cern.ch>
-# 
-# Tool and algorithm configuration done using egamma Factories
-# Default configurations found in TrigEgammaAnalysisToolsConfig
-#
-# To run
-# athena -l DEBUG -c "DIR='/afs/cern.ch/work/j/jolopezl/datasets/valid1.147406.PowhegPythia8_AZNLO_Zee.recon.AOD.e3099_s2578_r6220_tid05203475_00'" 
-#                 -c "NOV=50" test_ZeeElectronLowPtSupportingTrigAnalysis.py
-# where NOV is the number of events to run
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from RecExConfig.RecFlags import rec
-from RecExConfig.RecAlgsFlags import recAlgs
-from AthenaCommon.AppMgr import ToolSvc
-import os
-
-doZ=True
-doFakes=True
-
-# Define triggers for tagging 
-triggerTags     = ['HLT_e24_lhtight_nod0_ivarloose',
-                   'HLT_e26_lhtight_nod0_ivarloose',
-                   'HLT_e28_lhtight_nod0_ivarloose']
-
-triggerList = [
-         # standard monitoring chains
-         'HLT_e26_lhtight_nod0_ivarloose',
-         'HLT_e28_lhtight_nod0_ivarloose',
-         'HLT_e60_lhmedium_nod0_L1EM24VHI',
-         # no ringer chains for pos-commissioning...
-         'HLT_e26_lhtight_nod0_noringer_ivarloose_L1EM22VHI',
-         'HLT_e28_lhtight_nod0_noringer_ivarloose', # get real TDT
-         'HLT_e28_lhtight_nod0_noringer_ivarloose_L1EM24VHI',
-         'HLT_e60_lhmedium_nod0_noringer_L1EM24VHI',
-      ]
-
-
-
-#print 'Set some variables for job'
-dirtouse = str()
-finallist=[]
-
-if 'FILE' in dir() :
-     finallist.append(FILE)
-
-if 'DIR' in dir() :
-     dirtouse=DIR      
-     print 'DIR = ',dirtouse
-     while( dirtouse.endswith('/') ) :
-          dirtouse= dirtouse.rstrip('/')
-     listfiles=os.listdir(dirtouse)
-     for ll in listfiles:
-          finallist.append(dirtouse+'/'+ll)
-
-if 'NOV' in dir():
-    nov=NOV
-else :
-    nov=-1
-
-
-print  finallist 
-athenaCommonFlags.FilesInput=finallist
-athenaCommonFlags.EvtMax=nov
-rec.readAOD=True
-# switch off detectors
-rec.doForwardDet=False
-rec.doInDet=False
-rec.doCalo=False
-rec.doMuon=False
-rec.doEgamma=False
-rec.doTrigger = True; recAlgs.doTrigger=False # disable trigger (maybe necessary if detectors switched off)
-rec.doMuon=False
-rec.doAOD=False
-rec.doMuonCombined=False
-rec.doWriteAOD=False
-rec.doWriteESD=False
-rec.doDPD=False
-rec.doTruth=False
-
-# autoconfiguration might trigger undesired feature
-rec.doESD.set_Value_and_Lock(False) # uncomment if do not run ESD making algorithms
-rec.doWriteESD.set_Value_and_Lock(False) # uncomment if do not write ESD
-rec.doAOD.set_Value_and_Lock(True) # uncomment if do not run AOD making algorithms
-rec.doWriteAOD.set_Value_and_Lock(False) # uncomment if do not write AOD
-rec.doWriteTAG.set_Value_and_Lock(False) # uncomment if do not write TAG
-
-# main jobOption
-include ("RecExCommon/RecExCommon_topOptions.py")
-MessageSvc.debugLimit = 20000000
-MessageSvc.infoLimit  = 20000000
-# TDT
-from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-tdt = Trig__TrigDecisionTool( "TrigDecisionTool" )
-tdt.TrigDecisionKey='xTrigDecision'
-tdt.Navigation.ReadonlyHolders=True
-ToolSvc+=tdt
-
-try:
-  include ("AthenaMonitoring/DataQualityInit_jobOptions.py")
-except Exception:
-  treatException("Could not load AthenaMonitoring/DataQualityInit_jobOptions.py")
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-topSequence += AthenaMonManager( "HLTMonManager")
-HLTMonManager = topSequence.HLTMonManager
-
-################ Mon Tools #################
-#Global HLTMonTool
-
-from TrigHLTMonitoring.TrigHLTMonitoringConf import HLTMonTool
-HLTMon = HLTMonTool(name  = 'HLTMon', histoPathBase = "HLT");
-
-ToolSvc += HLTMon;
-HLTMonManager.AthenaMonTools += [ "HLTMonTool/HLTMon" ];
-    
-from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaPlotTool, getEventSelectionTool
-#Define the base path for all histograms
-basePath = '/HLT/Physval'
-
-#Configure the TrigEgammaPlotTool
-PlotTool = TrigEgammaPlotTool.copy( name="TrigEgammaPlotTool",
-                                    DirectoryPath=basePath,
-                                    #MaM=monitoring_mam,
-                                    Efficiency=[],
-                                    Distribution=[],
-                                    Resolution=[])
-
-TrigEgammaEventSelection = getEventSelectionTool()
-
-####################################################################################################
-
-from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig import TrigEgammaEmulationTool
-from TrigEgammaEmulationTool.TrigEgammaEmulationEFConfig   import EgammaEFElectronDefaultEmulator,EgammaEFElectronNoD0Emulator
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-
-# Force this emulation selector path
-TriggerFlags.EgammaSlice.pidVersion.set_Value_and_Lock("ElectronPhotonSelectorTools/trigger/rel21_20170217/")
-TriggerFlags.EgammaSlice.ringerVersion.set_Value_and_Lock("RingerSelectorTools/TrigL2_20170505_v6")
-
-EmulationElectronTool = TrigEgammaEmulationTool.copy( name="TrigEgammaEmulationTool",
-                                                      TriggerList = triggerList,
-                                                      DoL2ElectronFex=True,
-                                                      DoEFCaloPid=False,
-                                                      DoRinger=True,
-                                                      OutputLevel=0)
-
-####################################################################################################
-
-
-Tool = TrigEgammaEventSelection( name='EventSelection',
-                              Analysis='Probes',
-                              PlotTool=PlotTool,
-                              EmulationTool=EmulationElectronTool,
-                              File="",
-                              OutputLevel=0,
-                              DetailedHistograms=False,
-                              isEMResultNames=["Tight","Medium","Loose"],
-                              LHResultNames=["LHTight","LHMedium","LHLoose"],
-                              ZeeLowerMass=80,
-                              ZeeUpperMass=100,
-                              OfflineTagSelector='Tight', # 1=tight, 2=medium, 3=loose
-                              OfflineProbeSelector='Loose', 
-                              ForceProbePid=False, 
-                              OppositeCharge=True,
-                              OfflineTagMinEt=25,
-                              TagTriggerList=triggerTags,
-                              SelectionZ=doZ,
-                              SelectionFakes=doFakes,
-                              ApplyMinimalTrigger=False,
-                              DetailedDataLevel=2,
-                              DumpTags=False,
-                              TriggerList=triggerList)
-
-Tools=['TrigEgammaEventSelection/EventSelection']
-
-from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConf import TrigEgammaMonTool
-TrigEgammaMonTool = TrigEgammaMonTool( name = "HLTEgammaMon", 
-                                       histoPathBase=basePath,
-                                       Tools=Tools)
-
-ToolSvc += TrigEgammaMonTool
-
-#TrigEgammaMonToolConfig.TrigEgammaMonTool()
-HLTMonManager.AthenaMonTools += [ "TrigEgammaMonTool/HLTEgammaMon" ]
-HLTMonManager.FileKey = "GLOBAL"
-
-
-    
-- 
GitLab


From be36009aab70d98dd0528e201b5915a33856d9af Mon Sep 17 00:00:00 2001
From: sherwood <peter.sherwood@cern.ch>
Date: Tue, 22 Dec 2020 16:20:27 +0100
Subject: [PATCH 189/308] Jet hypo - support multiple FastReducer instances.

In FastReducer, parent Conditions are presented with jte groups made up
of jets chosen from those that pass siblings. Jet greoujps with duplicate
jets - ue ot the jet passing > 1 sibling Condition - are discarded. This is the
"no jet sharing regime".  On occasion jet sharing is required. This MR
allows jet sharing by supporting multiple indpendent FastReducrer instances.

As the the trees are independent, while no jet shring is allowed within the tree, there
are no contraints across the tree.

An example of such a chain from Run 2 required a forward backward jet, and a high mass dijet.
The jets making up the dijet could be shared with the forward backward jets.

The implmentation allows TrigJetHypoToolHelperNoGrouper to have >1
 TrigJetHypoToolConfig_fastReduction instances. These re looped over in intialise()
to produce multuple Matchers, each governing a FastReducter instance.

python/ChainLabelParser.py
	allow multiple trees to be produced by the parser.
	tidying,

python/ConditionsToolSetterFastReduction.py
	restructure to allow multiple TrigJetHypoToolConfig_fastReduction instances

python/FastReductionAlgToolFactory.py
	new module, extracted from ConditionsToolSetterFastReduction.py, as the code
	is shared among > 1 module.

python/ConditionsToolSetterFastReduction.py
	now instantiates only TrigJetHypoToolConfig_fastReduction tools
	    helper tool instantiation no in TrigJetHypoToolConfig.py
	AlgTool instantiation moved to FastReductionAlgToolFactory.py

python/TrigJetHypoToolConfig.py
	refactored to allow helper tool acquire multiple TrigJetHypoToolConfig_fastReduction
	instances.

python/jetlabel_tester.py
	tidy

python/testChainDictMaker.py
	accomodate changes to TrigJetHypoToolConfig.py

python/test_cases.py
	add a forest test chain label

src/TrigJetHypoToolHelperNoGrouper.cxx, h
	support multiple Matcher instances
---
 .../TrigHLTJetHypo/python/ChainLabelParser.py | 12 +--
 .../ConditionsToolSetterFastReduction.py      | 85 ++++---------------
 .../python/FastReductionAlgToolFactory.py     | 63 ++++++++++++++
 .../python/TrigJetHypoToolConfig.py           | 55 ++++++------
 .../TrigHLTJetHypo/python/jetlabel_tester.py  | 44 ++++------
 .../python/testChainDictMaker.py              | 16 ++--
 .../TrigHLTJetHypo/python/test_cases.py       | 15 +++-
 .../src/TrigJetHypoToolHelperNoGrouper.cxx    | 59 +++++++------
 .../src/TrigJetHypoToolHelperNoGrouper.h      | 17 ++--
 .../TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx  |  2 +-
 .../TrigHLTJetHypo/src/nodeIDPrinter.cxx      | 26 ++++++
 .../TrigHLTJetHypo/src/nodeIDPrinter.h        |  4 +
 12 files changed, 224 insertions(+), 174 deletions(-)
 create mode 100644 Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py
index ae90f265012b..94504552e886 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from __future__ import print_function
 from __future__ import absolute_import
 
@@ -304,18 +304,12 @@ class ChainLabelParser(object):
             print('error, stack size', len(self.tree), 'expected 2')
             print(self.state_history)
             
-        if len(self.tree[0].children) != 1:
-            error = True
-            print('error, top node has %d cdildren, expected 1' % (
-                len(self.tree[0].children)))
 
         final_state = 'end_scenario'
         if self.state != final_state:
             error = True
             print('error: final state is %s, expected %s' % (self.state,
                                                              final_state))
-        # print 'tree dump:'
-        # print self.tree[0].dump()
         print('parse', end=' ')
         if not error:
             print('succeeded')
@@ -331,8 +325,8 @@ class ChainLabelParser(object):
         for c in self.tree[0].children:
             c.tree_top = True
 
-        # for now (02/01/2019), no reco. First tree is only tree is hypo
-        return self.tree[0].children[0]
+        # return hypo forest (>= 1 trees)
+        return self.tree[0].children
 
 def _test(s):
     from TrigHLTJetHypo.ChainLabelParser import ChainLabelParser
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
index 9b3514a3d038..fe40393a1c9d 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
@@ -5,8 +5,8 @@ from a hypo tree."""
 
 from __future__ import print_function
 
-
-from AthenaConfiguration.ComponentFactory import CompFactory
+from TrigHLTJetHypo.FastReductionAlgToolFactory import (
+    FastReductionAlgToolFactory,)
 
 from collections import defaultdict
 
@@ -26,36 +26,11 @@ class ConditionsToolSetterFastReduction(object):
 
     """Visitor to set instantiated AlgTools to a jet hypo tree"""
 
-    JetMoments = {
-        'emfrac'  : 'EMFrac',
-        'hecfrac' : 'HECFrac',
-    }
 
     def __init__(self):
 
-        # for simple, use TrigJetConditionConfig_etaet. Needs to be
-        # completed because simple can conain any single jet condition
-        self.tool_factories = {
-            'eta': [CompFactory.TrigJetConditionConfig_abs_eta, 0], 
-            'peta': [CompFactory.TrigJetConditionConfig_signed_eta, 0],
-            'neta': [CompFactory.TrigJetConditionConfig_signed_eta, 0],
-            'et': [CompFactory.TrigJetConditionConfig_et, 0],
-            'djmass': [CompFactory.TrigJetConditionConfig_dijet_mass, 0],
-            'djdphi': [CompFactory.TrigJetConditionConfig_dijet_dphi, 0],
-            'djdeta': [CompFactory.TrigJetConditionConfig_dijet_deta, 0],
-            'qjmass': [CompFactory.TrigJetConditionConfig_qjet_mass, 0],
-            'smc': [CompFactory.TrigJetConditionConfig_smc, 0],
-            'jvt': [CompFactory.TrigJetConditionConfig_jvt, 0],
-            'ht': [CompFactory.TrigJetConditionConfig_htfr, 0],
-            'all': [CompFactory.TrigJetConditionConfig_acceptAll, 0],
-            'capacitychecked':
-            [CompFactory.TrigJetConditionConfig_capacitychecked, 0],
-            'fastreduction': [CompFactory.TrigJetHypoToolConfig_fastreduction, 0],
-            'helper': [CompFactory.TrigJetHypoToolHelperNoGrouper, 0],
-            }
-        for var in self.JetMoments:
-            self.tool_factories['mom'+var] = [CompFactory.TrigJetConditionConfig_moment, 0]
-
+        self.algToolFactory = FastReductionAlgToolFactory()
+ 
         # map conaining parent child ids for the node
         self.treeMap = {0: 0}
 
@@ -71,18 +46,6 @@ class ConditionsToolSetterFastReduction(object):
             self._set_conditions(cn)
 
 
- 
-    def _get_tool_instance(self, key, extra=''):
-   
-        klass = self.tool_factories[key][0]
-        sn = self.tool_factories[key][1]
-        
-        name = '%s_%d_fn' % (key, sn)
-        if extra: name += '_' + extra
-        tool = klass(name=name)            
-        self.tool_factories[key][1] += 1
-        return tool
-
     def _make_el_condition_tools(self, conf_dict):
         """conf_dict: a dict containing names of elemental conditions 
         and min, max valies. These will be used to instantiate
@@ -106,7 +69,7 @@ class ConditionsToolSetterFastReduction(object):
             # k in the condition name, v contains its min, max values.
 
             # create the AlgTool that will build the elemental condition
-            condition_tool = self._get_tool_instance(k) 
+            condition_tool = self.algToolFactory(k) 
             for lim, val in v.items():  # lim: min, max
                 setattr(condition_tool, lim, val)
 
@@ -160,7 +123,7 @@ class ConditionsToolSetterFastReduction(object):
             el_condition_tools = self._make_el_condition_tools(c)
  
             # create capacitychecked condition from elemental condition
-            condition_tool =self._get_tool_instance('capacitychecked')
+            condition_tool =self.algToolFactory('capacitychecked')
 
             if cpi:
 
@@ -188,9 +151,9 @@ class ConditionsToolSetterFastReduction(object):
             el_condition_tools.extend(self._make_el_condition_tools(fc))
 
         if not el_condition_tools:
-            el_condition_tools.append(self._get_tool_instance('all'))
+            el_condition_tools.append(self.algToolFactory('all'))
 
-        capacitychecked_condition_tool = self._get_tool_instance(
+        capacitychecked_condition_tool = self.algToolFactory(
             'capacitychecked')
 
         capacitychecked_condition_tool.conditionMakers = el_condition_tools
@@ -230,15 +193,8 @@ class ConditionsToolSetterFastReduction(object):
         #    assert False
             
     def report(self):
-        wid = max(len(k) for k in self.tool_factories.keys())
-        rep = '\n%s: ' % self.__class__.__name__
-
-        rep += '\n'.join(
-            ['%s: %d' % (k.ljust(wid), v[1])
-             for k, v in self.tool_factories.items()])
-
-        return rep
-
+        return str(self.algToolFactory)
+   
     def _fill_tree_map(self, node, tmap):
         tmap[node.node_id] = node.parent_id
         for cn in node.children:
@@ -254,12 +210,12 @@ class ConditionsToolSetterFastReduction(object):
             
         else:
             # must have a tool for Gaudi to instantiate in
-            cmap[node.node_id] = self._get_tool_instance('capacitychecked')
-            cmap[node.node_id].conditionMakers = [self._get_tool_instance('all')]
+            cmap[node.node_id] = self.algToolFactory('capacitychecked')
+            cmap[node.node_id].conditionMakers = [self.algToolFactory('all')]
             cmap[node.node_id].multiplicity = 1
 
-            fmap[node.node_id] = self._get_tool_instance('capacitychecked')
-            fmap[node.node_id].conditionMakers = [self._get_tool_instance('all')]
+            fmap[node.node_id] = self.algToolFactory('capacitychecked')
+            fmap[node.node_id].conditionMakers = [self.algToolFactory('all')]
             fmap[node.node_id].multiplicity = 1
 
             
@@ -317,17 +273,10 @@ class ConditionsToolSetterFastReduction(object):
         filterConditionsVec = self._map_2_vec(filterConditionsMap)
                
         # make a config tool and provide it with condition makers
-        config_tool = self._get_tool_instance('fastreduction')
+        config_tool = self.algToolFactory('fastreduction')
         config_tool.conditionMakers = conditionsVec
         config_tool.filtConditionsMakers = filterConditionsVec
         config_tool.treeVector = treeVec
+        self.config_tool = config_tool
         
-        nodestr = 'n%dp%d' % (tree.node_id, tree.parent_id)
-        helper_tool = self._get_tool_instance('helper', extra=nodestr)
-        helper_tool.HypoConfigurer = config_tool
-        helper_tool.node_id = tree.node_id
-        helper_tool.parent_id = tree.parent_id
-
-        self.tool = helper_tool
-
-        print (self.tool)
+        print (self.config_tool)
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py
new file mode 100644
index 000000000000..4a115d09f08c
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py
@@ -0,0 +1,63 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+"""Instantiator for AlgTools needed by the FastReduction."""
+
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+class FastReductionAlgToolFactory:
+
+    def __init__(self):
+        
+        self.tool_factories = {
+            'eta': [CompFactory.TrigJetConditionConfig_abs_eta, 0], 
+            'peta': [CompFactory.TrigJetConditionConfig_signed_eta, 0],
+            'neta': [CompFactory.TrigJetConditionConfig_signed_eta, 0],
+            'et': [CompFactory.TrigJetConditionConfig_et, 0],
+            'djmass': [CompFactory.TrigJetConditionConfig_dijet_mass, 0],
+            'djdphi': [CompFactory.TrigJetConditionConfig_dijet_dphi, 0],
+            'djdeta': [CompFactory.TrigJetConditionConfig_dijet_deta, 0],
+            'qjmass': [CompFactory.TrigJetConditionConfig_qjet_mass, 0],
+            'smc': [CompFactory.TrigJetConditionConfig_smc, 0],
+            'jvt': [CompFactory.TrigJetConditionConfig_jvt, 0],
+            'ht': [CompFactory.TrigJetConditionConfig_htfr, 0],
+            'all': [CompFactory.TrigJetConditionConfig_acceptAll, 0],
+            'capacitychecked':
+            [CompFactory.TrigJetConditionConfig_capacitychecked, 0],
+            'fastreduction': [CompFactory.TrigJetHypoToolConfig_fastreduction, 0],
+            'helper': [CompFactory.TrigJetHypoToolHelperNoGrouper, 0],
+            }
+
+
+        jetMoments = {
+            'emfrac'  : 'EMFrac',
+            'hecfrac' : 'HECFrac',
+        }
+
+        for var in jetMoments:
+            self.tool_factories['mom'+var] = [
+                CompFactory.TrigJetConditionConfig_moment, 0]
+
+
+    def __call__(self, key, extra=''):
+   
+        klass = self.tool_factories[key][0]
+        sn = self.tool_factories[key][1]
+        
+        name = '%s_%d_fn' % (key, sn)
+        if extra: name += '_' + extra
+        tool = klass(name=name)            
+        self.tool_factories[key][1] += 1
+        return tool
+
+    
+    def __str__(self):
+        wid = max(len(k) for k in self.tool_factories.keys())
+        rep = '\n%s: ' % self.__class__.__name__
+        
+        rep += '\n'.join(
+            ['%s: %d' % (k.ljust(wid), v[1])
+             for k, v in self.tool_factories.items()])
+
+        return rep
+
+    
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
index bb6155862780..f25a8d84c87e 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
@@ -8,6 +8,10 @@ from TrigHLTJetHypo.ConditionsToolSetterFastReduction import (
     ConditionsToolSetterFastReduction,
 )
 
+from TrigHLTJetHypo.FastReductionAlgToolFactory import (
+    FastReductionAlgToolFactory,
+    )
+
 from  TrigHLTJetHypo.chainDict2jetLabel import chainDict2jetLabel
 
 from  TrigHLTJetHypo.ChainLabelParser import ChainLabelParser
@@ -18,14 +22,8 @@ from TrigHLTJetHypo.NodeSplitterVisitor import NodeSplitterVisitor
 from AthenaCommon.Logging import logging
 log = logging.getLogger( 'TrigJetHypoToolConfig' )
 
-def  nodeTreeFromChainLabel(
-        chain_label, # simple([(260et,320eta490, leg000)])
-        chain_name, # HLT_j260_320eta490_L1J75_31ETA49
-        toolSetter):
-
-    parser = ChainLabelParser(chain_label, debug=False)
+def  tree2tools(rootless_tree, toolSetter):
 
-    rootless_tree = parser.parse()
     
     # add a root node so that split simple nodes cann connect.
     tree = Node('root')
@@ -51,29 +49,38 @@ def  nodeTreeFromChainLabel(
     # chain name in run 2 dicts were missing the 'HLT_' prefix
     # but it seems it is necessary to run the hypos in AthenaMT ?...?
 
-    if not chain_name.startswith('HLT_'):
-        chain_name = 'HLT_' + chain_name
+    toolSetter.mod(tree)
 
-    log.info('trigJetHypoToolFromDict chain_name %s', chain_name)
+    return tree  # used by debug tools
 
-    toolSetter.mod(tree)
-    return tree
 
+def  nodeForestFromChainLabel(
+        chain_label, # simple([(260et,320eta490, leg000)])
+        chain_name,): # HLT_j260_320eta490_L1J75_31ETA49
+    
+    parser = ChainLabelParser(chain_label, debug=False)
 
+    return parser.parse()
+   
 def trigJetHypoToolHelperFromDict_(
-        chain_label, # simple([(260et,320eta490, leg000)])
-        chain_name, # HLT_j260_320eta490_L1J75_31ETA49
-        toolSetter):
+        chain_label,  # simple([(260et,320eta490, leg000)])
+        chain_name,):  # HLT_j260_320eta490_L1J75_31ETA49
 
-    nodeTreeFromChainLabel(
-        chain_label,
-        chain_name,
-        toolSetter)
     
-    tool = toolSetter.tool
-    log.debug(toolSetter.report())
+    node_forest =  nodeForestFromChainLabel(chain_label,
+                                            chain_name)
+
+    algToolFactory = FastReductionAlgToolFactory()
+    helper_tool = algToolFactory('helper')
+
+    for tree in node_forest:
+        toolSetter = ConditionsToolSetterFastReduction()
+        tree2tools(tree, toolSetter)
+        helper_tool.HypoConfigurers.append(toolSetter.config_tool)   
+
+        log.debug(toolSetter.report())
     
-    return tool
+    return helper_tool
 
 def  trigJetHypoToolHelperFromDict(chain_dict):
     """Produce  a jet trigger hypo tool helper from a chainDict
@@ -100,11 +107,9 @@ def  trigJetHypoToolHelperFromDict(chain_dict):
 
     chain_name = chain_dict['chainName']
 
-    toolSetter = ConditionsToolSetterFastReduction()
 
     return trigJetHypoToolHelperFromDict_(chain_label,
-                                          chain_name,
-                                          toolSetter)
+                                          chain_name)
 
 
 def  trigJetHypoToolFromDict_(chain_dict, hypo_tool, debug=False):
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/jetlabel_tester.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/jetlabel_tester.py
index 5741fdbf50b8..5f7e255371c0 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/jetlabel_tester.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/jetlabel_tester.py
@@ -4,39 +4,35 @@ from __future__ import print_function
 
 
 from ChainLabelParser import ChainLabelParser
-from  TrigHLTJetHypo.treeVisitors import TreeParameterExpander
-from  TrigHLTJetHypo.ConditionsToolSetterFastReduction import (
-    ConditionsToolSetterFastReduction,)
 
-def compile(label, setter, expand=False, do_dump=False, do_print=False):
+def compile(label, do_dump=False, do_print=False):
     print ('compile:',  label)
 
     parser = ChainLabelParser(label, debug=False)
-    tree = parser.parse()
+    forest = parser.parse()
 
-    tree.set_ids(node_id=0, parent_id=0)
+    print ('forest has %d' % len(forest),' tree(s)\n')
     
-    
-    if expand:
-        visitor = TreeParameterExpander()
-        tree.accept(visitor)
+    for i, tree in enumerate(forest):
 
-        if setter is not None:
-            setter.mod(tree)
+        print ('tree ', i, '\n')
 
-    print ('compile: tree.scenario', tree.scenario)
+        tree.set_ids(node_id=0, parent_id=0)
+    
+    
+        print ('compile: tree.scenario', tree.scenario)
 
         
         
-    if do_print:
-        print ('\nnode dumping top node only:\n')
-        print (tree)
+        if do_print:
+            print ('\nnode dumping top node only:\n')
+            print (tree)
 
-    if do_dump:
-        print ('\nnode dump tree:\n')
-        print (tree.dump())
+        if do_dump:
+            print ('\nnode dump tree:\n')
+            print (tree.dump())
         
-    return tree
+    return forest
 
 def compile_(label, setter=None, expand=True, do_dump=False, do_print=False):
     compile(label, setter, expand, do_dump)
@@ -65,11 +61,5 @@ if __name__ == '__main__':
     print('index', index)
     label = test_strings[index]
 
-    setter = ConditionsToolSetterFastReduction('toolSetterFastReduction')
-    
-    tree = compile(label, setter=setter,  expand=True, do_dump=True)
+    tree = compile(label, do_dump=True)
 
-    print ('tvec: %s' % str(setter.tool))
-    print ('svec: %s' % setter.shared)
-    print ('conditionsVec [%d]: %s' % (len(setter.conditionsVec),
-                                       str(setter.conditionsVec)))
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
index 3166c3197c77..468d7427418a 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
@@ -12,7 +12,8 @@ from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import dictFromChainName
 
 from chainDict2jetLabel import chainDict2jetLabel 
 from TrigJetHypoToolConfig import (trigJetHypoToolFromDict,
-                                   nodeTreeFromChainLabel)
+                                   nodeForestFromChainLabel,
+                                   tree2tools,)
 
 from TrigHLTJetHypo.ConditionsToolSetterFastReduction import (
     ConditionsToolSetterFastReduction,
@@ -83,12 +84,15 @@ if __name__ == '__main__':
         print (d[0])
         label = chainDict2jetLabel(d[1])
         chain_name = d[1]['chainName']
-        
-        toolSetter=ConditionsToolSetterFastReduction()
+
+
+        forest = nodeForestFromChainLabel(label, chain_name)
+
+        for tree in forest:
+            toolSetter=ConditionsToolSetterFastReduction()
             
-        print (nodeTreeFromChainLabel(chain_name=d[0],
-                                      chain_label=label,
-                                      toolSetter=toolSetter).dump())
+            print (tree2tools(rootless_tree=tree,
+                              toolSetter=toolSetter).dump())
         print ()
         
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py
index 9dcb9f045f64..65ac32fc280a 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_cases.py
@@ -128,7 +128,20 @@ test_strings = [
                                  combgen([] 
                                          dijet([(71djmass91)])
                                          simple([(12et)(13et)])))))""",
- 
+    # forest
+    """simple
+    (
+        [(50et, 500neta, leg000)(50et, peta500, leg000)]
+    )
+    dijet
+    (
+        [(34mass, 26djdphi, leg000)]
+        simple
+        (
+            [(10et, 0eta320, leg000)(20et, 0eta320, leg000)]
+        )
+    )"""
+    
 ]
 
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx
index b7e7a2025889..b73271b5df73 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.cxx
@@ -21,10 +21,8 @@ TrigJetHypoToolHelperNoGrouper::TrigJetHypoToolHelperNoGrouper(const std::string
 
 StatusCode TrigJetHypoToolHelperNoGrouper::initialize() {
 
-  m_matcher = m_config->getMatcher();
-  if(!m_matcher){
-    ATH_MSG_ERROR("Error setting matcher");
-    return StatusCode::FAILURE;
+  for (const auto& config : m_configs) {
+    m_matchers.push_back(std::move(config->getMatcher()));
   }
 		  
   return StatusCode::SUCCESS;
@@ -36,8 +34,6 @@ TrigJetHypoToolHelperNoGrouper::collectData(const std::string& exetime,
 					    const std::optional<bool>& pass) const {
   if(!collector){return;}
   auto helperInfo = nodeIDPrinter("TrigJetHypoToolHelperNoGrouper",
-                                  m_nodeID,
-                                  m_parentNodeID,
                                   pass,
                                   exetime
                                   );
@@ -68,6 +64,7 @@ TrigJetHypoToolHelperNoGrouper::pass(HypoJetVector& jets,
     return pass;
   }
 
+  // jet cleaning
   HypoJetIter jets_begin = jets.begin(); 
   HypoJetIter jets_end = jets.end(); 
   for(auto cleaner: m_cleaners){
@@ -77,32 +74,38 @@ TrigJetHypoToolHelperNoGrouper::pass(HypoJetVector& jets,
 				return cleaner->select(j);}
 			      );
   }
-  
-  auto pass = m_matcher->match(jets_begin,
-			       jets_end,
-			       jetCollector,
-			       collector);
+
+  // see if matchers pass. Each matcher conatains a FastReducer tree.
+  // if  > matcher, this means the conditions of different trees may
+  // share jets.
+  bool pass = true;
+  for (const auto& matcher : m_matchers){
+    auto matcher_pass = matcher->match(jets_begin,
+				       jets_end,
+				       jetCollector,
+				       collector);
+    if (!matcher_pass.has_value()) {
+      ATH_MSG_ERROR("Matcher cannot determine result. Config error?");
+      return false;
+    }
+
+    if (!(*matcher_pass)){
+      pass = false;
+      break;
+    }
+  }
   
   timer.stop();
-  
   collectData(timer.readAndReset(), collector, pass);
-  
-  if(!pass.has_value()){
-    ATH_MSG_ERROR("Matcher cannot determine result. Config error?");
-    return false;
-  }
-    
-  return *pass;
+
+  return pass;
 }
 
 std::string TrigJetHypoToolHelperNoGrouper::toString() const {
   
   
   std::stringstream ss;
-  ss << nodeIDPrinter(name(),
-                      m_nodeID,
-                      m_parentNodeID);
-  
+  ss << name();
   
   ss << "Cleaners:\n No of cleaners: "  << m_cleaners.size() << '\n';
   
@@ -111,8 +114,12 @@ std::string TrigJetHypoToolHelperNoGrouper::toString() const {
        << '\n';
   }
   
-  ss << "\nMatcher:\n";
-  ss << m_matcher -> toString();
+  ss << "\nMatchers [" << m_matchers.size() << "]:\n\n";
+  unsigned int imatcher{0};
+  for (const auto & matcher : m_matchers) {
+    ss << "matcher " << imatcher++ << '\n';
+    ss << matcher -> toString();
+  }
   
   return ss.str();
 }
@@ -126,7 +133,7 @@ TrigJetHypoToolHelperNoGrouper::getDescription(ITrigJetHypoInfoCollector& c) con
 
 
 std::size_t TrigJetHypoToolHelperNoGrouper::requiresNJets() const {
-  return m_config->requiresNJets();
+  return m_configs[0]->requiresNJets();
 }
 
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h
index f4e58f9a0ac0..c398770e741a 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolHelperNoGrouper.h
@@ -54,7 +54,7 @@ public extends<AthAlgTool, ITrigJetHypoToolHelperMT> {
  private:
 
   // Object that matches jet groups with Conditions
-  std::unique_ptr<IJetsMatcherMT> m_matcher;
+  std::vector<std::unique_ptr<IJetsMatcherMT>> m_matchers;
 
   // Bridge objects to ICleaner predicate function objects to allow polymorphic
   // pointers to be used with the STL (pass by value).
@@ -64,18 +64,13 @@ public extends<AthAlgTool, ITrigJetHypoToolHelperMT> {
 
  // Used to generate helper objects foe TrigHLTJetHelper
  // from user supplied values
- ToolHandle<ITrigJetHypoToolNoGrouperConfig> m_config {
-   this, "HypoConfigurer", {}, "Configurer to set up TrigHLTJetHypoHelper2"}; 
+ ToolHandleArray<ITrigJetHypoToolNoGrouperConfig> m_configs {
+   this, "HypoConfigurers", {},
+   "Configurers to set up TrigJetHypoHelperNoGrouper"}; 
 
- Gaudi::Property<int>
-  m_parentNodeID {this, "parent_id", {0}, "hypo tool tree parent node id"};
-
-Gaudi::Property<int>
-  m_nodeID {this, "node_id", {0}, "hypo tool tree node id"};
-
-Gaudi::Property<bool>
+  Gaudi::Property<bool>
   m_debug {this, "debug", false, "instantantiate helpers with this debug flag"};
-
+  
 
  void collectData(const std::string& exetime,
                   const std::unique_ptr<ITrigJetHypoInfoCollector>&,
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx
index 05e2bf6d986d..3f1141a40357 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoToolMT.cxx
@@ -76,7 +76,7 @@ TrigJetHypoToolMT::decide(const xAOD::JetContainer* jets,
 
   std::unique_ptr<ITrigJetHypoInfoCollector> infocollector(nullptr);
   if(m_visitDebug){
-    auto collectorName = name() + std::to_string(m_eventSN->getSN());
+    auto collectorName = name() + "_" + std::to_string(m_eventSN->getSN());
     infocollector.reset(new  DebugInfoCollector(collectorName));
   }
   
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.cxx
index 063bf9f17d6d..860b45ee76ad 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.cxx
@@ -18,6 +18,17 @@ std::string nodeIDPrinter(const std::string& name,
   return ss.str();
 }
 
+std::string nodeIDPrinter(const std::string& name,
+                          bool pass,
+                          const std::string& timerStr){
+
+  std::stringstream ss;
+  ss << "name(): " << name <<"  pass: " <<std::boolalpha << pass << " "
+     << timerStr << '\n';
+
+  return ss.str();
+}
+
 std::string nodeIDPrinter(const std::string& name,
                           int nodeID,
                           int parentID,
@@ -34,6 +45,21 @@ std::string nodeIDPrinter(const std::string& name,
   return ss.str();
 }
 
+std::string nodeIDPrinter(const std::string& name,
+                          const std::optional<bool>& pass,
+                          const std::string& timerStr){
+  if(pass.has_value()){
+    return nodeIDPrinter(name, *pass, timerStr);
+  }
+
+  
+  std::stringstream ss;
+  
+  ss << "name(): " << name << " pass: " << "ERROR " <<timerStr << '\n';
+
+  return ss.str();
+}
+
 std::string nodeIDPrinter(const std::string& name,
                           int nodeID,
                           int parentID){
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.h
index 8b56fae12ccd..4fae2817f05b 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/nodeIDPrinter.h
@@ -25,6 +25,10 @@ std::string nodeIDPrinter(const std::string& name,
                           const std::optional<bool>& pass,
                           const std::string& time="");
 
+std::string nodeIDPrinter(const std::string& name,
+                          const std::optional<bool>& pass,
+                          const std::string& time);
+
 
 std::string nodeIDPrinter(const std::string& name,
                           int nodeID,
-- 
GitLab


From b9acd9a9ef5d168d6591e7dc9d9ddee6b347aab3 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Tue, 22 Dec 2020 15:22:45 +0000
Subject: [PATCH 190/308] Rename Trk::SegmentCollection to TrackMuonSegments to
 avoid duplicate (ATLASRECTS-5667)

---
 .../xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h  |  2 +-
 .../python/MuonReconstructionConfig.py        |  2 +-
 .../python/MuonSegmentFindingConfig.py        | 17 ++--
 .../python/MuonTrackBuildingConfig.py         |  2 +-
 .../MuonRecExample/python/MuonStandalone.py   | 15 ++--
 .../share/MuonRecOutputItemList_jobOptions.py |  4 +-
 .../src/MuonSegmentFinderAlg.h                |  4 +-
 .../src/MuonPhysValMonitoringTool.cxx         | 79 ++++++-------------
 .../src/MuonPhysValMonitoringTool.h           | 69 ++++++----------
 .../CscRawDataMonitoring/CSCSegmValAlg.h      |  2 +-
 .../CscRawDataMonitoring/CSCSegmValMonAlg.h   |  3 +-
 .../share/CSCMon_jobOptions.py                |  4 +-
 .../share/CscRawESD_MonitoringOptions.py      |  4 -
 .../src/CSCSegmValMonAlg.cxx                  | 12 +++
 .../MdtRawDataMonitoring/MdtRawDataMonAlg.h   |  3 +-
 .../MdtRawDataMonitoring/MdtRawDataValAlg.h   |  2 +-
 .../src/MdtRawDataMonAlg.cxx                  | 15 +++-
 .../PrimaryDPDMaker/share/DESDM_IDALIGN.py    |  4 +-
 .../PrimaryDPDMaker/share/DESD_DEDX.py        |  4 +-
 .../PrimaryDPDMaker/share/PerfDESDM_MS.py     |  2 +-
 .../PrimaryDPDMaker/share/PerfDPD_AllCells.py |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_EGamma.py   |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_EOverP.py   |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_Jet.py      |  4 +-
 .../share/PerfDPD_PhotonJet.py                |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_SGLEL.py    |  4 +-
 .../share/PerfDPD_TtbarMuon.py                |  4 +-
 .../share/PhysDPD_HIPs.py                     |  4 +-
 .../src/MuonCombinedInDetExtensionAlg.h       |  7 +-
 .../MuonCombinedReconstructionConfig.py       |  2 +-
 .../python/MuonCombinedAlgs.py                | 21 +----
 .../RecBackgroundAlgs/BeamBackgroundFiller.h  |  4 +-
 .../share/RecBackground_jobOptions.py         |  2 +-
 .../python/HLTMenuConfig/Muon/MuonSetup.py    |  6 +-
 34 files changed, 129 insertions(+), 194 deletions(-)

diff --git a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h
index ed64557d5427..08f850428c44 100644
--- a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h
+++ b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h
@@ -36,7 +36,7 @@ namespace xAODMaker {
 
    private:
      // the following segments do NOT contain MuGirl segments
-     SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation{this,"SegmentContainerName","MuonSegments"};
+     SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation{this,"SegmentContainerName","TrackMuonSegments"};
      SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_xaodContainerName{this,"xAODContainerName","MuonSegments"};
 
      ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool{this,"MuonSegmentConverterTool","Muon::MuonSegmentConverterTool/MuonSegmentConverterTool"};
diff --git a/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py b/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
index 25fb367cb01d..421518f5059f 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
@@ -55,7 +55,7 @@ if __name__=="__main__":
     muon_edm_helper_svc = Muon__MuonEDMHelperSvc("MuonEDMHelperSvc")
     cfg.addService( muon_edm_helper_svc )
 
-    itemsToRecord = ["Trk::SegmentCollection#MuonSegments", "Trk::SegmentCollection#NCB_MuonSegments"]
+    itemsToRecord = ["Trk::SegmentCollection#TrackMuonSegments", "Trk::SegmentCollection#NCB_TrackMuonSegments"]
     itemsToRecord += ["TrackCollection#MuonSpectrometerTracks"] 
     SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord)
     
diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
index ec455944705b..ea0c9e213fc3 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
@@ -610,7 +610,7 @@ def MooSegmentFinderAlgCfg(flags, name = "MuonSegmentMaker",  **kwargs):
     # FIXME - this really shouldn't be set here! 
     kwargs.setdefault('TgcPrepDataContainer', 'TGC_MeasurementsAllBCs' if not flags.Muon.useTGCPriorNextBC and not flags.Muon.useTGCPriorNextBC else 'TGC_Measurements')
         
-    kwargs.setdefault('MuonSegmentOutputLocation', "ThirdChainSegments" if flags.Muon.segmentOrigin=="TruthTracking" else "MuonSegments")
+    kwargs.setdefault('MuonSegmentOutputLocation', "ThirdChainSegments" if flags.Muon.segmentOrigin=="TruthTracking" else "TrackMuonSegments")
 
     moo_segment_finder_alg = MooSegmentFinderAlg( name=name, **kwargs )
     moo_segment_finder_alg.Cardinality=10
@@ -645,7 +645,7 @@ def MooSegmentFinderAlg_NCBCfg(flags, name = "MuonSegmentMaker_NCB", **kwargs):
 
     # Now set other NCB properties
     kwargs.setdefault('MuonPatternCombinationLocation', "NCB_MuonHoughPatternCombinations" )
-    kwargs.setdefault('MuonSegmentOutputLocation', "NCB_MuonSegments" )
+    kwargs.setdefault('MuonSegmentOutputLocation', "NCB_TrackMuonSegments" )
     kwargs.setdefault('UseCSC', flags.Muon.doCSCs)
     kwargs.setdefault('UseMDT', False)
     kwargs.setdefault('UseRPC', False)
@@ -679,7 +679,7 @@ def MuonSegmentFindingCfg(flags, cardinality=1):
     result.merge(acc)
     return result
 
-if __name__=="__main__":                        
+if __name__=="__main__":
     # To run this, do e.g. 
     # python -m MuonConfig.MuonSegmentFindingConfig --run --threads=1
     from MuonConfig.MuonConfigUtils import SetupMuonStandaloneArguments, SetupMuonStandaloneConfigFlags, SetupMuonStandaloneOutput, SetupMuonStandaloneCA
@@ -707,13 +707,13 @@ if __name__=="__main__":
     pps = ProxyProviderSvc()
     ars=AddressRemappingSvc()
     pps.ProviderNames += [ 'AddressRemappingSvc' ]
-    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "MuonSegments", "MuonSegments_old") ]
-    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "MuonSegments_NCB", "MuonSegments_NCB_old") ]
-    
+    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "TrackMuonSegments", "TrackMuonSegments_old") ]
+    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "NCB_TrackMuonSegments", "NCB_TrackMuonSegments_old") ]
+
     cfg.addService(pps)
     cfg.addService(ars)
-    
-    itemsToRecord = ["Trk::SegmentCollection#MuonSegments", "Trk::SegmentCollection#NCB_MuonSegments"]
+
+    itemsToRecord = ["Trk::SegmentCollection#TrackMuonSegments", "Trk::SegmentCollection#NCB_TrackMuonSegments"]
     SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord)
 
     # cfg.getService("StoreGateSvc").Dump = True
@@ -727,4 +727,3 @@ if __name__=="__main__":
         if not sc.isSuccess():
             import sys
             sys.exit("Execution failed")
-    
diff --git a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
index c66983c0fca2..3036fb462f03 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
@@ -527,7 +527,7 @@ def MuonTrackBuildingCfg(flags, name = "MuPatTrackBuilder"):
     track_steering = acc.getPrimary()
     result.merge(acc)
     
-    track_builder = MuPatTrackBuilder(name=name, TrackSteering = track_steering, MuonSegmentCollection="MuonSegments", SpectrometerTrackOutputLocation="MuonSpectrometerTracks" )
+    track_builder = MuPatTrackBuilder(name=name, TrackSteering = track_steering, MuonSegmentCollection="TrackMuonSegments", SpectrometerTrackOutputLocation="MuonSpectrometerTracks" )
 
     result.addEventAlgo( track_builder, primary=True )
     return result
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py
index bed770e06a53..45f35c51658f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py
@@ -66,7 +66,7 @@ def MooSegmentFinderAlg( name="MuonSegmentMaker",**kwargs ):
     kwargs.setdefault("SegmentFinder", getPublicToolClone("MuonSegmentFinder","MooSegmentFinder",
                                                           DoSummary=muonStandaloneFlags.printSummary()))
     kwargs.setdefault("MuonClusterSegmentFinderTool",getPublicTool("MuonClusterSegmentFinder"))
-    kwargs.setdefault("MuonSegmentOutputLocation", "MuonSegments")
+    kwargs.setdefault("MuonSegmentOutputLocation", "TrackMuonSegments")
     kwargs.setdefault("UseCSC", muonRecFlags.doCSCs())
     kwargs.setdefault("UseMDT", muonRecFlags.doMDTs())
     kwargs.setdefault("UseRPC", muonRecFlags.doRPCs())
@@ -94,8 +94,7 @@ def MooSegmentFinderNCBAlg( name="MuonSegmentMaker_NCB",**kwargs ):
                                                                                                  segmentTool = getPublicTool("CscSegmentUtilTool_NCB")) if MuonGeometryFlags.hasCSC() else ""),
                                                          DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False))
     kwargs.setdefault("MuonPatternCombinationLocation", "NCB_MuonHoughPatternCombinations")
-    kwargs.setdefault("MuonSegmentOutputLocation", "NCB_MuonSegments")
-    kwargs.setdefault("MuonSegmentOutputLocation", "NCB_MuonSegments")
+    kwargs.setdefault("MuonSegmentOutputLocation", "NCB_TrackMuonSegments")
     kwargs.setdefault("UseCSC", muonRecFlags.doCSCs())
     kwargs.setdefault("UseMDT", False)
     kwargs.setdefault("UseRPC", False)
@@ -146,7 +145,7 @@ class MuonStandalone(ConfiguredMuonRec):
         super(MuonStandalone,self).configure(keys)
         if not self.isEnabled(): return
 
-        SegmentLocation = "MuonSegments"
+        SegmentLocation = "TrackMuonSegments"
         if muonStandaloneFlags.segmentOrigin == 'TruthTracking':
             SegmentLocation = "ThirdChainSegments"
 
@@ -189,7 +188,7 @@ class MuonStandalone(ConfiguredMuonRec):
             self.addAlg(MooSegmentFinderNCBAlg("MuonSegmentMaker_NCB"))
 
             if (not cfgKeyStore.isInInput ('xAOD::MuonSegmentContainer', 'MuonSegments_NCB')):
-                self.addAlg( CfgMgr.xAODMaker__MuonSegmentCnvAlg("MuonSegmentCnvAlg_NCB",SegmentContainerName="NCB_MuonSegments",xAODContainerName="NCB_MuonSegments") )
+                self.addAlg( CfgMgr.xAODMaker__MuonSegmentCnvAlg("MuonSegmentCnvAlg_NCB",SegmentContainerName="NCB_TrackMuonSegments",xAODContainerName="NCB_MuonSegments") )
 
         if (not cfgKeyStore.isInInput ('xAOD::MuonSegmentContainer', 'MuonSegments')):
             self.addAlg( CfgMgr.xAODMaker__MuonSegmentCnvAlg("MuonSegmentCnvAlg") )
@@ -200,13 +199,9 @@ class MuonStandalone(ConfiguredMuonRec):
         #
         # add the algorithm (which uses the MuonTrackSteering)
         # 
-        TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder", TrackSteering = getPublicTool("MuonTrackSteering") )
+        TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder", TrackSteering=getPublicTool("MuonTrackSteering"), SpectrometerTrackOutputLocation="MuonSpectrometerTracks", MuonSegmentCollection="TrackMuonSegments")
         self.addAlg( TrackBuilder )
-        
-        self.registerOutputKey("MuonSpectrometerTracks",   self.MuPatTrackBuilder, "SpectrometerTrackOutputLocation")
-        self.registerInputKey ("MuonSegments", self.MuPatTrackBuilder, "MuonSegmentCollection"   )
 
-        
         if muonStandaloneFlags.createTrackParticles():
             xAODTrackParticleCnvAlg = MuonStandaloneTrackParticleCnvAlg("MuonStandaloneTrackParticleCnvAlg")
             self.addAlg( xAODTrackParticleCnvAlg )
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py
index b9b149554ae0..20be4a64712d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py
@@ -82,8 +82,8 @@ if DetFlags.detdescr.Muon_on() and rec.doWriteESD():
    MuonESDList+=["RpcSectorLogicContainer#RPC_SECTORLOGIC"]
 
    # Segments
-   MuonESDList+=["Trk::SegmentCollection#MuonSegments"]
-   MuonESDList+=["Trk::SegmentCollection#NCB_MuonSegments"]
+   MuonESDList+=["Trk::SegmentCollection#TrackMuonSegments"]
+   MuonESDList+=["Trk::SegmentCollection#NCB_TrackMuonSegments"]
 
    # Tracks
    MuonESDList+=["TrackCollection#MuonSpectrometerTracks"] 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
index 9d974f2d0fcb..8b9dd8c52d36 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
@@ -106,11 +106,11 @@ class MuonSegmentFinderAlg : public AthReentrantAlgorithm {
         "Csc4dSegmentMaker/Csc4dSegmentMaker",
     };
 
-    // the following Trk::SegmentCollection MuonSegments are sttandard MuonSegments, the MuGirl segments are stored in MuonCreatorAlg.h
+    // the following Trk::SegmentCollection MuonSegments are standard MuonSegments, the MuGirl segments are stored in MuonCreatorAlg.h
     SG::WriteHandleKey<Trk::SegmentCollection> m_segmentCollectionKey{
         this,
         "SegmentCollectionName",
-        "MuonSegments",
+        "TrackMuonSegments",
         "Muon Segments",
     };
     SG::ReadHandleKey<Muon::CscPrepDataContainer> m_cscPrdsKey{
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
index e0760b9afdc0..e706b0081e11 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
@@ -10,7 +10,6 @@
 // PhysVal includes
 #include "MuonPhysValMonitoringTool.h"
 
-// FrameWork includes
 #include "GaudiKernel/IToolSvc.h"
 #include "xAODMuon/MuonContainer.h"
 #include "xAODMuon/MuonAuxContainer.h"
@@ -18,7 +17,6 @@
 #include "xAODMuon/SlowMuonContainer.h"
 #include "xAODMuon/SlowMuonAuxContainer.h"
 #include "xAODMuon/SlowMuon.h"
-
 #include "xAODTrigger/MuonRoI.h"
 #include "xAODTrigger/MuonRoIContainer.h"
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h"
@@ -29,9 +27,6 @@
 #include "xAODTruth/TruthVertexContainer.h"
 #include "xAODTruth/TruthVertexAuxContainer.h"
 #include "MuonHistUtils/MuonEnumDefs.h"
-
-#include "MuonCombinedToolInterfaces/IMuonPrintingTool.h"
-
 #include "xAODCore/ShallowCopy.h"
 #include "xAODBase/IParticleHelpers.h"
 
@@ -71,8 +66,6 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool"),
   m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
   m_trackSelector("InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedTrackSelectorTool"),
-  // m_muonResonanceSelectionTool("MuonResonanceSelectionTool/MuonZSelectionTool"),
-  // m_muonResonancePairingTool("MuonResonancePairingTool/ZmumuResonancePairingTool"),
   m_oUnmatchedRecoMuonPlots(nullptr),
   m_oUnmatchedTruthMuonPlots(nullptr),
   m_oUnmatchedRecoMuonTrackPlots(nullptr),
@@ -83,20 +76,6 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   m_h_overview_Z_mass_ID(nullptr)
 {
   // default for muon chains
-
-  declareProperty( "IsData", m_isData = false );
-  declareProperty( "MuonContainerName", m_muonsName = "Muons" );
-  declareProperty( "SlowMuonContainerName", m_slowMuonsName = "SlowMuons" );
-  declareProperty( "MuonTruthParticleContainerName", m_muonsTruthName = "MuonTruthParticles" );
-
-  declareProperty( "TrackContainerName", m_tracksName);
-  declareProperty( "FwdTrackContainerName", m_fwdtracksName);
-  declareProperty( "MuonTrackContainerName", m_muonTracksName );
-  declareProperty( "MuonExtrapolatedTrackContainerName", m_muonExtrapolatedTracksName);
-  declareProperty( "MuonOnlyExtrapolatedTrackContainerName", m_muonMSOnlyExtrapolatedTracksName);
-  declareProperty( "MuonSegmentContainerName", m_muonSegmentsName);
-  declareProperty( "MuonTruthSegmentContainerName", m_muonSegmentsTruthName = "MuonTruthSegments" );
-  
   declareProperty( "TrackSelector", m_trackSelector);
   declareProperty( "IsoTool", m_isoTool );
   
@@ -107,24 +86,9 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   declareProperty( "SelectMuonCategories", m_selectMuonCategories );
   declareProperty( "DoBinnedResolutionPlots", m_doBinnedResolutionPlots = true);
 
-  declareProperty( "DoTrigMuonValidation", m_doTrigMuonValidation = false);
-  declareProperty( "DoTrigMuonL1Validation", m_doTrigMuonL1Validation = false);
-  declareProperty( "DoTrigMuonL2Validation", m_doTrigMuonL2Validation = false);
-  declareProperty( "DoTrigMuonEFValidation", m_doTrigMuonEFValidation = false);
-  declareProperty( "L1TrigMuonContainerName", m_muonL1TrigName = "LVL1MuonRoIs");
-  declareProperty( "L2SAMuonContainerName",m_muonL2SAName = "HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfo");
-  declareProperty( "L2CBMuonContainerName",m_muonL2CBName = "HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfo");
-  declareProperty( "EFCombTrigMuonContainerName", m_muonEFCombTrigName = "HLT_xAOD__MuonContainer_MuonEFInfo");
-  declareProperty( "DoMuonTree", m_doMuonTree = false);
-
   m_SelectedAuthor = 0;
 }
 
-// Destructor
-///////////////
-MuonPhysValMonitoringTool::~MuonPhysValMonitoringTool()
-{}
-
 // Athena algtool's Hooks
 ////////////////////////////
 StatusCode MuonPhysValMonitoringTool::initialize()
@@ -239,6 +203,7 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
   bool separateSAFMuons = true;
   if (m_slowMuonsName!="") separateSAFMuons = false; // no such muons in case of SlowMuon reco
   
+  std::string muonContainerName = m_muonsName.name();
   for (const auto category : m_selectMuonCategoriesStr) {
     std::string categoryPath = m_muonsName+"/"+category+"/";
     m_muonValidationPlots.push_back( new MuonValidationPlots(0, categoryPath,
@@ -255,7 +220,7 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     }
     if (m_muonTracksName!="") {
       m_muonMSTrackValidationPlots.push_back(new MuonTrackValidationPlots(0, categoryPath, "MSTrackParticles", m_isData));
-      if (!m_isData) m_oUnmatchedRecoMuonTrackPlots = new Muon::RecoMuonTrackPlotOrganizer(0, Form("%s/UnmatchedRecoMuonTracks/",m_muonsName.c_str()));
+      if (!m_isData) m_oUnmatchedRecoMuonTrackPlots = new Muon::RecoMuonTrackPlotOrganizer(0, Form("%s/UnmatchedRecoMuonTracks/",muonContainerName.c_str()));
     }
     if (m_muonExtrapolatedTracksName!="") m_muonMETrackValidationPlots.push_back(new MuonTrackValidationPlots(0, categoryPath, "METrackParticles", m_isData));
     if (m_muonMSOnlyExtrapolatedTracksName!="") m_muonMSOnlyMETrackValidationPlots.push_back(new MuonTrackValidationPlots(0, categoryPath, "MSOnlyMETrackParticles", m_isData));
@@ -269,13 +234,13 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     if (m_muonSegmentsName!="") {
       if (category!=theMuonCategories[ALL]) continue; //cannot identify the truth origin of segments...
       m_muonSegmentValidationPlots.push_back(new MuonSegmentValidationPlots(0, categoryPath, m_isData));
-      if (!m_isData) m_oUnmatchedRecoMuonSegmentPlots = new Muon::MuonSegmentPlots(0, Form("%s/UnmatchedRecoMuonSegments/",m_muonsName.c_str()));	    
+      if (!m_isData) m_oUnmatchedRecoMuonSegmentPlots = new Muon::MuonSegmentPlots(0, Form("%s/UnmatchedRecoMuonSegments/",muonContainerName.c_str()));
     }
   }
 
   if (!m_isData) {
-    m_oUnmatchedRecoMuonPlots = new Muon::RecoMuonPlotOrganizer(0, Form("%s/UnmatchedRecoMuons/",m_muonsName.c_str()));
-    m_oUnmatchedTruthMuonPlots = new Muon::TruthMuonPlotOrganizer(0, Form("%s/UnmatchedTruthMuons/",m_muonsName.c_str()));
+    m_oUnmatchedRecoMuonPlots = new Muon::RecoMuonPlotOrganizer(0, Form("%s/UnmatchedRecoMuons/",muonContainerName.c_str()));
+    m_oUnmatchedTruthMuonPlots = new Muon::TruthMuonPlotOrganizer(0, Form("%s/UnmatchedTruthMuons/",muonContainerName.c_str()));
   }   
 
   for (const auto plots : m_muonValidationPlots)                 bookValidationPlots(*plots).ignore();
@@ -295,37 +260,37 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     if (m_oUnmatchedRecoMuonSegmentPlots) bookValidationPlots(*m_oUnmatchedRecoMuonSegmentPlots).ignore();
   }
   //book overview hists
-  m_h_overview_Z_mass = new TH1F(Form("%s_Overview_Z_mass",m_muonsName.c_str()),"",20,76,106);
-  ATH_CHECK(regHist(m_h_overview_Z_mass,Form("%s/Overview",m_muonsName.c_str()),all));
-  m_h_overview_Z_mass_ME = new TH1F(Form("%s_Overview_Z_mass_ME",m_muonsName.c_str()),"",20,76,106);
-  ATH_CHECK(regHist(m_h_overview_Z_mass_ME,Form("%s/Overview",m_muonsName.c_str()),all));
-  m_h_overview_Z_mass_ID = new TH1F(Form("%s_Overview_Z_mass_ID",m_muonsName.c_str()),"",20,76,106);
-  ATH_CHECK(regHist(m_h_overview_Z_mass_ID,Form("%s/Overview",m_muonsName.c_str()),all));
+  m_h_overview_Z_mass = new TH1F(Form("%s_Overview_Z_mass",muonContainerName.c_str()),"",20,76,106);
+  ATH_CHECK(regHist(m_h_overview_Z_mass,Form("%s/Overview",muonContainerName.c_str()),all));
+  m_h_overview_Z_mass_ME = new TH1F(Form("%s_Overview_Z_mass_ME",muonContainerName.c_str()),"",20,76,106);
+  ATH_CHECK(regHist(m_h_overview_Z_mass_ME,Form("%s/Overview",muonContainerName.c_str()),all));
+  m_h_overview_Z_mass_ID = new TH1F(Form("%s_Overview_Z_mass_ID",muonContainerName.c_str()),"",20,76,106);
+  ATH_CHECK(regHist(m_h_overview_Z_mass_ID,Form("%s/Overview",muonContainerName.c_str()),all));
   
   m_h_overview_nObjects.clear();
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_muons",m_muonsName.c_str()), "Number of truth Muons per event", 20, -0.5, 19.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_muons",m_muonsName.c_str()), "Number of Muons per event", 20, -0.5, 19.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_tracks",m_muonsName.c_str()), "Number of Tracks per event", 50, -0.5, 49.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_segments",m_muonsName.c_str()), "Number of truth Segments per event", 200, -0.5, 199.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_segments",m_muonsName.c_str()), "Number of Segments per event", 200, -0.5, 199.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_muons",muonContainerName.c_str()), "Number of truth Muons per event", 20, -0.5, 19.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_muons",muonContainerName.c_str()), "Number of Muons per event", 20, -0.5, 19.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_tracks",muonContainerName.c_str()), "Number of Tracks per event", 50, -0.5, 49.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_segments",muonContainerName.c_str()), "Number of truth Segments per event", 200, -0.5, 199.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_segments",muonContainerName.c_str()), "Number of Segments per event", 200, -0.5, 199.5));
   for (const auto hist : m_h_overview_nObjects) {
-    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",m_muonsName.c_str()),all));
+    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",muonContainerName.c_str()),all));
   }
 
-  m_h_overview_reco_category = new TH1F(Form("%s_Overview_reco_category",m_muonsName.c_str()),"",4,0,4); //prompt/in-flight/non-isolated/other
+  m_h_overview_reco_category = new TH1F(Form("%s_Overview_reco_category",muonContainerName.c_str()),"",4,0,4); //prompt/in-flight/non-isolated/other
   for (int i=1; i<4; i++) { //skip 'All'
     m_h_overview_reco_category->GetXaxis()->SetBinLabel(i,theMuonCategories[i].c_str());
   } m_h_overview_reco_category->GetXaxis()->SetBinLabel(4,"Other"); //of some other origin or fakes
-  ATH_CHECK(regHist(m_h_overview_reco_category,Form("%s/Overview",m_muonsName.c_str()),all));
+  ATH_CHECK(regHist(m_h_overview_reco_category,Form("%s/Overview",muonContainerName.c_str()),all));
 
   int nAuth = xAOD::Muon::NumberOfMuonAuthors;
   for (int i=1; i<4; i++) {
-    m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),(m_muonsName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
+    m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),(muonContainerName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
   }
-  m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_Overview_Other_reco_authors").c_str(),(m_muonsName+"_Other_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
+  m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_Overview_Other_reco_authors").c_str(),(muonContainerName+"_Other_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
   
   for (const auto hist : m_h_overview_reco_authors) {
-    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",m_muonsName.c_str()),all));
+    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",muonContainerName.c_str()),all));
   }
 
   return StatusCode::SUCCESS;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
index 7af96ecbccbf..fa897be1a74e 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
@@ -10,11 +10,6 @@
 #ifndef MUONPHYSVALMONITORING_MUONPHYSVALMONITORINGTOOL_H
 #define MUONPHYSVALMONITORING_MUONPHYSVALMONITORINGTOOL_H
 
-// STL includes
-#include <string>
-#include <vector>
-
-// FrameWork includes
 #include "GaudiKernel/ServiceHandle.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "xAODTruth/TruthParticleContainer.h"
@@ -23,32 +18,23 @@
 #include "xAODTrigMuon/L2StandAloneMuon.h"
 #include "xAODTrigMuon/L2CombinedMuonContainer.h"
 #include "xAODTrigMuon/L2CombinedMuon.h"
-
 #include "xAODMuon/SlowMuon.h"
 #include "xAODEventInfo/EventInfo.h"
-
-// Tools
 #include "MuonAnalysisInterfaces/IMuonSelectionTool.h"
 #include "TrigDecisionTool/TrigDecisionTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
 #include "IsolationSelection/IIsolationSelectionTool.h"
-
-
-
-// Local includes
+#include "MuonCombinedToolInterfaces/IMuonPrintingTool.h"
 #include "AthenaMonitoring/ManagedMonitorToolBase.h"
-
-// Root includes
 #include "MuonValidationPlots.h"
 #include "TriggerMuonValidationPlots.h"
 #include "MuonTrackValidationPlots.h"
 #include "MuonSegmentValidationPlots.h"
 #include "SlowMuonValidationPlots.h"
 
-// Forward declaration
-namespace Rec {
-  class IMuonPrintingTool;
-}
+#include <string>
+#include <vector>
+
 namespace MuonPhysValMonitoring {
 
 class MuonPhysValMonitoringTool
@@ -67,7 +53,7 @@ class MuonPhysValMonitoringTool
 		  const IInterface* parent );
 
   /// Destructor: 
-  virtual ~MuonPhysValMonitoringTool(); 
+  virtual ~MuonPhysValMonitoringTool()=default;
 
   // Athena algtool's Hooks
   virtual StatusCode initialize();
@@ -124,26 +110,23 @@ class MuonPhysValMonitoringTool
   TH1F* findHistogram(std::vector<HistData> hists,std::string hnameTag,std::string hdirTag,std::string hNewName);
   void modifyHistogram(TH1* hist);
 
-  bool m_isData;
-
-
-
+  Gaudi::Property<bool> m_isData{this,"IsData",false};
 
   // Containers
-  std::string m_tracksName;
-  std::string m_fwdtracksName;
-  std::string m_muonsName;
-  std::string m_slowMuonsName;
-  std::string m_muonsTruthName;
-  std::string m_muonTracksName;
-  std::string m_muonExtrapolatedTracksName;
-  std::string m_muonMSOnlyExtrapolatedTracksName;
-  std::string m_muonSegmentsName;
-  std::string m_muonSegmentsTruthName;
-  std::string m_muonL1TrigName;
-  std::string m_muonL2SAName;
-  std::string m_muonL2CBName;
-  std::string m_muonEFCombTrigName;
+  Gaudi::Property<std::string> m_tracksName{this,"TrackContainerName",""};
+  Gaudi::Property<std::string> m_fwdtracksName{this,"FwdTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonsName{this,"MuonContainerName","Muons"};
+  Gaudi::Property<std::string> m_slowMuonsName{this,"SlowMuonContainerName","SlowMuons"};
+  Gaudi::Property<std::string> m_muonsTruthName{this,"MuonTruthParticleContainerName","MuonTruthParticles"};
+  Gaudi::Property<std::string> m_muonTracksName{this,"MuonTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonExtrapolatedTracksName{this,"MuonExtrapolatedTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonMSOnlyExtrapolatedTracksName{this,"MuonOnlyExtrapolatedTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonSegmentsName{this,"MuonSegmentContainerName",""};
+  Gaudi::Property<std::string> m_muonSegmentsTruthName{this,"MuonTruthSegmentContainerName","MuonTruthSegments"};
+  Gaudi::Property<std::string> m_muonL1TrigName{this,"L1TrigMuonContainerName","LVL1MuonRoIs"};
+  Gaudi::Property<std::string> m_muonL2SAName{this,"L2SAMuonContainerName","HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfo"};
+  Gaudi::Property<std::string> m_muonL2CBName{this,"L2CBMuonContainerName","HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfo"};
+  Gaudi::Property<std::string> m_muonEFCombTrigName{this,"EFCombTrigMuonContainerName","HLT_xAOD__MuonContainer_MuonEFInfo"};
 
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","event info"};
 
@@ -158,13 +141,11 @@ class MuonPhysValMonitoringTool
   int m_SelectedAuthor;
   std::vector<unsigned int> m_selectMuonCategories;  
   bool m_doBinnedResolutionPlots;
-  bool m_doTrigMuonValidation;
-  bool m_doTrigMuonL1Validation;
-  bool m_doTrigMuonL2Validation;
-  bool m_doTrigMuonEFValidation;
-  bool m_doMuonTree;
-
-
+  Gaudi::Property<bool> m_doTrigMuonValidation{this,"DoTrigMuonValidation",false};
+  Gaudi::Property<bool> m_doTrigMuonL1Validation{this,"DoTrigMuonL1Validation",false};
+  Gaudi::Property<bool> m_doTrigMuonL2Validation{this,"DoTrigMuonL2Validation",false};
+  Gaudi::Property<bool> m_doTrigMuonEFValidation{this,"DoTrigMuonEFValidation",false};
+  Gaudi::Property<bool> m_doMuonTree{this,"DoMuonTree",false};
   
   // Tools
   ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h
index e13ed2a63f06..ceebb0af9f32 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h
@@ -90,7 +90,7 @@ class CSCSegmValAlg : public ManagedMonitorToolBase {
   std::vector<std::string> m_sampSelTriggers;
   bool m_doEvtSel;
 
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","TrackMuonSegments","muon segments"};
   double m_segmSlope;
 
   bool m_debuglevel;           //!< private member to control debug messages
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
index 54a68b8bf31d..6408400df38c 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
@@ -58,7 +58,8 @@ class CSCSegmValMonAlg : public AthMonitorAlgorithm {
     "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
     "Handle to the service providing the IMuonEDMHelperSvc interface" };
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","TrackMuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKeyAlt{this,"SegmentKey","MuonSegments","muon segments"};
 
   Gaudi::Property<std::vector<std::string>> m_sampSelTriggers{this,"EventSelTriggers",{}};
   Gaudi::Property<bool> m_doEvtSel{this,"DoEventSelection",false};
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py
index fa5864cfefeb..4cd3a3f39cda 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py
@@ -36,8 +36,6 @@ def getInputFiles(dir, AODHLTP):
 # Input files
 ##############################
 
-#AODir = ['/raid01/venkat/dataset/data/csc/2011/mcpskim/data10_7TeV.*.phys*', 'data10_7TeV*DESD_ZMUMU*']
-#AODir2 = ['/raid01/jveatch/data/dataset/CSCMon/data11_7TeV.00189751.physics_Muons.recon.DESD_ZMUMU.f405_m716_f405', 'data11_7TeV*DESD_ZMUMU*']
 AODir2=['/afs/cern.ch/work/p/panagoul/CSC_data', 'data15_13TeV.00280950*']
 
 CSCInputFiles = []
@@ -262,7 +260,7 @@ if doCSCSegm:
   ## trigger-aware monitoring: sample seletion triggers (express stream menu physics_pp_v2)
   evtSelectionTriggers = [  "L1_MU10", "L1_MU15", "EF_mu20_muCombTag_NoEF", "EF_mu15", "EF_mu15_mu10_EFFS", "EF_2mu10", "EF_2mu10_loose" ]
 
-  CSCSegmValAlg = CSCSegmValAlg ( name = "CSCSegmValAlg", SegmentKey = "MuonSegments",
+  CSCSegmValAlg = CSCSegmValAlg ( name = "CSCSegmValAlg",
     TrigDecisionTool = ToolSvc.TrigDecisionTool, DoEventSelection = False, EventSelTriggers = evtSelectionTriggers,
     SegmentSlopeCut = 0.07, ClusterStatus = clusStatWords)
 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py
index a4879b152c0e..abac9f678a9e 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py
@@ -87,8 +87,6 @@ topSequence += cscesdRawMonMan
 # CSC Segment Monitoring
 #---------------------------------------------------------------
 from CscRawDataMonitoring.CscRawDataMonitoringConf import CSCSegmValAlg
-#from MuonDQAMonFlags.MuonDQAFlags import MuonDQAFlags as MuonDQAFlags
-#MuonDQAFlags.doMuonSegmMon = True
 
 ## TDT instance (this should be done already?)
 if(DQMonFlags.useTrigger() and hasattr(ToolSvc, DQMonFlags.nameTrigDecTool())):
@@ -106,8 +104,6 @@ clusStatWords = [ "Unspoiled", "Simple", "Edge", "MultiPeak", "Narrow",
 evtSelectionTriggers = [  "L1_MU10", "L1_MU15", "EF_mu20_muCombTag_NoEF", "EF_mu15", "EF_mu15_mu10_EFFS", "EF_2mu10", "EF_2mu10_loose" ]
 
 CSCSegmESDValAlg = CSCSegmValAlg ( name = "CSCSegmValAlg", 
-                                   SegmentKey = "MuonSegments",
-                                   #TrigDecisionTool = ToolSvc.TrigDecisionTool, 
                                    DoEventSelection = False, 
                                    EventSelTriggers = evtSelectionTriggers,
                                    SegmentSlopeCut = 0.07, 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
index 9f5c01e880cd..3ddfb1cf6226 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
@@ -46,6 +46,7 @@ StatusCode CSCSegmValMonAlg::initialize() {
   ATH_CHECK(m_edmHelperSvc.retrieve());
   ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK(m_segmKey.initialize());
+  ATH_CHECK(m_segmKeyAlt.initialize());
 
   return AthMonitorAlgorithm::initialize();
 }  
@@ -76,6 +77,17 @@ StatusCode CSCSegmValMonAlg::fillHistograms(const EventContext& ctx) const{
     }
 
     SG::ReadHandle<Trk::SegmentCollection> segments(m_segmKey, ctx);
+    if (!segments.isValid()) {
+      if (m_segmKey.key()=="TrackMuonSegments") {
+        // old DataQuality_required input file (/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q431/21.0/myESD.pool.root) still has 'MuonSegments' stored
+        // -> @TODO: need updated input file (temporary workaround: retrieve 'MuonSegments' instead if 'TrackMuonSegments' here)
+        segments = SG::ReadHandle<Trk::SegmentCollection>(m_segmKeyAlt, ctx);
+      }
+      if (!segments.isValid()) {
+        ATH_MSG_ERROR("Could not retrieve Trk::SegmentCollection "<<m_segmKey.key());
+        return StatusCode::FAILURE;
+      }
+    }
 
     if ( segments->empty() ){
       ATH_MSG_DEBUG( "      Segm Collection is Empty, done...    ");
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
index 351fe161c323..1d7de7822b6c 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
@@ -160,7 +160,8 @@ class MdtRawDataMonAlg: public AthMonitorAlgorithm {
 
   bool m_atlas_ready;
 
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","TrackMuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_typeAlt{this,"Eff_segm_typeAlt","MuonSegments","muon segments"};
 
   std::string returnString(int i) const{
     std::stringstream ss;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h
index ccac9d53b25d..6df5cbf4b05f 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h
@@ -176,7 +176,7 @@ class MdtRawDataValAlg: public ManagedMonitorToolBase {
   uint32_t m_firstTime;
   int m_numberOfEvents;
 
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","TrackMuonSegments","muon segments"};
 
   std::string returnString(int i){
     std::stringstream ss;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
index cf5c608a021e..decb471fda62 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
@@ -205,6 +205,7 @@ StatusCode MdtRawDataMonAlg::initialize()
   ATH_CHECK(m_l1RoiKey.initialize(SG::AllowEmpty));
   ATH_CHECK(m_muonKey.initialize());
   ATH_CHECK(m_segm_type.initialize());
+  ATH_CHECK(m_segm_typeAlt.initialize());
   ATH_CHECK(m_key_mdt.initialize());
   ATH_CHECK(m_key_rpc.initialize());
   ATH_CHECK(m_eventInfo.initialize());
@@ -528,10 +529,16 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const
   }   //m_doMdtESD==true
 
   SG::ReadHandle<Trk::SegmentCollection> segms(m_segm_type, ctx);
-  if (!segms.isValid())
-  {
-    ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << m_segm_type);
-    return StatusCode::FAILURE;
+  if (!segms.isValid()) {
+    if (m_segm_type.key()=="TrackMuonSegments") {
+      // old DataQuality_required input file (/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q431/21.0/myESD.pool.root) still has 'MuonSegments' stored
+      // -> @TODO: need updated input file (temporary workaround: retrieve 'MuonSegments' instead if 'TrackMuonSegments' here)
+      segms = SG::ReadHandle<Trk::SegmentCollection>(m_segm_typeAlt, ctx);
+    }
+    if (!segms.isValid()) {
+      ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << m_segm_type);
+      return StatusCode::FAILURE;
+    }
   }
 
   MDTSegmentHistogramStruct segsPlots[4][4][16]; // [region][layer][phi]
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py
index 178a553d4897..1b900146981e 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py
@@ -153,8 +153,8 @@ outList = CfgItemList( 'IDALIGN',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py
index b0cd14500f25..95d0fdbf71a1 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py
@@ -152,8 +152,8 @@ outList = CfgItemList( 'DEDX',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py
index ad5c959959a8..a7b01fe321f8 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py
@@ -344,7 +344,7 @@ AlignmentTriggerMuonStream.AddItem(["Muon::TgcPrepDataContainer#*"])
 AlignmentTriggerMuonStream.AddItem(["Muon::CscPrepDataContainer#*"])
 AlignmentTriggerMuonStream.AddItem(["Muon::MdtPrepDataContainer#*"])
 #Alignment
-AlignmentTriggerMuonStream.AddItem(["Trk::SegmentCollection#MuonSegments"])
+AlignmentTriggerMuonStream.AddItem(["Trk::SegmentCollection#TrackMuonSegments"])
 AlignmentTriggerMuonStream.AddItem(["xAOD::VertexContainer#PrimaryVertices"])
 AlignmentTriggerMuonStream.AddItem(["xAOD::VertexAuxContainer#PrimaryVerticesAux.-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"])
 AlignmentTriggerMuonStream.AddItem(["TrackCollection#MuonSpectrometerTracks"])
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py
index 92370c88d5d0..8925dacd9863 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py
@@ -152,8 +152,8 @@ outList = CfgItemList( 'ALLCELLS',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py
index 873ea275292f..0500c707c200 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py
@@ -369,8 +369,8 @@ outList = CfgItemList( 'EGAMMA',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py
index 32a9cd5799e5..0d6c6aa615fa 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py
@@ -167,8 +167,8 @@ outList = CfgItemList( 'EOVERP',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py
index 6821fb98a2a6..15d33cdef832 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py
@@ -291,8 +291,8 @@ outList = CfgItemList( 'CALJET',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py
index abf3d52003fa..d965f339be0c 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py
@@ -119,8 +119,8 @@ outList = CfgItemList( 'PHOJET',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py
index 0f143aff0429..5c64c8c8bc80 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py
@@ -119,8 +119,8 @@ outList = CfgItemList( 'SGLEL',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py
index b0867f88fef0..190c826e3e5a 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py
@@ -165,8 +165,8 @@ outList = CfgItemList( 'SLTTMU',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py
index 4c9c35e07be4..773475f23e84 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py
@@ -117,8 +117,8 @@ outList = CfgItemList( 'HIPsStream',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
index dbebf2928022..5e1c2c3386c9 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
@@ -20,7 +20,7 @@
 
 #include <string>
 
-// uses (further down the call chain) the MuPatHitTool that has a mutable cache of pointers to-be-deleted and the end of the event
+// uses (further down the call chain) the MuPatHitTool that has a mutable cache of pointers to-be-deleted at the end of the event
 // thus, currently, the MuonCombinedInDetExtensionAlg cannot become an AthReentrantAlgorithm
 class MuonCombinedInDetExtensionAlg : public AthAlgorithm {
   public:
@@ -92,12 +92,11 @@ class MuonCombinedInDetExtensionAlg : public AthAlgorithm {
         "MuGirlMETracks",
         "ME track collection",
     };
-    // these are the MuGirl segments inputs
     SG::WriteHandleKey<Trk::SegmentCollection> m_segments{
         this,
         "SegmentCollection",
-        "MuGirlSegments",
-        "Segment collection",
+        "",
+        "specify segment collection",
     };
 
     Gaudi::Property<bool> m_usePRDs{this, "usePRDs", false};
diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
index 3ba9de7e4146..eee23de4e0d0 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
@@ -32,7 +32,6 @@ def MuonCaloTagAlgCfg(flags, name="MuonCaloTagAlg",**kwargs):
     kwargs.setdefault("TagMap","caloTagMap")
     kwargs.setdefault("CombinedTrackCollection","")
     kwargs.setdefault("METrackCollection","")
-    kwargs.setdefault("SegmentCollection","")
     kwargs.setdefault("HasCSC", flags.Detector.GeometryCSC )
     kwargs.setdefault("HasSTgc", flags.Detector.GeometrysTGC )
     kwargs.setdefault("HasMM", flags.Detector.GeometryMM )
@@ -111,6 +110,7 @@ def MuonInsideOutRecoAlgCfg(flags, name="MuonInsideOutRecoAlg", **kwargs ):
     kwargs.setdefault("HasSTgc", flags.Detector.GeometrysTGC )
     kwargs.setdefault("HasMM", flags.Detector.GeometryMM )
     kwargs.setdefault("TagMap","muGirlTagMap")
+    kwargs.setdefault("SegmentCollection","MuGirlSegments")
     alg = CompFactory.MuonCombinedInDetExtensionAlg(name,**kwargs)
     result.addEventAlgo( alg, primary=True )
     return result
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 3baeb10f2c1e..7bfa7f169bb6 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -15,24 +15,12 @@ from InDetRecExample.InDetKeys import InDetKeys
 from InDetRecExample.InDetJobProperties import InDetFlags
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
-def MuonCombinedInDetExtensionAlg(name="MuonCombinedInDetExtensionAlg",**kwargs):
-    tools = []
-    if muonCombinedRecFlags.doCaloTrkMuId():
-        tools.append(getPublicTool("MuonCaloTagTool"))
-        kwargs.setdefault("TagMap", "caloTagMap" )
-    kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
-    kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
-    kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
-    kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
-    return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
-
 def MuonCaloTagAlg(name="MuonCaloTagAlg",**kwargs):
     tools = [getPublicTool("MuonCaloTagTool")]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
     kwargs.setdefault("TagMap","caloTagMap")
     kwargs.setdefault("CombinedTrackCollection","")
     kwargs.setdefault("METrackCollection","")
-    kwargs.setdefault("SegmentCollection","")
     kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
     kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
@@ -45,13 +33,11 @@ def MuonCaloTagAlg_LRT(name="MuonCaloTagAlg_LRT", **kwargs):
     kwargs.setdefault("InDetCandidateLocation", MuonCbKeys.InDetTrackParticlesLargeD0())  
     kwargs.setdefault("CombinedTrackCollection","")
     kwargs.setdefault("METrackCollection","")
-    kwargs.setdefault("SegmentCollection","")
     kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
     kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
-
 def MuonSegmentTagAlg( name="MuonSegmentTagAlg", **kwargs ):
     kwargs.setdefault("MuonSegmentTagTool", getPublicTool("MuonSegmentTagTool") )
     return CfgMgr.MuonSegmentTagAlg(name,**kwargs)
@@ -63,7 +49,6 @@ def MuonSegmentTagAlg_LRT( name="MuonSegmentTagAlg_LRT", **kwargs ):
     kwargs.setdefault("MuonSegmentLocation","MuonSegments")
     return CfgMgr.MuonSegmentTagAlg(name,**kwargs)
 
-                                                                        
 def MuonInsideOutRecoAlg( name="MuonInsideOutRecoAlg", **kwargs ):
     tools = [getPublicTool("MuonInsideOutRecoTool") ]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
@@ -72,9 +57,9 @@ def MuonInsideOutRecoAlg( name="MuonInsideOutRecoAlg", **kwargs ):
     kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
     kwargs.setdefault("TagMap","muGirlTagMap")
+    kwargs.setdefault("SegmentCollection","MuGirlSegments")
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
-
 def MuGirlAlg_LRT( name="MuGirlAlg_LRT", **kwargs ):
     tools = [getPublicTool("MuonInsideOutRecoTool") ]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
@@ -88,11 +73,7 @@ def MuGirlAlg_LRT( name="MuGirlAlg_LRT", **kwargs ):
     kwargs.setdefault("CombinedTrackCollection",MuonCbKeys.MuGirlMuonsLargeD0())
     kwargs.setdefault("InDetCandidateLocation",MuonCbKeys.InDetTrackParticlesLargeD0())
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
-    
 
-                                  
-                               
-                                 
 def MuGirlStauAlg(name="MuGirlStauAlg",**kwargs):
     tools = [getPublicTool("MuonStauRecoTool")]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
diff --git a/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h b/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h
index a1ab60154fd0..3fc5e5a9b5af 100644
--- a/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h
+++ b/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h
@@ -64,10 +64,10 @@ private:
   void PrintMatchMatrix() {};
 
   /** ReadHandleKey for Trk::SegmentCollection from CSC */
-  SG::ReadHandleKey<Trk::SegmentCollection> m_cscSegmentContainerReadHandleKey{this,"cscSegmentContainerKey","NCB_MuonSegments","ReadHandleKey for Trk::SegmentCollection from CSC"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_cscSegmentContainerReadHandleKey{this,"cscSegmentContainerKey","NCB_TrackMuonSegments","ReadHandleKey for Trk::SegmentCollection from CSC"};
 
   /** ReadHandleKey for Trk::SegmentCollection from MDT */
-  SG::ReadHandleKey<Trk::SegmentCollection> m_mdtSegmentContainerReadHandleKey{this,"mdtSegmentContainerKey","MuonSegments","ReadHandleKey for Trk::SegmentCollection from MDT"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_mdtSegmentContainerReadHandleKey{this,"mdtSegmentContainerKey","TrackMuonSegments","ReadHandleKey for Trk::SegmentCollection from MDT"};
 
   /** ReadHandleKey for CaloClusterContainer */
   SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusterContainerReadHandleKey{this,"caloClusterContainerKey","CaloCalTopoClusters","ReadHandleKey for CaloClusterContainer"};
diff --git a/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py b/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py
index 9937ad41a639..df66e6a5dd4f 100644
--- a/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py
+++ b/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py
@@ -8,7 +8,7 @@ if rec.doInDet() and rec.doMuon() and rec.doCalo() and \
     DetFlags.detdescr.Muon_on() and DetFlags.detdescr.Calo_on() and DetFlags.detdescr.ID_on() :
   include ("LArCellRec/LArCollisionTime_jobOptions.py")
   from RecBackgroundAlgs.RecBackgroundAlgsConf import BeamBackgroundFiller
-  BeamBackgroundFiller=BeamBackgroundFiller(cscSegmentContainerKey=("NCB_MuonSegments" if MuonGeometryFlags.hasCSC() else ""))
+  BeamBackgroundFiller=BeamBackgroundFiller(cscSegmentContainerKey=("NCB_TrackMuonSegments" if MuonGeometryFlags.hasCSC() else ""))
   topSequence+=BeamBackgroundFiller
 
   from BCM_BackgroundAlgs.BCM_BackgroundAlgsConf import BcmCollisionTimeAlg
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index b3de9157559c..bfffeaf4b4e5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -613,7 +613,7 @@ def muEFSARecoSequence( RoIs, name ):
       Cleaner.PullCutPhi = 3
       SegmentFinder.TrackCleaner = Cleaner
       
-      theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,SegmentCollectionName="MuonSegments",
+      theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,
                                                        MuonPatternCalibration = CfgGetter.getPublicTool("MuonPatternCalibration"), 
                                                        MuonPatternSegmentMaker = CfgGetter.getPublicTool("MuonPatternSegmentMaker"), 
                                                        MuonTruthSummaryTool = None)
@@ -630,7 +630,7 @@ def muEFSARecoSequence( RoIs, name ):
     theSegmentFinderAlg = MooSegmentFinderAlg("TrigMuonSegmentMaker_"+name)
 
   from MuonSegmentTrackMaker.MuonTrackMakerAlgsMonitoring import MuPatTrackBuilderMonitoring
-  TrackBuilder = CfgMgr.MuPatTrackBuilder("TrigMuPatTrackBuilder_"+name ,MuonSegmentCollection = "MuonSegments", 
+  TrackBuilder = CfgMgr.MuPatTrackBuilder("TrigMuPatTrackBuilder_"+name ,MuonSegmentCollection = "TrackMuonSegments", 
                                           TrackSteering=CfgGetter.getPublicToolClone("TrigMuonTrackSteering", "MuonTrackSteering"), 
                                           MonTool = MuPatTrackBuilderMonitoring("MuPatTrackBuilderMonitoringSA_"+name))
   xAODTrackParticleCnvAlg = MuonStandaloneTrackParticleCnvAlg("TrigMuonStandaloneTrackParticleCnvAlg_"+name)
@@ -846,7 +846,7 @@ def muEFInsideOutRecoSequence(RoIs, name):
         Cleaner.PullCutPhi = 3
         SegmentFinder.TrackCleaner = Cleaner
       
-        theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,SegmentCollectionName="MuonSegments",
+        theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,
                                                            MuonPatternCalibration = CfgGetter.getPublicTool("MuonPatternCalibration"), 
                                                            MuonPatternSegmentMaker = CfgGetter.getPublicTool("MuonPatternSegmentMaker"), 
                                                            MuonTruthSummaryTool = None)
-- 
GitLab


From 0d00f44ee8ee82f97df99181faae219f32d3e17a Mon Sep 17 00:00:00 2001
From: Mark Sutton <mark.sutton@cern.ch>
Date: Tue, 22 Dec 2020 15:24:08 +0000
Subject: [PATCH 191/308] Finally fix the tau and electron analyses

Typos and mistakes in the chain configuration prevented the analyses working correctly.

In addition, the release for the reference reconstruction is changed so that we can see
the collections in the AOD
---
 .../share/TIDAdata-chains-run3.dat                  | 13 ++++---------
 .../TrigInDetValidation/share/comparitor.json       |  2 +-
 .../test/test_trigID_all_ttbar_pu40.py              |  2 ++
 .../test/test_trigID_el_zee_pu40.py                 |  3 ++-
 .../test/test_trigID_el_zee_pu40_st.py              |  3 ++-
 .../test/test_trigID_tau_ztautau_pu46.py            |  1 +
 .../test/test_trigID_tau_ztautau_pu46_st.py         |  1 +
 7 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
index 8e7fca7ed157..deae3973b76b 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat
@@ -19,19 +19,14 @@ testChains = {
     "HLT_mu28_ivarmedium_L1MU20:HLT_IDTrack_MuonIso_FTF:HLT_Roi_MuonIso",
     "HLT_mu28_ivarmedium_L1MU20:HLT_IDTrack_MuonIso_IDTrig:HLT_Roi_MuonIso",
  
-    "HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_FTF",  
-    "HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_IDTrig", 
-    "HLT_e17_lhvloose_nod0_L1EM15VH:HLT_IDTrack_Electron_FTF",  
+    "HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron",  
+    "HLT_e5_etcut_L1EM3:HLT_IDTrack_Electron_IDTrig",
+    "HLT_e17_lhvloose_nod0_L1EM15VH:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron",
     "HLT_e17_lhvloose_nod0_L1EM15VH:HLT_IDTrack_Electron_IDTrig", 
  
-    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF",
     "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF:HLT_Roi_TauCore",
-    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF",
     "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso",
-    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_FTF",
-    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_FTF:HLT_TAURoI",
-    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig",
-    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_TAURoI",
+    "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso",
 
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF",
     "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig",
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json b/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json
index 8f92f4e743e5..d924fee9e7f3 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json
@@ -27,7 +27,7 @@
         "chains" : "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF:HLT_Roi_TauCore HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso"
     },
     "EFtau":{ 
-        "chains" : "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_TauIso"
+        "chains" : "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso"
     },
     "L2bjet":{ 
         "chains" : "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF"
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
index eb28cde6636c..d15e4aa40811 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu40.py
@@ -29,6 +29,8 @@ Slices  = ['muon','electron','tau','bjet','fsjet']
 Events  = 4000
 Threads = 8 
 Slots   = 8
+Release = "current"
+
 Input   = 'ttbar_ID'    # defined in TrigValTools/share/TrigValInputs.json  
 
 Jobs = [ ( "Offline",     " TIDAdata-run3-offline.dat      -r Offline -o data-hists-offline.root" ),
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py
index 4dadf400dbda..1dce5e61cef8 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40.py
@@ -32,7 +32,8 @@ Events  = 16000
 Threads = 8 
 Slots   = 8
 Input   = 'Zee_pu40'    # defined in TrigValTools/share/TrigValInputs.json
-GridFiles=True
+Release = "current"
+GridFiles = True
 
 Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
          ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py
index 829ea474af30..fc93fd30b035 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_st.py
@@ -32,7 +32,8 @@ Events  = 8000
 Threads = 1 
 Slots   = 1
 Input   = 'Zee_pu40'    # defined in TrigValTools/share/TrigValInputs.json
-GridFiles=True
+Release = "current"
+GridFiles = True
 
 Jobs = [ ( "Truth",       " TIDAdata-run3.dat                    -o data-hists.root -p 11" ),
          ( "Offline",     " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ) ]
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py
index d743d196d530..cc6b814541c1 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py
@@ -29,6 +29,7 @@ Slices  = ['tau']
 Events  = 6000
 Threads = 8 
 Slots   = 8
+Release = "current"
 Input   = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
 
 Jobs = [ ( "Offline",  " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ),
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py
index 27f1c21df5be..abd7eda34e4f 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46_st.py
@@ -29,6 +29,7 @@ Slices  = ['tau']
 Events  = 6000
 Threads = 1 
 Slots   = 1
+Release = "current"
 Input   = 'Ztautau_pu46'    # defined in TrigValTools/share/TrigValInputs.json  
 
 Jobs = [ ( "Offline",  " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" ),
-- 
GitLab


From 3f0313936e92eb0f5821a61b649861f40bf2c4aa Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Tue, 22 Dec 2020 15:25:04 +0000
Subject: [PATCH 192/308] SGTools: Fix dummy proxy leak.

When we remove a proxy, be sure to decrement the reference count even
if it's not in m_storeMap.  A dummy proxy won't have been entered
there, but it will still have gotten a reference count.
---
 Control/SGTools/src/DataStore.cxx       |  7 ++++++-
 Control/SGTools/test/DataStore_test.cxx | 22 +++++++++++++++++++---
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/Control/SGTools/src/DataStore.cxx b/Control/SGTools/src/DataStore.cxx
index d7e596184fb3..125bf7a485f4 100755
--- a/Control/SGTools/src/DataStore.cxx
+++ b/Control/SGTools/src/DataStore.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SGTools/DataStore.h"
@@ -208,12 +208,17 @@ DataStore::removeProxy(DataProxy* proxy, bool forceRemove, bool hard)
     int index = it->second.first;
     sc = StatusCode::SUCCESS;
 
+    // Remove primary entry.
     m_keyMap.erase (it);
     if (storeIter != m_storeMap.end()) {
       if (1 == storeIter->second.erase(name)) {
         proxy->release();
       }
     }
+    else {
+      // A dummy proxy.
+      proxy->release();
+    }
 
     // Remove all symlinks too.
     for (CLID symclid : clids) 
diff --git a/Control/SGTools/test/DataStore_test.cxx b/Control/SGTools/test/DataStore_test.cxx
index ce081b63da65..2223c6dc4275 100644
--- a/Control/SGTools/test/DataStore_test.cxx
+++ b/Control/SGTools/test/DataStore_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file DataStore_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -512,6 +510,24 @@ void test_dummy ATLAS_NOT_THREAD_SAFE ()
   assert (dp2->clID() == 456);
   assert (dp2->name() == "dp2");
   assert (dp2->refCount() == 1);
+
+  SG::StringPool::sgkey_t sgkey3 = pool.stringToKey ("dp3", 456);
+  SG::DataProxy* dp3 = make_proxy (0, "", sgkey3);
+  assert (store.addToStore (0, dp3).isSuccess());
+  assert (dp3->refCount() == 1);
+  assert (store.proxy_exact (sgkey3) == dp3);
+
+  dp1->addRef();
+  dp2->addRef();
+  dp3->addRef();
+  assert (dp1->refCount() == 2);
+  assert (dp2->refCount() == 2);
+  assert (dp3->refCount() == 2);
+
+  store.clearStore (true, false, nullptr);
+  assert (dp1->refCount() == 1);
+  assert (dp2->refCount() == 1);
+  assert (dp3->refCount() == 1);
 }
 
 
-- 
GitLab


From 88921f0b917edde87a2d86d67214760a4042f575 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 22 Dec 2020 01:28:02 +0100
Subject: [PATCH 193/308] MuonEventAthenaPool: Fix memory leak.

In MdtCsmCnv_p1::persToTrans, we initialize the transient object via
assigment.  But it is a DataVector, so the assignment will leave
it as a view container, meaning that its contents will be leaked.
Need to convert it back to an owning container before populating it.
---
 .../MuonCnv/MuonEventAthenaPool/src/MdtCsmCnv_p1.cxx        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtCsmCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtCsmCnv_p1.cxx
index 9696c7443079..52139bb24cbc 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtCsmCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtCsmCnv_p1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonRDO/MdtCsm.h"
@@ -15,6 +15,10 @@ MdtCsmCnv_p1::persToTrans(const MdtCsm_p1* persColl, MdtCsm* transColl, MsgStrea
                        persColl->m_SubDetId,
                        persColl->m_MrodId,
                        persColl->m_CsmId);
+  // The assignment above will leave *transColl as a view container.
+  // But it should own it's elements, so convert it back
+  // to an owning container.
+  transColl->clear (SG::OWN_ELEMENTS);
   
   // Invoke vector converter from the base template
   MdtCsm_Cnvp1_base_t::persToTrans( persColl, transColl, log );
-- 
GitLab


From 6ece7a894d3ac0b4958701bf5c9a8c2fcc1c2699 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 22 Dec 2020 00:49:14 +0100
Subject: [PATCH 194/308] MuonCombinedTrackFindingTools: Fix memory leak.

Object returned from TrackSelectionProcessorTool::process() was being leaked.
---
 .../MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx
index c7b1a3d09ba8..1b5f4ffa97ac 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonStauRecoTool.cxx
@@ -788,7 +788,8 @@ namespace MuonCombined {
     if( tracks.size() == 1 ) return true;
 
     // more than 1 track call ambiguity solver and select first track
-    TrackCollection* resolvedTracks=m_trackAmbibuityResolver->process(&tracks);
+    std::unique_ptr<TrackCollection> resolvedTracks
+      (m_trackAmbibuityResolver->process(&tracks));
     Trk::Track* selectedTrack = resolvedTracks->front();
 
     // get candidate
-- 
GitLab


From 38a0eebc3917bdd915aec3adf335ed808b405d2c Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 16 Oct 2020 09:22:01 -0400
Subject: [PATCH 195/308] CaloG4Sim: Enable thread-safety checking.

Enable thread-safety checking.
Clean up resulting warnings.
---
 .../CaloG4Sim/CaloG4Sim/ATLAS_CHECK_THREAD_SAFETY  |  1 +
 .../CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h    |  5 +++--
 .../CaloG4Sim/src/CalibrationDefaultProcessing.cc  | 14 ++++++++------
 3 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 Calorimeter/CaloG4Sim/CaloG4Sim/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/ATLAS_CHECK_THREAD_SAFETY b/Calorimeter/CaloG4Sim/CaloG4Sim/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..bd029a61c8f9
--- /dev/null
+++ b/Calorimeter/CaloG4Sim/CaloG4Sim/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Calorimeter/CaloG4Sim
diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h b/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h
index d25bb6f0d59f..8d82088b898c 100644
--- a/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h
+++ b/Calorimeter/CaloG4Sim/CaloG4Sim/EscapedEnergyRegistry.h
@@ -1,11 +1,12 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CaloG4_EscapedEnergyRegistry_H
 #define CaloG4_EscapedEnergyRegistry_H
 
 #include "CaloG4Sim/VEscapedEnergyProcessing.h"
+#include "CxxUtils/checker_macros.h"
 #include "globals.hh"
 
 #include <map>
@@ -75,7 +76,7 @@ namespace CaloG4
      // Thread-to-EscapeEnergyRegistry concurrent map type
     using EERThreadMap_t = tbb::concurrent_unordered_map< std::thread::id, EscapedEnergyRegistry*, std::hash<std::thread::id> >;
     // Concurrent map of EERs, one for each thread
-    static EERThreadMap_t m_EERThreadMap;
+    static EERThreadMap_t m_EERThreadMap ATLAS_THREAD_SAFE;
     // @brief Search inside m_EERThreadMap the element with the current threadID 
     // and return it or return a null pointer if the element is not found
     static EscapedEnergyRegistry* getEER();
diff --git a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc
index c0fd10089dfb..a03b0a2db37c 100644
--- a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc
+++ b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // CalibrationDefaultProcessing
@@ -20,6 +20,7 @@
 
 #include "CaloG4Sim/CalibrationDefaultProcessing.h"
 #include "CaloG4Sim/SimulationEnergies.h"
+#include "CxxUtils/checker_macros.h"
 
 // For the event-level flag
 #include "MCTruth/AtlasG4EventUserInfo.h"
@@ -32,6 +33,7 @@
 
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
+#include <atomic>
 
 namespace G4UA
 {
@@ -79,7 +81,9 @@ namespace G4UA
           // this step.  Note that we have to "cast away" const-ness for
           // the G4Step*, due to how G4VSensitiveDetector::Hit() is
           // defined.
-          m_defaultSD->Hit( const_cast<G4Step*>(a_step) );
+          // Should be ok, since Geant doesn't do intra-event parallelism.
+          G4Step* step_nc ATLAS_THREAD_SAFE = const_cast<G4Step*> (a_step);
+          m_defaultSD->Hit( step_nc );
 
           // Update the step info
           atlasG4EvtUserInfo->SetLastProcessedBarcode( track->GetTrackID() );
@@ -88,10 +92,8 @@ namespace G4UA
       }
 
       else {
-        // FIXME - thread unsafe static!!!
-        static G4bool warningPrinted = false;
-        if ( ! warningPrinted ) {
-          warningPrinted = true;
+        static std::atomic_flag warningPrinted ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT;
+        if ( ! warningPrinted.test_and_set() ) {
           G4cout << "CaloG4::CalibrationDefaultProcessing::SteppingAction - "
                  << G4endl
                  << "   A default calibration sensitive detector was not defined."
-- 
GitLab


From 4dae14bf1c50202a12888841e133f3cb0c5e370a Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Sun, 20 Dec 2020 15:09:33 -0500
Subject: [PATCH 196/308] TrkVertexFitters: Fix use of initialized variable.

Don't pass an uninitialized vector; pass a zeroed vector instead.
---
 .../TrkVertexFitters/src/AdaptiveVertexFitter.cxx               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tracking/TrkVertexFitter/TrkVertexFitters/src/AdaptiveVertexFitter.cxx b/Tracking/TrkVertexFitter/TrkVertexFitters/src/AdaptiveVertexFitter.cxx
index 1409b9518c1a..d2bae3fc0216 100755
--- a/Tracking/TrkVertexFitter/TrkVertexFitters/src/AdaptiveVertexFitter.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexFitters/src/AdaptiveVertexFitter.cxx
@@ -560,7 +560,7 @@ namespace Trk
     const std::vector<const Trk::NeutralParameters*>& neutralPerigeeList,
     const xAOD::Vertex& constraint) const
   {
-    return _fit(perigeeList,neutralPerigeeList,constraint,Amg::Vector3D(),true);
+    return _fit(perigeeList,neutralPerigeeList,constraint,Amg::Vector3D::Zero(),true);
   }
 
   xAOD::Vertex*
-- 
GitLab


From d71d59647773c50dcee3b3d7c2bd2200fa7549c0 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Mon, 21 Dec 2020 10:07:57 -0500
Subject: [PATCH 197/308] TrigAnalysisExamples: Fix gcc11 warnings.

Avoid spurious copies in for loops.
---
 .../TrigAnalysisExamples/src/TriggerAnalysisHelper.h      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h
index eac981dbb7df..f0dbf91cb7ba 100644
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h
+++ b/Trigger/TrigAnalysis/TrigAnalysisExamples/src/TriggerAnalysisHelper.h
@@ -124,7 +124,7 @@ namespace Trig{
             std::vector<Feature<T> > vectorOfFeatures = features.get<T>(key);
             ATH_MSG_INFO(chainName << " has " << features.get<T>().size() << " T features ");
             // Loop over the features of type T
-            for( const Trig::Feature<T> feature : vectorOfFeatures ) {
+            for( const Trig::Feature<T>& feature : vectorOfFeatures ) {
                 printFeatureAndTEInfo<T>(feature);
             } // End loop over the features
         }
@@ -146,13 +146,13 @@ namespace Trig{
                 std::vector< Trig::Feature <T1> > feature1 = comb.get<T1>(key1);
                 ATH_MSG_INFO("COMB Combination has " << feature1.size() << " T1 features "); 
 
-                for(const Trig::Feature<T1> feat1:feature1){
+                for(const Trig::Feature<T1>& feat1:feature1){
                     printFeatureAndTEInfo<T1>(feat1);
                 }
 
                 std::vector< Trig::Feature <T2> > feature2 = comb.get<T2>(key2);
                 ATH_MSG_INFO("COMB Combination has " << feature2.size() << " T2 features ");
-                for(const Trig::Feature<T2> feat2:feature2){
+                for(const Trig::Feature<T2>& feat2:feature2){
                     printFeatureAndTEInfo<T2>(feat2);
                 }
             }
@@ -165,7 +165,7 @@ namespace Trig{
             FeatureContainer features = m_trigDecisionTool->features( chainName, condition);
             std::vector<Feature<T> > vectorOfFeatures = features.get<T>(key);
             // Loop over the features of type T
-            for( const Trig::Feature<T> feature : vectorOfFeatures ) {
+            for( const Trig::Feature<T>& feature : vectorOfFeatures ) {
                 const T *cont=feature.cptr(); //Get pointer to container of type T
                 const xAOD::TrigPassBits *bits=(m_trigDecisionTool->ancestor<xAOD::TrigPassBits>(feature.te())).cptr();
                 if(!bits) 
-- 
GitLab


From ecc828f5682e1304c493e1ceb5d675c5625ce2c8 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Fri, 23 Oct 2020 13:40:41 +0200
Subject: [PATCH 198/308] Also adjust MC channel number

In the EVNT -> EVNT workflows where the run number needs adjusting, the
MC channel number requires the same correction. This will later propogte
into EventInfo clients such as xAOD::EventInfo, EventStreamInfo, and
FileMetaData.
---
 Generators/EvgenProdTools/src/CountHepMC.cxx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Generators/EvgenProdTools/src/CountHepMC.cxx b/Generators/EvgenProdTools/src/CountHepMC.cxx
index 3e40238d1804..4f9d5a38afba 100644
--- a/Generators/EvgenProdTools/src/CountHepMC.cxx
+++ b/Generators/EvgenProdTools/src/CountHepMC.cxx
@@ -14,6 +14,7 @@
 #include "AthenaKernel/errorcheck.h"
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
+#include "EventInfo/EventType.h"
 #include <cmath>
 #include <cassert>
 
@@ -95,7 +96,7 @@ else{
     }
   }
 
-if (m_corRunNumber) {
+  if (m_corRunNumber) {
     // Change the EventID in the eventinfo header
     const EventInfo* pInputEvt(0);
     ATH_MSG_INFO("Set new run number called !!" << m_newRunNumber);
@@ -106,6 +107,13 @@ if (m_corRunNumber) {
       eventID->set_run_number(m_newRunNumber);
       ATH_MSG_INFO("Set new run number" << m_newRunNumber);
       ATH_MSG_DEBUG("Set new run number in event_ID");
+
+      // also set the MC channel number
+      EventType* event_type = const_cast<EventType*>(pInputEvt->event_type());
+      ATH_MSG_INFO("got event_type !! " );
+      event_type->set_mc_channel_number(m_newRunNumber);
+      ATH_MSG_INFO("Set new MC channel number" << event_type->mc_channel_number());
+      ATH_MSG_DEBUG("Set new mc_channel_number in event_type");
     } else {
       ATH_MSG_ERROR("No EventInfo object found");
       return StatusCode::SUCCESS;
-- 
GitLab


From 5d6bea39247481722b46822aec9348f4ad1da5f1 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 09:19:04 +0100
Subject: [PATCH 199/308] Add Particle_v1 to the standalone dictionary loader

---
 Control/xAODRootAccess/Root/Init.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Control/xAODRootAccess/Root/Init.cxx b/Control/xAODRootAccess/Root/Init.cxx
index 2b0f02b4374b..3375db647492 100644
--- a/Control/xAODRootAccess/Root/Init.cxx
+++ b/Control/xAODRootAccess/Root/Init.cxx
@@ -74,7 +74,8 @@ namespace xAOD {
             "xAOD::TauJet_v1",
             "xAOD::PFO_v1",
             "xAOD::TrigElectron_v1",
-            "xAOD::L2CombinedMuon_v1"}) {
+            "xAOD::L2CombinedMuon_v1",
+            "xAOD::Particle_v1"}) {
         // silently ignore missing classes, because this gets used in
         // all projects, and not all projects contain all xAOD classes
         static constexpr Bool_t LOAD = kTRUE;
-- 
GitLab


From dc7130b4da39ee14235b469b7309ede542bc0e84 Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Wed, 23 Dec 2020 10:06:14 +0000
Subject: [PATCH 200/308] MuonTruthAlgs: Fix memory leaks.

In MuonTruthDecorationAlg, firstPos and secondPos were not deleted
on all possible code paths.

Change them to use automatic allocation instead.
---
 .../MuonTruthAlgs/MuonTrackTruthTool.h        |  2 +-
 .../MuonTruthAlgs/src/MuonTrackTruthTool.cxx  | 13 ++----
 .../src/MuonTruthDecorationAlg.cxx            | 46 +++++++++++--------
 3 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonTrackTruthTool.h b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonTrackTruthTool.h
index d755688f54de..d919b8381b1c 100644
--- a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonTrackTruthTool.h
+++ b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonTrackTruthTool.h
@@ -147,7 +147,7 @@ namespace Muon {
     ToolHandle<Trk::ITruthTrajectoryBuilder> m_truthTrajectoryBuilder{this,"TruthTrajectoryBuilder","Muon::MuonDecayTruthTrajectoryBuilder/MuonDecayTruthTrajectoryBuilder"};
 
     mutable TruthTree m_truthTree;
-    mutable std::vector<TruthTrajectory*> m_truthTrajectoriesToBeDeleted;
+    mutable std::vector<std::unique_ptr<TruthTrajectory> > m_truthTrajectoriesToBeDeleted;
     mutable std::map<int,int> m_barcodeMap; // map used to link barcode of TrackRecord particles/hits to 'final' state barcode
 
     Gaudi::Property<bool> m_manipulateBarCode{this,"ManipulateBarCode",false};
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTrackTruthTool.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTrackTruthTool.cxx
index c343b108ef4b..e5e4cf377e31 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTrackTruthTool.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTrackTruthTool.cxx
@@ -156,13 +156,13 @@ namespace Muon {
       }
       ATH_MSG_VERBOSE(" found new particle with pdgid " << PDGCode << " in truth record, barcode " << barcode);
 
-      TruthTrajectory* truthTrajectory = 0;
+      std::unique_ptr<TruthTrajectory> truthTrajectory;
       // associate the muon truth with the gen event info
       if( genEvent ){
 	HepMC::GenParticle* genParticle = genEvent->barcode_to_particle( (*tr_it).GetBarCode() );
 	if( genParticle ){
-	  truthTrajectory = new TruthTrajectory();
-	  m_truthTrajectoryBuilder->buildTruthTrajectory(truthTrajectory,genParticle);
+	  truthTrajectory = std::make_unique<TruthTrajectory>();
+	  m_truthTrajectoryBuilder->buildTruthTrajectory(truthTrajectory.get(),genParticle);
 	  if( !truthTrajectory->empty() ){
 	    
 	    // always use barcode of the 'final' particle in chain in map
@@ -212,8 +212,8 @@ namespace Muon {
 	
       TruthTreeEntry& entry = m_truthTree[barcode];
       entry.truthTrack = &(*tr_it);
-      entry.truthTrajectory = truthTrajectory;
-      m_truthTrajectoriesToBeDeleted.push_back(truthTrajectory);
+      entry.truthTrajectory = truthTrajectory.get();
+      m_truthTrajectoriesToBeDeleted.push_back(std::move(truthTrajectory));
     }
     
     // add sim data collections
@@ -698,9 +698,6 @@ namespace Muon {
   void MuonTrackTruthTool::clear() const {
     m_truthTree.clear();
     m_barcodeMap.clear();
-    std::vector<TruthTrajectory*>::iterator dit = m_truthTrajectoriesToBeDeleted.begin();
-    std::vector<TruthTrajectory*>::iterator dit_end = m_truthTrajectoriesToBeDeleted.end();
-    for( ;dit!=dit_end;++dit ) delete *dit;
     m_truthTrajectoriesToBeDeleted.clear();
   }
 
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
index 1199406c5469..e531dc87f97a 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
@@ -163,8 +163,10 @@ namespace Muon {
     // loop over chamber layers
     for( const auto& lay : ids ){
       // skip empty layers
-      Amg::Vector3D* firstPos  = 0;
-      Amg::Vector3D* secondPos = 0;
+      Amg::Vector3D firstPos  = Amg::Vector3D::Zero();
+      Amg::Vector3D secondPos = Amg::Vector3D::Zero();
+      bool firstPosSet = false;
+      bool secondPosSet = false;
       Identifier chId;
       int index = -1;
       uint8_t nprecLayers = 0;
@@ -218,14 +220,18 @@ namespace Muon {
 		if( isEndcap ) return fabs(p1.z()) < fabs(p2.z());
 		else           return p1.perp() < p2.perp();
 	      };
-	      if( !firstPos ) firstPos  = new Amg::Vector3D(gpos);
-	      else if( !secondPos ){
-		secondPos = new Amg::Vector3D(gpos);
-		if( isSmaller(*secondPos,*firstPos) ) std::swap(firstPos,secondPos);
+	      if( !firstPosSet ) {
+                firstPos  = gpos;
+                firstPosSet = true;
+              }
+	      else if( !secondPosSet ){
+		secondPos = gpos;
+                secondPosSet = true;
+		if( isSmaller(secondPos,firstPos) ) std::swap(firstPos,secondPos);
 	      }else{
 		// update position if we can increase the distance between the two positions
-		if( isSmaller(gpos,*firstPos) )       *firstPos  = gpos;
-		else if( isSmaller(*secondPos,gpos) ) *secondPos = gpos;
+		if( isSmaller(gpos,firstPos) )       firstPos  = gpos;
+		else if( isSmaller(secondPos,gpos) ) secondPos = gpos;
 	      }
 	    }
 	  }
@@ -238,14 +244,18 @@ namespace Muon {
 	      Amg::Vector3D locpos(0,pos->second.getdeposits()[0].second.ypos(),pos->second.getdeposits()[0].second.zpos());
 	      gpos=descriptor->localToGlobalCoords(locpos,m_idHelperSvc->cscIdHelper().elementID(id));
 	      ATH_MSG_DEBUG("got CSC global position "<<gpos);
-	      if( !firstPos ) firstPos  = new Amg::Vector3D(gpos);
-              else if( !secondPos ){
-                secondPos = new Amg::Vector3D(gpos);
-		if(secondPos->perp()<firstPos->perp()) std::swap(firstPos,secondPos);
+	      if( !firstPosSet ) {
+                firstPos  = gpos;
+                firstPosSet = true;
+              }
+              else if( !secondPosSet ){
+                secondPos = gpos;
+                secondPosSet = true;
+		if(secondPos.perp() < firstPos.perp()) std::swap(firstPos,secondPos);
 	      }
 	      else{
-		if( gpos.perp()<firstPos->perp() )       *firstPos  = gpos;
-                else if( secondPos->perp()<gpos.perp() ) *secondPos = gpos;
+		if( gpos.perp() < firstPos.perp() )       firstPos  = gpos;
+                else if( secondPos.perp() < gpos.perp() ) secondPos = gpos;
               }
 	    }
 	  }
@@ -272,16 +282,14 @@ namespace Muon {
 	  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
 	  segment->setIdentifier(sector,chIndex,eta,technology);
 	}
-	if( firstPos && secondPos ){
-          Amg::Vector3D gpos = (*firstPos+*secondPos)/2.;
-          Amg::Vector3D gdir = (*firstPos-*secondPos).unit();
+	if( firstPosSet && secondPosSet ){
+          Amg::Vector3D gpos = (firstPos+secondPos)/2.;
+          Amg::Vector3D gdir = (firstPos-secondPos).unit();
 	  ATH_MSG_DEBUG(" got position : r " << gpos.perp() << " z " << gpos.z()
                         << "  and direction: theta " << gdir.theta() << " phi " << gdir.phi() );
           segment->setPosition(gpos.x(),gpos.y(),gpos.z());
           segment->setDirection(gdir.x(),gdir.y(),gdir.z());
 	}
-	delete firstPos;
-	delete secondPos;
       }
     }
   }
-- 
GitLab


From 1da30e13430e47657a6eafd704b34150cc5bec58 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Wed, 23 Dec 2020 10:48:01 +0000
Subject: [PATCH 201/308] Some cleanup in muon packages

---
 .../src/MuonFeatureCnvTestAlg.cxx             |  8 +---
 .../src/MuonFeatureCnvTestAlg.h               |  4 +-
 .../src/TrigMuonEFInfoCnvTestAlg.cxx          |  8 +---
 .../src/TrigMuonEFInfoCnvTestAlg.h            |  4 +-
 .../src/TrigMuonEFInfoToMuonCnvTool.cxx       | 16 +-------
 .../src/TrigMuonEFInfoToMuonCnvTool.h         |  7 +---
 .../AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h     |  1 -
 .../AmdcAth/src/AmdcsimrecAthenaSvc.cxx       |  5 +--
 .../Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h         |  1 -
 .../Amdcsimrec/AmdcDb/src/AmdcDb.cxx          |  3 --
 .../AmdcOracle/AmdcOracle/AmdcDumpOracle.h    |  3 +-
 .../AmdcOracle/src/AmdcDumpOracle.cxx         |  4 --
 .../CSCcabling/CSCcabling/CSCcablingSvc.h     |  3 +-
 .../CSCcabling/src/CSCcablingSvc.cxx          |  6 ---
 .../MuonCablingServers/RPCcablingServerSvc.h  |  3 +-
 .../MuonCablingServers/TGCcablingServerSvc.h  |  6 +--
 .../src/RPCcablingServerSvc.cxx               |  5 ---
 .../src/TGCcablingServerSvc.cxx               | 11 ------
 .../MuonMDT_Cabling/MdtTestCabling.h          |  3 +-
 .../MuonMDT_Cabling/MuonMDT_CablingAlg.h      |  1 -
 .../MuonMDT_Cabling/MuonMDT_CablingSvc.h      | 10 +----
 .../MuonMDT_Cabling/src/MdtTestCabling.cxx    |  9 -----
 .../src/MuonMDT_CablingAlg.cxx                |  7 ----
 .../src/MuonMDT_CablingSvc.cxx                | 12 ------
 .../TGCcabling/TGCcabling/TGCcablingSvc.h     |  4 +-
 .../TGCcabling/src/TGCcablingSvc.cxx          |  5 +--
 .../MuonGeoModel/MuonDetectorCondAlg.h        |  4 +-
 .../MuonGeoModel/src/MuonDetectorCondAlg.cxx  |  7 ----
 .../MuonGeoModelTest/MuonGMTestOnPrd.h        | 10 +----
 .../MuonGeoModelTest/src/MuonGMTestOnPrd.cxx  | 37 +------------------
 .../MuonIdHelpers/MuonIdHelperSvc.h           |  3 --
 .../MuonIdHelpers/src/MuonIdHelperSvc.cxx     |  5 ---
 32 files changed, 22 insertions(+), 193 deletions(-)

diff --git a/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.cxx b/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.cxx
index ee4b285cf556..b80b57a64760 100644
--- a/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.cxx
+++ b/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonFeatureCnvTestAlg.h"
@@ -29,12 +29,6 @@ StatusCode MuonFeatureCnvTestAlg::initialize() {
     return StatusCode::SUCCESS;
 }
 
-StatusCode MuonFeatureCnvTestAlg::finalize() {
-    
-    // Return gracefully:
-    return StatusCode::SUCCESS;
-}
-
 StatusCode MuonFeatureCnvTestAlg::execute() {
 
   // Retrieve MuonFeatureContainer
diff --git a/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.h b/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.h
index e495f0ad9213..e994db39493c 100644
--- a/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.h
+++ b/Event/xAOD/xAODTrigMuonCnv/src/MuonFeatureCnvTestAlg.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -34,8 +34,6 @@ class MuonFeatureCnvTestAlg : public AthAlgorithm {
         
         /// Function initialising the algorithm
         virtual StatusCode initialize();
-        /// Function initialising the algorithm
-        virtual StatusCode finalize();
         /// Function executing the algorithm
         virtual StatusCode execute();
 
diff --git a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.cxx b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.cxx
index 453039354bb2..feeebc4c9f53 100644
--- a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.cxx
+++ b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigMuonEFInfoCnvTestAlg.h"
@@ -35,12 +35,6 @@ StatusCode TrigMuonEFInfoCnvTestAlg::initialize() {
     return StatusCode::SUCCESS;
 }
 
-StatusCode TrigMuonEFInfoCnvTestAlg::finalize() {
-    
-    // Return gracefully:
-    return StatusCode::SUCCESS;
-}
-
 StatusCode TrigMuonEFInfoCnvTestAlg::execute() {
 
   // Retrieve the TrigMuonEFInfoContainer
diff --git a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.h b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.h
index 4f11662daad3..d381e7e9ad09 100644
--- a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.h
+++ b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoCnvTestAlg.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -43,8 +43,6 @@ class TrigMuonEFInfoCnvTestAlg : public AthAlgorithm {
         
         /// Function initialising the algorithm
         virtual StatusCode initialize();
-        /// Function initialising the algorithm
-        virtual StatusCode finalize();
         /// Function executing the algorithm
         virtual StatusCode execute();
 
diff --git a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.cxx b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.cxx
index 7d13d09ee009..ab8623d436c4 100644
--- a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.cxx
+++ b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -26,13 +26,6 @@ TrigMuonEFInfoToMuonCnvTool::TrigMuonEFInfoToMuonCnvTool(const std::string& type
   declareProperty( "xAODEFInDetTrackParticleContainerName", m_inDetTrackParticles = "EFInDetTrackParticles" );   
 }
 
-/**
- * Destructor - nothing to do so far.
- */
-TrigMuonEFInfoToMuonCnvTool::~TrigMuonEFInfoToMuonCnvTool() {
-    
-}
-
 /**
  * Initialize the tool
  */
@@ -45,13 +38,6 @@ StatusCode TrigMuonEFInfoToMuonCnvTool::initialize() {
     return StatusCode::SUCCESS;
 }
 
-/**
- * Finalize the tool
- */
-StatusCode TrigMuonEFInfoToMuonCnvTool::finalize() {
-    return StatusCode::SUCCESS;
-}
-
 /**
  * Convert input TrigMuonEFInfo object into multuple xAOD::Muon objects.
  * The xAOD::Muon objects are stored into the MuonContainer passed to the function.
diff --git a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.h b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.h
index 7bd1eff060d8..7a1ac63fd1a7 100644
--- a/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.h
+++ b/Event/xAOD/xAODTrigMuonCnv/src/TrigMuonEFInfoToMuonCnvTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //
@@ -30,14 +30,11 @@ public:
     TrigMuonEFInfoToMuonCnvTool(const std::string& type, const std::string& name, const IInterface* parent);
     
     /// Destructor
-    virtual ~TrigMuonEFInfoToMuonCnvTool();
+    virtual ~TrigMuonEFInfoToMuonCnvTool()=default;
     
     /// initialize the tool
     virtual StatusCode initialize() override;
     
-    /// finalize the tool
-    virtual StatusCode finalize() override;
-    
     /// Convert a single TrigMuonEFInfo object into (maybe multiple) xAOD::Muon objects.
     virtual StatusCode convertTrigMuonEFInfo(const TrigMuonEFInfo& efinfo,
                                                  xAOD::MuonContainer& muoncontainer,
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h b/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h
index b20b0c241d0b..b80c338f9863 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h
@@ -51,7 +51,6 @@ public:
    static const InterfaceID& interfaceID() { return IID_IAmdcsimrecAthenaSvc; }
 
    virtual StatusCode initialize();
-   virtual StatusCode finalize();
 
    virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
 
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx b/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx
index dc4189317622..57ee88cbbe69 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx
@@ -266,10 +266,7 @@ StatusCode AmdcsimrecAthenaSvc::initialize() {
   if ( m_EmergencyOut == 1 ) return StatusCode::FAILURE;
   return StatusCode::SUCCESS;
 }
- 
-/// Service finalisation
-StatusCode AmdcsimrecAthenaSvc::finalize(){return StatusCode::SUCCESS;}
- 
+
 StatusCode AmdcsimrecAthenaSvc::queryInterface( const InterfaceID& riid, void** ppvInterface ) {
   if ( IID_IAmdcsimrecAthenaSvc == riid )    {
     *ppvInterface = (AmdcsimrecAthenaSvc*)this;
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
index e78595ec08fb..c8418f5d39e9 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
@@ -31,7 +31,6 @@ class AmdcDb final : public AthService, virtual public IRDBAccessSvc {
   static const InterfaceID& interfaceID() { return IID_IRDBAccessSvc; }
 
   virtual StatusCode initialize() override;
-  virtual StatusCode finalize() override;
 
   virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override;
 
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx
index ea84217fc16b..bec013addc0e 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx
@@ -195,9 +195,6 @@ StatusCode AmdcDb::DoUpdatedSvc()
   return StatusCode::SUCCESS;
 }
 
-/// Service finalisation
-StatusCode AmdcDb::finalize(){return StatusCode::SUCCESS;}
- 
 StatusCode AmdcDb::queryInterface(const InterfaceID& riid, void** ppvInterface)
 {
   if (IID_IRDBAccessSvc == riid)
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h b/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h
index bae89b19c50f..909af1d8f0d7 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/AmdcOracle/AmdcDumpOracle.h
@@ -29,8 +29,7 @@ public:
 ///////////////////////////////////
 
    StatusCode initialize();
-   StatusCode execute();
-   StatusCode finalize();
+   StatusCode execute(){return StatusCode::SUCCESS;}
 
 private:
 ///////////////////////////////////
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx b/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx
index 7df7f6d4a0ad..b018dd56bebe 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/src/AmdcDumpOracle.cxx
@@ -374,10 +374,6 @@ StatusCode AmdcDumpOracle::DoIt()
 
 }
 
-StatusCode AmdcDumpOracle::execute() {return StatusCode::SUCCESS;}
- 
-StatusCode AmdcDumpOracle::finalize() {return StatusCode::SUCCESS;}
-
 void AmdcDumpOracle::DumpASZT( IRDBAccessSvc* pIRDBAccessSvc, std::string TagAdd, int& Kwarn,int& Kchck){
 
   std::string NameOfTheSet = "ASZT";
diff --git a/MuonSpectrometer/MuonCablings/CSCcabling/CSCcabling/CSCcablingSvc.h b/MuonSpectrometer/MuonCablings/CSCcabling/CSCcabling/CSCcablingSvc.h
index 88b2bc5d395a..a4d8f93e69c8 100755
--- a/MuonSpectrometer/MuonCablings/CSCcabling/CSCcabling/CSCcablingSvc.h
+++ b/MuonSpectrometer/MuonCablings/CSCcabling/CSCcabling/CSCcablingSvc.h
@@ -24,13 +24,12 @@ class CSCcablingSvc : public AthService, virtual public IInterface {
 public:
    
   CSCcablingSvc(const std::string& name,ISvcLocator* sl);
-  virtual ~CSCcablingSvc();
+  virtual ~CSCcablingSvc()=default;
 
   static const InterfaceID& interfaceID() { return IID_ICSCcablingSvc; }
   virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF);
 
   virtual StatusCode initialize(void);
-  virtual StatusCode finalize(void);  
 
   /** map offline ROD identifier to online ID */
   bool onlineId(const uint16_t subdetectorID, const uint16_t offlineID, uint32_t& rodId) const;
diff --git a/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx b/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx
index 9ab4c909ec53..744a261245b1 100755
--- a/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx
+++ b/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx
@@ -22,8 +22,6 @@ CSCcablingSvc::CSCcablingSvc(const std::string& name, ISvcLocator* sl)
   declareProperty("Run1Cabling", m_run1 = false);
 }
 
-CSCcablingSvc::~CSCcablingSvc() {}
-
 StatusCode CSCcablingSvc::queryInterface(const InterfaceID& riid, void** ppvIF) {
  
   if( IID_ICSCcablingSvc.versionMatch(riid) ) { 
@@ -73,10 +71,6 @@ StatusCode CSCcablingSvc::initialize() {
   return StatusCode::SUCCESS;
 }
 
-StatusCode CSCcablingSvc::finalize() { 
-  return StatusCode::SUCCESS;
-}
-
 /** map offline ROD identifier to online ID */
 bool CSCcablingSvc::onlineId(const uint16_t subDetectorID, const uint16_t offlineID, uint32_t& rodId) const {
 
diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/RPCcablingServerSvc.h b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/RPCcablingServerSvc.h
index ec9d0ac2b929..49d51af42e47 100644
--- a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/RPCcablingServerSvc.h
+++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/RPCcablingServerSvc.h
@@ -30,11 +30,10 @@ class RPCcablingServerSvc : public AthService,
     public:
     // Constructor and other Service methods
     RPCcablingServerSvc(const std::string& name, ISvcLocator* svc);
-    virtual ~RPCcablingServerSvc() {}
+    virtual ~RPCcablingServerSvc()=default;
   
     virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF) override;
     virtual StatusCode initialize(void) override;
-    virtual StatusCode finalize(void) override;
 
     // Interface implementation
     virtual StatusCode giveCabling(const IRPCcablingSvc*&) const override;
diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h
index 1cee8a878508..0b4e05f664ce 100644
--- a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h
+++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TGCcablingServerSvc_H
@@ -22,11 +22,9 @@ class TGCcablingServerSvc : public AthService,
     public:
     // Constructor and other Service methods
     TGCcablingServerSvc(const std::string& name, ISvcLocator* svc);
-    virtual ~TGCcablingServerSvc() {}
+    virtual ~TGCcablingServerSvc()=default;
   
     virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF);
-    virtual StatusCode initialize(void);
-    virtual StatusCode finalize(void);
 
     // Interface implementation
     virtual StatusCode giveCabling( const ITGCcablingSvc*&) const;
diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/RPCcablingServerSvc.cxx b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/RPCcablingServerSvc.cxx
index 36bd4892cee8..b2594f9dd23f 100644
--- a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/RPCcablingServerSvc.cxx
+++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/RPCcablingServerSvc.cxx
@@ -57,11 +57,6 @@ RPCcablingServerSvc::initialize() {
     return StatusCode::SUCCESS;
 }
 
-StatusCode
-RPCcablingServerSvc::finalize() {
-    return StatusCode::SUCCESS;
-}
-
 StatusCode 
 RPCcablingServerSvc::giveCabling(const IRPCcablingSvc*& cabling) const {
 
diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx
index c61391da5358..ab1e48ba3985 100644
--- a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx
+++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx
@@ -30,17 +30,6 @@ TGCcablingServerSvc::queryInterface(const InterfaceID& riid, void** ppvIF)
     
     addRef();
     return StatusCode::SUCCESS;
-} 
-
-StatusCode
-TGCcablingServerSvc::initialize() 
-{
-    return StatusCode::SUCCESS;
-}
-
-StatusCode
-TGCcablingServerSvc::finalize() {
-    return StatusCode::SUCCESS;
 }
 
 StatusCode
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MdtTestCabling.h b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MdtTestCabling.h
index dd353f113641..b640a47dd0d4 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MdtTestCabling.h
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MdtTestCabling.h
@@ -29,10 +29,9 @@ class MdtTestCabling : public AthAlgorithm {
  public:
 
   MdtTestCabling(const std::string& name, ISvcLocator* pSvcLocator);
-  ~MdtTestCabling();
+  ~MdtTestCabling()=default;
 
   virtual StatusCode initialize();
-  virtual StatusCode finalize();
   virtual StatusCode execute();
 
  private:
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingAlg.h b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingAlg.h
index ad704fbfd4c3..57128e1b00cb 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingAlg.h
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingAlg.h
@@ -36,7 +36,6 @@ class MuonMDT_CablingAlg: public AthAlgorithm {
   virtual ~MuonMDT_CablingAlg() = default;
   virtual StatusCode initialize() override;
   virtual StatusCode execute() override;
-  virtual StatusCode finalize() override;
   
  private:
 
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingSvc.h b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingSvc.h
index 27aadd9b9f9a..183ce2895038 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingSvc.h
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/MuonMDT_Cabling/MuonMDT_CablingSvc.h
@@ -29,17 +29,9 @@ class MuonMDT_CablingSvc : public AthService ,
  public:
 
   MuonMDT_CablingSvc(const std::string& name,ISvcLocator* sl);
-  virtual ~MuonMDT_CablingSvc();
+  virtual ~MuonMDT_CablingSvc()=default;
   
   virtual StatusCode initialize() override;
-  virtual StatusCode finalize() override;
-
-  /** methods called at trigger stop/start */
-  //  virtual StatusCode start();
-  //  virtual StatusCode stop();
-
-  /** method for begin run transition */
-  //  virtual void handle(const Incident&);
 
   static const InterfaceID& interfaceID() { return IID_IMuonMDT_CablingSvc; }
 
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MdtTestCabling.cxx b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MdtTestCabling.cxx
index 11ba99136ca3..670fb5745982 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MdtTestCabling.cxx
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MdtTestCabling.cxx
@@ -10,9 +10,6 @@ MdtTestCabling::MdtTestCabling(const std::string& name, ISvcLocator* pSvcLocator
 { 
 }
 
-MdtTestCabling::~MdtTestCabling() { }
-
-
 StatusCode MdtTestCabling::initialize()
 {
   ATH_CHECK( m_chronoSvc.retrieve() );
@@ -45,12 +42,6 @@ StatusCode MdtTestCabling::execute()
   return StatusCode::SUCCESS;
 }
 
-
-StatusCode MdtTestCabling::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
 /** test the map content */
 bool MdtTestCabling::testMap()
 {
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingAlg.cxx b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingAlg.cxx
index 784b3d759685..73be45980b2d 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingAlg.cxx
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingAlg.cxx
@@ -286,10 +286,3 @@ StatusCode MuonMDT_CablingAlg::execute(){
   
   return StatusCode::SUCCESS;
 }
-
-
-StatusCode MuonMDT_CablingAlg::finalize(){
-  
-  ATH_MSG_DEBUG( "finalize " << name() );
-  return StatusCode::SUCCESS;
-}
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingSvc.cxx b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingSvc.cxx
index d5f66c5c7d1d..39e59a52958b 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingSvc.cxx
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/src/MuonMDT_CablingSvc.cxx
@@ -39,10 +39,6 @@ AthService(svcName,sl),
     declareProperty("doCalStreamInit",m_doCalStreamInit=false);
 }
 
-MuonMDT_CablingSvc::~MuonMDT_CablingSvc()
-    { }
-
-
 /** Initialization method */
 StatusCode MuonMDT_CablingSvc::initialize()
 {
@@ -149,14 +145,6 @@ StatusCode MuonMDT_CablingSvc::initialize()
     return sc;
 }
 
-/** Finalization method */
-StatusCode MuonMDT_CablingSvc::finalize()
-{
-   return StatusCode::SUCCESS;
-}
-
-
-
 // queryInterface 
 StatusCode MuonMDT_CablingSvc::queryInterface(const InterfaceID& riid, void** ppvIF) 
 { 
diff --git a/MuonSpectrometer/MuonCablings/TGCcabling/TGCcabling/TGCcablingSvc.h b/MuonSpectrometer/MuonCablings/TGCcabling/TGCcabling/TGCcablingSvc.h
index 261e0e58fef2..a8db79c4c973 100755
--- a/MuonSpectrometer/MuonCablings/TGCcabling/TGCcabling/TGCcablingSvc.h
+++ b/MuonSpectrometer/MuonCablings/TGCcabling/TGCcabling/TGCcablingSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -34,7 +34,7 @@ class TGCcablingSvc : public ITGCcablingSvc
 {
 public:
   TGCcablingSvc (const std::string& name, ISvcLocator* svc);
-  virtual ~TGCcablingSvc (void);
+  virtual ~TGCcablingSvc()=default;
 
   static const InterfaceID& interfaceID() 
   {
diff --git a/MuonSpectrometer/MuonCablings/TGCcabling/src/TGCcablingSvc.cxx b/MuonSpectrometer/MuonCablings/TGCcabling/src/TGCcablingSvc.cxx
index a2279c279125..3f3c10fec9d4 100755
--- a/MuonSpectrometer/MuonCablings/TGCcabling/src/TGCcablingSvc.cxx
+++ b/MuonSpectrometer/MuonCablings/TGCcabling/src/TGCcablingSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -33,9 +33,6 @@ TGCcablingSvc::TGCcablingSvc (const std::string& name, ISvcLocator* svc)
   declareProperty("databasePPToSL",  m_databasePPToSL="PP2SL.db");
   declareProperty("databaseSLBToROD",m_databaseSLBToROD="SLB2ROD.db");
 }
-  
-TGCcablingSvc::~TGCcablingSvc (void)
-{}
 
 StatusCode  TGCcablingSvc::queryInterface(const InterfaceID& riid,void** ppvIF)
 {
diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorCondAlg.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorCondAlg.h
index 78c837f4c1dd..952a91b8bfed 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorCondAlg.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorCondAlg.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONGEOMODEL_MUONDETECTORCONDALG_H
@@ -26,8 +26,6 @@ public:
 
   virtual StatusCode initialize() override final;
   virtual StatusCode execute() override final;
-  virtual StatusCode finalize() override final;
-
 
 private:
   
diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorCondAlg.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorCondAlg.cxx
index e250f0ccb689..e49a2003963b 100755
--- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorCondAlg.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorCondAlg.cxx
@@ -152,10 +152,3 @@ StatusCode MuonDetectorCondAlg::execute()
 
   return StatusCode::SUCCESS;
 }
-
-
-StatusCode MuonDetectorCondAlg::finalize()
-{
-  ATH_MSG_DEBUG( "finalize " << name() );
-  return StatusCode::SUCCESS;
- }
diff --git a/MuonSpectrometer/MuonGeoModelTest/MuonGeoModelTest/MuonGMTestOnPrd.h b/MuonSpectrometer/MuonGeoModelTest/MuonGeoModelTest/MuonGMTestOnPrd.h
index e01d1da1844c..31cf424fa8d7 100644
--- a/MuonSpectrometer/MuonGeoModelTest/MuonGeoModelTest/MuonGMTestOnPrd.h
+++ b/MuonSpectrometer/MuonGeoModelTest/MuonGeoModelTest/MuonGMTestOnPrd.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -25,24 +25,18 @@
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
 
-
 class StoreGateSvc;
 class ActiveStoreSvc;
 
-
-//class MuonReadoutElement;
-
-
 class MuonGMTestOnPrd: public AthAlgorithm
 {
 public:
     
     MuonGMTestOnPrd(const std::string& name, ISvcLocator* pSvcLocator);
-    ~MuonGMTestOnPrd();
+    ~MuonGMTestOnPrd()=default;
     
     StatusCode	initialize();
     StatusCode 	execute();
-    StatusCode 	finalize();
 
 private:
 
diff --git a/MuonSpectrometer/MuonGeoModelTest/src/MuonGMTestOnPrd.cxx b/MuonSpectrometer/MuonGeoModelTest/src/MuonGMTestOnPrd.cxx
index 305cd0474073..5edf1c4e2fba 100644
--- a/MuonSpectrometer/MuonGeoModelTest/src/MuonGMTestOnPrd.cxx
+++ b/MuonSpectrometer/MuonGeoModelTest/src/MuonGMTestOnPrd.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -7,9 +7,6 @@
  -----------------------------------------
  ***************************************************************************/
 
-//<doc><file>	$Id: MuonGMTestOnPrd.cxx,v 1.8 2009-03-28 10:59:01 stefspa Exp $
-//<version>	$Name: not supported by cvs2svn $
-
 #include "GaudiKernel/MsgStream.h"
 #include "StoreGate/StoreGateSvc.h"
 
@@ -20,12 +17,6 @@
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
 #include "MuonReadoutGeometry/CscReadoutElement.h"
 
-// #include "MuonPrepRawData/MdtPrepDataContainer.h"
-// #include "MuonPrepRawData/MdtPrepDataCollection.h"
-// #include "MuonPrepRawData/MdtPrepData.h"
-
-// #include "Identifier/Identifier.h"
-// #include "Identifier/IdentifierHash.h"
 #include "TrkDistortedSurfaces/SaggedLineSurface.h"
 
 MuonGMTestOnPrd::MuonGMTestOnPrd(const std::string& name, ISvcLocator* pSvcLocator)
@@ -48,9 +39,6 @@ MuonGMTestOnPrd::MuonGMTestOnPrd(const std::string& name, ISvcLocator* pSvcLocat
     declareProperty("doCheckMisal", m_check_misal );        
 }
 
-MuonGMTestOnPrd::~MuonGMTestOnPrd()
-{ }
-
 StatusCode
 MuonGMTestOnPrd::initialize()
 {
@@ -256,32 +244,9 @@ MuonGMTestOnPrd::execute()
         }
     }
 
-//     // Rpc
-//     Muon::RpcPrepDataContainer * rpcContainer;
-
-//     // Tgc 
-//     TgcPrepDataContainer * tgcContainer;
-//     if ( StatusCode::SUCCESS != p_EventStore->retrieve(tgcContainer, key) )
-//     {
-//         log<<MSG::ERROR<<"Cannot retrieve TGC PRD Container "<<endmsg;
-//         return StatusCode::FAILURE;
-//     }
-//     else
-//         log<<MSG::INFO<<"Retrieved TGC PRD Container with size = " << tgcContainer->size()<< endmsg;
-
-//     // Csc
-//     CscPrepDataContainer * cscContainer;
-    
     return StatusCode::SUCCESS;
 }
 
-StatusCode
-MuonGMTestOnPrd::finalize()
-{
-  ATH_MSG_DEBUG( "Finalizing"  );
-  return StatusCode::SUCCESS;
-}
-
 void MuonGMTestOnPrd::processMdtCollection(const Muon::MdtPrepDataCollection* mdtColl,
                                            Identifier& collid,
                                            IdentifierHash& collidh) const 
diff --git a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h
index bd60bc1dd08e..1fbecb12a5d9 100644
--- a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h
+++ b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MuonIdHelperSvc.h
@@ -31,9 +31,6 @@ namespace Muon {
     /** @brief AlgTool initilize */
     virtual StatusCode initialize() override;
     
-    /** @brief AlgTool finalize */
-    virtual StatusCode finalize() override;
-    
     /** @brief print all fields to string */
     virtual std::string toString( const Identifier& id ) const override;
 
diff --git a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx
index f114a40d93cc..d111243a615f 100644
--- a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx
+++ b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx
@@ -139,11 +139,6 @@ namespace Muon {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode MuonIdHelperSvc::finalize() {
-    if( AthService::finalize().isFailure() ) return StatusCode::FAILURE;
-    return StatusCode::SUCCESS;
-  }
-
   int MuonIdHelperSvc::gasGap( const Identifier& id ) const {
     if( isRpc(id) ) {
       return m_rpcIdHelper->gasGap(id);
-- 
GitLab


From a8af547532e9deb7c2fe2909cd3796b8afae3f3b Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 11:48:07 +0100
Subject: [PATCH 202/308] CP algs: Use POOL access for now and unify Athena
 tests

---
 .../share/EventAlgorithmsTest_jobOptions.py   |  2 +-
 .../GeneratorAlgorithmsTest_jobOptions.py     |  2 +-
 .../share/OverlapAlgorithmsTest_jobOptions.py |  2 +-
 ...EgammaAnalysisAlgorithmsTest_jobOptions.py |  2 +-
 .../FTagAnalysisAlgorithmsTest_jobOptions.py  |  2 +-
 ...nalysisAlgorithmsTest_EMTopo_jobOptions.py |  2 +-
 ...AnalysisAlgorithmsTest_PFlow_jobOptions.py |  2 +-
 .../MetAnalysisAlgorithmsTest_jobOptions.py   |  2 +-
 .../MuonAnalysisAlgorithmsTest_jobOptions.py  | 68 +++++++------------
 .../TauAnalysisAlgorithmsTest_jobOptions.py   |  2 +-
 .../share/TriggerAlgorithmsTest_jobOptions.py |  2 +-
 11 files changed, 33 insertions(+), 55 deletions(-)

diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py
index 6fd7280dd7e3..d75605f77b0c 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/GeneratorAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/GeneratorAlgorithmsTest_jobOptions.py
index bae994afbe05..5bff87b56399 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/GeneratorAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/GeneratorAlgorithmsTest_jobOptions.py
@@ -21,7 +21,7 @@ inputfile = {"mc":   'ASG_TEST_FILE_MC',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py
index 607ba7885078..053cf2943532 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_jobOptions.py
index a3124542462f..8f04fdf374a0 100644
--- a/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_jobOptions.py
index d776511c9ce8..e6f6f0aeca8e 100644
--- a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py
index aaaa35b50e71..f1a8f48865b2 100644
--- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py
@@ -24,7 +24,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
 jetContainer = "AntiKt4EMTopoJets"
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py
index 3ad9c2a04f1a..de9ba9c43896 100644
--- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py
@@ -24,7 +24,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
 jetContainer = "AntiKt4EMTopoJets"
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/share/MetAnalysisAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/share/MetAnalysisAlgorithmsTest_jobOptions.py
index 0c13735ea0bf..6b949c02f98e 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/share/MetAnalysisAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/share/MetAnalysisAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/share/MuonAnalysisAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/share/MuonAnalysisAlgorithmsTest_jobOptions.py
index 1bf25efdc24a..de5537baa546 100644
--- a/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/share/MuonAnalysisAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/share/MuonAnalysisAlgorithmsTest_jobOptions.py
@@ -1,47 +1,31 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
-# @author Nils Krumnack, Will Buttinger
+# @author Nils Krumnack
 
-#User options, which can be set from command line after a "-" character
-#athena MuonAnalysisAlgorithmsTest_jobOptions.py - --myOption ...
+# User options, which can be set from command line after a "-" character
+# athena MuonAnalysisAlgorithmsTest_jobOptions.py - --myOption ...
 from AthenaCommon.AthArgumentParser import AthArgumentParser
 athArgsParser = AthArgumentParser()
-athArgsParser.add_argument("--data-type",action="store",dest="data_type",
-                           default="data",
-                           help="Type of data to run over. Valid options are data, mc, afii")
-athArgsParser.add_argument("--write-xaod",action="store",dest="write_xaod",
-                           default=False,
-                           help="Specify if you want xaod writing to happen (which means slower access mode for now)")
+athArgsParser.add_argument("--data-type", action = "store", dest = "data_type",
+                           default = "data",
+                           help = "Type of input to run over. Valid options are 'data', 'mc', 'afii'")
 athArgs = athArgsParser.parse_args()
 
-
-if athArgs.write_xaod:
-    #currently we must use POOLAccess mode when writing an xAOD
-    jps.AthenaCommonFlags.AccessMode = "POOLAccess"
-else:
-    #ClassAccess is much faster than POOLAccess
-    jps.AthenaCommonFlags.AccessMode = "ClassAccess"
-
 dataType = athArgs.data_type
+if not dataType in ["data", "mc", "afii"] :
+    raise Exception ("invalid data type: " + dataType)
 
-# Set up a histogram/tree output file for the job:
-jps.AthenaCommonFlags.HistOutputs = ["ANALYSIS:MuonAnalysisAlgorithmsTest." + dataType + ".hist.root"]
-svcMgr.THistSvc.MaxFileSize=-1 #make job run faster by disabling file size check
-
-#set a default file and number of events to process
-#can override with standard athena command line options (--evtMax and --filesInput)
-jps.AthenaCommonFlags.EvtMax = 500
-
-if dataType=="data":
-    testFile = os.getenv ('ASG_TEST_FILE_DATA')
-elif dataType=="mc":
-    testFile = os.getenv ('ASG_TEST_FILE_MC')
-elif dataType=="afii":
-    testFile = os.getenv ('ASG_TEST_FILE_MC_AFII')
-
-jps.AthenaCommonFlags.FilesInput = [testFile]
+print("Running on data type: " + dataType)
 
+inputfile = {"data": 'ASG_TEST_FILE_DATA',
+             "mc":   'ASG_TEST_FILE_MC',
+             "afii": 'ASG_TEST_FILE_MC_AFII'}
 
+# Set up the reading of the input file:
+import AthenaPoolCnvSvc.ReadAthenaPool
+theApp.EvtMax = 500
+testFile = os.getenv ( inputfile[dataType] )
+svcMgr.EventSelector.InputCollections = [testFile]
 
 from MuonAnalysisAlgorithms.MuonAnalysisAlgorithmsTest import makeSequence
 algSeq = makeSequence (dataType)
@@ -50,17 +34,11 @@ print (algSeq) # For debugging
 # Add all algorithms from the sequence to the job.
 athAlgSeq += algSeq
 
-# Write a mini-xAOD if requested:
-if athArgs.write_xaod:
-    from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-    minixAOD = MSMgr.NewPoolRootStream( 'AAOD_MUON',
-                   FileName = 'MuonAnalysisAlgorithmsTest.AAOD_MUON.pool.root' )
-    minixAOD.AddItem(
-        [ 'xAOD::EventInfo#EventInfo',
-     'xAOD::EventAuxInfo#EventInfoAux.-',
-     'xAOD::MuonContainer#AnalysisMuons_NOSYS',
-     'xAOD::AuxContainerBase#AnalysisMuons_NOSYSAux.eta.phi.pt' ] )
-
+# Set up a histogram output file for the job:
+ServiceMgr += CfgMgr.THistSvc()
+ServiceMgr.THistSvc.Output += [
+    "ANALYSIS DATAFILE='MuonAnalysisAlgorithmsTest." + dataType + ".hist.root' OPT='RECREATE'"
+    ]
 
 # Reduce the printout from Athena:
 include( "AthAnalysisBaseComps/SuppressLogging.py" )
diff --git a/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/share/TauAnalysisAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/share/TauAnalysisAlgorithmsTest_jobOptions.py
index a83dc7c63755..d15a7339611f 100644
--- a/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/share/TauAnalysisAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/share/TauAnalysisAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
diff --git a/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py
index 8bd9e31e5eb4..2131a772d2ab 100644
--- a/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py
@@ -22,7 +22,7 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
              "afii": 'ASG_TEST_FILE_MC_AFII'}
 
 # Set up the reading of the input file:
-import AthenaRootComps.ReadAthenaxAODHybrid
+import AthenaPoolCnvSvc.ReadAthenaPool
 theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
-- 
GitLab


From 7413bde2e7c01a7d78738f196fc3c3c27478be2a Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 11:50:23 +0100
Subject: [PATCH 203/308] CP algs: Cleanup EventLoop tests

---
 .../share/EgammaAnalysisAlgorithmsTest_eljob.py              | 2 +-
 .../share/FTagAnalysisAlgorithmsTest_eljob.py                | 5 -----
 .../share/JetAnalysisAlgorithmsTest_EMTopo_eljob.py          | 5 -----
 .../share/JetAnalysisAlgorithmsTest_PFlow_eljob.py           | 5 -----
 4 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_eljob.py b/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_eljob.py
index bbf680455ce3..d4d268597b2e 100755
--- a/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_eljob.py
+++ b/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/share/EgammaAnalysisAlgorithmsTest_eljob.py
@@ -57,7 +57,7 @@ job.options().setDouble( ROOT.EL.Job.optMaxEvents, 500 )
 
 from EgammaAnalysisAlgorithms.EgammaAnalysisAlgorithmsTest import makeSequence
 algSeq = makeSequence (dataType)
-print algSeq # For debugging
+print (algSeq) # For debugging
 for alg in algSeq :
     job.algsAdd( alg )
     pass
diff --git a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_eljob.py b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_eljob.py
index 88fa5e909445..de0ab5b219d0 100755
--- a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_eljob.py
+++ b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/share/FTagAnalysisAlgorithmsTest_eljob.py
@@ -24,11 +24,6 @@ parser.add_option( '-u', '--unit-test', dest='unit_test',
 import ROOT
 ROOT.xAOD.Init().ignore()
 
-# this forces the jet algorithms dictionary to be loaded before
-# anything else, which works around some strange dictionary issues I
-# don't understand.
-ROOT.CP.JetCalibrationAlg ("dummy", None)
-
 # ideally we'd run over all of them, but we don't have a mechanism to
 # configure per-sample right now
 
diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_eljob.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_eljob.py
index 235132a94ae5..768ae197a9d9 100755
--- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_eljob.py
+++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_eljob.py
@@ -24,11 +24,6 @@ parser.add_option( '-u', '--unit-test', dest='unit_test',
 import ROOT
 ROOT.xAOD.Init().ignore()
 
-# this forces the jet algorithms dictionary to be loaded before
-# anything else, which works around some strange dictionary issues I
-# don't understand.
-ROOT.CP.JetCalibrationAlg ("dummy", None)
-
 # ideally we'd run over all of them, but we don't have a mechanism to
 # configure per-sample right now
 
diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_eljob.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_eljob.py
index 3d1660911813..d51cbab91193 100755
--- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_eljob.py
+++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_PFlow_eljob.py
@@ -24,11 +24,6 @@ parser.add_option( '-u', '--unit-test', dest='unit_test',
 import ROOT
 ROOT.xAOD.Init().ignore()
 
-# this forces the jet algorithms dictionary to be loaded before
-# anything else, which works around some strange dictionary issues I
-# don't understand.
-ROOT.CP.JetCalibrationAlg ("dummy", None)
-
 # ideally we'd run over all of them, but we don't have a mechanism to
 # configure per-sample right now
 
-- 
GitLab


From fae5dfdcaa710b85dbee216b940b81358909bda7 Mon Sep 17 00:00:00 2001
From: Dan Guest <daniel.hay.guest@cern.ch>
Date: Wed, 23 Dec 2020 11:17:43 +0000
Subject: [PATCH 204/308] Update AnaAlgorithm.h: remove obsolete comment

---
 .../D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h     | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h
index 84cc10421356..cb76231dc30f 100644
--- a/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h
+++ b/PhysicsAnalysis/D3PDTools/AnaAlgorithm/AnaAlgorithm/AnaAlgorithm.h
@@ -61,12 +61,7 @@ namespace EL
   /// currently be done with a \ref `EL::Algorithm` since it neither
   /// knows about incidents, nor has all the virtual methods that were
   /// available before.
-  ///
-  /// \todo It might be nice to make this actually dual-use at some
-  /// point, but since there seems little interest in a dual-use
-  /// algorithm that is on the back-burner.  There are some
-  /// conditional compilation directives here and there, but it was
-  /// never tested for dual-use (or even in-athena compilation).
+
 
   class AnaAlgorithm
 #ifdef XAOD_STANDALONE
-- 
GitLab


From 2eea2b837db7a99210d302c8742da984a4150242 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 11:53:27 +0100
Subject: [PATCH 205/308] CP algs: Merge MetMakerAlg and MetSystematicsAlg due
 to dependencies

---
 .../MetAnalysisAlgorithmsDict.h               |  1 -
 .../MetAnalysisAlgorithms/MetMakerAlg.h       |  7 +-
 .../MetAnalysisAlgorithms/MetSystematicsAlg.h | 57 ---------------
 .../MetAnalysisAlgorithms/selection.xml       |  1 -
 .../Root/MetMakerAlg.cxx                      | 29 ++++++++
 .../Root/MetSystematicsAlg.cxx                | 72 -------------------
 .../python/MetAnalysisSequence.py             | 13 ++--
 .../MetAnalysisAlgorithms_entries.cxx         |  2 -
 8 files changed, 39 insertions(+), 143 deletions(-)
 delete mode 100644 PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetSystematicsAlg.h
 delete mode 100644 PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetSystematicsAlg.cxx

diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithmsDict.h b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithmsDict.h
index 751f56e8171a..06f150d36f6f 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithmsDict.h
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithmsDict.h
@@ -11,6 +11,5 @@
 #include <MetAnalysisAlgorithms/MetBuilderAlg.h>
 #include <MetAnalysisAlgorithms/MetMakerAlg.h>
 #include <MetAnalysisAlgorithms/MetSignificanceAlg.h>
-#include <MetAnalysisAlgorithms/MetSystematicsAlg.h>
 
 #endif
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetMakerAlg.h b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetMakerAlg.h
index da7cab773194..7bf2b28ef695 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetMakerAlg.h
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetMakerAlg.h
@@ -14,6 +14,7 @@
 #include <SystematicsHandles/SysWriteHandle.h>
 #include <SystematicsHandles/SysListHandle.h>
 #include <METInterface/IMETMaker.h>
+#include <METInterface/IMETSystematicsTool.h>
 
 #include <xAODBase/IParticleContainer.h>
 #include <xAODMissingET/MissingETContainer.h>
@@ -47,10 +48,14 @@ namespace CP
     
 
 
-    /// \brief the smearing tool
+    /// \brief the maker tool
   private:
     ToolHandle<IMETMaker> m_makerTool;
 
+    /// \brief the systematics tool
+  private:
+    ToolHandle<IMETSystematicsTool> m_systematicsTool;
+
     /// \brief the name of the core MissingETContainer
   private:
     std::string m_metCoreName;
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetSystematicsAlg.h b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetSystematicsAlg.h
deleted file mode 100644
index cba1d161ef44..000000000000
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/MetSystematicsAlg.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-/// @author Nils Krumnack
-
-
-
-#ifndef MET_ANALYSIS_ALGORITHMS__MET_SYSTEMATICS_ALG_H
-#define MET_ANALYSIS_ALGORITHMS__MET_SYSTEMATICS_ALG_H
-
-#include <AnaAlgorithm/AnaAlgorithm.h>
-#include <SystematicsHandles/SysCopyHandle.h>
-#include <SystematicsHandles/SysListHandle.h>
-#include <METInterface/IMETSystematicsTool.h>
-#include <xAODMissingET/MissingETContainer.h>
-
-namespace CP
-{
-  /// \brief an algorithm for calling \ref IMetCalibrationAndSmearingTool
-
-  class MetSystematicsAlg final : public EL::AnaAlgorithm
-  {
-    /// \brief the standard constructor
-  public:
-    MetSystematicsAlg (const std::string& name, 
-                 ISvcLocator* pSvcLocator);
-
-
-  public:
-    StatusCode initialize () override;
-
-  public:
-    StatusCode execute () override;
-    
-
-
-    /// \brief the smearing tool
-  private:
-    ToolHandle<IMETSystematicsTool> m_systematicsTool;
-
-    /// \brief the systematics list we run
-  private:
-    SysListHandle m_systematicsList {this};
-
-    /// \brief the met collection we run on
-  private:
-    SysCopyHandle<xAOD::MissingETContainer> m_metHandle {
-      this, "met", "MissingET_%SYS%", "the met collection we run on"};
-
-    /// \brief the key for the soft term
-  private:
-    std::string m_softTerm {"PVSoftTrk"};
-  };
-}
-
-#endif
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/selection.xml b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/selection.xml
index c83c888c5044..fc4f787b3d67 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/selection.xml
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/MetAnalysisAlgorithms/selection.xml
@@ -3,6 +3,5 @@
    <class name="CP::MetBuilderAlg" />
    <class name="CP::MetMakerAlg" />
    <class name="CP::MetSignificanceAlg" />
-   <class name="CP::MetSystematicsAlg" />
 
 </lcgdict>
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetMakerAlg.cxx b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetMakerAlg.cxx
index c5e0191f2e24..e6b9c054e30c 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetMakerAlg.cxx
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetMakerAlg.cxx
@@ -26,8 +26,10 @@ namespace CP
                      ISvcLocator* pSvcLocator)
     : AnaAlgorithm (name, pSvcLocator)
     , m_makerTool ("METMaker", this)
+    , m_systematicsTool ("", this)
   {
     declareProperty ("makerTool", m_makerTool, "the METMaker tool we apply");
+    declareProperty ("systematicsTool", m_systematicsTool, "the systematics tool we apply");
     declareProperty ("metCore", m_metCoreName, "the name of the core MissingETContainer");
     declareProperty ("metAssociation", m_metAssociationName, "the name of the core MissingETContainer");
     declareProperty ("electronsKey", m_electronsKey, "the key for the electrons");
@@ -46,6 +48,7 @@ namespace CP
   initialize ()
   {
     ANA_CHECK (m_makerTool.retrieve());
+
     for (auto* handle : {&m_electronsHandle, &m_photonsHandle,
                          &m_muonsHandle, &m_tausHandle, &m_invisHandle}) {
       if (*handle) {
@@ -54,6 +57,13 @@ namespace CP
     }
     m_systematicsList.addHandle (m_jetsHandle);
     m_systematicsList.addHandle (m_metHandle);
+
+    if (!m_systematicsTool.empty())
+    {
+      ANA_CHECK (m_systematicsTool.retrieve());
+      ANA_CHECK (m_systematicsList.addAffectingSystematics (m_systematicsTool->affectingSystematics()));
+    }
+
     ANA_CHECK (m_systematicsList.initialize());
 
     return StatusCode::SUCCESS;
@@ -122,6 +132,25 @@ namespace CP
           ANA_CHECK (m_makerTool->rebuildJetMET (m_jetsKey, m_softTermKey, met.get(), jets, metcore, &metHelper, m_doJetJVT));
         }
 
+        // Systematics
+        if (!m_systematicsTool.empty())
+        {
+          ANA_CHECK (m_systematicsTool->applySystematicVariation (sys));
+
+          xAOD::MissingET *softTerm = (*met)[m_softTermKey];
+          if (softTerm == nullptr)
+          {
+            ANA_MSG_ERROR ("failed to find MET soft-term \"" << m_softTermKey << "\"");
+            return StatusCode::FAILURE;
+          }
+
+          // This returns a `CorrectionCode`, so in principle this could
+          // return an `OutOfValidity` result, but I have no idea what
+          // that would mean or how to handle it, so I'm implicitly
+          // converting it into a `FAILURE` instead.
+          ANA_CHECK (m_systematicsTool->applyCorrection (*softTerm, &metHelper));
+        }
+
         ANA_CHECK (m_metHandle.record (std::move (met), std::move (aux), sys));
         return StatusCode::SUCCESS;
       });
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetSystematicsAlg.cxx b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetSystematicsAlg.cxx
deleted file mode 100644
index 1e255b6581d6..000000000000
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/Root/MetSystematicsAlg.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-/// @author Nils Krumnack
-
-
-
-//
-// includes
-//
-
-#include <MetAnalysisAlgorithms/MetSystematicsAlg.h>
-
-#include <xAODMissingET/MissingETAuxContainer.h>
-
-//
-// method implementations
-//
-
-namespace CP
-{
-  MetSystematicsAlg ::
-  MetSystematicsAlg (const std::string& name, 
-                     ISvcLocator* pSvcLocator)
-    : AnaAlgorithm (name, pSvcLocator)
-    , m_systematicsTool ("met::METSystematicsTool", this)
-  {
-    declareProperty ("systematicsTool", m_systematicsTool, "the systematics tool we apply");
-    declareProperty ("softTerm", m_softTerm, "the key for the soft term");
-  }
-
-
-
-  StatusCode MetSystematicsAlg ::
-  initialize ()
-  {
-    ANA_CHECK (m_systematicsTool.retrieve());
-    m_systematicsList.addHandle (m_metHandle);
-    ANA_CHECK (m_systematicsList.addAffectingSystematics (m_systematicsTool->affectingSystematics()));
-    ANA_CHECK (m_systematicsList.initialize());
-    return StatusCode::SUCCESS;
-  }
-
-
-
-  StatusCode MetSystematicsAlg ::
-  execute ()
-  {
-    return m_systematicsList.foreach ([&] (const CP::SystematicSet& sys) -> StatusCode {
-        ANA_CHECK (m_systematicsTool->applySystematicVariation (sys));
-
-        xAOD::MissingETContainer *met {};
-        ANA_CHECK (m_metHandle.getCopy (met, sys));
-
-        xAOD::MissingET *softTerm = (*met)[m_softTerm];
-        if (softTerm == nullptr)
-        {
-          ANA_MSG_ERROR ("failed to find MET soft-term \"" << m_softTerm << "\"");
-          return StatusCode::FAILURE;
-        }
-
-        // This returns a `CorrectionCode`, so in principle this could
-        // return an `OutOfValidity` result, but I have no idea what
-        // that would mean or how to handle it, so I'm implicitly
-        // converting it into a `FAILURE` instead.
-        ANA_CHECK (m_systematicsTool->applyCorrection (*softTerm));
-
-        return StatusCode::SUCCESS;
-      });
-  }
-}
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/python/MetAnalysisSequence.py b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/python/MetAnalysisSequence.py
index a20926c5c835..aeb244ea391a 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/python/MetAnalysisSequence.py
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/python/MetAnalysisSequence.py
@@ -6,8 +6,8 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm, addPrivateTool
 
 def makeMetAnalysisSequence( dataType, metSuffix,
                              postfix = '',
-                             useFJVT = True,
-                             treatPUJets = True ):
+                             useFJVT = False,
+                             treatPUJets = False ):
     """Create a met analysis algorithm sequence
 
     After creating the sequence object, it needs to be configured with a call
@@ -60,6 +60,8 @@ def makeMetAnalysisSequence( dataType, metSuffix,
     alg.makerTool.DoPFlow = 'PFlow' in metSuffix
     if useFJVT:
         alg.makerTool.JetRejectionDec = 'passFJVT'
+    if dataType != "data" :
+        addPrivateTool( alg, 'systematicsTool', 'met::METSystematicsTool' )
     alg.metCore = 'MET_Core_' + metSuffix
     alg.metAssociation = 'METAssoc_' + metSuffix
     seq.append( alg,
@@ -72,13 +74,6 @@ def makeMetAnalysisSequence( dataType, metSuffix,
                 outputPropName = 'met',
                 affectingSystematics = '(^MET_.*)' )
 
-    if dataType != "data" :
-        alg = createAlgorithm( 'CP::MetSystematicsAlg', 'MetSystematicsAlg' + postfix )
-        addPrivateTool( alg, 'systematicsTool', 'met::METSystematicsTool' )
-        seq.append( alg, inputPropName = 'met',
-                    affectingSystematics = '(^MET_.*)' )
-        pass
-
     # Set up the met builder algorithm:
     alg = createAlgorithm( 'CP::MetBuilderAlg', 'MetBuilderAlg' + postfix )
     seq.append( alg, inputPropName = 'met' )
diff --git a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/src/components/MetAnalysisAlgorithms_entries.cxx b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/src/components/MetAnalysisAlgorithms_entries.cxx
index 7e058bc2cb47..566a3a6924a2 100644
--- a/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/src/components/MetAnalysisAlgorithms_entries.cxx
+++ b/PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/src/components/MetAnalysisAlgorithms_entries.cxx
@@ -3,10 +3,8 @@
 #include <MetAnalysisAlgorithms/MetBuilderAlg.h>
 #include <MetAnalysisAlgorithms/MetMakerAlg.h>
 #include <MetAnalysisAlgorithms/MetSignificanceAlg.h>
-#include <MetAnalysisAlgorithms/MetSystematicsAlg.h>
 
 DECLARE_COMPONENT (CP::MetBuilderAlg)
 DECLARE_COMPONENT (CP::MetMakerAlg)
 DECLARE_COMPONENT (CP::MetSignificanceAlg)
-DECLARE_COMPONENT (CP::MetSystematicsAlg)
 
-- 
GitLab


From c2464d10512b1772a71c63e7e0596c09d5d8bc33 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 14:09:52 +0100
Subject: [PATCH 206/308] CP algs: Disable parts of tau tests until everything
 is working

---
 .../python/AsgAnalysisAlgorithmsTest.py       | 35 +++++++------
 .../TauAnalysisAlgorithms/CMakeLists.txt      | 49 ++++++++++---------
 2 files changed, 45 insertions(+), 39 deletions(-)

diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisAlgorithmsTest.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisAlgorithmsTest.py
index 5d99638fa074..262068810cf1 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisAlgorithmsTest.py
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisAlgorithmsTest.py
@@ -58,36 +58,40 @@ def makeOverlapSequence (dataType) :
                            outputName = 'AnalysisJets_%SYS%' )
     algSeq += jetSequence
 
+    # TODO: disabled for now
     # Include, and then set up the tau analysis algorithm sequence:
-    from TauAnalysisAlgorithms.TauAnalysisSequence import makeTauAnalysisSequence
-    tauSequence = makeTauAnalysisSequence( dataType, 'Tight' )
-    tauSequence.configure( inputName = 'TauJets',
-                           outputName = 'AnalysisTauJets_%SYS%' )
-    algSeq += tauSequence
+    # from TauAnalysisAlgorithms.TauAnalysisSequence import makeTauAnalysisSequence
+    # tauSequence = makeTauAnalysisSequence( dataType, 'Tight' )
+    # tauSequence.configure( inputName = 'TauJets',
+    #                        outputName = 'AnalysisTauJets_%SYS%' )
+    # algSeq += tauSequence
 
     # Include, and then set up the overlap analysis algorithm sequence:
     from AsgAnalysisAlgorithms.OverlapAnalysisSequence import \
         makeOverlapAnalysisSequence
-    overlapSequence = makeOverlapAnalysisSequence( dataType, doMuPFJetOR=True, enableCutflow=True )
+    overlapSequence = makeOverlapAnalysisSequence( dataType, doMuPFJetOR=True, doTaus=False, enableCutflow=True )
     overlapSequence.configure(
         inputName = {
             'electrons' : 'AnalysisElectrons_%SYS%',
             'photons'   : 'AnalysisPhotons_%SYS%',
             'muons'     : 'AnalysisMuons_%SYS%',
             'jets'      : 'AnalysisJets_%SYS%',
-            'taus'      : 'AnalysisTauJets_%SYS%' },
+            # 'taus'      : 'AnalysisTauJets_%SYS%'
+        },
         outputName = {
             'electrons' : 'AnalysisElectronsOR_%SYS%',
             'photons'   : 'AnalysisPhotonsOR_%SYS%',
             'muons'     : 'AnalysisMuonsOR_%SYS%',
             'jets'      : 'AnalysisJetsOR_%SYS%',
-            'taus'      : 'AnalysisTauJetsOR_%SYS%' },
+            # 'taus'      : 'AnalysisTauJetsOR_%SYS%'
+        },
         affectingSystematics = {
             'electrons' : electronSequence.affectingSystematics(),
             'photons'   : photonSequence.affectingSystematics(),
             'muons'     : muonSequence.affectingSystematics(),
             'jets'      : jetSequence.affectingSystematics(),
-            'taus'      : tauSequence.affectingSystematics() } )
+            # 'taus'      : tauSequence.affectingSystematics()
+        } )
     algSeq += overlapSequence
 
     # Set up an ntuple to check the job with:
@@ -123,12 +127,13 @@ def makeOverlapSequence (dataType) :
         'AnalysisJetsOR_%SYS%.eta -> jet_OR_%SYS%_eta',
         'AnalysisJetsOR_%SYS%.phi -> jet_OR_%SYS%_phi',
         'AnalysisJetsOR_%SYS%.pt  -> jet_OR_%SYS%_pt',
-        'AnalysisTauJets_%SYS%.eta -> tau_%SYS%_eta',
-        'AnalysisTauJets_%SYS%.phi -> tau_%SYS%_phi',
-        'AnalysisTauJets_%SYS%.pt  -> tau_%SYS%_pt',
-        'AnalysisTauJetsOR_%SYS%.eta -> tau_OR_%SYS%_eta',
-        'AnalysisTauJetsOR_%SYS%.phi -> tau_OR_%SYS%_phi',
-        'AnalysisTauJetsOR_%SYS%.pt  -> tau_OR_%SYS%_pt' ]
+        # 'AnalysisTauJets_%SYS%.eta -> tau_%SYS%_eta',
+        # 'AnalysisTauJets_%SYS%.phi -> tau_%SYS%_phi',
+        # 'AnalysisTauJets_%SYS%.pt  -> tau_%SYS%_pt',
+        # 'AnalysisTauJetsOR_%SYS%.eta -> tau_OR_%SYS%_eta',
+        # 'AnalysisTauJetsOR_%SYS%.phi -> tau_OR_%SYS%_phi',
+        # 'AnalysisTauJetsOR_%SYS%.pt  -> tau_OR_%SYS%_pt'
+    ]
     ntupleMaker.systematicsRegex = '.*'
     algSeq += ntupleMaker
     treeFiller = createAlgorithm( 'CP::TreeFillerAlg', 'TreeFiller' )
diff --git a/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/CMakeLists.txt b/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/CMakeLists.txt
index f9e3e98448df..58a12d090108 100644
--- a/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/CMakeLists.txt
+++ b/PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/CMakeLists.txt
@@ -29,27 +29,28 @@ atlas_install_joboptions( share/*_jobOptions.py )
 atlas_install_scripts( share/*_eljob.py )
 atlas_install_data( data/*.conf )
 
-if( XAOD_STANDALONE )
-   atlas_add_test( testJobData
-      SCRIPT TauAnalysisAlgorithmsTest_eljob.py --data-type data --unit-test
-      PROPERTIES TIMEOUT 600 )
-   # atlas_add_test( testJobFullSim    #testJobFullSim and testJobFastSim are temporarily removed awaiting TauTruthMatchigToolMigration (ATLASG-1548) 
-   #    SCRIPT TauAnalysisAlgorithmsTest_eljob.py --data-type mc --unit-test
-   #    PROPERTIES TIMEOUT 600 )
-   # atlas_add_test( testJobFastSim
-   #    SCRIPT TauAnalysisAlgorithmsTest_eljob.py --data-type afii --unit-test
-   #    PROPERTIES TIMEOUT 600 )
-else()
-   atlas_add_test( testJobData
-      SCRIPT athena.py
-      TauAnalysisAlgorithms/TauAnalysisAlgorithmsTest_jobOptions.py - --data-type data
-      PROPERTIES TIMEOUT 600 )
-   atlas_add_test( testJobFullSim
-      SCRIPT athena.py
-      TauAnalysisAlgorithms/TauAnalysisAlgorithmsTest_jobOptions.py - --data-type mc
-      PROPERTIES TIMEOUT 600 )
-   atlas_add_test( testJobFastSim
-      SCRIPT athena.py
-      TauAnalysisAlgorithms/TauAnalysisAlgorithmsTest_jobOptions.py - --data-type afii
-      PROPERTIES TIMEOUT 600 )
-endif()
+# Temporarily disabled
+# if( XAOD_STANDALONE )
+#    atlas_add_test( testJobData
+#       SCRIPT TauAnalysisAlgorithmsTest_eljob.py --data-type data --unit-test
+#       PROPERTIES TIMEOUT 600 )
+#    atlas_add_test( testJobFullSim
+#       SCRIPT TauAnalysisAlgorithmsTest_eljob.py --data-type mc --unit-test
+#       PROPERTIES TIMEOUT 600 )
+#    atlas_add_test( testJobFastSim
+#       SCRIPT TauAnalysisAlgorithmsTest_eljob.py --data-type afii --unit-test
+#       PROPERTIES TIMEOUT 600 )
+# else()
+#    atlas_add_test( testJobData
+#       SCRIPT athena.py
+#       TauAnalysisAlgorithms/TauAnalysisAlgorithmsTest_jobOptions.py - --data-type data
+#       PROPERTIES TIMEOUT 600 )
+#    atlas_add_test( testJobFullSim
+#       SCRIPT athena.py
+#       TauAnalysisAlgorithms/TauAnalysisAlgorithmsTest_jobOptions.py - --data-type mc
+#       PROPERTIES TIMEOUT 600 )
+#    atlas_add_test( testJobFastSim
+#       SCRIPT athena.py
+#       TauAnalysisAlgorithms/TauAnalysisAlgorithmsTest_jobOptions.py - --data-type afii
+#       PROPERTIES TIMEOUT 600 )
+# endif()
-- 
GitLab


From f88e13801bcc08f0c0cdf806c045bb5fe7a0abd9 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 14:10:43 +0100
Subject: [PATCH 207/308] CP algs: Configure CutFlowSvc in tests when needed

---
 .../share/EventAlgorithmsTest_jobOptions.py                   | 4 ++++
 .../share/OverlapAlgorithmsTest_jobOptions.py                 | 4 ++++
 .../share/TriggerAlgorithmsTest_jobOptions.py                 | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py
index 6fd7280dd7e3..f34b58e95ca8 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/EventAlgorithmsTest_jobOptions.py
@@ -27,6 +27,10 @@ theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
 
+# Needed for filtering, Athena only for now
+from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc
+CreateCutFlowSvc(svcName="CutFlowSvc", seq=athAlgSeq, addMetaDataToAllOutputFiles=False)
+
 from AsgAnalysisAlgorithms.AsgAnalysisAlgorithmsTest import makeEventAlgorithmsSequence
 algSeq = makeEventAlgorithmsSequence (dataType)
 print( algSeq ) # For debugging
diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py
index 607ba7885078..cbfed2759410 100644
--- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/share/OverlapAlgorithmsTest_jobOptions.py
@@ -27,6 +27,10 @@ theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
 
+# Needed for filtering, Athena only for now
+from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc
+CreateCutFlowSvc(svcName="CutFlowSvc", seq=athAlgSeq, addMetaDataToAllOutputFiles=False)
+
 from AsgAnalysisAlgorithms.AsgAnalysisAlgorithmsTest import makeOverlapSequence
 algSeq = makeOverlapSequence (dataType)
 print( algSeq ) # For debugging
diff --git a/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py b/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py
index 8bd9e31e5eb4..ce9fee129b98 100644
--- a/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py
+++ b/PhysicsAnalysis/Algorithms/TriggerAnalysisAlgorithms/share/TriggerAlgorithmsTest_jobOptions.py
@@ -27,6 +27,10 @@ theApp.EvtMax = 500
 testFile = os.getenv ( inputfile[dataType] )
 svcMgr.EventSelector.InputCollections = [testFile]
 
+# Needed for filtering, Athena only for now
+from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc
+CreateCutFlowSvc(svcName="CutFlowSvc", seq=athAlgSeq, addMetaDataToAllOutputFiles=False)
+
 from TriggerAnalysisAlgorithms.TriggerAnalysisAlgorithmsTest import makeSequence
 algSeq = makeSequence (dataType)
 print (algSeq) # For debugging
-- 
GitLab


From f3f5629968864f379918e27f0a1509c6fddcd5d3 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 14:13:31 +0100
Subject: [PATCH 208/308] CP algs: Jet updates for DAOD_PHYS in master

---
 .../python/FTagAnalysisSequence.py                 | 14 ++++++--------
 .../python/JetAnalysisSequence.py                  |  9 ++++++---
 .../python/JetJvtAnalysisSequence.py               | 10 +++++-----
 3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py
index d37732da0a3a..bcde16d17fe4 100644
--- a/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py
+++ b/PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisSequence.py
@@ -5,7 +5,7 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm, addPrivateTool
 
 def makeFTagAnalysisSequence( seq, dataType, jetCollection,
                               btagWP = "FixedCutBEff_77",
-                              btagger = "MV2c10",
+                              btagger = "DL1r",
                               postfix = "",
                               preselection=None,
                               kinematicSelection = False,
@@ -46,14 +46,12 @@ def makeFTagAnalysisSequence( seq, dataType, jetCollection,
     if legacyRecommendations:
         # Remove b-tagging calibration from the container name
         btIndex = jetCollection.find('_BTagging')
-        if btIndex != -1:
-            jetCollection = jetCollection[:btIndex]
+        if btIndex == -1:
+            jetCollection += '_BTagging201903'
 
-        # CDI file
-        # https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BTagCalibrationRecommendationsRelease21
-        bTagCalibFile = "xAODBTaggingEfficiency/13TeV/2017-21-13TeV-MC16-CDI-2019-07-30_v1.root"
-    else:
-        bTagCalibFile = "xAODBTaggingEfficiency/13TeV/2020-21-13TeV-MC16-CDI-2020-03-11_Sh228_v3.root"
+    # CDI file
+    # https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BTagCalibrationRecommendationsRelease21
+    bTagCalibFile = "xAODBTaggingEfficiency/13TeV/2020-21-13TeV-MC16-CDI-2020-03-11_Sh228_v3.root"
 
     # # Create the analysis algorithm sequence object:
     # seq = AnaAlgSequence( "FTagAnalysisSequence" )
diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py
index 5dae4f300888..067fbc663148 100644
--- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py
+++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py
@@ -161,9 +161,9 @@ def makeJetAnalysisSequence( dataType, jetCollection, postfix = '',
 
 def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollection,
                                    jetInput, postfix = '', 
-                                   runJvtUpdate = True, runFJvtUpdate = True,
-                                   runJvtSelection = True, runFJvtSelection = True,
-                                   runJvtEfficiency = True, runFJvtEfficiency = True,
+                                   runJvtUpdate = False, runFJvtUpdate = False,
+                                   runJvtSelection = True, runFJvtSelection = False,
+                                   runJvtEfficiency = True, runFJvtEfficiency = False,
                                    reduction = "Global", JEROption = "Simple"):
     """Add algorithms for the R=0.4 jets.
 
@@ -240,6 +240,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
     if runJvtUpdate :
         alg = createAlgorithm( 'CP::JvtUpdateAlg', 'JvtUpdateAlg'+postfix )
         addPrivateTool( alg, 'jvtTool', 'JetVertexTaggerTool' )
+        alg.jvtTool.JetContainer = jetCollection
         seq.append( alg, inputPropName = 'jets', outputPropName = 'jetsOut', stageName = 'selection' )
 
     if runFJvtUpdate :
@@ -266,6 +267,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
             alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root'
             alg.efficiencyTool.MaxPtForJvt = 120e3
         alg.efficiencyTool.WorkingPoint = 'Tight' if jetInput == 'EMPFlow' else 'Medium'
+        alg.truthJetCollection = 'AntiKt4TruthDressedWZJets'
         alg.selection = 'jvt_selection'
         alg.scaleFactorDecoration = 'jvt_effSF_%SYS%'
         alg.scaleFactorDecorationRegex = jvtSysts
@@ -285,6 +287,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
         addPrivateTool( alg, 'efficiencyTool', 'CP::JetJvtEfficiency' )
         alg.efficiencyTool.SFFile = 'JetJvtEfficiency/Moriond2018/fJvtSFFile.root'
         alg.efficiencyTool.WorkingPoint = 'Tight'
+        alg.truthJetCollection = 'AntiKt4TruthDressedWZJets'
         alg.dofJVT = True
         alg.fJVTStatus = 'passFJVT,as_char'
         alg.selection = 'fjvt_selection'
diff --git a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py
index 8ebee22a2ab3..17f5dda46dcf 100644
--- a/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py
+++ b/PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py
@@ -6,7 +6,7 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm
 
 def makeJetJvtAnalysisSequence( dataType, jetCollection,
                                 preselection = '',
-                                disableFJvt = False,
+                                enableFJvt = False,
                                 globalSF = True,
                                 runSelection = True,
                                 enableCutflow = False ):
@@ -15,7 +15,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
     Keyword arguments:
       dataType -- The data type to run on ("data", "mc" or "afii")
       jetCollection -- The jet container to run on
-      disableFJvt -- Whether to disable forward JVT calculations
+      enableFJvt -- Whether to enable forward JVT calculations
       globalSF -- Whether to calculate per event scale factors
       runSelection -- Whether to run selection
       enableCutflow -- Whether or not to dump the cutflow
@@ -37,7 +37,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
 
     # Set up the per-event jet efficiency scale factor calculation algorithm
     if dataType != 'data' and globalSF:
-        from JetAnalysisSequence import jvtSysts, fjvtSysts
+        from .JetAnalysisSequence import jvtSysts, fjvtSysts
 
         alg = createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'JvtEventScaleFactorAlg' )
         alg.preselection = preselection + '&&no_jvt' if preselection else 'no_jvt'
@@ -50,7 +50,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
                     inputPropName = { 'jets' : 'particles',
                                       'eventInfo' : 'eventInfo' } )
 
-        if not disableFJvt:
+        if enableFJvt:
             alg = createAlgorithm( 'CP::AsgEventScaleFactorAlg', 'ForwardJvtEventScaleFactorAlg' )
             alg.preselection = preselection + '&&no_fjvt' if preselection else 'no_fjvt'
             alg.scaleFactorInputDecoration = 'fjvt_effSF_%SYS%'
@@ -66,7 +66,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
         cutlist.append('jvt_selection')
         cutlength.append(1)
 
-        if not disableFJvt:
+        if enableFJvt:
             cutlist.append('fjvt_selection')
             cutlength.append(1)
 
-- 
GitLab


From 8fcb20a31ebe6778883304b8e8879b2b278295ea Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Wed, 23 Dec 2020 14:16:17 +0100
Subject: [PATCH 209/308] CP algs: Photons updates for DAOD_PHYS in master

---
 .../python/PhotonAnalysisSequence.py                         | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/python/PhotonAnalysisSequence.py b/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/python/PhotonAnalysisSequence.py
index 9c9826c5cd9d..b9da8fa196c4 100644
--- a/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/python/PhotonAnalysisSequence.py
+++ b/PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/python/PhotonAnalysisSequence.py
@@ -146,6 +146,7 @@ def makePhotonAnalysisSequence( dataType, workingPoint,
         alg.isolationCorrectionTool.IsMC = 1
         pass
     seq.append( alg, inputPropName = 'egammas', outputPropName = 'egammasOut',
+                affectingSystematics = '(^PH_Iso_.*)',
                 stageName = 'selection' )
 
     # Set up the isolation selection algorithm:
@@ -165,11 +166,9 @@ def makePhotonAnalysisSequence( dataType, workingPoint,
     addPrivateTool( alg, 'efficiencyCorrectionTool',
                     'AsgPhotonEfficiencyCorrectionTool' )
     alg.scaleFactorDecoration = 'effSF' + postfix
-    alg.efficiencyCorrectionTool.MapFilePath = \
-        'PhotonEfficiencyCorrection/2015_2017/rel21.2/Winter2018_Prerec_v1/map0.txt'
     if dataType == 'afii':
         alg.efficiencyCorrectionTool.ForceDataType = \
-          PATCore.ParticleDataType.Fast
+          PATCore.ParticleDataType.Full  # no AFII ID SFs for now
     elif dataType == 'mc':
         alg.efficiencyCorrectionTool.ForceDataType = \
           PATCore.ParticleDataType.Full
-- 
GitLab


From 48d71884344f6a3bb95b1db6556c68b5e60e17f6 Mon Sep 17 00:00:00 2001
From: yoyamagu <yohei.yamaguchi@cern.ch>
Date: Wed, 23 Dec 2020 22:57:03 +0900
Subject: [PATCH 210/308] modify element index

---
 .../TrigMuonHypoMT/src/TrigMufastHypoTool.cxx               | 6 +++---
 .../TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx               | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx
index d975a6c2cfd4..602d47ce93aa 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoTool.cxx
@@ -322,18 +322,17 @@ StatusCode TrigMufastHypoTool::inclusiveSelection(std::vector<TrigMufastHypoTool
 StatusCode TrigMufastHypoTool::multiplicitySelection(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const{
 
    HLT::Index2DVec passingSelection( m_ptBins.size() );
-   size_t elementIndex{ 0 };
 
    for ( size_t cutIndex=0; cutIndex < m_ptBins.size(); ++cutIndex ) {
+      size_t elementIndex{ 0 };
       for ( auto& i: toolInput ) {
 
 	if(!m_acceptAll && m_applyOR && !i.passOR) {
 	  ATH_MSG_DEBUG("skip due to overap, DecisionID " << m_decisionId );
+	  elementIndex++;
 	  continue;
 	}
 
-	elementIndex = &i - &toolInput.front();
-
          // If muon event has difference DecisionID, it shouldn't apply.
          if ( TrigCompositeUtils::passed( m_decisionId.numeric(), i.previousDecisionIDs ) ) {
             if ( decideOnSingleObject( i, cutIndex ) == true ) {
@@ -345,6 +344,7 @@ StatusCode TrigMufastHypoTool::multiplicitySelection(std::vector<TrigMufastHypoT
          } else {
             ATH_MSG_DEBUG("Not match DecisionID " << m_decisionId );
          }
+         elementIndex++;
       }
 
       // If no object passes the selection, multipul selection should stop.
diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx
index dc4323fef1c0..78c4ede02600 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoTool.cxx
@@ -275,18 +275,17 @@ StatusCode TrigmuCombHypoTool::inclusiveSelection(std::vector<TrigmuCombHypoTool
 StatusCode TrigmuCombHypoTool::multiplicitySelection(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input) const
 {
    HLT::Index2DVec passingSelection( m_ptBins.size() );
-   size_t elementIndex{ 0 };
 
    for ( size_t cutIndex=0; cutIndex < m_ptBins.size(); ++cutIndex ) {
+      size_t elementIndex{ 0 };
       for ( auto& i: input ) {
 
 	if(!m_acceptAll && m_applyOR && !i.passOR) {
 	  ATH_MSG_DEBUG("skip due to overap, DecisionID " << m_decisionId );
+	  elementIndex++;
 	  continue;
 	}
 
-	elementIndex = &i - &input.front();
-
          // If muon event has difference DecisionID, it shouldn't apply.
          if ( TrigCompositeUtils::passed( m_decisionId.numeric(), i.previousDecisionIDs ) ) {
             if ( decideOnSingleObject( i, cutIndex ) == true ) {
@@ -298,6 +297,7 @@ StatusCode TrigmuCombHypoTool::multiplicitySelection(std::vector<TrigmuCombHypoT
          } else {
             ATH_MSG_DEBUG("Not match DecisionID " << m_decisionId );
          }
+         elementIndex++;
       }
 
       // If no object passes the selection, multipul selection should stop.
-- 
GitLab


From 1e207c0a3f57514c40b49b70e96892ccca48d191 Mon Sep 17 00:00:00 2001
From: Jay Ajitbhai Sandesara <jay.ajitbhai.sandesara@cern.ch>
Date: Wed, 23 Dec 2020 14:23:35 +0000
Subject: [PATCH 211/308] Moved from writing ntuple per event to per seed, for
 seeds seen by the SiSPSeededTrackFinder algorithm.

---
 .../python/InDetJobProperties.py              |   8 +-
 .../share/ConfiguredNewTrackingSiPattern.py   |  14 ++
 .../src/SiSPSeededTrackFinder.cxx             |  49 +++-
 .../SiSpacePointForSeed.h                     |  12 +
 .../SiSpacePointsProSeed.h                    |  26 +-
 .../src/SiSpacePointForSeed.cxx               |  33 ++-
 .../src/SiSpacePointsProSeed.cxx              |  23 +-
 .../SiSpacePointsSeed/SiSpacePointsSeed.h     | 225 +++++++++++++++++-
 .../ISiSpacePointsSeedMaker.h                 |  10 +-
 .../SiSpacePointsSeedMaker_ATLxk.h            |  57 ++++-
 .../SiSpacePointsSeedMaker_BeamGas.h          |   4 +
 .../SiSpacePointsSeedMaker_Cosmic.h           |   4 +
 .../SiSpacePointsSeedMaker_HeavyIon.h         |   4 +
 .../SiSpacePointsSeedMaker_ITK.h              |   4 +
 .../SiSpacePointsSeedMaker_LowMomentum.h      |   4 +
 .../SiSpacePointsSeedMaker_Trigger.h          |   4 +
 .../src/SiSpacePointsSeedMaker_ATLxk.cxx      | 118 ++++++++-
 .../src/SiSpacePointsSeedMaker_BeamGas.cxx    |   7 +
 .../src/SiSpacePointsSeedMaker_Cosmic.cxx     |   7 +
 .../src/SiSpacePointsSeedMaker_HeavyIon.cxx   |   7 +
 .../src/SiSpacePointsSeedMaker_ITK.cxx        |   7 +
 .../SiSpacePointsSeedMaker_LowMomentum.cxx    |   7 +
 .../src/SiSpacePointsSeedMaker_Trigger.cxx    |   7 +
 .../src/SiTrackMaker_xk.cxx                   |   4 +-
 24 files changed, 616 insertions(+), 29 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py b/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
index bf315e2c2a91..7b9068cff2f8 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
@@ -1192,13 +1192,18 @@ class nnCutLargeD0Threshold(InDetFlagsJobProperty):
   allowedTypes = ['float']
   StoredValue  = -1.0
 
+class writeSeedValNtuple(InDetFlagsJobProperty):
+    """Turn writing of seed validation ntuple on and off"""
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = False
+
 class doTRTPIDNN(InDetFlagsJobProperty): 
   """calculate NN-based TRT electron probability""" 
   statusOn     = True 
   allowedTypes = ['bool']
   StoredValue  = True
 
-
 ##-----------------------------------------------------------------------------
 ## 2nd step
 ## Definition of the InDet flag container
@@ -2794,6 +2799,7 @@ _list_InDetJobProperties = [Enabled,
                             doDigitalROTCreation,
                             nnCutLargeD0Threshold,
                             useMuForTRTErrorScaling,
+                            writeSeedValNtuple,
                             doTRTPIDNN
                            ]
 for j in _list_InDetJobProperties: 
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
index 64b02d8db790..5a6650eeed51 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
@@ -61,7 +61,10 @@ class  ConfiguredNewTrackingSiPattern:
       #
       # ------------------------------------------------------------
 
+      doSeedMakerValidation = InDetFlags.writeSeedValNtuple()
+
       if InDetFlags.doSiSPSeededTrackFinder():
+
          #
          # --- Space points seeds maker, use different ones for cosmics and collisions
          #
@@ -95,6 +98,17 @@ class  ConfiguredNewTrackingSiPattern:
                                                                SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
                                                                radMax                 = NewTrackingCuts.radMax(),
                                                                RapidityCut            = NewTrackingCuts.maxEta())
+
+         if doSeedMakerValidation:
+
+           InDetSiSpacePointsSeedMaker.WriteNtuple = True
+
+           from AthenaCommon.AppMgr import ServiceMgr
+           if not hasattr(ServiceMgr, 'THistSvc'):
+             from GaudiSvc.GaudiSvcConf import THistSvc
+             ServiceMgr += THistSvc()
+
+           ServiceMgr.THistSvc.Output  = ["valNtuples DATAFILE='SeedMakerValidation.root' OPT='RECREATE'"]
             
          if NewTrackingCuts.mode() == "Offline" or InDetFlags.doHeavyIon() or  NewTrackingCuts.mode() == "ForwardTracks":
             InDetSiSpacePointsSeedMaker.maxdImpactPPS = NewTrackingCuts.maxdImpactPPSSeeds()
diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
index c608055d1ec6..29a40a8ef8f8 100644
--- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/src/SiSPSeededTrackFinder.cxx
@@ -263,23 +263,39 @@ StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) co
   /// prepare a collection for the quality-sorted track canddiates
   std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
 
+  /// Get the value of the seed maker validation ntuple writing switch
+  bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
+  long EvNumber = 0.;            //Event number variable to be used for the validation ntuple 
+
+  if (doWriteNtuple) {
+    SG::ReadHandle<xAOD::EventInfo> eventInfo(m_evtKey,ctx);
+    if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
+  }
+
   /// Loop through all seeds from the first pass and attempt to form track candidates
   while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
+
     ++counter[kNSeeds];
     /// we only want to fill the Z histo with the first candidate for each seed. 
     bool firstTrack{true};
-    /// combinatorial track finding for one given seed 
-    std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
 
-    /// record found candidates
-    for (Trk::Track* t: trackList) {
-      qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
-      /// For the first (highest quality) track from each seed, populate the vertex finding histograms 
-      if (firstTrack and not m_ITKGeometry) {
-        fillZHistogram(t, beamPosPerigee, numberHistogram, zWeightedHistogram, ptWeightedHistogram);
-      }
-      firstTrack = false;
-    }
+      /// copy all the tracks into trackList
+      std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
+      /// record track candidates found, using combinatorial track finding, from the given seed
+      for (Trk::Track* t: trackList) {
+
+        qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
+
+        /// For the first (highest quality) track from each seed, populate the vertex finding histograms
+        if (firstTrack and not m_ITKGeometry) {
+          fillZHistogram(t, beamPosPerigee, numberHistogram, zWeightedHistogram, ptWeightedHistogram);
+        }
+        firstTrack = false;
+      }  
+      /// Call the ntuple writing method
+      if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::StripSeed, EvNumber) ; } 
+        
+
     if (counter[kNSeeds] >= m_maxNumberSeeds) {
       ERR = true;
       ++m_problemsTotal;
@@ -307,17 +323,24 @@ StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) co
 
   /// Again, loop over the newly found seeds and attempt to form track candidates
   while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
+
     ++counter[kNSeeds];
-    /// insert the new tracks into the quality-sorted list
-    for (Trk::Track* t: m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints())) {
+
+    std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
+
+    for (Trk::Track* t: trackList) {
       qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
     }
+
+    if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::PixelSeed, EvNumber); }
+
     if (counter[kNSeeds] >= m_maxNumberSeeds) {
       ERR = true;
       ++m_problemsTotal;
       break;
     }
   }
+
   m_trackmaker->endEvent(trackEventData);
 
   /// Remove shared tracks with worse quality
diff --git a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointForSeed.h b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointForSeed.h
index 2879259be249..31d942ba06ef 100644
--- a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointForSeed.h
+++ b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointForSeed.h
@@ -46,6 +46,10 @@ namespace InDet {
     void set(const Trk::SpacePoint*const&,const float*,const float*);
     void setQuality(float);
     void setParam(const float&);
+    void setD0(const float&);
+    void setEta(const float&);
+    void setDZDR(const float&);
+    void setPt(const float&);
     void setScorePenalty(const float& par) {m_scorePenalty=par;}
 
     const Trk::SpacePoint* spacepoint; 
@@ -56,9 +60,13 @@ namespace InDet {
           float         phi() const {return atan2(m_y,m_x);}
     const float&       covr() const {return m_covr;}
     const float&       covz() const {return m_covz;}
+    const float&         d0() const {return m_d0;}
+    const float&        eta() const {return m_eta;}
     const float&      param() const {return m_param;} /// impact parameter
     const float&      scorePenalty() const {return m_scorePenalty;} /// penalty term in the seed score
     const float&    quality() const {return m_q ;}      /// quality of the best seed this candidate was seen on 
+    const float&       dzdr() const {return m_dzdr;}
+    const float&         Pt() const {return m_pt;}
     const Trk::Surface* sur() const {return m_su;}
     const Trk::Surface* sun() const {return m_sn;}
 
@@ -70,6 +78,10 @@ namespace InDet {
     float m_r   ; // radius       in beam system coordinates
     float m_covr; //
     float m_covz; //
+    float m_d0;
+    float m_eta;
+    float m_dzdr;
+    float m_pt;
     float m_param;  /// impact parameter
     float m_scorePenalty; /// penalty term in the seed score 
     float m_q   ;   /// quality of the best seed this candidate was seen on 
diff --git a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsProSeed.h b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsProSeed.h
index f7595db7d84c..1efc685eb9f4 100644
--- a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsProSeed.h
+++ b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/SiSPSeededTrackFinderData/SiSpacePointsProSeed.h
@@ -39,7 +39,15 @@ namespace InDet {
     SiSpacePointForSeed* spacepoint0() {return m_s0;}
     SiSpacePointForSeed* spacepoint1() {return m_s1;}
     SiSpacePointForSeed* spacepoint2() {return m_s2;}
+    const float&            d0() const {return m_d0;}
     const float&             z() const {return m_z ;}
+    const float&           eta() const {return m_eta;}
+    const float&            z1() const {return m_z1;}
+    const float&            z2() const {return m_z2;}
+    const float&            z3() const {return m_z3;}
+    const float&            r1() const {return m_r1;}
+    const float&            r2() const {return m_r2;}
+    const float&            r3() const {return m_r3;}
     const float&       quality() const {return m_q ;}
     
     void set(SiSpacePointForSeed*&,SiSpacePointForSeed*&,SiSpacePointForSeed*&,float);
@@ -49,11 +57,19 @@ namespace InDet {
 
   private:
     
-    SiSpacePointForSeed* m_s0;
-    SiSpacePointForSeed* m_s1;
-    SiSpacePointForSeed* m_s2;
-    float                m_z ;
-    float                m_q ;
+    SiSpacePointForSeed* m_s0  ;
+    SiSpacePointForSeed* m_s1  ;
+    SiSpacePointForSeed* m_s2  ;
+    float                m_d0  ;
+    float                m_z   ;
+    float                m_eta ;
+    float                m_z1  ;
+    float                m_z2  ;
+    float                m_z3  ;
+    float                m_r1  ;
+    float                m_r2  ;
+    float                m_r3  ;
+    float                m_q   ;
   };
 } // end of name space
 
diff --git a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointForSeed.cxx b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointForSeed.cxx
index b1716d8257d7..2701e4d01ee5 100644
--- a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointForSeed.cxx
+++ b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointForSeed.cxx
@@ -21,6 +21,10 @@ namespace InDet {
     m_covr  = 0.;
     m_covz  = 0.;
     m_param = 0.;
+    m_d0    = 0.;
+    m_eta   = 0.;
+    m_dzdr  = 0.;
+    m_pt    = 0.;
     m_q     = 0.;
     m_su    = 0 ;
     m_sn    = 0 ;
@@ -38,6 +42,10 @@ namespace InDet {
       m_covr      = sp.m_covr    ;
       m_covz      = sp.m_covz    ;
       m_q         = sp.m_q       ;
+      m_dzdr      = sp.m_dzdr    ;
+      m_d0        = sp.m_d0      ;
+      m_eta       = sp.m_eta     ;
+      m_pt        = sp.m_pt      ;
       m_su        = sp.m_su      ;
       m_sn        = sp.m_sn      ;        
     }
@@ -47,13 +55,13 @@ namespace InDet {
   SiSpacePointForSeed::SiSpacePointForSeed
   (const Trk::SpacePoint*const& sp,const float* r) 
   {
-    set(sp,r); m_param = 0.;
+    set(sp,r); m_param = 0.;  
   }
 
   SiSpacePointForSeed::SiSpacePointForSeed
   (const Trk::SpacePoint*const& sp,const float* r,const float* sc) 
   {
-    set(sp,r,sc); m_param = 0.;
+    set(sp,r,sc); m_param = 0.; 
   }
 
   /////////////////////////////////////////////////////////////////////////////////
@@ -157,9 +165,30 @@ namespace InDet {
   {
     m_param = p;
   }
+
+  void SiSpacePointForSeed::setD0(const float& d0)
+  {
+    m_d0 = d0;
+  } 
+
+  void SiSpacePointForSeed::setEta(const float& eta)
+  {
+    m_eta = eta;
+  }
+
   void  SiSpacePointForSeed::setQuality(float q)
   {
     if(q <= m_q) m_q = q;
   }
+
+  void  SiSpacePointForSeed::setDZDR(const float& dzdr)
+  {
+    m_dzdr = dzdr;
+  }
+
+  void  SiSpacePointForSeed::setPt(const float& pt)
+  {
+    m_pt = pt;
+  }
  
 } // end of name space
diff --git a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointsProSeed.cxx b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointsProSeed.cxx
index 4894433ae64f..c300db866c1e 100644
--- a/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointsProSeed.cxx
+++ b/InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiSpacePointsProSeed.cxx
@@ -13,6 +13,8 @@ namespace InDet {
     m_s0 = 0 ;
     m_s1 = 0 ;
     m_s2 = 0 ;
+    m_d0 = 0.;
+    m_eta = 0.;
     m_z  = 0.;
     m_q  = 0.;
   }
@@ -22,7 +24,9 @@ namespace InDet {
   {
     if(&sp!=this) {
 
+      m_d0  = sp.m_d0;
       m_z   = sp.m_z ;
+      m_eta = sp.m_eta;
       m_q   = sp.m_q ;
       m_s0  = sp.m_s0;
       m_s1  = sp.m_s1;
@@ -101,7 +105,24 @@ namespace InDet {
     s.add(m_s0->spacepoint);
     s.add(m_s1->spacepoint);
     s.add(m_s2->spacepoint);
-    s.setZVertex(double(m_z)); 
+    s.setD0(m_s2->param());
+    s.setZVertex(double(m_z));
+    s.setEta(m_s2->eta()); 
+    s.setX1(m_s0->x());
+    s.setX2(m_s1->x());
+    s.setX3(m_s2->x());
+    s.setY1(m_s0->y());
+    s.setY2(m_s1->y());
+    s.setY3(m_s2->y());
+    s.setZ1(m_s0->z());
+    s.setZ2(m_s1->z());
+    s.setZ3(m_s2->z());
+    s.setR1(m_s0->radius());
+    s.setR2(m_s1->radius());
+    s.setR3(m_s2->radius());
+    s.setDZDR_B(m_s0->dzdr());
+    s.setDZDR_T(m_s2->dzdr());
+    s.setPt(m_s2->Pt()); 
     return true;
   }
 
diff --git a/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/SiSpacePointsSeed.h b/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/SiSpacePointsSeed.h
index b05bb2581cb2..e0b293a8b7b3 100755
--- a/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/SiSpacePointsSeed.h
+++ b/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/SiSpacePointsSeed.h
@@ -47,9 +47,45 @@ namespace InDet {
     virtual ~SiSpacePointsSeed();
     void                                     erase();
     void                                     add(const Trk::SpacePoint*&);
+    void                                     setD0     (const double&);
     void                                     setZVertex(const double&);
+    void                                     setEta    (const double&);
+    void                                     setX1     (const double&);
+    void                                     setX2     (const double&);
+    void                                     setX3     (const double&);
+    void                                     setY1     (const double&);
+    void                                     setY2     (const double&);
+    void                                     setY3     (const double&);
+    void                                     setZ1     (const double&);
+    void                                     setZ2     (const double&);
+    void                                     setZ3     (const double&);
+    void                                     setR1     (const double&);
+    void                                     setR2     (const double&);
+    void                                     setR3     (const double&);
+    void                                     setDZDR_B (const double&);
+    void                                     setDZDR_T (const double&);
+    void                                     setPt     (const double&);
+
     const std::vector<const Trk::SpacePoint*>& spacePoints() const;
+    const double&                            d0         () const;
     const double&                            zVertex    () const;
+    const double&                            eta        () const;
+    const double&                            x1         () const;
+    const double&                            x2         () const;
+    const double&                            x3         () const;
+    const double&                            y1         () const;
+    const double&                            y2         () const;
+    const double&                            y3         () const;
+    const double&                            z1         () const;
+    const double&                            z2         () const;
+    const double&                            z3         () const;
+    const double&                            r1         () const;
+    const double&                            r2         () const;
+    const double&                            r3         () const;
+    const double&                            dzdr_b     () const;
+    const double&                            dzdr_t     () const;
+    const double&                            pt         () const;
+
     virtual MsgStream&    dump(MsgStream&    out) const ;
     virtual std::ostream& dump(std::ostream& out) const ;
     
@@ -60,7 +96,24 @@ namespace InDet {
   protected:
     
     std::vector<const Trk::SpacePoint*> m_spacepoints;
-    double                            m_zvertex    ;  
+    double                            m_d0         ;
+    double                            m_zvertex    ;
+    double                            m_eta        ;  
+    double                            m_x1         ;
+    double                            m_x2         ;
+    double                            m_x3         ;
+    double                            m_y1         ;
+    double                            m_y2         ;
+    double                            m_y3         ;
+    double                            m_z1         ;
+    double                            m_z2         ;
+    double                            m_z3         ;
+    double                            m_r1         ;
+    double                            m_r2         ;
+    double                            m_r3         ;
+    double                            m_dzdr_b     ;
+    double                            m_dzdr_t     ;
+    double                            m_pt         ;
   };
 
   MsgStream&    operator << (MsgStream&   ,const SiSpacePointsSeed&);
@@ -85,16 +138,186 @@ namespace InDet {
       m_spacepoints.push_back(p);
     }
 
+  inline void SiSpacePointsSeed::setD0(const double& d0)
+    {
+      m_d0 = d0;
+    }
+
   inline void SiSpacePointsSeed::setZVertex(const double& z) 
     {
       m_zvertex = z;
     }
 
+  inline void SiSpacePointsSeed::setEta(const double& eta)
+    {
+      m_eta = eta;
+    }
+
+  inline void SiSpacePointsSeed::setX1(const double& x1)
+    {
+      m_x1 = x1;
+    }
+
+  inline void SiSpacePointsSeed::setX2(const double& x2)
+    {
+      m_x2 = x2;
+    }
+
+  inline void SiSpacePointsSeed::setX3(const double& x3)
+    {
+      m_x3 = x3;
+    }
+
+  inline void SiSpacePointsSeed::setY1(const double& y1)
+    {
+      m_y1 = y1;
+    }
+
+  inline void SiSpacePointsSeed::setY2(const double& y2)
+    {
+      m_y2 = y2;
+    }
+
+  inline void SiSpacePointsSeed::setY3(const double& y3)
+    {
+      m_y3 = y3;
+    }
+
+  inline void SiSpacePointsSeed::setZ1(const double& z1)
+    {
+      m_z1 = z1;
+    }
+
+  inline void SiSpacePointsSeed::setZ2(const double& z2)
+    {
+      m_z2 = z2;
+    }
+
+  inline void SiSpacePointsSeed::setZ3(const double& z3)
+    {
+      m_z3 = z3;
+    }
+
+  inline void SiSpacePointsSeed::setR1(const double& r1)
+    {
+      m_r1 = r1;
+    }
+
+  inline void SiSpacePointsSeed::setR2(const double& r2)
+    {
+      m_r2 = r2;
+    }
+
+  inline void SiSpacePointsSeed::setR3(const double& r3)
+    {
+      m_r3 = r3;
+    }
+
+  inline void SiSpacePointsSeed::setDZDR_B(const double& dzdr)
+    {
+      m_dzdr_b = dzdr;
+    }
+
+  inline void SiSpacePointsSeed::setDZDR_T(const double& dzdr)
+    {
+      m_dzdr_t = dzdr;
+    }
+
+  inline void SiSpacePointsSeed::setPt(const double& pt)
+    {
+      m_pt = pt;
+    }
+
+  inline const double& SiSpacePointsSeed::d0() const
+    {
+      return m_d0;
+    }
+
   inline const double& SiSpacePointsSeed::zVertex() const 
     {
       return m_zvertex;
     }
+   
+  inline const double& SiSpacePointsSeed::eta() const
+    {
+      return m_eta;
+    }
+
+  inline const double& SiSpacePointsSeed::x1() const
+    {
+      return m_x1;
+    }
+
+  inline const double& SiSpacePointsSeed::x2() const
+    {
+      return m_x2;
+    }
+
+  inline const double& SiSpacePointsSeed::x3() const
+    {
+      return m_x3;
+    }
+
+  inline const double& SiSpacePointsSeed::y1() const
+    {
+      return m_y1;
+    }
+
+  inline const double& SiSpacePointsSeed::y2() const
+    {
+      return m_y2;
+    }
+
+  inline const double& SiSpacePointsSeed::y3() const
+    {
+      return m_y3;
+    }
+
+  inline const double& SiSpacePointsSeed::z1() const
+    {
+      return m_z1;
+    }
+
+  inline const double& SiSpacePointsSeed::z2() const
+    {
+      return m_z2;
+    }
+
+  inline const double& SiSpacePointsSeed::z3() const
+    {
+      return m_z3;
+    }
+
+  inline const double& SiSpacePointsSeed::r1() const
+    {
+      return m_r1;
+    }
+
+  inline const double& SiSpacePointsSeed::r2() const
+    {
+      return m_r2;
+    }
+
+  inline const double& SiSpacePointsSeed::r3() const
+    {
+      return m_r3;
+    }
+
+  inline const double& SiSpacePointsSeed::dzdr_b() const
+    {
+      return m_dzdr_b;
+    }
+
+  inline const double& SiSpacePointsSeed::dzdr_t() const
+    {
+      return m_dzdr_t;
+    }
   
+  inline const double& SiSpacePointsSeed::pt() const
+    {
+      return m_pt;
+    }
+
 } // end of name space
 
 #endif  // SiSpacePointsSeed_h
diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h
index e51088b9ea70..d166e6712cce 100644
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/InDetRecToolInterfaces/ISiSpacePointsSeedMaker.h
@@ -26,6 +26,8 @@
 
 class MsgStream;
 
+namespace Trk { class Track; }
+
 namespace InDet {
 
   class SiSpacePointsSeed;
@@ -126,7 +128,13 @@ namespace InDet {
       //@{
       virtual const SiSpacePointsSeed* next(const EventContext& ctx, SiSpacePointsSeedMakerEventData& data) const =0;
       //@}
-      
+
+      virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track*, int seedType, long eventNumber) const =0;
+
+      virtual bool getWriteNtupleBoolProperty() const =0;
+     
+      enum seedType { StripSeed = 0, PixelSeed = 1 };
+ 
       ///////////////////////////////////////////////////////////////////
       /// @name Print internal tool parameters and status
       ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
index adc213c8c9e3..1fa659963e5f 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
@@ -22,6 +22,9 @@
 #include "TrkSpacePoint/SpacePointContainer.h" 
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
 #include "TrkEventUtils/PRDtoTrackMap.h"
+#include "GaudiKernel/ITHistSvc.h"
+#include "TFile.h"
+#include "TTree.h"
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // MagField cache
@@ -35,6 +38,8 @@
 #include <vector>
 
 class MsgStream;
+//class TFile;
+//class TTree;
 
 namespace InDet {
 
@@ -117,7 +122,16 @@ namespace InDet {
     **/ 
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
-      
+     
+    /** This method is called by the SiSPSeededTrackFinder algorithm to fill ntuples for 
+    * seeds seen by the algorithm. seedType represents Pixel/SCT type seeds, where 0->SCT
+    * and 1->Pixel. givesTrack is determined by whether or not the given seed forms atleast 
+    * one track candidate. 0->No track candidate 1->At least one track Candidate
+    **/  
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
@@ -475,6 +489,47 @@ namespace InDet {
      * @return true if the seed is confirmed, false otherwise 
      **/ 
     bool isConfirmedSeed(const InDet::SiSpacePointForSeed* bottomSP, const InDet::SiSpacePointForSeed* topSP, float quality) const; 
+
+    ///Flag to write validation ntuples. Turned off by default
+    Gaudi::Property<bool> m_writeNtuple {this, "WriteNtuple", false, "Flag to write Validation Ntuples"};
+
+    ITHistSvc* m_thistSvc;
+
+    TFile* m_outputFile;
+    TTree* m_outputTree;
+
+    mutable std::mutex m_mutex;
+
+    mutable std::string          m_treeName               ATLAS_THREAD_SAFE;
+    mutable TString              m_treeFolder             ATLAS_THREAD_SAFE;
+
+    mutable float                  m_d0                   ATLAS_THREAD_SAFE;
+    mutable float                  m_z0                   ATLAS_THREAD_SAFE;
+    mutable float                  m_pt                   ATLAS_THREAD_SAFE;
+    mutable float                  m_eta                  ATLAS_THREAD_SAFE;
+    mutable double                 m_x1                   ATLAS_THREAD_SAFE;
+    mutable double                 m_x2                   ATLAS_THREAD_SAFE;
+    mutable double                 m_x3                   ATLAS_THREAD_SAFE;
+    mutable double                 m_y1                   ATLAS_THREAD_SAFE;
+    mutable double                 m_y2                   ATLAS_THREAD_SAFE;
+    mutable double                 m_y3                   ATLAS_THREAD_SAFE;
+    mutable double                 m_z1                   ATLAS_THREAD_SAFE;
+    mutable double                 m_z2                   ATLAS_THREAD_SAFE;
+    mutable double                 m_z3                   ATLAS_THREAD_SAFE;
+    mutable double                 m_r1                   ATLAS_THREAD_SAFE;
+    mutable double                 m_r2                   ATLAS_THREAD_SAFE;
+    mutable double                 m_r3                   ATLAS_THREAD_SAFE;
+    mutable float                  m_quality              ATLAS_THREAD_SAFE;
+    mutable int                    m_type                 ATLAS_THREAD_SAFE;
+    mutable int                    m_status               ATLAS_THREAD_SAFE;
+    mutable double                 m_dzdr_t               ATLAS_THREAD_SAFE;
+    mutable double                 m_dzdr_b               ATLAS_THREAD_SAFE;
+    mutable bool                   m_givesTrack           ATLAS_THREAD_SAFE;
+    mutable float                  m_trackD0              ATLAS_THREAD_SAFE;
+    mutable float                  m_trackZ0              ATLAS_THREAD_SAFE;
+    mutable float                  m_trackPt              ATLAS_THREAD_SAFE;
+    mutable float                  m_trackEta             ATLAS_THREAD_SAFE;
+    mutable long                   m_eventNumber          ATLAS_THREAD_SAFE;
   };
   
 } // end of name space
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
index ce9990ce62bc..5ec5f5ba0e18 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
@@ -111,6 +111,10 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long EventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
index 9dabc1d84ebd..a72164353de5 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
@@ -108,6 +108,10 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
index 9dd38fd4534f..19e54527894c 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
@@ -109,6 +109,10 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
index a744dc44eaff..b922f7a3866b 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
@@ -111,6 +111,10 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
index aa55a92ed6df..153db9d6f5b3 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
@@ -109,6 +109,10 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
index 92375cc65ee7..6ffa79a5ee93 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
@@ -107,6 +107,10 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+
+    virtual bool getWriteNtupleBoolProperty() const;
+
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
     ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
index b039fc6bae12..36a72a60852a 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ATLxk.cxx
@@ -16,6 +16,10 @@
 #include "InDetPrepRawData/SiCluster.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 
+#include "TrkTrack/Track.h"
+#include "TrkParameters/TrackParameters.h"
+
+#include "StoreGate/ReadCondHandle.h"
 #include <iomanip>
 #include <ostream>
 
@@ -25,7 +29,11 @@
 
 InDet::SiSpacePointsSeedMaker_ATLxk::SiSpacePointsSeedMaker_ATLxk
 (const std::string& t,const std::string& n,const IInterface* p)
-  : base_class(t, n, p)
+  : base_class(t, n, p),
+    m_thistSvc(nullptr),
+    m_outputTree(nullptr),
+    m_treeName(""),
+    m_treeFolder("/valNtuples/")
 {
 }
 
@@ -62,6 +70,46 @@ StatusCode InDet::SiSpacePointsSeedMaker_ATLxk::initialize()
     dump(data, msg(MSG::DEBUG));
   }
 
+  if (m_writeNtuple) {
+
+    ATH_CHECK( service("THistSvc",m_thistSvc)  );
+ 
+    m_treeName = (std::string("SeedTree_")+name());
+    std::replace( m_treeName.begin(), m_treeName.end(), '.', '_' );
+ 
+    m_outputTree = new TTree( m_treeName.c_str() , "SeedMakerValTool"); 
+
+    m_outputTree->Branch("eventNumber",    &m_eventNumber); 
+    m_outputTree->Branch("d0",             &m_d0);
+    m_outputTree->Branch("z0",             &m_z0);
+    m_outputTree->Branch("pt",             &m_pt);
+    m_outputTree->Branch("eta",            &m_eta);
+    m_outputTree->Branch("x1",             &m_x1);
+    m_outputTree->Branch("x2",             &m_x2);
+    m_outputTree->Branch("x3",             &m_x3);
+    m_outputTree->Branch("y1",             &m_y1);
+    m_outputTree->Branch("y2",             &m_y2);
+    m_outputTree->Branch("y3",             &m_y3);
+    m_outputTree->Branch("z1",             &m_z1);
+    m_outputTree->Branch("z2",             &m_z2);
+    m_outputTree->Branch("z3",             &m_z3);
+    m_outputTree->Branch("r1",             &m_r1);
+    m_outputTree->Branch("r2",             &m_r2);
+    m_outputTree->Branch("r3",             &m_r3);
+    m_outputTree->Branch("quality",        &m_quality);
+    m_outputTree->Branch("seedType",       &m_type);
+    m_outputTree->Branch("givesTrack",     &m_givesTrack);
+    m_outputTree->Branch("dzdr_b",  	   &m_dzdr_b);
+    m_outputTree->Branch("dzdr_t",         &m_dzdr_t);
+    m_outputTree->Branch("track_pt",       &m_trackPt);
+    m_outputTree->Branch("track_eta",      &m_trackEta);
+
+    TString fullTreeName = m_treeFolder + m_treeName;
+
+    ATH_CHECK(  m_thistSvc->regTree( fullTreeName.Data(), m_outputTree )  );
+
+  }
+
   return sc;
 }
 
@@ -147,6 +195,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even
     // by the user for strip seeds
     data.maxSeedsPerSP = m_maxOneSizeSSS;
     data.keepAllConfirmedSeeds = m_alwaysKeepConfirmedStripSeeds;
+    
   } ///< end if-statement for iteration 0 
   else {  /// for the second iteration (PPP pass), don't redo the full init required the first time 
     data.r_first = 0;     ///< reset the first radial bin 
@@ -154,6 +203,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newEvent(const EventContext& ctx, Even
     // by the user for pixel seeds
     data.maxSeedsPerSP = m_maxOneSizePPP;
     data.keepAllConfirmedSeeds = m_alwaysKeepConfirmedPixelSeeds;
+
     /// call fillLists to repopulate the candidate space points and exit 
     fillLists(data);
     return;
@@ -1767,6 +1817,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp
 	      if(z0 > zmax || z0 < zmin) continue;
         /// found a bottom SP candidate, write it into the data object
         data.SP[Nb] = (*iter_otherSP);
+        if(m_writeNtuple) data.SP[Nb]->setDZDR(dZdR);
         /// if we are exceeding the SP capacity of our data object,
         /// make it resize its vectors. Will add 50 slots by default,
         /// so rarely should happen more than once per event.  
@@ -1815,6 +1866,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp
  	      if(z0 > zmax || z0 < zmin) continue;
         /// add SP to the list
         data.SP[Nt] = (*iter_otherSP);
+        if (m_writeNtuple)  data.SP[Nt]->setDZDR(dZdR);
         /// if we are exceeding the SP capacity of our data object,
         /// make it resize its vectors. Will add 50 slots by default,
         /// so rarely should happen more than once per event.  
@@ -1904,6 +1956,11 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp
         
         /// average value of 1/tan(theta), approximate the slope at the location of the central space point
         float meanOneOverTanTheta = (Tzb+data.Tz[t])/2.; 
+        float theta = 0.;
+        if(m_writeNtuple){
+          /// theta estimate of the seed based on the average value of 1/tan(theta)
+          theta = atan(1./meanOneOverTanTheta);
+        }
         /// squared error on the difference in tan(theta) due to space point position errors. 
         float sigmaSquaredSpacePointErrors = Erb+data.Er[t]   /// pre-computed individual squared errors on 1/tan(theta) for the two segments 
                         + 2. * covz0 * data.R[t]*data.R[b]    /// mixed term with z-uncertainty on central SP
@@ -1956,7 +2013,6 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp
          * pt. This refines the cut applied above, following the same logic ("delta² - sigma² ?<=0")
          **/
         if (BSquare  > ipt2K*onePlusAsquare || remainingSquaredDelta*onePlusAsquare > BSquare*sigmaSquaredScatteringPtDependent) continue;
-
         /** This is an estimate of the transverse impact parameter. 
         * The reasoning is that, in the x-y frame with the central SP as origin and 
         * the x axis pointing away from the IP, we have for the distance between
@@ -1992,11 +2048,18 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp
           /// deviate from a straight line in r-z
           data.SP[t]->setScorePenalty(std::abs((Tzb-data.Tz[t])/(dr*sTzb2)));
           data.SP[t]->setParam(d0);
+
+          if(m_writeNtuple){
+            /// set parameters for ntuple writing
+            data.SP[t]->setEta(-log(tan(0.5*theta)));
+            data.SP[t]->setPt(std::sqrt(onePlusAsquare/BSquare)/(1000*data.K)); 
+          }
           /// record one possible seed candidate, sort by the curvature 
           data.CmSp.emplace_back(std::make_pair(B/std::sqrt(onePlusAsquare), data.SP[t]));
           /// store the transverse IP, will later be used as a quality estimator 
 
         }
+   
       }   ///< end loop over top space point candidates
       /// now apply further cleaning on the seed candidates for this central+bottom pair. 
       if (!data.CmSp.empty()) {
@@ -2006,6 +2069,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::production3Sp
     ///record seeds found in this run  
     fillSeeds(data);
     nseed += data.fillOneSeeds;
+   
   } ///< end loop over central SP 
 }
 
@@ -2386,6 +2450,7 @@ void InDet::SiSpacePointsSeedMaker_ATLxk::newOneSeedWithCurvaturesComparison
 
 void InDet::SiSpacePointsSeedMaker_ATLxk::fillSeeds(EventData& data) const
 {
+
   data.fillOneSeeds = 0;
 
   std::multimap<float,InDet::SiSpacePointsProSeed*>::iterator it_firstSeedCandidate = data.mapOneSeeds_Pro.begin();
@@ -2442,6 +2507,7 @@ const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_ATLxk::next(const
       }
       /// iterate until we find a valid seed satisfying certain quality cuts in set3 
     } while (!(*data.i_seed_Pro++).set3(data.seedOutput));
+
     /// then return this next seed candidate 
     return &data.seedOutput;
   } else {
@@ -2456,6 +2522,50 @@ const InDet::SiSpacePointsSeed* InDet::SiSpacePointsSeedMaker_ATLxk::next(const
   return nullptr;
 }
 
+///////////////////////////////////////////////////////////////////////////////////
+/// Method to write ntuple entries for an input seed
+///////////////////////////////////////////////////////////////////////////////////
+void InDet::SiSpacePointsSeedMaker_ATLxk::writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const{
+  
+  if(m_writeNtuple) {
+    std::lock_guard<std::mutex> lock(m_mutex);
+
+    if(track != nullptr) {
+      m_trackPt = (track->trackParameters()->front()->pT())/1000.;
+      m_trackEta = std::abs(track->trackParameters()->front()->eta());
+    }
+    else {
+      m_trackPt = -1.;
+      m_trackEta = -1.; 
+    }
+    m_d0           =   seed->d0();
+    m_z0           =   seed->zVertex();
+    m_eta          =   seed->eta();
+    m_x1           =   seed->x1();
+    m_x2           =   seed->x2();
+    m_x3           =   seed->x3();
+    m_y1           =   seed->y1();
+    m_y2           =   seed->y2();
+    m_y3           =   seed->y3();      
+    m_z1           =   seed->z1();
+    m_z2           =   seed->z2();
+    m_z3           =   seed->z3();
+    m_r1           =   seed->r1();
+    m_r2           =   seed->r2();
+    m_r3           =   seed->r3();
+    m_type         =   seedType;
+    m_dzdr_b       =   seed->dzdr_b();
+    m_dzdr_t       =   seed->dzdr_t();
+    m_pt           =   seed->pt();
+    m_givesTrack   =   !(track == nullptr);
+    m_eventNumber  =   eventNumber;
+
+    m_outputTree->Fill();
+
+  }
+
+}
+
 bool InDet::SiSpacePointsSeedMaker_ATLxk::isZCompatible  
 (EventData& data, const float& Zv, const float& R, const float& T) const
 {
@@ -2562,3 +2672,7 @@ bool InDet::SiSpacePointsSeedMaker_ATLxk::isConfirmedSeed(const InDet::SiSpacePo
     /// PPS: the confirmation is the only quality modifier applied
     else return (quality < 0.); 
 }
+
+bool InDet::SiSpacePointsSeedMaker_ATLxk::getWriteNtupleBoolProperty() const{
+    return m_writeNtuple;
+} 
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
index 2c7400366b86..3ebae905d6da 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_BeamGas.cxx
@@ -1216,3 +1216,10 @@ void InDet::SiSpacePointsSeedMaker_BeamGas::initializeEventData(EventData& data)
                   0, // sizeRFZV not used
                   false); // checkEta not used
 }
+
+void InDet::SiSpacePointsSeedMaker_BeamGas::writeNtuple(const SiSpacePointsSeed*, const Trk::Track*, int, long) const{
+}
+
+bool InDet::SiSpacePointsSeedMaker_BeamGas::getWriteNtupleBoolProperty() const{
+    return false;
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
index bbfc2e54f252..d1ef2528e3d3 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Cosmic.cxx
@@ -1160,3 +1160,10 @@ void InDet::SiSpacePointsSeedMaker_Cosmic::initializeEventData(EventData& data)
                   0, // sizeRFZV not used
                   false); // checkEta not used
 }
+
+void InDet::SiSpacePointsSeedMaker_Cosmic::writeNtuple(const SiSpacePointsSeed*, const Trk::Track*, int, long) const{
+}
+
+bool InDet::SiSpacePointsSeedMaker_Cosmic::getWriteNtupleBoolProperty() const{
+    return false;
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
index 423b40ddfde6..297a3a60f3a2 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_HeavyIon.cxx
@@ -1743,3 +1743,10 @@ void InDet::SiSpacePointsSeedMaker_HeavyIon::initializeEventData(EventData& data
                   SizeRFZV,
                   false); // checkEta not used
 }
+
+void InDet::SiSpacePointsSeedMaker_HeavyIon::writeNtuple(const SiSpacePointsSeed*, const Trk::Track*, int, long) const{
+}
+
+bool InDet::SiSpacePointsSeedMaker_HeavyIon::getWriteNtupleBoolProperty() const{
+    return false;
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
index acc9bb73cea6..aabcf9cd6415 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_ITK.cxx
@@ -2077,3 +2077,10 @@ void InDet::SiSpacePointsSeedMaker_ITK::initializeEventData(EventData& data) con
                   SizeRFZV,
                   m_checketa);
 }
+
+void InDet::SiSpacePointsSeedMaker_ITK::writeNtuple(const SiSpacePointsSeed*, const Trk::Track*, int, long) const{
+}
+
+bool InDet::SiSpacePointsSeedMaker_ITK::getWriteNtupleBoolProperty() const{
+    return false;
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
index 3f075123c6b2..b0fb2dc7cd74 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_LowMomentum.cxx
@@ -1184,3 +1184,10 @@ void InDet::SiSpacePointsSeedMaker_LowMomentum::initializeEventData(EventData& d
                   0, // sizeRFZV not used
                   false); // checkEta not used
 }
+
+void InDet::SiSpacePointsSeedMaker_LowMomentum::writeNtuple(const SiSpacePointsSeed*, const Trk::Track*, int, long) const{
+}
+
+bool InDet::SiSpacePointsSeedMaker_LowMomentum::getWriteNtupleBoolProperty() const{
+    return false;
+}
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
index 61db8694e7a5..4bae1bd01ec6 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/src/SiSpacePointsSeedMaker_Trigger.cxx
@@ -1664,3 +1664,10 @@ void InDet::SiSpacePointsSeedMaker_Trigger::initializeEventData(EventData& data)
                   SizeRFZV,
                   false); // checkEta not used
 }
+
+void InDet::SiSpacePointsSeedMaker_Trigger::writeNtuple(const SiSpacePointsSeed*, const Trk::Track*, int, long) const{
+}
+
+bool InDet::SiSpacePointsSeedMaker_Trigger::getWriteNtupleBoolProperty() const{
+    return false;
+}
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
index ac26da25831a..8c775c0772e8 100644
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/src/SiTrackMaker_xk.cxx
@@ -565,8 +565,8 @@ void InDet::SiTrackMaker_xk::newTrigEvent(const EventContext& ctx, SiTrackMakerE
   data.inputseeds() = 0;
   data.goodseeds()  = 0;
   data.findtracks() = 0;
-  for(int i=0; i!=SiCombinatorialTrackFinderData_xk::kNStatAllTypes; ++i) { for(int k = 0; k!=SiCombinatorialTrackFinderData_xk::kNSeedTypes; ++k) data.summaryStatAll()[i][k]; }
-  for(int i=0; i!=SiCombinatorialTrackFinderData_xk::kNStatEtaTypes; ++i) { for(int k = 0; k!=SiCombinatorialTrackFinderData_xk::kNSeedTypes; ++k) { for(int r=0; r!=SiCombinatorialTrackFinderData_xk::kNRapidityRanges; ++r) data.summaryStatUsedInTrack()[i][k][r]; } }
+  for(int i=0; i!=SiCombinatorialTrackFinderData_xk::kNStatAllTypes; ++i) { for(int k = 0; k!=SiCombinatorialTrackFinderData_xk::kNSeedTypes; ++k) data.summaryStatAll()[i][k] = 0.; }
+  for(int i=0; i!=SiCombinatorialTrackFinderData_xk::kNStatEtaTypes; ++i) { for(int k = 0; k!=SiCombinatorialTrackFinderData_xk::kNSeedTypes; ++k) { for(int r=0; r!=SiCombinatorialTrackFinderData_xk::kNRapidityRanges; ++r) data.summaryStatUsedInTrack()[i][k][r] = 0.; } }
 
 }
 
-- 
GitLab


From dfa101d56a93a10d17332a03f910c11e1daac41b Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Wed, 23 Dec 2020 14:35:37 +0000
Subject: [PATCH 212/308] RootStorageSvc: Fix memory leaks.

The IRootAuxDynReader objects were never deleted.
Change to hold them via unique_ptr.
---
 Database/APR/RootStorageSvc/src/RootTreeContainer.h          | 3 ++-
 Database/AthenaRoot/RootAuxDynIO/RootAuxDynIO/RootAuxDynIO.h | 4 ++--
 Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx    | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Database/APR/RootStorageSvc/src/RootTreeContainer.h b/Database/APR/RootStorageSvc/src/RootTreeContainer.h
index 106e01a0dab6..cc72b055ed76 100755
--- a/Database/APR/RootStorageSvc/src/RootTreeContainer.h
+++ b/Database/APR/RootStorageSvc/src/RootTreeContainer.h
@@ -18,6 +18,7 @@
 // Framework include files
 #include "StorageSvc/DbDatabase.h"
 #include "StorageSvc/DbContainerImp.h"
+#include "RootAuxDynIO/RootAuxDynIO.h"
 
 #include <map>
 #include <vector>
@@ -72,7 +73,7 @@ namespace pool  {
       // extra variables used by Aux dynamic
       size_t            rows_written = 0;
       // AuxDyn reader if used by this branch
-      IRootAuxDynReader*aux_reader = nullptr;
+      std::unique_ptr<IRootAuxDynReader> aux_reader;
       int               aux_iostore_IFoffset = -1;
       bool              is_basic_type = false;
       bool              written = false;
diff --git a/Database/AthenaRoot/RootAuxDynIO/RootAuxDynIO/RootAuxDynIO.h b/Database/AthenaRoot/RootAuxDynIO/RootAuxDynIO/RootAuxDynIO.h
index 5fee81018ec3..02c896cda5fd 100644
--- a/Database/AthenaRoot/RootAuxDynIO/RootAuxDynIO/RootAuxDynIO.h
+++ b/Database/AthenaRoot/RootAuxDynIO/RootAuxDynIO/RootAuxDynIO.h
@@ -29,9 +29,9 @@ namespace RootAuxDynIO {
    * @brief Crate RootAuxDynReader for a given TBranch
    * @param branch TBranch in which AuxStore objects are
 
-   Will return nullptr in case of problems
+   Will return null in case of problems
    */ 
-   IRootAuxDynReader*  getReaderForBranch(TBranch *branch);
+   std::unique_ptr<IRootAuxDynReader>  getReaderForBranch(TBranch *branch);
   
  /**
    * @brief Construct branch name for a given dynamic attribute
diff --git a/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx b/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx
index 224d7755bfed..bd6d4b85da94 100644
--- a/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx
+++ b/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx
@@ -174,7 +174,7 @@ namespace RootAuxDynIO
    }
 
    
-   IRootAuxDynReader*
+   std::unique_ptr<IRootAuxDynReader>
    getReaderForBranch(TBranch *branch)
    {
       if( isAuxDynBranch(branch) ) {
@@ -188,7 +188,7 @@ namespace RootAuxDynIO
          TClass *storeTC = tc->GetBaseClass("SG::IAuxStoreHolder");
          if( storeTC ) {  
             int store_holder_offset = tc->GetBaseClassOffset( storeTC );
-            return new RootAuxDynReader(branch, store_holder_offset);
+            return std::make_unique<RootAuxDynReader>(branch, store_holder_offset);
          }
       }
       return nullptr;
-- 
GitLab


From 451459ecd2daffb8ccf6cb9cdce6710deaa78c55 Mon Sep 17 00:00:00 2001
From: Peter van Gemmeren <gemmeren@anl.gov>
Date: Wed, 23 Dec 2020 09:16:45 -0600
Subject: [PATCH 213/308] Some improvements to SharedIO efficiency of dynamic
 aux store.

---
 .../src/AthenaSharedMemoryTool.cxx            |  2 +-
 .../src/AthenaSharedMemoryTool.h              |  2 +-
 .../AthenaIPCTools/src/AthenaYamplTool.cxx    |  2 +-
 Control/AthenaIPCTools/src/AthenaYamplTool.h  |  2 +-
 .../AthenaKernel/IAthenaIPCTool.h             |  2 +-
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx | 12 +++----
 .../AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx  | 32 ++++++++-----------
 7 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.cxx b/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.cxx
index 5c46484f21e9..224f48fc98c6 100644
--- a/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.cxx
+++ b/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.cxx
@@ -356,7 +356,7 @@ StatusCode AthenaSharedMemoryTool::getObject(void** target, size_t& nbytes, int
 }
 
 //___________________________________________________________________________
-StatusCode AthenaSharedMemoryTool::clearObject(char** tokenString, int& num) const {
+StatusCode AthenaSharedMemoryTool::clearObject(const char** tokenString, int& num) const {
    if (m_isClient) {
       ShareEventHeader* evtH = static_cast<ShareEventHeader*>(m_status->get_address());
       if (evtH->evtProcessStatus != ShareEventHeader::CLEARED) {
diff --git a/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.h b/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.h
index 182cda61b452..d629361ff115 100644
--- a/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.h
+++ b/Control/AthenaIPCTools/src/AthenaSharedMemoryTool.h
@@ -53,7 +53,7 @@ public:
 
    StatusCode putObject(const void* source, size_t nbytes, int num = 0) const;
    StatusCode getObject(void** target, size_t& nbytes, int num = 0) const;
-   StatusCode clearObject(char** tokenString, int& num) const;
+   StatusCode clearObject(const char** tokenString, int& num) const;
    StatusCode lockObject(const char* tokenString, int num = 0) const;
 
 private:
diff --git a/Control/AthenaIPCTools/src/AthenaYamplTool.cxx b/Control/AthenaIPCTools/src/AthenaYamplTool.cxx
index fea75d358e30..7ed8fc9a153b 100644
--- a/Control/AthenaIPCTools/src/AthenaYamplTool.cxx
+++ b/Control/AthenaIPCTools/src/AthenaYamplTool.cxx
@@ -235,7 +235,7 @@ StatusCode AthenaYamplTool::getObject(void**, size_t&, int) const {
 }
 
 //___________________________________________________________________________
-StatusCode AthenaYamplTool::clearObject(char**, int&) const {
+StatusCode AthenaYamplTool::clearObject(const char**, int&) const {
   return(StatusCode::FAILURE);
 }
 
diff --git a/Control/AthenaIPCTools/src/AthenaYamplTool.h b/Control/AthenaIPCTools/src/AthenaYamplTool.h
index 51e91ed2c88c..440b47f6a8c2 100644
--- a/Control/AthenaIPCTools/src/AthenaYamplTool.h
+++ b/Control/AthenaIPCTools/src/AthenaYamplTool.h
@@ -43,7 +43,7 @@ public:
 
    StatusCode putObject(const void* source, size_t nbytes, int num = 0) const;
    StatusCode getObject(void** target, size_t& nbytes, int num = 0) const;
-   StatusCode clearObject(char** tokenString, int& num) const;
+   StatusCode clearObject(const char** tokenString, int& num) const;
    StatusCode lockObject(const char* tokenString, int num = 0) const;
 
 private:
diff --git a/Control/AthenaKernel/AthenaKernel/IAthenaIPCTool.h b/Control/AthenaKernel/AthenaKernel/IAthenaIPCTool.h
index b734fa1bc625..12e3353e3983 100644
--- a/Control/AthenaKernel/AthenaKernel/IAthenaIPCTool.h
+++ b/Control/AthenaKernel/AthenaKernel/IAthenaIPCTool.h
@@ -24,7 +24,7 @@ public:
 
    virtual StatusCode putObject(const void* source, size_t nbytes, int num = 0) const = 0;
    virtual StatusCode getObject(void** target, size_t& nbytes, int num = 0) const = 0;
-   virtual StatusCode clearObject(char** tokenString, int& num) const = 0;
+   virtual StatusCode clearObject(const char** tokenString, int& num) const = 0;
    virtual StatusCode lockObject(const char* tokenString, int num = 0) const = 0;
 };
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index 51518beb0b8e..2134f4c0206d 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -424,7 +424,7 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& outputConnectionSpe
 		   && m_outputStreamingTool[m_streamServer]->isServer()) {
       auto& streamingTool = m_outputStreamingTool[m_streamServer];
       // Clear object to get Placements for all objects in a Stream
-      char* placementStr = nullptr;
+      const char* placementStr = nullptr;
       int num = -1;
       StatusCode sc = streamingTool->clearObject(&placementStr, num);
       if (sc.isSuccess() && placementStr != nullptr && strlen(placementStr) > 6 && num > 0) {
@@ -778,7 +778,7 @@ Token* AthenaPoolCnvSvc::registerForWrite(Placement* placement, const void* obj,
          return(nullptr);
       }
       // Get Token back from Server
-      char* tokenStr = nullptr;
+      const char* tokenStr = nullptr;
       int num = -1;
       sc = m_outputStreamingTool[streamClient]->clearObject(&tokenStr, num);
       while (sc.isRecoverable()) {
@@ -893,7 +893,7 @@ void AthenaPoolCnvSvc::setObjPtr(void*& obj, const Token* token) {
       }
    }
    if (!m_inputStreamingTool.empty() && m_inputStreamingTool->isClient()) {
-      ATH_MSG_VERBOSE("Requesting object for: " << token->toString());
+      ATH_MSG_VERBOSE("Requesting remote object for: " << token->toString());
       if (!m_inputStreamingTool->lockObject(token->toString().c_str()).isSuccess()) {
          ATH_MSG_ERROR("Failed to lock Data for " << token->toString());
          obj = nullptr;
@@ -979,7 +979,7 @@ StatusCode AthenaPoolCnvSvc::createAddress(long svcType,
          return(StatusCode::FAILURE);
       }
       token = new Token();
-      token->fromString(static_cast<char*>(buffer)); buffer = nullptr;
+      token->fromString(static_cast<const char*>(buffer)); buffer = nullptr;
       if (token->classID() == Guid::null()) {
          delete token; token = nullptr;
       }
@@ -1118,7 +1118,7 @@ StatusCode AthenaPoolCnvSvc::readData() {
    if (m_inputStreamingTool.empty()) {
       return(StatusCode::FAILURE);
    }
-   char* tokenStr = nullptr;
+   const char* tokenStr = nullptr;
    int num = -1;
    StatusCode sc = m_inputStreamingTool->clearObject(&tokenStr, num);
    if (sc.isSuccess() && tokenStr != nullptr && strlen(tokenStr) > 0 && num > 0) {
@@ -1200,7 +1200,7 @@ StatusCode AthenaPoolCnvSvc::abortSharedWrClients(int client_n)
       if (client_n >= 0) {
          sc = streamingTool->lockObject("ABORT", client_n);
       }
-      char* dummy;
+      const char* dummy;
       sc = streamingTool->clearObject(&dummy, client_n);
       while (sc.isRecoverable()) {
          sc = streamingTool->clearObject(&dummy, client_n);
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
index a45a0580a3a8..643354ddd27f 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
@@ -166,25 +166,25 @@ StatusCode AuxDiscoverySvc::receiveStore(const IAthenaSerializeSvc* serSvc, cons
       return(StatusCode::SUCCESS);
    }
    Guid classId;
-   classId.fromString(static_cast<char*>(buffer));
+   classId.fromString(static_cast<const char*>(buffer));
    if (!ipcTool->getObject(&buffer, nbytes, num).isSuccess() || nbytes == 0) {
       return(StatusCode::FAILURE);
    }
-   const std::string contName = std::string(static_cast<char*>(buffer));
+   const std::string contName = std::string(static_cast<const char*>(buffer));
    if (classId != Guid::null() && this->getAuxStore(obj, classId, contName)) {
-      void* attrName = nullptr;
-      void* typeName = nullptr;
-      void* elemName = nullptr;
+      void* nameData = nullptr;
       // StreamingTool owns buffer, will stay around until last dynamic attribute is copied
-      while (ipcTool->getObject(&attrName, nbytes, num).isSuccess() && nbytes > 0 &&
-	      ipcTool->getObject(&typeName, nbytes, num).isSuccess() && nbytes > 0 &&
-	      ipcTool->getObject(&elemName, nbytes, num).isSuccess() && nbytes > 0) {
+      while (ipcTool->getObject(&nameData, nbytes, num).isSuccess() && nbytes > 0) {
+         const char* del1 = static_cast<const char*>(memchr(nameData, '\n', nbytes));
+         const char* del2 = static_cast<const char*>(memchr(del1 + 1, '\n', nbytes - (del1 - static_cast<const char*>(nameData) - 1)));
+         const std::string dataStr(static_cast<const char*>(nameData));
+         const std::string& attrName = dataStr.substr(0, del1 - static_cast<const char*>(nameData));
+         const std::string& typeName = dataStr.substr(del1 - static_cast<const char*>(nameData) + 1, del2 - del1 - 1);
+         const std::string& elemName = dataStr.substr(del2 - static_cast<const char*>(nameData) + 1);
          if (ipcTool->getObject(&buffer, nbytes, num).isSuccess()) {
-            SG::auxid_t auxid = this->getAuxID(static_cast<char*>(attrName),
-	            static_cast<char*>(elemName),
-	            static_cast<char*>(typeName));
+            SG::auxid_t auxid = this->getAuxID(attrName, elemName, typeName);
             if (auxid != SG::null_auxid) {
-              const RootType type(std::string(static_cast<char*>(typeName)));
+              const RootType type(typeName);
               void* dynAttr = nullptr;
               if (type.IsFundamental()) {
                 dynAttr = new char[nbytes];
@@ -218,12 +218,8 @@ StatusCode AuxDiscoverySvc::sendStore(const IAthenaSerializeSvc* serSvc,
       }
    }
    for (SG::auxid_set_t::const_iterator iter = auxIDs.begin(), last = auxIDs.end(); iter != last; iter++) {
-      const std::string& attrName = this->getAttrName(*iter);
-      const std::string& typeName = this->getTypeName(*iter);
-      const std::string& elemName = this->getElemName(*iter);
-      if (!ipcTool->putObject(attrName.c_str(), attrName.size() + 1, num).isSuccess() ||
-	      !ipcTool->putObject(typeName.c_str(), typeName.size() + 1, num).isSuccess() ||
-	      !ipcTool->putObject(elemName.c_str(), elemName.size() + 1, num).isSuccess()) {
+      const std::string& dataStr = this->getAttrName(*iter) + "\n" + this->getTypeName(*iter) + "\n" + this->getElemName(*iter);
+      if (!ipcTool->putObject(dataStr.c_str(), dataStr.size() + 1, num).isSuccess()) {
          return(StatusCode::FAILURE);
       }
       const std::type_info* tip = this->getType(*iter);
-- 
GitLab


From 6dbf3960de95dd9c1de4e20d253907fb5db46e87 Mon Sep 17 00:00:00 2001
From: Ewelina Maria Lobodzinska <ewelina.maria.lobodzinska@cern.ch>
Date: Wed, 23 Dec 2020 15:49:35 +0000
Subject: [PATCH 214/308] H7 art tests

---
 Generators/Herwig7_i/CMakeLists.txt           |  17 +-
 .../Herwig7_i/python/Herwig72ConfigLHEF.py    | 293 ++++++++++++++++++
 Generators/Herwig7_i/python/Herwig7Config.py  |  83 +++--
 Generators/Herwig7_i/src/Herwig7.cxx          |  47 +++
 Generators/Starlight_i/CMakeLists.txt         |   5 +-
 .../share/common/Starlight_Common.py          |  13 +
 .../starlight.example.joboption.py            |   0
 7 files changed, 418 insertions(+), 40 deletions(-)
 create mode 100644 Generators/Herwig7_i/python/Herwig72ConfigLHEF.py
 create mode 100644 Generators/Starlight_i/share/common/Starlight_Common.py
 rename Generators/Starlight_i/share/{ => example}/starlight.example.joboption.py (100%)

diff --git a/Generators/Herwig7_i/CMakeLists.txt b/Generators/Herwig7_i/CMakeLists.txt
index 65d4fb39621a..3c9ed90737dd 100644
--- a/Generators/Herwig7_i/CMakeLists.txt
+++ b/Generators/Herwig7_i/CMakeLists.txt
@@ -8,13 +8,17 @@ find_package( Boost )
 find_package( Herwig3 COMPONENTS HerwigAPI )
 find_package( ThePEG )
 find_package( GSL )
-# find_package( OpenLoops )
-find_package( VBFNLO )
+find_package( OpenLoops )
+# find_package( VBFNLO )
 find_package( hepmc3 )
 
 # Remove the --as-needed linker flags:
 atlas_disable_as_needed()
 
+# Add extra flag for H7 versions >=7.2
+set( _extraDefs )
+list( APPEND _extraDefs -DHWVER_IS_72=1 )
+
 # Component(s) in the package:
 if (HEPMC3_USE)
 atlas_add_component( Herwig7_i
@@ -32,14 +36,15 @@ else()
 atlas_add_component( Herwig7_i
    Herwig7_i/*.h src/*.cxx src/components/*.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HERWIG3_INCLUDE_DIRS}
-   ${THEPEG_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${VBFNLO_INCLUDE_DIRS}
+   ${THEPEG_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${OPENLOOPS_INCLUDE_DIRS}
    DEFINITIONS -DHWVERSION=\"${HERWIG3_LCGVERSION}\"
    -DHWVER_IS_72=\"${HW3_VER_IS_72}\"
    LINK_LIBRARIES ${HERWIG3_LIBRARIES}  ${Boost_LIBRARIES} 
-   ${THEPEG_LIBRARIES} ${GSL_LIBRARIES} ${VBFNLO_LIBRARIES}
+   ${THEPEG_LIBRARIES} ${GSL_LIBRARIES} ${OPENLOOPS_LIBRARIES}
    GeneratorModulesLib EventInfo GaudiKernel PathResolver AtlasHepMCLib )
 endif()
-# ${OPENLOOPS_INCLUDE_DIRS} ${OPENLOOPS_LIBRARIES}
+
+# ${VBFNLO_INCLUDE_DIRS} ${VBFNLO_LIBRARIES}
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
@@ -50,3 +55,5 @@ atlas_install_runtime( share/file/*.pdt share/file/*.dat )
 set( Herwig7Environment_DIR ${CMAKE_CURRENT_SOURCE_DIR}
    CACHE PATH "Location of Herwig7Environment.cmake" )
 find_package( Herwig7Environment )
+
+
diff --git a/Generators/Herwig7_i/python/Herwig72ConfigLHEF.py b/Generators/Herwig7_i/python/Herwig72ConfigLHEF.py
new file mode 100644
index 000000000000..4ca4153d0447
--- /dev/null
+++ b/Generators/Herwig7_i/python/Herwig72ConfigLHEF.py
@@ -0,0 +1,293 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+## \file Herwig7ConfigLHEF.py
+## \brief Configuration class for showering LHE files from MG5_aMC@NLO or PowhegBox
+## \author Daniel Rauch (daniel.rauch@desy.de)
+
+import os
+
+import Herwig7Config as hw7Config
+import Herwig7Control as hw7Control
+import Herwig7Utils as hw7Utils
+
+
+## Configuration class for showering LHE files from MG5_aMC@NLO or PowhegBox
+##
+## Example JobOptions are available in [`examples/LHEF`](https://svnweb.cern.ch/trac/atlasoff/browser/Generators/Herwig7_i/trunk/examples/LHEF) and [`tests/athenaLHEF/jobOptions`](https://svnweb.cern.ch/trac/atlasoff/browser/Generators/Herwig7_i/trunk/tests/athenaLHEF/jobOptions).
+## 
+##
+## Process Setup and Generator Configuration
+## =========================================
+##
+## The LHE files have to follow a specific naming scheme which is detailed
+## [here](https://twiki.cern.ch/twiki/bin/view/AtlasProtected/PreparingLesHouchesEven).
+## The name of the LHE file is added as the command line parameter `--inputGeneratorFile`
+## to the `Generate_tf.py` command and can be accessed using the variable
+## `runArgs.inputGeneratorFile` in the JobOptions where they can be passed to the
+## functions [lhef_mg5amc_commands](\ref Herwig7ConfigLHEF::Hw7ConfigLHEF#lhef_mg5amc_commands)
+## or [lhef_powhegbox_commands](\ref Herwig7ConfigLHEF::Hw7ConfigLHEF#lhef_powhegbox_commands)
+## in order to communicate the LHE file names to %Herwig7, e.g.
+## 
+## \code{.py}
+## generator.lhef_mg5amc_commands(lhe_filename=runArgs.inputGeneratorFile, me_pdf_order="NLO")
+## \endcode
+## 
+## or
+## 
+## \code{.py}
+## generator.lhef_powhegbox_commands(lhe_filename=runArgs.inputGeneratorFile, me_pdf_order="NLO")
+## \endcode
+##
+##
+## Event Generation
+## ================
+##
+## To trigger the actual running of %Herwig7 in Athena please end the JobOptions with
+## 
+## \code{.py}
+## # run the generator
+## generator.run()
+## \endcode
+##
+## More specifically, the `run()` function triggers the creation of the %Herwig7 input
+## file and the preparation of the run (i.e. the `Herwig read` step).
+## This means, that no %Herwig7 settings should be modified after calling the
+## `run()` function because the changed settings would not be applied during the
+## event generation.
+##
+class Hw72ConfigLHEF(hw7Config.Hw7Config):
+
+
+  def __init__(self, genSeq, runArgs, run_name="Herwig", beams="pp"):
+
+    beams = beams.upper()
+    if beams not in ["EE", "EP" , "PP"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'beams' must be one of the following: ['EE', 'EP' , 'PP']"))
+
+    ## provide variables initialized by the parent class
+    super(Hw72ConfigLHEF, self).__init__(genSeq, runArgs, run_name)
+
+    self.beams = beams
+
+    self.set_lhef_mg5amc_commands = False
+    self.set_lhef_powhegbox_commands = False
+
+
+  def local_pre_commands(self):
+
+    return """
+## ============================================
+## Local Pre-Commands from Herwig7ConfigLHEF.py
+## ============================================
+
+# > no local pre-commands at the moment
+"""
+
+
+  def local_post_commands(self):
+
+    return """
+## =============================================
+## Local Post-Commands from Herwig7ConfigLHEF.py
+## =============================================
+
+saverun {} /Herwig/Generators/EventGenerator
+""".format(self.run_name)
+
+
+
+  ## High-level function for triggering the process setup and the event generation.
+  ##
+  ## \warning Please do not modify the generator configuration in the job options after calling the `run()` function as
+  ##          the modified settings would not be applied in the event generation
+  ##
+  def run(self):
+
+    ## add default settings if they were not overwritten in the JobOptions
+
+    self.default_commands += self.beam_commands()
+    self.default_commands += self.random_seed_commands()
+    
+    if not self.set_printout_commands:
+      self.default_commands += self.printout_commands()
+    if not self.set_physics_parameter_commands:
+      self.default_commands += self.physics_parameter_commands()
+    if not self.set_technical_parameter_commands:
+      self.default_commands += self.technical_parameter_commands()
+
+    ## check for configuration errors
+
+    if self.set_lhef_mg5amc_commands and self.set_lhef_powhegbox_commands:
+      raise RuntimeError(hw7Utils.ansi_format_error("Please do not use both 'lhef_mg5amc_commands()' and 'lhef_powhegbox_commands()' at the same time!"))
+    if not self.set_lhef_mg5amc_commands and not self.set_lhef_powhegbox_commands:
+      raise RuntimeError(hw7Utils.ansi_format_error("Please use either 'lhef_mg5amc_commands()' or 'lhef_powhegbox_commands()' in the JobOptions!"))
+
+    ## do read and run step in one go
+
+    hw7Control.run(self)
+
+
+  ## Sets up reading of events from an LHE file
+  ##
+  ## \param usespin Use the spin of tau leptons from the LHE file (spins of other particles are ignored anyways)
+  ## \param usepwghlhereader Uses a different LHE reader, which is able to propagte multiple event weights
+  def __lhef_commands(self, lhe_filename="events.lhe", me_pdf_order="NLO", usespin=True, usepwghlhereader=False):
+
+    if me_pdf_order not in ["LO", "NLO"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Herwig7ConfigLHEF.py:__lhef_commands: Parameter 'me_pdf_order' must either be 'LO' or 'NLO'!"))
+
+    if lhe_filename.endswith(".tar.gz"): # athena will decompress the LHE file for us
+      lhe_filename = lhe_filename.replace(".tar.gz", ".events")
+      if not os.path.isfile(lhe_filename):
+        raise RuntimeError(hw7Utils.ansi_format_error("Herwig7ConfigLHEF.py:__lhef_commands: Could not find decompressed LHE file '{}'!".format(lhe_filename)))
+
+    momentum_treatment = ""
+    beam_commands = ""
+    if self.beams == "EE":
+      momentum_treatment = "Accept"
+    elif self.beams == "EP":
+      momentum_treatment = "RescaleEnergy"
+      beam_commands = """
+## Set the PDF for the LHE reader
+# set /Herwig/EventHandlers/LHEReader:PDFA /Herwig/Partons/Hard{MEPDFOrder}PDF
+""".format(MEPDFOrder = me_pdf_order)
+    elif self.beams == "PP":
+      momentum_treatment = "RescaleEnergy"
+      beam_commands = """
+## Set the PDF for the LHE reader
+# set /Herwig/EventHandlers/LHEReader:PDFA /Herwig/Partons/Hard{MEPDFOrder}PDF
+# set /Herwig/EventHandlers/LHEReader:PDFB /Herwig/Partons/Hard{MEPDFOrder}PDF
+""".format(MEPDFOrder = me_pdf_order)
+
+    pwg_reader_lib = "library powhegHerwig.so" 
+
+
+    self.commands += """
+## ----------------------------
+## Read in Events from LHE File
+## ----------------------------
+
+## Create the Handler and Reader
+{PwgReaderLib}
+library LesHouches.so
+create ThePEG::{PwgReader}LesHouchesFileReader /Herwig/EventHandlers/LHEReader
+create ThePEG::LesHouchesEventHandler /Herwig/EventHandlers/LHEHandler
+
+## Set LHE filename
+set /Herwig/EventHandlers/LHEReader:FileName {FileName}
+
+## Setup LHE event handler and LHE reader
+set /Herwig/Generators/EventGenerator:EventHandler /Herwig/EventHandlers/LHEHandler
+insert /Herwig/EventHandlers/LHEHandler:LesHouchesReaders 0 /Herwig/EventHandlers/LHEReader
+set /Herwig/EventHandlers/LHEHandler:PartonExtractor /Herwig/Partons/{Beams}Extractor
+set /Herwig/EventHandlers/LHEHandler:CascadeHandler /Herwig/Shower/ShowerHandler
+set /Herwig/EventHandlers/LHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler
+set /Herwig/EventHandlers/LHEHandler:DecayHandler /Herwig/Decays/DecayHandler
+set /Herwig/EventHandlers/LHEHandler:WeightNormalization CrossSection
+set /Herwig/EventHandlers/LHEHandler:WeightOption VarNegWeight
+set /Herwig/EventHandlers/LHEReader:IncludeSpin {IncludeSpin}
+set /Herwig/EventHandlers/LHEReader:MomentumTreatment {MomentumTreatment}
+set /Herwig/EventHandlers/LHEReader:AllowedToReOpen No
+
+## Parton shower settings
+set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
+set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
+# treatment of wide angle radiation
+set /Herwig/Shower/PartnerFinder:PartnerMethod Random
+set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
+
+## Don't use any cuts on LHE files
+create ThePEG::Cuts /Herwig/Cuts/NoCuts
+set /Herwig/EventHandlers/LHEReader:Cuts /Herwig/Cuts/NoCuts
+
+{BeamCommands}
+""".format(FileName = lhe_filename,
+           PwgReaderLib = pwg_reader_lib if usepwghlhereader is True else "",
+           PwgReader = "powheg" if usepwghlhereader is True else "",
+           Beams = self.beams,
+           IncludeSpin = "Yes" if usespin is True else "No",
+           MomentumTreatment = momentum_treatment,
+           BeamCommands = beam_commands)
+
+
+  ## Commands specific to showering of events produced with MG5_aMC@NLO
+  ##
+  ## \param[in] lhe_filename name of the LHE file that is to be showered
+  ## \param[in] me_pdf_order order (either `LO` or `NLO`) of the matrix element PDF.
+  ##                         This has to be consistent with the PDF used in the
+  ##                         hard process generation and the PDF set with
+  ##                         generator.me_pdf_commands.
+  ##
+  ## The reason for these specific settings is that for MC@NLO-like matching schemes
+  ## the subtraction of the parton shower contribution in the hard process and the
+  ## parton shower settings have to be consistent in order to recover the
+  ## correct terms at the NLO.
+  ##
+  ## For showering of previously existing LHE files
+  ##
+  ##     generator.lhef_powhegbox_commands(lhe_filename=runArgs.inputGeneratorFile)
+  ##
+  ## will work.
+  ##
+  def lhef_mg5amc_commands(self, lhe_filename="events.lhe", me_pdf_order="NLO", usespin=True):
+
+    if me_pdf_order not in ["LO", "NLO"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Herwig7ConfigLHEF.py:lhef_mg5amc_commands: Parameter 'me_pdf_order' must either be 'LO' or 'NLO'!"))
+
+    self.set_lhef_mg5amc_commands = True
+
+    self.__lhef_commands(lhe_filename, me_pdf_order, usespin)
+
+    self.commands += """
+## Commands specific to showering of events produced with MG5_aMC@NLO
+set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General
+set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost
+set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
+# this option is not available anymore in Herwig 7.2:
+# set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default
+set /Herwig/Shower/ShowerHandler:SpinCorrelations No
+"""
+
+
+  ## Commands specific to showering of events produced with PowhegBox
+  ##
+  ## \param[in] lhe_filename name of the LHE file that is to be showered
+  ## \param[in] me_pdf_order order (either `LO` or `NLO`) of the matrix element PDF.
+  ##                         This has to be consistent with the PDF used in the
+  ##                         hard process generation and the PDF set with
+  ##                         generator.me_pdf_commands.
+  ## \param[in] usespin 
+  ## \param[in] usepwghlhereader 
+  ##
+  ## Specifying the LHE file name with
+  ##
+  ##     generator.lhef_powhegbox_commands(lhe_filename=runArgs.inputGeneratorFile)
+  ## 
+  ## should work both for showering existing LHE files as well as for on-the-fly (OTF)
+  ## running of PowhegBox and %Herwig7.
+  ##
+  ## Since for OTF running the LHE file generated by PowhegBox is usually
+  ## called `PowhegOTF._1.events` using
+  ##
+  ##     generator.lhef_powhegbox_commands(lhe_filename="PowhegOTF._1.events")
+  ## 
+  ## will normally also work in this case. If a different name for the LHE file
+  ## generated by PowhegBox is specified with the `--outputTXTFile` argument to
+  ## `Generate_tf.py` then `PowhegControl` will update the value of
+  ## `runArgs.inputGeneratorFile` accordingly and
+  ##
+  ##     generator.lhef_powhegbox_commands(lhe_filename=runArgs.inputGeneratorFile)
+  ##
+  ## should still work.
+  ##
+  ## If you want to use the pwglhereader, needed to propagte multiple event weights
+  ## you need to use a gridpack contains the powhegHerwig.so 
+  ## 
+  def lhef_powhegbox_commands(self, lhe_filename="events.lhe", me_pdf_order="NLO", usespin=True, usepwhglhereader=False):
+
+    if me_pdf_order not in ["LO", "NLO"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Herwig7ConfigLHEF.py:lhef_powhegbox_commands: Parameter 'me_pdf_order' must either be 'LO' or 'NLO'!"))
+
+    self.set_lhef_powhegbox_commands = True
+
+    self.__lhef_commands(lhe_filename, me_pdf_order, usespin, usepwhglhereader)
diff --git a/Generators/Herwig7_i/python/Herwig7Config.py b/Generators/Herwig7_i/python/Herwig7Config.py
index 31255e346973..5c283c879b28 100644
--- a/Generators/Herwig7_i/python/Herwig7Config.py
+++ b/Generators/Herwig7_i/python/Herwig7Config.py
@@ -25,11 +25,11 @@ class Hw7Config(object):
     self.set_printout_commands            = False
     self.set_physics_parameter_commands   = False
     self.set_technical_parameter_commands = False
+    self.use_PDGparams = False
 
     self.default_commands = hw7Utils.ConfigurationCommands()
     self.commands         = hw7Utils.ConfigurationCommands()
 
-
   ## \brief Commands applied to all configuration classes before commands from the JobOptions
   ## \todo  Remove `AngularOrdered` settungs once they are included in %Herwig7 by default
   def global_pre_commands(self):
@@ -38,19 +38,6 @@ class Hw7Config(object):
 ## Global Pre-Commands from Herwig7Config.py
 ## =========================================
 
-## fix for global default settings until released with Herwig7 itself
-set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes
-set /Herwig/Shower/GammatoQQbarSplitFn:AngularOrdered Yes
-
-## fix for GeV-mass photon radiation until released with Herwig7 itself
-set /Herwig/Shower/GammatoQQbarSudakov:Alpha /Herwig/Shower/AlphaQED
-
-## fix for initial-state (backward evolution) splitting (AGENE-1384)
-set /Herwig/Shower/QtoGammaQSudakov:Alpha /Herwig/Shower/AlphaQED
-
-## fix for QED lepton radiation scale (ATLMCPROD-5138)
-set /Herwig/Shower/LtoLGammaSudakov:pTmin 0.000001
-
 ## ensure JetFinder uses AntiKt with R=0.4
 set /Herwig/Cuts/JetFinder:Variant AntiKt
 set /Herwig/Cuts/JetFinder:ConeRadius 0.4
@@ -121,28 +108,63 @@ set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy {}
   def printout_commands(self):
 
     self.set_printout_commands = True
-
+    
     return("""
+
 ## Verbosity and printout settings
 set /Herwig/Generators/EventGenerator:DebugLevel 1
 set /Herwig/Generators/EventGenerator:PrintEvent 2
 set /Herwig/Generators/EventGenerator:UseStdout Yes
 set /Herwig/Generators/EventGenerator:NumberOfEvents 1000000000
-set /Herwig/Generators/EventGenerator:MaxErrors 1000000
+set /Herwig/Generators/EventGenerator:MaxErrors 500
 
 ## Make sampler print out cross sections for each subprocess
 set /Herwig/Samplers/Sampler:Verbose Yes
 """)
 
+    ## Before there were used the ATLAS MC15 default parameters for particle masses and widths and Weinberg angle
+    ##
+    ## As specified in https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/McProductionCommonParametersMC15
+    ## Now the PDG API is used to set the parameters via the python file Generators/EvgenProdTools/python/physics_parameters.py that generates the dictionary offline_dict.py with the parameters
 
-  ## ATLAS MC15 default parameters for particle masses and widths and Weinberg angle
-  ##
-  ## As specified in https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/McProductionCommonParametersMC15
   def physics_parameter_commands(self):
+    if self.use_PDGparams:
+       paramlist = []
+       self.physics_parameter_commands = True
+    
+       paramlist.append("## Masses and widths: PDG 2019 values")
+    
+    ## Load the dictionary and extract the values of the variables that were defined here before (top quark, W and Z boson)
+       from EvgenProdTools.offline_dict import parameters
+       for k,v in parameters.items():
+         if k == 'particles':
+           for key,value in v.items():
+             if int(key) == 24:
+               paramlist.append("set /Herwig/Particles/"+value['name']+"+:NominalMass "+value['mass'])
+               paramlist.append("set /Herwig/Particles/"+value['name']+"+:Width "+value['width'])
+               paramlist.append("set /Herwig/Particles/"+value['name']+"-:NominalMass "+value['mass'])
+               paramlist.append("set /Herwig/Particles/"+value['name']+"-:Width "+value['width'])
+             if int(key) == 23:
+               paramlist.append("set /Herwig/Particles/"+value['name']+"0:NominalMass "+value['mass'])
+               paramlist.append("set /Herwig/Particles/"+value['name']+"0:Width "+value['width'])
+             if int(key) == 6:
+               paramlist.append("set /Herwig/Particles/"+value['name']+"bar:NominalMass "+value['mass'])
+               paramlist.append("set /Herwig/Particles/"+value['name']+"bar:Width "+value['width'])         
+               paramlist.append("set /Herwig/Particles/"+value['name']+":NominalMass "+value['mass'])
+               paramlist.append("set /Herwig/Particles/"+value['name']+":Width "+value['width'])
+   
+    ## Take the value of sin2thetaW from the EW_parameters dictionary      
+         if k == 'EW_parameters':
+           for key,value in v.items():
+             if key[2] == "Sin2ThetaW":
+               paramlist.append("set /Herwig/Model:EW/"+str(key[2])+" "+str(value))
+       paramstring = '\n'.join(paramlist)
+       return(paramstring)
 
-    self.physics_parameter_commands = True
+    else:
+       self.physics_parameter_commands = True
 
-    return("""
+       return("""
 ## Masses and widths: PDG 2010 values (except TOP mass; kept at PDG2007)
 set /Herwig/Particles/t:NominalMass 172.5*GeV
 set /Herwig/Particles/tbar:NominalMass 172.5*GeV
@@ -157,7 +179,6 @@ set /Herwig/Particles/Z0:Width 2.4952*GeV
 set /Herwig/Model:EW/Sin2ThetaW 0.23113
 """)
 
-
   def technical_parameter_commands(self):
 
     self.set_technical_parameter_commands = True
@@ -168,10 +189,6 @@ set /Herwig/Particles/pomeron:PDF /Herwig/Partons/NoPDF
 
 ## Set long-lived particles stable
 set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm
-
-# Turn off intermediate photons inserted explicitly into the event record with an incorrect life length in the pi0 -> e+e-e+e- decay mode 
-# This is the default from H++ 2.6.1
-set /Herwig/Decays/PScalar4f:GenerateIntermediates 0
 """)
 
 
@@ -291,7 +308,7 @@ set /Herwig/Partons/RemnantPDF:MaxFlav {}
   ## \param[in] ps_tune_name name identifying the PS/hadronization tune
   ## \param[in] ue_tune_name name identifying the UE/MPI tune
   ## \return    Nothing, adds the corresponding commands directly to the generator configuration object
-  def tune_commands(self, ps_tune_name = "H7-PS-MMHT2014LO", ue_tune_name = "H7-UE-MMHT"):
+  def tune_commands(self, ps_tune_name = "H7-PS-MMHT2014LO", ue_tune_name = "H7.1-Default"):
 
     cmds = """
 ## -------------
@@ -299,7 +316,7 @@ set /Herwig/Partons/RemnantPDF:MaxFlav {}
 ## -------------
 """
     self.commands += cmds
-    self.ps_tune_commands(tune_name = ps_tune_name)
+    # self.ps_tune_commands(tune_name = ps_tune_name) # the name of the default PS tune may be obsolete
     self.ue_tune_commands(tune_name = ue_tune_name)
 
 
@@ -337,15 +354,15 @@ set /Herwig/Partons/RemnantPDF:MaxFlav {}
   ##
   ## \param[in] tune_name name identifying the UE/MPI tune
   ## \return    Nothing, adds the corresponding commands directly to the generator configuration object
-  def ue_tune_commands(self, tune_name = "H7-UE-MMHT"):
+  def ue_tune_commands(self, tune_name = "H7.1-Default"):
 
     cmds = """
 ## Underlying event tune settings
 """
 
-    if tune_name == "H7-UE-MMHT":
+    if tune_name == "H7.1-Default":
       cmds += """
-# > The underlying event tune "H7-UE-MMHT" is already
+# > The underlying event tune "H7.1-Default" is already
 # > configured in Herwig7 via the default settings.
 """
     # elif tune_name == "some-other-name":
@@ -399,7 +416,7 @@ set /Herwig/Particles/pomeron:PDF /Herwig/Partons/PomeronPDF
 
 # Technical parameters for this run
 set /Herwig/Generators/EventGenerator:EventHandler:Sampler:Ntry 100000
-set /Herwig/Generators/EventGenerator:MaxErrors 100000
+set /Herwig/Generators/EventGenerator:MaxErrors 500
 
 # MPI doesn't work
 # TODO: Is this a problem?
@@ -433,5 +450,3 @@ set /Herwig/Particles/pbar-:PDF /Herwig/Partons/BudnevPDF
 set /Herwig/Generators/EventGenerator:EventHandler:CascadeHandler:MPIHandler NULL
 
 """
-
-
diff --git a/Generators/Herwig7_i/src/Herwig7.cxx b/Generators/Herwig7_i/src/Herwig7.cxx
index 26cf40463331..1204b9744e9a 100644
--- a/Generators/Herwig7_i/src/Herwig7.cxx
+++ b/Generators/Herwig7_i/src/Herwig7.cxx
@@ -33,6 +33,53 @@
 #include "boost/thread/thread.hpp"
 #include "boost/filesystem.hpp"
 #include "boost/algorithm/string.hpp"
+#include "boost/foreach.hpp"
+#define foreach BOOST_FOREACH
+
+
+// Setup HepMC traits definition for ThePEG's converter to work
+#include "ThePEG/Vectors/HepMCConverter.h"
+#ifdef HWVER_IS_72
+namespace ThePEG {
+  template<>
+  struct HepMCTraits<HepMC::GenEvent>
+    : public HepMCTraitsBase<HepMC::GenEvent,
+                             HepMC::GenParticle,
+                             HepMC::GenParticle *,
+                             HepMC::GenVertex,
+                             HepMC::GenVertex *,
+                             HepMC::Polarization,
+                             HepMC::PdfInfo>
+  {
+    static bool hasUnits() {
+      #ifdef HEPMC_HAS_UNITS
+      return true;
+      #else
+      return false;
+      #endif
+    }
+  };
+}
+#else
+namespace ThePEG {
+  template<>
+  struct HepMCTraits<HepMC::GenEvent>
+    : public HepMCTraitsBase<HepMC::GenEvent,
+                            HepMC::GenParticle,
+                             HepMC::GenVertex,
+                             HepMC::Polarization,
+                             HepMC::PdfInfo>
+  {
+    static bool hasUnits() {
+      #ifdef HEPMC_HAS_UNITS
+      return true;
+      #else
+      return false;
+      #endif
+    }
+  };
+}
+#endif
 
 void   convert_to_HepMC(const ThePEG::Event & m_event, HepMC::GenEvent & evt, bool nocopies,ThePEG::Energy eunit, ThePEG::Length lunit);
 
diff --git a/Generators/Starlight_i/CMakeLists.txt b/Generators/Starlight_i/CMakeLists.txt
index 8dfb8fbf4e65..018b4756c1ab 100644
--- a/Generators/Starlight_i/CMakeLists.txt
+++ b/Generators/Starlight_i/CMakeLists.txt
@@ -27,4 +27,7 @@ atlas_add_component( Starlight_i
    LINK_LIBRARIES Starlight_iLib )
 
 # Install files from the package:
-atlas_install_joboptions( share/*.py )
+atlas_install_joboptions( share/common/*.py 
+                          share/example/*.py )
+
+
diff --git a/Generators/Starlight_i/share/common/Starlight_Common.py b/Generators/Starlight_i/share/common/Starlight_Common.py
new file mode 100644
index 000000000000..e6e724e814df
--- /dev/null
+++ b/Generators/Starlight_i/share/common/Starlight_Common.py
@@ -0,0 +1,13 @@
+from Starlight_i.Starlight_iConf import Starlight_i
+genSeq += Starlight_i("Starlight")
+genSeq.Starlight.McEventKey = "GEN_EVENT"
+
+evgenConfig.generators += ["Starlight"]
+
+## Extra stream persistency
+## 2101 == EventInfo, 133273 == MCTruth (HepMC)
+from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
+_evgenstream = AthenaPoolOutputStream("StreamEVGEN")
+_evgenstream.ItemList = ["2101#*","133273#GEN_EVENT"]
+del _evgenstream
+
diff --git a/Generators/Starlight_i/share/starlight.example.joboption.py b/Generators/Starlight_i/share/example/starlight.example.joboption.py
similarity index 100%
rename from Generators/Starlight_i/share/starlight.example.joboption.py
rename to Generators/Starlight_i/share/example/starlight.example.joboption.py
-- 
GitLab


From 4b6d2fba3f623007648c184fcf75d71e4eb75b7c Mon Sep 17 00:00:00 2001
From: Ewelina Maria Lobodzinska <ewelina.maria.lobodzinska@cern.ch>
Date: Wed, 23 Dec 2020 15:50:32 +0000
Subject: [PATCH 215/308] update gen_tf.py and skel.GENtoEVGEN.py to include
 the most recent modifications introduced for rel. 21.6

---
 Generators/EvgenJobTransforms/CMakeLists.txt  |   2 +-
 .../EvgenJobTransforms/scripts/Gen_tf.py      |  34 +++++-
 .../share/skel.GENtoEVGEN.py                  | 104 +++++++++++++++---
 .../EvgenJobTransforms/share/skel.GENtoTXT.py |  69 ++++++++----
 4 files changed, 162 insertions(+), 47 deletions(-)

diff --git a/Generators/EvgenJobTransforms/CMakeLists.txt b/Generators/EvgenJobTransforms/CMakeLists.txt
index 8736b66f00e7..4b9ece443068 100644
--- a/Generators/EvgenJobTransforms/CMakeLists.txt
+++ b/Generators/EvgenJobTransforms/CMakeLists.txt
@@ -6,4 +6,4 @@ atlas_subdir( EvgenJobTransforms )
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
-atlas_install_runtime( scripts/*.py )
+atlas_install_runtime( scripts/*.py share/file/*.txt )
diff --git a/Generators/EvgenJobTransforms/scripts/Gen_tf.py b/Generators/EvgenJobTransforms/scripts/Gen_tf.py
index ee7ba47953fc..91bd3d84c4f4 100755
--- a/Generators/EvgenJobTransforms/scripts/Gen_tf.py
+++ b/Generators/EvgenJobTransforms/scripts/Gen_tf.py
@@ -118,19 +118,39 @@ class EvgenExecutor(athenaExecutor):
         # copy config files to cwd
         FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0]
         configFiles = [f for f in os.listdir(FIRST_DIR) if ( "GRID" in f)]
+        confFile=None
         if len(configFiles) == 1:
             confFile =  os.path.join(FIRST_DIR, configFiles[0])
             expand_if_archive(confFile)
             msg.info('Configuration input found: %s' % confFile)
         elif len(configFiles) >1:
-            msg.error("Too many *GRID* config files, please check = '%s'" % dsidparam) 
+            msg.info("more then one gridpack ! ")
+            if "--ecmEnergy" in str(sys.argv[1:]):
+               ener=str(sys.argv[1:]).split("ecmEnergy",1)[1]
+               energy=str(ener)[:4].strip(" =0\']")
+               printfunc("Should be used gridpack for energy "+energy)
+            else:
+               energy="13"
+            for x in configFiles:
+                gridS="mc_"+energy+"TeV"
+                printfunc("Gridpack should start from "+gridS) 
+                if x.startswith(gridS):
+                   confFile = os.path.join(FIRST_DIR, x)
+                   msg.info("using gridpack = "+confFile)
+            if confFile is None:
+               msg.error("No *GRID* config files, for requested energy = '%s'  please check = '%s'" %(energy,dsidparam))
+            
+        if confFile is not None:
+           expand_if_archive(confFile)
+#       os.system("cp %s ." % confFile)
+           printfunc("Configuration input gridpack found " + confFile)
 
         #Expand if a tarball is found in local directory
         loc_files = os.listdir(os.getcwd())
-        for loc_file in loc_files: 
-            expand_if_archive(loc_file)
-            
-            
+        for loc_file in loc_files:
+            if "GRID" not in loc_file:  
+               expand_if_archive(loc_file)
+
         ## Expand tarball input event and generator conf files, if provided
         if "inputGeneratorFile" in self._trf.argdict:
 #           expand_if_archive(self._trf.argdict["inputGeneratorFile"].value)
@@ -159,6 +179,10 @@ def getTransform():
     if "--outputEVNTFile" in str(sys.argv[1:]):
        exeSet.add(EvgenExecutor(name="generate", skeleton="EvgenJobTransforms/skel.GENtoEVGEN.py", inData=["inNULL"], outData=["EVNT", "EVNT_Pre", "TXT" ]))
        msg.info("Output EVNT file")
+    elif "--outputYODAFile" in str(sys.argv[1:]):
+       exeSet.add(EvgenExecutor(name="generate", skeleton="EvgenJobTransforms/skel.GENtoEVGEN.py", inData=["inNULL"], outData=["outNULL", "TXT" 
+]))
+       msg.info("Output EVNT file")
     elif "--outputTXTFile" in str(sys.argv[1:]):
        exeSet.add(EvgenExecutor(name="generate", skeleton="EvgenJobTransforms/skel.GENtoTXT.py", inData=["inNULL"], outData=["TXT"]))
        msg.info("Output TXT file")
diff --git a/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py b/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py
index 6b5c098e2003..beae3cff2449 100644
--- a/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py
+++ b/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py
@@ -79,11 +79,21 @@ if hasattr(runArgs, "runNumber"):
 
 if hasattr(runArgs, "inputGenConfFile"):
    raise RuntimeError("inputGenConfFile is invalid !! Gridpacks and config. files/links to be put into DSID directory ")
+
+if hasattr(runArgs, "inputGeneratorFile"):
+   evgenLog.info("inputGeneratorFile used " + runArgs.inputGeneratorFile)
+ 
+if hasattr(runArgs, "outputYODAFile"):
+    evgenLog.info("outputYODAFile specified " + runArgs.outputYODAFile)
  
 ## Ensure that an output name has been given
 # TODO: Allow generation without writing an output file (if outputEVNTFile is None)?
 if not hasattr(runArgs, "outputEVNTFile") and not hasattr(runArgs, "outputEVNT_PreFile"):
-    raise RuntimeError("No output evgen EVNT or EVNT_Pre file provided.")
+    if hasattr(runArgs, "outputYODAFile"):
+        evgenLog.info("No outputEVNTFile specified but outputYODAFile is used")
+        evgenLog.info("Will run GENtoEVGEN without saving the output EVNT file, asuming a valid outputYODAFile will be produced")
+    else:
+        raise RuntimeError("No output evgen EVNT or EVNT_Pre file provided.")
 
 ## Ensure that mandatory args have been supplied (complain before processing the includes)
 if not hasattr(runArgs, "ecmEnergy"):
@@ -166,6 +176,8 @@ if hasattr(runArgs, "rivetAnas"):
     anaSeq += Rivet_i()
     anaSeq.Rivet_i.Analyses = runArgs.rivetAnas
     anaSeq.Rivet_i.DoRootHistos = True
+    if hasattr(runArgs, "outputYODAFile"):
+      anaSeq.Rivet_i.HistoFile = runArgs.outputYODAFile
 
 ##==============================================================
 ## Pre- and main config parsing
@@ -249,6 +261,9 @@ include(jofile)
 ## Announce start of JO checking
 evgenLog.debug("****************** CHECKING EVGEN CONFIGURATION *****************")
 
+if hasattr(runArgs,'inputGeneratorFile') and int(evgenConfig.inputFilesPerJob) == 0 : 
+   evgenConfig.inputFilesPerJob = 1 
+
 ## Print out options
 for opt in str(evgenConfig).split(os.linesep):
     evgenLog.info(opt)
@@ -311,15 +326,29 @@ rounding = 0
 if hasattr(runArgs,'inputGeneratorFile') and ',' in runArgs.inputGeneratorFile:   multiInput = runArgs.inputGeneratorFile.count(',')+1
 else:
    multiInput = 0
-   
-if evgenConfig.nEventsPerJob < 1:
-    raise RunTimeError("evgenConfig.nEventsPerJob must be at least 1")
+
+# check if default nEventsPerJob used 
+if not evgenConfig.nEventsPerJob:
+    evgenLog.info('#############################################################')
+    evgenLog.info(' !!!! no nEventsPerJob set !!!  The default 10000 used. !!! ') 
+    evgenLog.info('#############################################################')
+else:
+    evgenLog.info(' nEventsPerJob set to ' + str(evgenConfig.nEventsPerJob)  )
+
+if evgenConfig.minevents > 0 :
+    raise RuntimeError("evgenConfig.minevents is obsolete and should be removed from the JOs")
+elif evgenConfig.nEventsPerJob > 100000:
+    raise RuntimeError("evgenConfig.nEventsPerJob can be max. 100000")
 else:
     allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000]
     msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob
 
-    if evgenConfig.nEventsPerJob >= 1000 and evgenConfig.nEventsPerJob % 1000 != 0 and 10000 % evgenConfig.nEventsPerJob != 0 :
-           msg += "nEventsPerJob in range >= 1K must be a multiple of 1K and a divisor of 10K"
+    if evgenConfig.nEventsPerJob >= 1000 and evgenConfig.nEventsPerJob <=10000 and (evgenConfig.nEventsPerJob % 1000 != 0 or 10000 % 
+evgenConfig.nEventsPerJob != 0) :
+           msg += "nEventsPerJob in range [1K, 10K] must be a multiple of 1K and a divisor of 10K"
+           raise RuntimeError(msg)
+    elif evgenConfig.nEventsPerJob > 10000  and evgenConfig.nEventsPerJob % 10000 != 0:
+           msg += "nEventsPerJob >10K must be a multiple of 10K"
            raise RuntimeError(msg)
     elif evgenConfig.nEventsPerJob < 1000 and evgenConfig.nEventsPerJob not in allowed_nEventsPerJob_lt1000:
            msg += "nEventsPerJob in range <= 1000 must be one of %s" % allowed_nEventsPerJob_lt1000
@@ -331,9 +360,9 @@ else:
 if evgenConfig.keywords:
     ## Get the allowed keywords file from the JO package if possibe
     # TODO: Make the package name configurable
-    kwfile = "EvgenJobTransforms/evgenkeywords.txt"
+    kwfile = "evgenkeywords.txt"
     kwpath = None
-    for p in os.environ["JOBOPTSEARCHPATH"].split(":"):
+    for p in os.environ["DATAPATH"].split(":"):
         kwpath = os.path.join(p, kwfile)
         if os.path.exists(kwpath):
             break
@@ -356,15 +385,15 @@ if evgenConfig.keywords:
             if officialJO:
                 sys.exit(1)
     else:
-        evgenLog.warning("Could not find evgenkeywords.txt file %s in $JOBOPTSEARCHPATH" % kwfile)
+        evgenLog.warning("Could not find evgenkeywords.txt file %s in DATAPATH" % kwfile )
 
 ## Check that the L1 and L2 keywords pairs are in the list of allowed words pairs (and exit if processing an official JO)
 if evgenConfig.categories:
     ## Get the allowed categories file from the JO package if possibe
     # TODO: Make the package name configurable
-    lkwfile = "EvgenJobTransforms/CategoryList.txt"
+    lkwfile = "CategoryList.txt"
     lkwpath = None
-    for p in os.environ["JOBOPTSEARCHPATH"].split(":"):
+    for p in os.environ["DATAPATH"].split(":"):
         lkwpath = os.path.join(p, lkwfile)
         if os.path.exists(lkwpath):
             break
@@ -397,7 +426,7 @@ if evgenConfig.categories:
                if officialJO:
                    sys.exit(1)
     else:
-        evgenLog.warning("Could not find CategoryList.txt file %s in $JOBOPTSEARCHPATH" % lkwfile)
+        evgenLog.warning("Could not find CategoryList.txt file %s in $DATAPATH" % lkwfile)
 
 ## Configure POOL streaming to the output EVNT format file
 from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
@@ -465,6 +494,38 @@ if hasattr(testSeq, "TestHepMC") and not gens_testhepmc(evgenConfig.generators):
     evgenLog.info("Removing TestHepMC sanity checker")
     del testSeq.TestHepMC
 
+##=============================================================
+## Check release number
+##=============================================================
+# Function to check blacklist (from Spyros'es logParser.py)
+def checkBlackList(relFlavour,cache,generatorName) :
+    isError = None
+    with open('/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/BlackList_caches.txt') as bfile:
+        for line in bfile.readlines():
+            if not line.strip():
+                continue
+            # Blacklisted release flavours
+            badRelFlav=line.split(',')[0].strip()
+            # Blacklisted caches
+            badCache=line.split(',')[1].strip()
+            # Blacklisted generators
+            badGens=line.split(',')[2].strip()
+            
+            used_gens = ','.join(generatorName)
+            #Match Generator and release type e.g. AtlasProduction, MCProd
+            if relFlavour==badRelFlav and cache==badCache and re.search(badGens,used_gens) is not None:
+                if badGens=="": badGens="all generators"
+                isError=relFlavour+","+cache+" is blacklisted for " + badGens
+                return isError
+    return isError
+## Announce start of JO checkingrelease number checking
+evgenLog.debug("****************** CHECKING RELEASE IS NOT BLACKLISTED *****************")
+rel = os.popen("echo $AtlasVersion").read()
+rel = rel.strip()
+errorBL = checkBlackList("AthGeneration",rel,gennames)
+if (errorBL): 
+   raise RuntimeError("This run is blacklisted for this generator, please use a different one !! "+ errorBL)  
+#    evgenLog.warning("This run is blacklisted for this generator, please use a different one !! "+ errorBL )
 
 ##==============================================================
 ## Handling of a post-include/exec args at the end of standard configuration
@@ -659,12 +720,6 @@ else:
         raise RuntimeError("evgenConfig.inputfilecheck specified in %s, but generators %s do not require an input file" %
                            (runArgs.jobConfig, str(gennames)))
 
-## Check conf files, as above but for a different command line arg, and with omission allowed
-if hasattr(runArgs, "inputGenConfFile") and runArgs.inputGenConfFile != "NONE":
-    if evgenConfig.inputconfcheck and not re.search(evgenConfig.inputconfcheck, runArgs.inputGenConfFile):
-        raise RuntimeError("inputGenConfFile=%s is incompatible with inputconfcheck (%s) in %s" %
-                           (runArgs.inputGenConfFile, evgenConfig.inputconfcheck, runArgs.jobConfig))
-
 ## Do the aux-file copying
 if evgenConfig.auxfiles:
     from PyJobTransformsCore.trfutil import get_files
@@ -683,6 +738,19 @@ def _checkattr(attr, required=False):
         return False
     return True
 
+if hasattr(runArgs, "outputTXTFile"):
+    # counting the number of events in LHE output
+    with open(eventsFile) as f:
+        contents = f.read()
+        count_ev = contents.count("<event>")
+    printfunc("MetaData: %s = %s" % ("Number of produced LHE events ", count_ev))
+elif hasattr(runArgs, "inputGeneratorFile"):
+    # counting the number of events in LHE output
+    with open(eventsFile) as f:
+        contents = f.read()
+        count_ev = contents.count("<event>")
+    printfunc("MetaData: %s = %s" % ("Number of input LHE events ", count_ev))
+
 if _checkattr("description", required=True):
     msg = evgenConfig.description
     if _checkattr("notes"):
diff --git a/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py b/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py
index db20bad83f68..f213345143a1 100644
--- a/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py
+++ b/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py
@@ -33,7 +33,7 @@ testSeq = acam.athMasterSeq.EvgenTestSeq
 ## NOTE: LogicalExpressionFilter is an algorithm, not a sequence
 from EvgenProdTools.LogicalExpressionFilter import LogicalExpressionFilter
 acam.athMasterSeq += LogicalExpressionFilter("EvgenFilterSeq")
-filtSeq = acam.athMsterSeq.EvgenFilterSeq
+filtSeq = acam.athMasterSeq.EvgenFilterSeq
 topSeq = acas.AlgSequence()
 anaSeq = topSeq
 topSeq += acas.AlgSequence("EvgenPostSeq")
@@ -61,7 +61,7 @@ jobproperties.AthenaCommonFlags.AllowIgnoreConfigError = False
 
 ## Set up a standard logger
 from AthenaCommon.Logging import logging
-evgenLog = logging.getLogger('Gen_tf_txt')
+evgenLog = logging.getLogger('Gen_tf')
 
 ##==============================================================
 ## Run arg handling
@@ -155,7 +155,7 @@ def OutputTXTFile():
 ## Only permit one jobConfig argument for evgen: does more than one _ever_ make sense?
 
 if len(runArgs.jobConfig) != 1:
-    evgenLog.info("runArgs.jobConfig %s ", % runArgs.jobConfig)
+    evgenLog.info("runArgs.jobConfig " +  runArgs.jobConfig)
     evgenLog.error("You must supply one and only one jobConfig file argument. It has to start from mc. and end with .py")
     sys.exit(1)
 
@@ -169,7 +169,7 @@ evgenLog.info("dsid " + dsid)
 jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))]
 ## Only permit one JO file in each dsid folder
 if len(jofiles) !=1:
-    evgenLog.info("runArgs.jobConfig wrong %s ", % runArgs.jobConfig)
+    evgenLog.info("runArgs.jobConfig wrong " + runArgs.jobConfig)
     evgenLog.error("You must supply one and only one jobOption file in DSID directory. It has to start with mc. and end with .py")
     sys.exit(1)
 jofile = jofiles[0]
@@ -277,21 +277,14 @@ rounding = 0
 if hasattr(runArgs,'inputGeneratorFile') and ',' in runArgs.inputGeneratorFile:   multiInput = runArgs.inputGeneratorFile.count(',')+1
 else:
    multiInput = 0
+
+
    
 if evgenConfig.nEventsPerJob < 1:
-    raise RunTimeError("evgenConfig.nEventsPerJob must be at least 0")
-else:
-    allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000]
-    msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob
-
-    if evgenConfig.nEventsPerJob >= 1000 and evgenConfig.nEventsPerJob % 1000 != 0 and 10000 % evgenConfig.nEventsPerJob != 0:
-           msg += "nEventsPerJob in range >= 1000 must be a multiple of 1000 and a divisor of 10000"
-           raise RuntimeError(msg)
-    elif evgenConfig.nEventsPerJob < 1000 and evgenConfig.nEventsPerJob not in allowed_nEventsPerJob_lt1000:
-           msg += "nEventsPerJob in range <= 1000 must be one of %s" % allowed_nEventsPerJob_lt1000
-           raise RuntimeError(msg)
-    postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1  else runArgs.maxEvents
-    evgenLog.info('Requested output events '+str(postSeq.CountHepMC.RequestedOutput))
+    raise RunTimeError("evgenConfig.nEventsPerJob must be at least 1")
+else: 
+    evgenLog.info("evgenConfig.nEventsPerJob = {}, but only {} (dummy) event(s) will be generated by Pythia8 for lhe-only production".format(evgenConfig.nEventsPerJob, postSeq.CountHepMC.RequestedOutput))
+### NB: postSeq.CountHepMC.RequestedOutput is set to 1 in LHEonly.py
 
 ## Check that the keywords list is not empty:
 if not evgenConfig.keywords:
@@ -373,6 +366,9 @@ if evgenConfig.categories:
         evgenLog.warning("Could not find CategoryList.txt file %s in $JOBOPTSEARCHPATH" % lkwfile)
 
 ## Set the run numbers
+dsid = os.path.basename(runArgs.jobConfig[0])
+if not dsid.isdigit():
+    dsid = "999999"
 svcMgr.EventSelector.RunNumber = int(dsid)
 
 ## Include information about generators in metadata
@@ -398,6 +394,39 @@ include("EvgenJobTransforms/Generate_ecmenergies.py")
 ## Process random seed arg and pass to generators
 include("EvgenJobTransforms/Generate_randomseeds.py")
 
+##=============================================================
+## Check release number
+##=============================================================
+# Function to check blacklist (from Spyros'es logParser.py)
+def checkBlackList(relFlavour,cache,generatorName) :
+    isError = None
+    with open('/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/BlackList_caches.txt') as bfile:
+        for line in bfile.readlines():
+            if not line.strip():
+                continue
+            # Blacklisted release flavours
+            badRelFlav=line.split(',')[0].strip()
+            # Blacklisted caches
+            badCache=line.split(',')[1].strip()
+            # Blacklisted generators
+            badGens=line.split(',')[2].strip()
+
+            used_gens = ','.join(generatorName)
+            #Match Generator and release type e.g. AtlasProduction, MCProd
+            if relFlavour==badRelFlav and cache==badCache and re.search(badGens,used_gens) is not None:
+                if badGens=="": badGens="all generators"
+                isError=relFlavour+","+cache+" is blacklisted for " + badGens
+                return isError  
+    return isError
+## Announce start of JO checkingrelease nimber checking
+evgenLog.debug("****************** CHECKING RELEASE IS NOT BLACKLISTED *****************")
+rel = os.popen("echo $AtlasVersion").read()
+rel = rel.strip()
+errorBL = checkBlackList("AthGeneration",rel,gennames)
+if (errorBL):
+#   evgenLog.warning("This run is blacklisted for this generator, please use a different one !! "+ errorBL )
+   raise RuntimeError("This run is blacklisted for this generator, please use a different one !! "+ errorBL)
+
 ## Add special config option (extended model info for BSM scenarios)
 svcMgr.TagInfoMgr.ExtraTagValuePairs += ["specialConfiguration", evgenConfig.specialConfig ]
 
@@ -595,12 +624,6 @@ else:
         raise RuntimeError("evgenConfig.inputfilecheck specified in %s, but generators %s do not require an input file" %
                            (runArgs.jobConfig, str(gennames)))
 
-## Check conf files, as above but for a different command line arg, and with omission allowed
-if hasattr(runArgs, "inputGenConfFile") and runArgs.inputGenConfFile != "NONE":
-    if evgenConfig.inputconfcheck and not re.search(evgenConfig.inputconfcheck, runArgs.inputGenConfFile):
-        raise RuntimeError("inputGenConfFile=%s is incompatible with inputconfcheck (%s) in %s" %
-                           (runArgs.inputGenConfFile, evgenConfig.inputconfcheck, runArgs.jobConfig))
-
 ## Do the aux-file copying
 if evgenConfig.auxfiles:
     from PyJobTransformsCore.trfutil import get_files
-- 
GitLab


From 7604017c69e5b193d48c58d3c6976e23d79aaa25 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Wed, 23 Dec 2020 16:34:08 +0000
Subject: [PATCH 216/308] Hepmc3 nightly fixes 22122020 part 1

---
 .../src/PixelPrepDataToxAOD.cxx                | 16 +++++++++++++---
 .../src/InDetRecStatisticsAlg.cxx              | 10 +++++++---
 .../InDetRecStatistics/src/TrackStatHelper.cxx |  6 +++---
 .../src/TruthLeptonParentAssociationTool.cxx   | 17 +++++++++++------
 .../src/TruthLeptonParentAssociationTool.h     |  2 +-
 .../src/TruthTauDecayAssociationTool.cxx       | 18 ++++++++----------
 .../src/TruthTauDecayAssociationTool.h         |  2 +-
 7 files changed, 44 insertions(+), 27 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
index 93cc1a051d16..f25ae994aea0 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
@@ -1040,14 +1040,24 @@ void  PixelPrepDataToxAOD::addNNTruthInfo(  xAOD::TrackMeasurementValidation* xp
       
       auto particle = siHit.particleLink();
       pdgid[hitNumber]   = particle->pdg_id();
-      truep[hitNumber]  = particle->momentum().rho();
-      if ( particle->production_vertex() ){
-        auto vertex =  particle->production_vertex();
+      HepMC::FourVector mom=particle->momentum();
+      truep[hitNumber]  = std::sqrt(mom.x()*mom.x()+mom.y()*mom.y()+mom.z()*mom.z());
+      auto vertex =  particle->production_vertex();
+//AV Please note that taking the first particle as a mother is ambiguous.
+#ifdef HEPMC3
+      if ( vertex && vertex->particles_in().size()>0){
+        auto mother_of_particle=vertex->particles_in().at(0);             
+        motherBarcode[hitNumber] =  HepMC::barcode(mother_of_particle);
+        motherPdgid[hitNumber]    = mother_of_particle->pdg_id();
+      }
+#else
+      if ( vertex ){
         if( vertex->particles_in_const_begin() !=  vertex->particles_in_const_end() ){
           motherBarcode[hitNumber] =  (*vertex->particles_in_const_begin())->barcode();
           motherPdgid[hitNumber]    =  (*vertex->particles_in_const_begin())->pdg_id();
         }
       }
+#endif
     }
     chargeDep[hitNumber] = siHit.energyLoss() ;
     
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
index 4b3feda32334..10bd093d7e5b 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
@@ -298,7 +298,7 @@ StatusCode InDet::InDetRecStatisticsAlg::execute(const EventContext &ctx)  const
     // apply pt, eta etc cuts to generated tracks
     // devide generated tracks into primary, truncated, secondary
 
-    std::vector <std::pair<HepMC::GenParticle *,int> > GenSignal;
+    std::vector <std::pair<HepMC::GenParticlePtr,int> > GenSignal;
     //     GenSignalPrimary, GenSignalTruncated, GenSignalSecondary;   
     unsigned int inTimeStart = 0;
     unsigned int inTimeEnd   = 0;
@@ -583,7 +583,7 @@ void InDet::InDetRecStatisticsAlg::selectRecSignal(const TrackCollection* RecCol
 // select charged, stable particles in allowed pt and eta range
 void InDet :: InDetRecStatisticsAlg ::
 selectGenSignal  (const McEventCollection* SimTracks, 
-		  std::vector <std::pair<HepMC::GenParticle *,int> > & GenSignal,
+		  std::vector <std::pair<HepMC::GenParticlePtr,int> > & GenSignal,
 		  unsigned int /*inTimeStart*/, unsigned int /*inTimeEnd*/,
                   InDet::InDetRecStatisticsAlg::CounterLocal &counter) const //'unused' compiler warning
 {
@@ -604,7 +604,11 @@ selectGenSignal  (const McEventCollection* SimTracks,
   for(unsigned int ievt=0; ievt<nb_mc_event; ++ievt)
     {
       const HepMC::GenEvent* genEvent = SimTracks->at(ievt);
-      counter.m_counter[kN_gen_tracks_processed] += ((SimTracks->at(ievt)))->particles_size();
+#ifdef HEPMC3
+      counter.m_counter[kN_gen_tracks_processed] += genEvent->particles().size();
+#else
+      counter.m_counter[kN_gen_tracks_processed] += genEvent->particles_size();
+#endif
       if (put && inTimeMBbegin != inTimeMBend) // if not, inTimeStart and End are untouched
 	{
 	  //if (genEvent == *inTimeMBbegin) inTimeStart = ievt;
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
index 1f9d5946e202..4d283224b34a 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
@@ -407,7 +407,7 @@ void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTr
   Eta = 0;
   Region = ETA_ALL;
   int classification=-999;
-  for (std::vector <std::pair<HepMC::GenParticle *,int> >::const_iterator truth = gen.begin(); truth != gen.end();  ++truth) {
+  for (auto truth = gen.begin(); truth != gen.end();  ++truth) {
     classification=-999; 
     bool inTimePileup = truth->second == 0
       || (truth->second >= (int)*inTimeStart && truth->second <= (int)*inTimeEnd);
@@ -494,7 +494,7 @@ void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTr
   Region = ETA_ALL;
   classification=-999;
   
-  for (std::vector <std::pair<HepMC::GenParticle *,int> >::const_iterator truth = gen.begin(); truth != gen.end();  ++truth) 
+  for (auto truth = gen.begin(); truth != gen.end();  ++truth) 
     {
       if (truth->second != 0) // only signal event GenParticles
 	continue;
@@ -868,7 +868,7 @@ bool InDet::TrackStatHelper::PassTrackCuts(const Trk::TrackParameters *para) con
 
 }
 
-int InDet::TrackStatHelper::ClassifyParticle( const HepMC::GenParticle *particle, const double prob) const {
+int InDet::TrackStatHelper::ClassifyParticle( HepMC::ConstGenParticlePtr particle, const double prob) const {
 
   int partClass=-999;
 
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.cxx
index 9e452a53e796..dd1514279573 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.cxx
@@ -84,9 +84,9 @@ TruthLeptonParentAssociationTool::reset (const TruthParticle& p)
   return StatusCode::SUCCESS;
 }
 
-void TruthLeptonParentAssociationTool::addLeptonParent(const HepMC::GenParticle* part) {
+void TruthLeptonParentAssociationTool::addLeptonParent(HepMC::ConstGenParticlePtr part) {
 
-  HepMC::GenVertex* begvx = part->production_vertex();
+  auto begvx = part->production_vertex();
   if(!begvx){ // no parents
     return;
   }
@@ -95,22 +95,27 @@ void TruthLeptonParentAssociationTool::addLeptonParent(const HepMC::GenParticle*
   if (begvx==part->end_vertex()) return;
 
   // More complex loop catch
-  if ( find(m_barcode_trace.begin(),m_barcode_trace.end(),begvx->barcode()) != m_barcode_trace.end()){
+  if ( find(m_barcode_trace.begin(),m_barcode_trace.end(),HepMC::barcode(begvx)) != m_barcode_trace.end()){
     ATH_MSG_DEBUG( "Found a loop (a la Sherpa sample).  Backing out." );
     return;
   }
-  m_barcode_trace.push_back(begvx->barcode());
+  m_barcode_trace.push_back(HepMC::barcode(begvx));
 
   // Loop over the parents of this particle.
+#ifdef HEPMC3
+  auto itrPar = begvx->particles_in().begin();
+  auto endPar = begvx->particles_in().end();
+#else  
   HepMC::GenVertex::particle_iterator itrPar = begvx->particles_begin(HepMC::parents);
   HepMC::GenVertex::particle_iterator endPar = begvx->particles_end(HepMC::parents);
+#endif
   int n_iter=0;
   for(;itrPar!=endPar; ++itrPar){
     if ( !(*itrPar) ) continue;  // parent didn't exist
     n_iter++;
     if (n_iter>2) break; // No point in trying - this vertex does not have a quantum meaning...
 
-    int pdg = abs((*itrPar)->pdg_id());
+    int pdg = std::abs((*itrPar)->pdg_id());
 
     if ( (31<pdg && pdg<38) || // BSM Higgs / W' / Z' / etc
          pdg==39 ||
@@ -125,7 +130,7 @@ void TruthLeptonParentAssociationTool::addLeptonParent(const HepMC::GenParticle*
          (pdg == 15 && !m_primary_is_tau) || // Tau
          HepPID::isHadron (pdg) // from a hadron!
         ){
-      m_parent_barcodes.push_back( (*itrPar)->barcode() ); 
+      m_parent_barcodes.push_back( HepMC::barcode(*itrPar) ); 
     } else { // Will get to here if we are coming from the same lepton again
       addLeptonParent( *itrPar );
     } // End of catch on PDG ID
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.h
index 70ffc405c617..53bb0bf6dbb5 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonParentAssociationTool.h
@@ -59,7 +59,7 @@ public:
 private:
 
   /// Function for association to a specific lepton 
-  void addLeptonParent(const HepMC::GenParticle*);
+  void addLeptonParent(HepMC::ConstGenParticlePtr);
 
   /// TruthParticle iterator
   std::vector<const TruthParticle*> m_parents;
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.cxx
index 953fd2cf260d..ad77365a6b8b 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.cxx
@@ -78,25 +78,23 @@ TruthTauDecayAssociationTool::reset (const TruthParticle& p)
   return StatusCode::SUCCESS;
 }
 
-void TruthTauDecayAssociationTool::addStableDaughters(const HepMC::GenParticle* part) {
+void TruthTauDecayAssociationTool::addStableDaughters(HepMC::ConstGenParticlePtr part) {
   // Sanity check
   if (!part) return;
 
-  HepMC::GenVertex* endvx = part->end_vertex();
+  auto endvx = part->end_vertex();
   if(!endvx){ // no children
-    if ( part && part->status()==1 ) m_tau_prod_barcodes.push_back( part->barcode() );
+    if ( part && part->status()==1 ) m_tau_prod_barcodes.push_back( HepMC::barcode(part) );
     return;
   }
 
   // Loop over the parents of this particle.
-  HepMC::GenVertex::particle_iterator itrChild = endvx->particles_begin(HepMC::children);
-  HepMC::GenVertex::particle_iterator endChild = endvx->particles_end(HepMC::children);
-  for(;itrChild!=endChild; ++itrChild){
-    if ( (*itrChild) && (*itrChild)->status()==1 ){
+  for(auto Child: *endvx){
+    if ( (Child) && (Child)->status()==1 ){
       // Found a stable child!
-      m_tau_prod_barcodes.push_back( (*itrChild)->barcode() );
-    } else if ( (*itrChild) ){
-      addStableDaughters( (*itrChild) );
+      m_tau_prod_barcodes.push_back( HepMC::barcode(Child) );
+    } else if ( (Child) ){
+      addStableDaughters( (Child) );
     }
   } // End loop over children
 
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.h
index bfb6b361fe69..a56845e22d96 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthTauDecayAssociationTool.h
@@ -59,7 +59,7 @@ public:
 private:
 
   /// Function for association to a specific tau 
-  void addStableDaughters(const HepMC::GenParticle*);
+  void addStableDaughters(HepMC::ConstGenParticlePtr);
 
   /// TruthParticle iterator
   std::vector<const TruthParticle*> m_tau_prods;
-- 
GitLab


From 2ce6bff4f5b1031dba50c1be02f1e5f733dd2f70 Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <averbyts@cern.ch>
Date: Wed, 23 Dec 2020 22:24:11 +0100
Subject: [PATCH 217/308] More migration

---
 .../D2PDMaker/src/D2PDParticleCombiner.cxx    | 31 ++++++++-----
 .../src/GenVertexFillerTool.cxx               |  2 +-
 .../TruthD3PDMaker/src/JetFullTruthTag.cxx    | 29 ++++++------
 .../src/SpclMcValidationTool.cxx              |  2 +-
 .../iPatInterfaces/ITruthParameters.h         |  4 +-
 .../iPatTruthTrajectory/TruthParameters.h     | 12 ++---
 .../src/TruthParameters.cxx                   | 46 +++++++++----------
 7 files changed, 66 insertions(+), 60 deletions(-)

diff --git a/PhysicsAnalysis/D2PDMaker/src/D2PDParticleCombiner.cxx b/PhysicsAnalysis/D2PDMaker/src/D2PDParticleCombiner.cxx
index b4cab570b04e..a4425d30e16d 100644
--- a/PhysicsAnalysis/D2PDMaker/src/D2PDParticleCombiner.cxx
+++ b/PhysicsAnalysis/D2PDMaker/src/D2PDParticleCombiner.cxx
@@ -1385,13 +1385,13 @@ bool D2PDParticleCombiner::mcTruthSelections( const CompositeParticle* compPart
     {
       // Get the GenParticle from the TruthParticle
       const TruthParticle* part = (*partItr);
-      const HepMC::GenParticle* genPart = part->genParticle();
+      auto genPart = part->genParticle();
       const int pdgID = genPart->pdg_id();
       
       // Now, get the origin of this generated particle
       McEventCollection::const_iterator mcEventItr = m_mcEventColl->begin();
-      const int primaryBarcode = genPart->barcode()%1000000;
-      const HepMC::GenParticle* primaryPart = (*mcEventItr)->barcode_to_particle(primaryBarcode);
+      const int primaryBarcode = HepMC::barcode(genPart)%1000000;
+      auto primaryPart = HepMC::barcode_to_particle((*mcEventItr),primaryBarcode);
 
       // Check that we really have the primaryPart
       if ( !primaryPart )
@@ -1401,7 +1401,7 @@ bool D2PDParticleCombiner::mcTruthSelections( const CompositeParticle* compPart
         }
 
       // Now get the production vertex
-      const HepMC::GenVertex*  prodVert = primaryPart->production_vertex();
+      auto  prodVert = primaryPart->production_vertex();
       if ( !prodVert )
         {
           ATH_MSG_WARNING ( "Could not get the ProductionVertex... skipping!" );
@@ -1409,7 +1409,11 @@ bool D2PDParticleCombiner::mcTruthSelections( const CompositeParticle* compPart
         }
 
       // Check that we have only one mother
+#ifdef HEPMC3
+      if ( prodVert->particles_in().size() > 1 )
+#else
       if ( prodVert->particles_in_size() > 1 )
+#endif
         {
           ATH_MSG_WARNING ( "The ProductionVertex has more than one incomming particles... skipping!" );
           return true;
@@ -1418,21 +1422,24 @@ bool D2PDParticleCombiner::mcTruthSelections( const CompositeParticle* compPart
 
       // Loop over the mother particles
       // Make sure that we ignore bremsstrahlung and decays into itself
-      const HepMC::GenVertex* originVert = prodVert ;
-      //const HepMC::GenVertex* tmpVert(0);
+      auto originVert = prodVert;
       int originPdgID = pdgID;
       int originBarcode(0);
       int counter(0);
       do
         {
           ++counter;
+#ifdef HEPMC3
+          for ( auto mother: originVert->particles_in()) {
+#else
           HepMC::GenVertex::particles_in_const_iterator motherItr    = originVert->particles_in_const_begin();
           HepMC::GenVertex::particles_in_const_iterator motherItrEnd = originVert->particles_in_const_end();
-          for ( ; motherItr != motherItrEnd; ++motherItr )
-            {	     
-              originPdgID   = (*motherItr)->pdg_id();
-              originVert    = (*motherItr)->production_vertex();
-              originBarcode = (*motherItr)->barcode();
+          for ( ; motherItr != motherItrEnd; ++motherItr ) {
+              auto mother=*motherItr;
+#endif
+              originPdgID   = mother->pdg_id();
+              originVert    = mother->production_vertex();
+              originBarcode = HepMC::barcode(mother);
             }
 
           // Protect against infinite loop
@@ -1441,7 +1448,7 @@ bool D2PDParticleCombiner::mcTruthSelections( const CompositeParticle* compPart
               ATH_MSG_WARNING ( "Stuck in an infinite while loop... breaking out!" );
               break;
             }
-        } while ( abs(originPdgID) == abs(pdgID) && originVert != 0 );
+        } while ( std::abs(originPdgID) == std::abs(pdgID) && originVert );
 
       // Attach the PDG_ID and barcode of the origin particle to the vectors
       pdgIDList.push_back( originPdgID );
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenVertexFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenVertexFillerTool.cxx
index 453e1dc25587..852510d41474 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenVertexFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/GenVertexFillerTool.cxx
@@ -67,7 +67,7 @@ StatusCode GenVertexFillerTool::fill (const HepMC::GenVertex& p)
   *m_x = pos.x();
   *m_y = pos.y();
   *m_z = pos.z();
-  *m_barcode = p.barcode();
+  *m_barcode = HepMC::barcode(p);
   if (m_do_id) *m_id = p.id();
 
   return StatusCode::SUCCESS;
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/JetFullTruthTag.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/JetFullTruthTag.cxx
index 71d853c66ec4..3d01e45b521d 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/JetFullTruthTag.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/JetFullTruthTag.cxx
@@ -63,36 +63,35 @@ StatusCode JetFullTruthTag::fill (const Jet& p)
     // We have an McEventCollection
     for (McEventCollection::const_iterator currentGenEventIter = mcCollection->begin();
          currentGenEventIter!=mcCollection->end(); ++currentGenEventIter) {
-      for (HepMC::GenEvent::particle_const_iterator currentGenParticleIter= (*currentGenEventIter)->particles_begin(); 
-           currentGenParticleIter!= (*currentGenEventIter)->particles_end(); ++currentGenParticleIter) {
+      for (auto currentGenParticle: *(*currentGenEventIter)) {
 
         // Grab the PDGID, used both for partons and hadrons
-        pdgid = (*currentGenParticleIter)->pdg_id();
+        pdgid = currentGenParticle->pdg_id();
 
         // Parton labeling section...
-        if((*currentGenParticleIter)->momentum().e()>=Emax && (*currentGenParticleIter)->momentum().perp()>m_min_parton_pt){
-          if( abs(pdgid)<=21 && // Should be a parton
-              abs(pdgid)!=6 && // Should not be a top
-              (abs(pdgid)==15 || abs(pdgid)<=10 || abs(pdgid)>16) && // Not a lepton
-              abs(pdgid)!=0){ // not an unrecognized thingy
+        if(currentGenParticle->momentum().e()>=Emax && currentGenParticle->momentum().perp()>m_min_parton_pt){
+          if( std::abs(pdgid)<=21 && // Should be a parton
+              std::abs(pdgid)!=6 && // Should not be a top
+              (std::abs(pdgid)==15 || std::abs(pdgid)<=10 || std::abs(pdgid)>16) && // Not a lepton
+              std::abs(pdgid)!=0){ // not an unrecognized thingy
  
-            dR2 = std::pow( std::acos( std::cos( p.phi() - (*currentGenParticleIter)->momentum().phi() ) ) , 2 );
-            dR2 += std::pow( p.eta()-(*currentGenParticleIter)->momentum().eta() , 2 );
+            dR2 = std::pow( std::acos( std::cos( p.phi() - currentGenParticle->momentum().phi() ) ) , 2 );
+            dR2 += std::pow( p.eta()-currentGenParticle->momentum().eta() , 2 );
         
             if(dR2<=m_partonMatch_dr*m_partonMatch_dr){ // We have a winner
-              Emax=(*currentGenParticleIter)->momentum().e();
-              *m_partonFlavor = (*currentGenParticleIter)->pdg_id();
+              Emax=currentGenParticle->momentum().e();
+              *m_partonFlavor = currentGenParticle->pdg_id();
               *m_partonDR = static_cast<float> (dR2);
             } // Outside of dR
           } // Wrong PDG ID
         } // Low energy
 
         // Hadron labeling section
-        if ((HepPID::isHadron (pdgid) || abs(pdgid)==15) && ((*currentGenParticleIter)->momentum().perp()>m_min_hadron_pt)){
+        if ((HepPID::isHadron (pdgid) || std::abs(pdgid)==15) && (currentGenParticle->momentum().perp()>m_min_hadron_pt)){
 
           // Check on DR match
-          dR2 = std::pow( std::acos( std::cos( p.phi() - (*currentGenParticleIter)->momentum().phi() ) ) , 2 );
-          dR2 += std::pow( p.eta()-(*currentGenParticleIter)->momentum().eta() , 2 );
+          dR2 = std::pow( std::acos( std::cos( p.phi() - currentGenParticle->momentum().phi() ) ) , 2 );
+          dR2 += std::pow( p.eta()-currentGenParticle->momentum().eta() , 2 );
 
           if( dR2<=m_hadronMatch_dr*m_hadronMatch_dr ){
             // Strict ordering bottom up - 0 -> tau -> c -> b
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/SpclMcValidationTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/SpclMcValidationTool.cxx
index 2bf794a86ecf..f75434c6f5d2 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/SpclMcValidationTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/SpclMcValidationTool.cxx
@@ -160,7 +160,7 @@ SpclMcValidationTool::executeTool( const McEventCollection* mcEvents,
     const TruthParticle * mc = *itrPart;
     auto hepMc = mc->genParticle();
 
-    if ( hepMc->momentum() != mc->hlv() ) {
+    if ( hepMc->momentum() != HepMC::FourVector(mc->hlv().x(),mc->hlv().y(),mc->hlv().z(),mc->hlv().t()) ) {
       ATH_MSG_ERROR("TruthParticle and GenParticle-link don't have same 4-mom !!");
       return StatusCode::FAILURE;
     }
diff --git a/Reconstruction/iPat/iPatInterfaces/iPatInterfaces/ITruthParameters.h b/Reconstruction/iPat/iPatInterfaces/iPatInterfaces/ITruthParameters.h
index 234ef43245ca..6581ddaab178 100755
--- a/Reconstruction/iPat/iPatInterfaces/iPatInterfaces/ITruthParameters.h
+++ b/Reconstruction/iPat/iPatInterfaces/iPatInterfaces/ITruthParameters.h
@@ -44,7 +44,7 @@ public:
      
     /**ITruthParameters interface:
        obtain PerigeeParameters corresponding to a simulated particle from a HepMC GenParticle */
-    virtual const PerigeeParameters*	perigeeParameters(const HepMC::GenParticle&	particle,
+    virtual const PerigeeParameters*	perigeeParameters(HepMC::ConstGenParticlePtr	particle,
 							  const Amg::Vector3D&		vertex) = 0;
        
     /**ITruthParameters interface: 
@@ -53,7 +53,7 @@ public:
            
     /**ITruthParameters interface: 
        obtain TrackParameters corresponding to a simulated particle from a HepMC GenParticle */
-    virtual const TrackParameters*	trackParameters(const HepMC::GenParticle& particle) = 0;
+    virtual const TrackParameters*	trackParameters(HepMC::ConstGenParticlePtr particle) = 0;
 };
 
 #endif // IPATINTERFACES_ITRUTHPARAMETERS_H
diff --git a/Reconstruction/iPat/iPatTruthTrajectory/iPatTruthTrajectory/TruthParameters.h b/Reconstruction/iPat/iPatTruthTrajectory/iPatTruthTrajectory/TruthParameters.h
index 963db93f57de..2fd6367c4cea 100755
--- a/Reconstruction/iPat/iPatTruthTrajectory/iPatTruthTrajectory/TruthParameters.h
+++ b/Reconstruction/iPat/iPatTruthTrajectory/iPatTruthTrajectory/TruthParameters.h
@@ -10,7 +10,7 @@
 #ifndef IPATTRUTHTRAJECTORY_TRUTHPARAMETERS_H
 #define IPATTRUTHTRAJECTORY_TRUTHPARAMETERS_H
 
-//<<<<<< INCLUDES                                                       >>>>>>
+//INCLUDES
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "AtlasHepMC/GenParticle.h"
@@ -20,7 +20,7 @@
 #include "iPatInterfaces/ITruthParameters.h"
 #include "iPatTrackParameters/PerigeeParameters.h"
 
-//<<<<<< CLASS DECLARATIONS                                             >>>>>>
+//CLASS DECLARATIONS
 
 class ITruthSelector;
 namespace Trk  { class IIntersector; }
@@ -39,14 +39,14 @@ public:
     StatusCode			finalize();
 
     const PerigeeParameters*	perigeeParameters(int barcode, const Amg::Vector3D& vertex);
-    const PerigeeParameters*	perigeeParameters(const HepMC::GenParticle& particle,
+    const PerigeeParameters*	perigeeParameters(HepMC::ConstGenParticlePtr particle,
 						  const Amg::Vector3D& vertex);
     const TrackParameters*	trackParameters(int barcode);
-    const TrackParameters*	trackParameters(const HepMC::GenParticle& particle);
+    const TrackParameters*	trackParameters(HepMC::ConstGenParticlePtr particle);
   
 private:
-    const HepMC::GenParticle*	findParticle(int barcode);
-    void			trackFromParticle(const HepMC::GenParticle& particle);
+    HepMC::ConstGenParticlePtr	findParticle(int barcode);
+    void			trackFromParticle(HepMC::ConstGenParticlePtr particle);
 
 
     // configuration: tools etc
diff --git a/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx b/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx
index 46396ea1d7fd..f7f25e06724c 100755
--- a/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx
+++ b/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx
@@ -7,7 +7,7 @@
  particle, either from its barcode or from a HepMC GenParticle.
 ***************************************************************************/
 
-//<<<<<< INCLUDES                                                       >>>>>>
+//INCLUDES
 
 #include <cmath>
 #include "GaudiKernel/IPartPropSvc.h"
@@ -17,7 +17,7 @@
 #include "GenInterfaces/ITruthSelector.h"
 #include "iPatTruthTrajectory/TruthParameters.h"
 
-//<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
+//CLASS STRUCTURE INITIALIZATION
 
 TruthParameters::TruthParameters (const std::string&	type,
 				  const std::string&	name, 
@@ -39,11 +39,11 @@ TruthParameters::~TruthParameters (void)
 
 //<<<<<< PRIVATE MEMBER FUNCTION DEFINITIONS>>>>>>
 
-const HepMC::GenParticle*
+HepMC::ConstGenParticlePtr
 TruthParameters::findParticle (int barCode)
 {
     // protect against real data, fakes ...
-    const HepMC::GenParticle* particle = 0;
+    HepMC::ConstGenParticlePtr particle{nullptr};
     if (barCode == 0) return particle;
   
     // retrieve McEventCollection (from truthSelector to give G3/4 simulation independence)
@@ -56,26 +56,26 @@ TruthParameters::findParticle (int barCode)
 }
 
 void
-TruthParameters::trackFromParticle(const HepMC::GenParticle& particle)
+TruthParameters::trackFromParticle(HepMC::ConstGenParticlePtr particle)
 {
     // protect against missing production_vertex
-    if (! particle.production_vertex()) return;
+    if (! particle->production_vertex()) return;
 
     // ensure known particle
     m_intersection		=  0;
-    int	pdgCode			=  particle.pdg_id();
+    int	pdgCode			=  particle->pdg_id();
     if (! m_particleDataTable->particle(std::abs(pdgCode))) return;
 
     // fill intersection, qOverP
-    Amg::Vector3D position( particle.production_vertex()->position().x(),
-			    particle.production_vertex()->position().y(),
-			    particle.production_vertex()->position().z());
-    m_qOverP			=  1./std::sqrt(particle.momentum().px()*particle.momentum().px() +
-						particle.momentum().py()*particle.momentum().py() +
-						particle.momentum().pz()*particle.momentum().pz());
-    Amg::Vector3D direction( m_qOverP*particle.momentum().px(),
-			     m_qOverP*particle.momentum().py(),
-			     m_qOverP*particle.momentum().pz());
+    Amg::Vector3D position( particle->production_vertex()->position().x(),
+			    particle->production_vertex()->position().y(),
+			    particle->production_vertex()->position().z());
+    m_qOverP			=  1./std::sqrt(particle->momentum().px()*particle->momentum().px() +
+						particle->momentum().py()*particle->momentum().py() +
+						particle->momentum().pz()*particle->momentum().pz());
+    Amg::Vector3D direction( m_qOverP*particle->momentum().px(),
+			     m_qOverP*particle->momentum().py(),
+			     m_qOverP*particle->momentum().pz());
     m_intersection		=  new Trk::TrackSurfaceIntersection(position,direction,0.);
 	
     // fill trackParameters
@@ -94,7 +94,7 @@ TruthParameters::trackFromParticle(const HepMC::GenParticle& particle)
     m_trackParameters.fill(position,cosPhi,sinPhi,sinThetaInv*cosTheta,sinThetaInv*m_qOverP);
 }
 
-//<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS                             >>>>>>
+// PUBLIC MEMBER FUNCTION DEFINITIONS
 
 StatusCode
 TruthParameters::initialize()
@@ -143,9 +143,9 @@ TruthParameters::finalize()
 const PerigeeParameters*
 TruthParameters::perigeeParameters (int barCode, const Amg::Vector3D& vertex)
 {
-    const HepMC::GenParticle* particle = findParticle(barCode);
+    auto particle = findParticle(barCode);
     if (! particle)		return 0;
-    trackFromParticle(*particle);
+    trackFromParticle(particle);
     if (! m_intersection)	return 0;
 
     Trk::PerigeeSurface surface(vertex);
@@ -181,7 +181,7 @@ TruthParameters::perigeeParameters (int barCode, const Amg::Vector3D& vertex)
 }
 
 const PerigeeParameters*
-TruthParameters::perigeeParameters (const HepMC::GenParticle& particle, const Amg::Vector3D& vertex)
+TruthParameters::perigeeParameters (HepMC::ConstGenParticlePtr particle, const Amg::Vector3D& vertex)
 {
     trackFromParticle(particle);
     if (! m_intersection)	return 0;
@@ -220,16 +220,16 @@ TruthParameters::perigeeParameters (const HepMC::GenParticle& particle, const Am
 const TrackParameters*
 TruthParameters::trackParameters (int barCode)
 {
-    const HepMC::GenParticle* particle = findParticle(barCode);
+    auto particle = findParticle(barCode);
     if (! particle)		return 0;
-    trackFromParticle(*particle);
+    trackFromParticle(particle);
     if (! m_intersection)	return 0;
     delete m_intersection;
     return &m_trackParameters;
 }
 
 const TrackParameters*
-TruthParameters::trackParameters (const HepMC::GenParticle& particle)
+TruthParameters::trackParameters (HepMC::ConstGenParticlePtr particle)
 {
     trackFromParticle(particle);
     if (! m_intersection)	return 0;
-- 
GitLab


From 110107036ca6810eb4e677b1a966fab1c19cadc2 Mon Sep 17 00:00:00 2001
From: sherwood <peter.sherwood@cern.ch>
Date: Thu, 24 Dec 2020 11:40:32 +0100
Subject: [PATCH 218/308] 
 TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py 	Pass in
 FastReductionAlgToolFactory rather than instantiating 	it to ensure tool
 serial numbers increase on tool instantiation.

python/FastReductionAlgToolFactory.py
	remove noise from tool names

TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
	instantiate FastReductionAlgToolFactory in __init__ rather than
	ConditionsToolSetterFastReduction and various ioother places
	 to ensure tool serial numbers do not keep satrting from 0.

TrigHLTJetHypo/python/chainDict2jetLabel.py
	fix error setting forward/backward jet et cut

	add method _make_fbdjshared_label() to run vbenf like chain -
	but where the fb and dijet jet Conditions may share jets.

TrigHLTJetHypo/python/testChainDictMaker.py
	adjust to the bove changes
	add test chains for multi-tree chains, namely
	    HLT_j0_fbdjshared_L1J20,
	    HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20

TriggerTest/share/ref_data_v1Dev_build.ref
	update reference for changes to vbenf (fb et value correction,
	and the two chains mentioned immediately above.

TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
	add the to new chains to the menu, to exercise the C++ changes
	introduced in MR !39379, and this MR.

TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
	add a new jet hypo scenario to the possible scenario list.
---
 .../ConditionsToolSetterFastReduction.py      |  7 ++----
 .../python/FastReductionAlgToolFactory.py     |  2 +-
 .../python/TrigJetHypoToolConfig.py           |  5 ++--
 .../python/chainDict2jetLabel.py              | 23 ++++++++++++++++++-
 .../python/testChainDictMaker.py              | 13 +++++++----
 .../share/ref_data_v1Dev_build.ref            | 18 ++++++++++++---
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |  4 ++++
 .../HLTMenuConfig/Menu/SignatureDicts.py      |  5 +++-
 8 files changed, 59 insertions(+), 18 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
index 7fa8f35d5a57..a31384270818 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
@@ -5,9 +5,6 @@ from a hypo tree."""
 
 from __future__ import print_function
 
-from TrigHLTJetHypo.FastReductionAlgToolFactory import (
-    FastReductionAlgToolFactory,)
-
 from collections import defaultdict
 
 from AthenaCommon.Logging import logging
@@ -27,9 +24,9 @@ class ConditionsToolSetterFastReduction(object):
     """Visitor to set instantiated AlgTools to a jet hypo tree"""
 
 
-    def __init__(self):
+    def __init__(self, algToolFactory):
 
-        self.algToolFactory = FastReductionAlgToolFactory()
+        self.algToolFactory = algToolFactory
  
         # map conaining parent child ids for the node
         self.treeMap = {0: 0}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py
index 4a115d09f08c..5cf284a9274f 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py
@@ -43,7 +43,7 @@ class FastReductionAlgToolFactory:
         klass = self.tool_factories[key][0]
         sn = self.tool_factories[key][1]
         
-        name = '%s_%d_fn' % (key, sn)
+        name = '%s_%d' % (key, sn)
         if extra: name += '_' + extra
         tool = klass(name=name)            
         self.tool_factories[key][1] += 1
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
index f25a8d84c87e..3baf21b31c73 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
@@ -22,6 +22,8 @@ from TrigHLTJetHypo.NodeSplitterVisitor import NodeSplitterVisitor
 from AthenaCommon.Logging import logging
 log = logging.getLogger( 'TrigJetHypoToolConfig' )
 
+algToolFactory = FastReductionAlgToolFactory()
+
 def  tree2tools(rootless_tree, toolSetter):
 
     
@@ -70,11 +72,10 @@ def trigJetHypoToolHelperFromDict_(
     node_forest =  nodeForestFromChainLabel(chain_label,
                                             chain_name)
 
-    algToolFactory = FastReductionAlgToolFactory()
     helper_tool = algToolFactory('helper')
 
     for tree in node_forest:
-        toolSetter = ConditionsToolSetterFastReduction()
+        toolSetter = ConditionsToolSetterFastReduction(algToolFactory)
         tree2tools(tree, toolSetter)
         helper_tool.HypoConfigurers.append(toolSetter.config_tool)   
 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
index b78bc88bce17..b6a788a08ec4 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
@@ -155,7 +155,7 @@ def _make_vbenf_label(chain_parts, leg_label):
       []
       simple
       (
-        [(%(etlo).0fet, 500neta, leg000)(%(etlo).0fet, peta500, %(leg_label)s)]
+        [(%(fbetlo).0fet, 500neta, leg000)(%(fbetlo).0fet, peta500, %(leg_label)s)]
       )
       dijet
       (
@@ -168,6 +168,24 @@ def _make_vbenf_label(chain_parts, leg_label):
     )""" % argvals
 
 
+def  _make_fbdjshared_label(chain_parts, leg_label):
+    """example label for a 2-tree forest. Same cuts as 
+    HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20, but the cuts are hardwired
+    here. The dijet and the forward-backward cuts run in separate trees."""
+    
+    return """
+    simple
+    (
+    [(50et, 500neta, leg000)(50et, peta500, leg000)]
+    )
+    dijet
+    (
+    [(34djmass, 26djdphi)]
+        simple
+        ([(10et, 0eta320, leg000)(20et, 0eta320, leg000)])
+    )"""
+
+    
 def _make_dijet_label(chain_parts, leg_label):
     """dijet label. supports dijet cuts, and cuts on particpating jets
     Currently supported cuts:
@@ -323,6 +341,7 @@ def chainDict2jetLabel(chain_dict):
         'agg':   _make_agg_label,
         'vbenf': _make_vbenf_label,
         'dijet': _make_dijet_label,
+        'fbdjshared': _make_fbdjshared_label,
     }
 
     # chain_part - scenario association
@@ -348,8 +367,10 @@ def chainDict2jetLabel(chain_dict):
 
     assert labels
     nlabels = len(labels)
+    return ''.join(labels)
     if nlabels == 1: return labels[0]
     if nlabels == 2:
+        # two labels occur when combining simple and a non-simple scenario
         alabel = """\
 all([]
     %s
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
index 468d7427418a..ac2837ade4f7 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
@@ -19,6 +19,9 @@ from TrigHLTJetHypo.ConditionsToolSetterFastReduction import (
     ConditionsToolSetterFastReduction,
 )
 
+from TrigHLTJetHypo.FastReductionAlgToolFactory import (
+    FastReductionAlgToolFactory,)
+
 
 def testChainDictMaker():
 
@@ -50,11 +53,10 @@ def testChainDictMaker():
 
         ChainProp(name='HLT_j0_aggSEP1000htSEP30etSEP0eta320_L1J20',
                   groups=SingleJetGroup),
-        
-        # ChainProp(name='HLT_j70_j50 _0eta490_invm1000j50_dphi20_deta40_L1J20',
-        #          l1SeedThresholds=['FSNOSEED']*2,
-        #          groups=MultiJetGroup),
 
+         ChainProp(name='HLT_j0_fbdjshared_L1J20', groups=SingleJetGroup),
+
+        ChainProp(name='HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20',l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup),
     ]
 
     result = []
@@ -88,8 +90,9 @@ if __name__ == '__main__':
 
         forest = nodeForestFromChainLabel(label, chain_name)
 
+        algToolFactory = FastReductionAlgToolFactory()
         for tree in forest:
-            toolSetter=ConditionsToolSetterFastReduction()
+            toolSetter=ConditionsToolSetterFastReduction(algToolFactory)
             
             print (tree2tools(rootless_tree=tree,
                               toolSetter=toolSetter).dump())
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 571575bba8b2..a516fd4fdb6e 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -686,6 +686,12 @@ HLT_j0_aggSEP1000htSEP30etSEP0eta320_L1J20:
   eventCount: 0
 HLT_j0_aggSEP500htSEP30etSEP0eta320_L1J20:
   eventCount: 0
+HLT_j0_fbdjshared_L1J20:
+  eventCount: 1
+  stepCounts:
+    0: 1
+  stepFeatures:
+    0: 9
 HLT_j0_perf_L1J12_EMPTY:
   eventCount: 8
   stepCounts:
@@ -693,11 +699,11 @@ HLT_j0_perf_L1J12_EMPTY:
   stepFeatures:
     0: 127
 HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20:
-  eventCount: 2
+  eventCount: 1
   stepCounts:
-    0: 2
+    0: 1
   stepFeatures:
-    0: 17
+    0: 9
 HLT_j225_subjesgscIS_ftf_bmv2c1040_split_L1J100:
   eventCount: 0
 HLT_j260_320eta490_L1J20:
@@ -726,6 +732,12 @@ HLT_j360_subjesgscIS_ftf_bdl1r77_split_L1J100:
   eventCount: 0
 HLT_j360_subjesgscIS_ftf_bmv2c1077_split_L1J100:
   eventCount: 0
+HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20:
+  eventCount: 7
+  stepCounts:
+    0: 7
+  stepFeatures:
+    0: 103
 HLT_j420_L1J100:
   eventCount: 0
 HLT_j420_pf_subresjesgscIS_ftf_L1J100:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 1821f9279060..eafd51cfd56b 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -269,10 +269,14 @@ def setupMenu():
         ChainProp(name='HLT_2j330_a10sd_csskpf_jes_ftf_35smcINF_L1J100', groups=SingleJetGroup),
 
         ChainProp(name='HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20', groups=SingleJetGroup),
+        ChainProp(name='HLT_j0_fbdjshared_L1J20', groups=SingleJetGroup),
 
         ChainProp(name='HLT_j0_aggSEP1000htSEP30etSEP0eta320_L1J20', groups=SingleJetGroup),
         ChainProp(name='HLT_j0_aggSEP500htSEP30etSEP0eta320_L1J20', groups=SingleJetGroup),
 
+        ChainProp(name='HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20',
+                  l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup),
+
         # ATR-20624
         ChainProp(name='HLT_j0_perf_L1J12_EMPTY', stream=['Main'], groups=['Online',SingleJetGroup]),
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
index 7d176fb0b6ef..ad097da08b99 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
@@ -133,12 +133,15 @@ JetChainParts = {
     #   from the hypoScenario specification, and all other hypo entries are ignored.
     'hypoScenario' : ['simple', # Independent selections on individual jets, multiplicity+threshold cuts
                       'vbenf',  # Test VBF-like chain
+                      'fbdjshared',  # Test VBF-like chain with dijet-fworward/backward sharing
                       'vbenfSEP30etSEP34mass35SEP50fbet', # Test VBF-like chain with more info
                       'dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass', # Test dijet mass sel
                       # 'agg' category is for single variable computed by aggregation over single jets
                       'aggSEP1000htSEP30etSEP0eta320', # HT selection with explicit jet et/eta cuts
                       'aggSEP500htSEP30etSEP0eta320',
-                      'aggSEP100htSEP10etSEP0eta320',],
+                      'aggSEP100htSEP10etSEP0eta320',
+                      'aggSEP50htSEP10etSEP0eta320',
+                      ],
     # Simple hypo configuration. Single property cuts defined as MINvarMAX
     'etaRange'      :
       ['0eta320', '320eta490', '0eta240', '0eta290'],
-- 
GitLab


From fcb8e6a9184d2e9d3dc0d1e454c569fbf225db4d Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <averbyts@cern.ch>
Date: Thu, 24 Dec 2020 13:13:56 +0100
Subject: [PATCH 219/308] Update Herwig7

---
 Generators/Herwig7_i/src/Herwig7.cxx | 47 ----------------------------
 1 file changed, 47 deletions(-)

diff --git a/Generators/Herwig7_i/src/Herwig7.cxx b/Generators/Herwig7_i/src/Herwig7.cxx
index 1204b9744e9a..26cf40463331 100644
--- a/Generators/Herwig7_i/src/Herwig7.cxx
+++ b/Generators/Herwig7_i/src/Herwig7.cxx
@@ -33,53 +33,6 @@
 #include "boost/thread/thread.hpp"
 #include "boost/filesystem.hpp"
 #include "boost/algorithm/string.hpp"
-#include "boost/foreach.hpp"
-#define foreach BOOST_FOREACH
-
-
-// Setup HepMC traits definition for ThePEG's converter to work
-#include "ThePEG/Vectors/HepMCConverter.h"
-#ifdef HWVER_IS_72
-namespace ThePEG {
-  template<>
-  struct HepMCTraits<HepMC::GenEvent>
-    : public HepMCTraitsBase<HepMC::GenEvent,
-                             HepMC::GenParticle,
-                             HepMC::GenParticle *,
-                             HepMC::GenVertex,
-                             HepMC::GenVertex *,
-                             HepMC::Polarization,
-                             HepMC::PdfInfo>
-  {
-    static bool hasUnits() {
-      #ifdef HEPMC_HAS_UNITS
-      return true;
-      #else
-      return false;
-      #endif
-    }
-  };
-}
-#else
-namespace ThePEG {
-  template<>
-  struct HepMCTraits<HepMC::GenEvent>
-    : public HepMCTraitsBase<HepMC::GenEvent,
-                            HepMC::GenParticle,
-                             HepMC::GenVertex,
-                             HepMC::Polarization,
-                             HepMC::PdfInfo>
-  {
-    static bool hasUnits() {
-      #ifdef HEPMC_HAS_UNITS
-      return true;
-      #else
-      return false;
-      #endif
-    }
-  };
-}
-#endif
 
 void   convert_to_HepMC(const ThePEG::Event & m_event, HepMC::GenEvent & evt, bool nocopies,ThePEG::Energy eunit, ThePEG::Length lunit);
 
-- 
GitLab


From 359f13a458ddb913362c9d3741590b6e93397d1e Mon Sep 17 00:00:00 2001
From: Heather Russell <heather.russell@cern.ch>
Date: Thu, 24 Dec 2020 12:51:16 +0000
Subject: [PATCH 220/308] ATR-22206, adding functionality for multi-leg merging

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    |  10 +
 .../share/ref_data_v1Dev_build.ref            |   8 +-
 .../python/HLTMenuConfig/Menu/ChainMerging.py | 280 ++++++++++++++----
 .../HLTMenuConfig/Menu/GenerateMenuMT.py      |   2 +-
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |   2 +-
 .../HLTMenuConfig/Menu/MenuComponents.py      |  23 +-
 6 files changed, 247 insertions(+), 78 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 201a8038ae04..df116303bdfd 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -1350,6 +1350,16 @@ HLT_g35_loose_mu18_L1EM24VHI:
     7: 2
 HLT_g35_medium_g25_medium_L12EM20VH:
   eventCount: 0
+HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI:
+  eventCount: 0
+  stepCounts:
+    0: 5
+    1: 5
+    2: 5
+  stepFeatures:
+    0: 10
+    1: 10
+    2: 11
 HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
   eventCount: 0
   stepCounts:
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 571575bba8b2..1bbb99ec0c34 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -318,12 +318,6 @@ HLT_cscmon_CSCPEB_L1All:
     0: 20
 HLT_e12_lhloose_2mu10_L12MU10:
   eventCount: 0
-  stepCounts:
-    0: 1
-    1: 1
-  stepFeatures:
-    0: 2
-    1: 5
 HLT_e140_lhloose_L1EM22VHI:
   eventCount: 0
 HLT_e140_lhloose_nod0_L1EM22VHI:
@@ -614,6 +608,8 @@ HLT_g35_loose_mu18_L1EM24VHI:
   eventCount: 0
 HLT_g35_medium_g25_medium_L12EM20VH:
   eventCount: 0
+HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI:
+  eventCount: 0
 HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
   eventCount: 0
 HLT_g3_loose_LArPEB_L1EM3:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
index 6c4a49f123ef..d10b30487f71 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
@@ -17,7 +17,7 @@ def mergeChainDefs(listOfChainDefs, chainDict):
 
     strategy = chainDict["mergingStrategy"]
     offset = chainDict["mergingOffset"]
-    log.info("%s: Combine by using %s merging", chainDict['chainName'], strategy)
+    log.info("[mergeChainDefs] %s: Combine by using %s merging", chainDict['chainName'], strategy)
 
     if strategy=="parallel":
         return mergeParallel(listOfChainDefs,  offset)
@@ -30,7 +30,7 @@ def mergeChainDefs(listOfChainDefs, chainDict):
         for ich,cConfig in enumerate(listOfChainDefs):
             chain_ag = cConfig.alignmentGroups[0]
             if chain_ag not in ordering:
-                log.error("Alignment group %s can't be auto-merged because it's not in the grouping list!",chain_ag)
+                log.error("[mergeChainDefs] Alignment group %s can't be auto-merged because it's not in the grouping list!",chain_ag)
             if chain_ag in merging_dict:
                 merging_dict[chain_ag] += [ich]
             else:
@@ -53,7 +53,7 @@ def mergeChainDefs(listOfChainDefs, chainDict):
             
         
     else:
-        log.error("Merging failed for %s. Merging strategy '%s' not known.", (listOfChainDefs, strategy))
+        log.error("[mergeChainDefs] Merging failed for %s. Merging strategy '%s' not known.", (listOfChainDefs, strategy))
         return -1
 
 
@@ -61,8 +61,9 @@ def mergeChainDefs(listOfChainDefs, chainDict):
 def mergeParallel(chainDefList, offset):
 
     if offset != -1:
-        log.error("Offset for parallel merging not implemented.")
-        
+        log.error("[mergeParallel] Offset for parallel merging not implemented.")
+        raise Exception("[mergeParallel] Cannot merge this chain, exiting.")
+
     allSteps = []
     nSteps = []
     chainName = ''
@@ -73,17 +74,18 @@ def mergeParallel(chainDefList, offset):
         if chainName == '':
             chainName = cConfig.name
         elif chainName != cConfig.name:
-            log.error("Something is wrong with the combined chain name: cConfig.name = %s while chainName = %s", cConfig.name, chainName)
-        
+            log.error("[mergeParallel] Something is wrong with the combined chain name: cConfig.name = %s while chainName = %s", cConfig.name, chainName)
+            raise Exception("[mergeParallel] Cannot merge this chain, exiting.")
         allSteps.append(cConfig.steps)
         nSteps.append(len(cConfig.steps))
         l1Thresholds.extend(cConfig.vseeds)
         if len(cConfig.alignmentGroups) > 1:
-            log.error("Merging an already merged chain? This is odd! %s",cConfig.alignmentGroups)
+            log.error("[mergeParallel] Parallel merging an already merged chain? This is odd! %s",cConfig.alignmentGroups)
+            raise Exception("[mergeParallel] Complicated situation currently unimplemented. exiting.")
         elif len(cConfig.alignmentGroups) == 1:
             alignmentGroups.append(cConfig.alignmentGroups[0])
         else: 
-            log.info("Alignment groups are empty for this combined chain - if this is not _newJO, this is not ok!")
+            log.info("[mergeParallel] Alignment groups are empty for this combined chain - if this is not _newJO, this is not ok!")
     import itertools
     if 'zip_longest' in dir(itertools):
         from itertools import zip_longest
@@ -93,17 +95,20 @@ def mergeParallel(chainDefList, offset):
     orderedSteps = list(zip_longest(*allSteps))
 
     combChainSteps =[]
-    log.debug("len(orderedSteps): %d", len(orderedSteps))
+    log.debug("[mergeParallel] len(orderedSteps): %d", len(orderedSteps))
+    for chain_index in range(len(chainDefList)):
+        log.debug('[mergeParallel] Chain object to merge (i.e. chainDef) %s', chainDefList[chain_index])
+
     for step_index, steps in enumerate(orderedSteps):
         mySteps = list(steps)
-        log.debug("Merging step counter %d", step_index+1)
-        combStep = makeCombinedStep(mySteps, step_index+1, chainDefList)
+        log.debug("[mergeParallel] Merging step counter %d", step_index+1)
+        combStep = makeCombinedStep(mySteps, step_index+1, chainDefList, orderedSteps, combChainSteps)
         combChainSteps.append(combStep)
                                   
     combinedChainDef = Chain(chainName, ChainSteps=combChainSteps, L1Thresholds=l1Thresholds, 
                                 nSteps = nSteps, alignmentGroups = alignmentGroups)
 
-    log.debug("Parallel merged chain %s with these steps:", chainName)
+    log.debug("[mergeParallel] Parallel merged chain %s with these steps:", chainName)
     for step in combinedChainDef.steps:
         log.debug('\n   %s', step)
 
@@ -114,65 +119,180 @@ def getEmptySeqName(stepName, chain_index, step_number, alignGroup):
     if re.search('^Step[0-9]_',stepName):
         stepName = stepName[6:]
 
-    seqName = 'Empty'+ alignGroup +'Seq'+str(step_number)+ '_'+ stepName + '_leg' + str(chain_index)
+    seqName = 'Empty'+ alignGroup +'Seq'+str(step_number)+ '_'+ stepName
     return seqName
 
 
-def getEmptyMenuSequence(flags, name):
-    return EmptyMenuSequence(name)
+def getEmptyMenuSequence(flags, name, mergeUsingFeature = False):
+    return EmptyMenuSequence(name, mergeUsingFeature = mergeUsingFeature)
 
+def getMultiplicityPerLeg(multiplicities):
+    mult_per_leg = []
+    for mult in multiplicities:
+        if mult == 1: 
+            mult_per_leg += ['1']
+        elif mult > 1: 
+            mult_per_leg += ['N']
+        else: 
+            raise Exception("[serial_zip] multiplicity not an expected value: %s",mult) 
+    return mult_per_leg
+
+def isFullScanRoI(inputL1Nav):
+    fsRoIList = ['HLTNav_L1FSNOSEED','HLTNav_L1MET','HLTNav_L1J']
+    if inputL1Nav in fsRoIList:
+        return True
+    else:
+        return False
+
+def noPrecedingStepsPreMerge(newsteps,chain_index,ileg):
+    for step in newsteps:
+        seq = step[chain_index].sequences[ileg]
+        if type(seq).__name__ == 'EmptyMenuSequence':
+            continue
+        else:
+            #if there's a non-empty sequence in a step before, there is clearly a
+            #preceding step in this chain.
+            return False
+    return True
+
+def noPrecedingStepsPostMerge(newsteps, ileg):
+    for step in newsteps:
+        seq = step.sequences[ileg]
+        if type(seq).__name__ == 'EmptyMenuSequence':
+            continue
+        else:
+            #if there's a non-empty sequence in a step before, there is clearly a
+            #preceding step in this chain.
+            return False
+    return True
+        
 
 def serial_zip(allSteps, chainName, chainDefList):
-    n_chains = len(allSteps)
+
+    legs_per_part = [len(cd.steps[0].multiplicity) for cd in chainDefList]
+    n_parts = len(allSteps)
+    log.debug('[serial_zip] configuring chain with %d parts with multiplicities %s', n_parts, legs_per_part)
     newsteps = []
-    for chain_index, chainsteps in enumerate(allSteps):
-        for step_index, step in enumerate(chainsteps):
-            log.debug('chain_index: %s step_index: %s', chain_index, step_index)
-            # create list of correct length
-            stepList = [None]*n_chains
-            
+
+    doBonusDebug = False
+
+    for chain_index, chainSteps in enumerate(allSteps): #per-part (horizontal) iteration
+        for step_index, step in enumerate(chainSteps):  #serial step iteration
+            log.debug('[serial_zip] chain_index: %s step_index: %s', chain_index, step_index)
+            # create list of correct length (chainSteps in parallel)
+            stepList = [None]*n_parts
+
             # put the step from the current sub-chain into the right place
             stepList[chain_index] = step
-            log.debug('Put step: %s', step.name)
+            log.debug('[serial_zip] Put step: %s', step.name)
 
-            # all other steps should contain an empty sequence
-            for step_index2, emptyStep in enumerate(stepList):
+            # all other chain parts' steps should contain an empty sequence
+            for chain_index2, (emptyStep, nLegs) in enumerate(zip(stepList,legs_per_part)): #more per-leg iteration
                 if emptyStep is None:
-                    seqName = getEmptySeqName(step.name, chain_index, step_index+1, chainDefList[0].alignmentGroups[0])
-                    emptySeq =  RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName)
-                    stepList[step_index2] = ChainStep( seqName, Sequences=[emptySeq], chainDicts=step.stepDicts)            
-            
+                    mult_per_leg = getMultiplicityPerLeg(chainDefList[chain_index2].steps[0].multiplicity)
+
+                    #this WILL NOT work for jets!
+                    step_mult = []
+                    emptyChainDicts = []
+                    if chain_index2 < chain_index:
+                        emptyChainDicts = allSteps[chain_index2][-1].stepDicts
+                    else:
+                        emptyChainDicts = allSteps[chain_index2][0].stepDicts
+
+                    sigNames = []
+                    for emptyChainDict in emptyChainDicts:
+                        if isFullScanRoI(chainDefList[chain_index2].L1decisions[0]):
+                            sigNames +=[emptyChainDict['chainParts'][0]['signature']+'FS']
+                        else:
+                            sigNames +=[emptyChainDict['chainParts'][0]['signature']]
+
+                    seqMultName = '_'.join([mult+sigName for mult, sigName in zip(mult_per_leg,sigNames)])
+                    seqStepName = 'Empty' + chainDefList[chain_index].alignmentGroups[0]+'Align'+str(step_index+1)+'_'+seqMultName
+
+                    seqNames = [getEmptySeqName(emptyChainDicts[iSeq]['signature'], chain_index, step_index+1, chainDefList[chain_index].alignmentGroups[0]) for iSeq in range(nLegs)]
+                    if doBonusDebug:                        
+                        log.debug("[serial_zip] step name for this leg: %s", seqStepName)
+                        log.debug("[serial_zip] created empty sequence(s): %s", seqNames)
+                        log.debug("[serial_zip] L1decisions %s ", chainDefList[chain_index2].L1decisions)
+
+                    emptySequences = []
+                    for ileg in range(nLegs):
+                        if isFullScanRoI(chainDefList[chain_index2].L1decisions[0]) and noPrecedingStepsPreMerge(newsteps,chain_index2, ileg):
+                            log.debug("[serial_zip] adding FS empty sequence with mergeUsingFeature = False ")
+                            emptySequences += [RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqNames[ileg]+"FS", mergeUsingFeature = False)]
+                        elif isFullScanRoI(chainDefList[chain_index2].L1decisions[0]):
+                            log.debug("[serial_zip] adding FS empty sequence with mergeUsingFeature = True ")
+                            emptySequences += [RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqNames[ileg]+"FS", mergeUsingFeature = True)]
+                        else:
+                            log.debug("[serial_zip] adding non-FS empty sequence")
+                            emptySequences += [RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqNames[ileg])]
+
+                    #this WILL NOT work for jets!
+                    step_mult = []
+                    emptyChainDicts = []
+                    if chain_index2 < chain_index:
+                        emptyChainDicts = allSteps[chain_index2][-1].stepDicts
+                    else:
+                        emptyChainDicts = allSteps[chain_index2][0].stepDicts
+
+                    if doBonusDebug:
+                        log.debug("[serial_zip] emptyChainDicts %s",emptyChainDicts)
+
+                    if len(emptySequences) != len(emptyChainDicts):
+                        log.error("[serial_zip] different number of empty sequences/legs %d to stepDicts %d", len(emptySequences), len(emptyChainDicts))
+                        raise Exception("[serial_zip] Cannot create this chain step, exiting.")
+
+                    for sd in emptyChainDicts:
+                        if len(sd['chainParts']) != 1:
+                            log.error("[serial_zip] stepDict chainParts has length != 1 within a leg! %s",sd)
+                            raise Exception("[serial_zip] Cannot create this chain step, exiting.")
+                        step_mult += [int(sd['chainParts'][0]['multiplicity'])] 
+
+                    if len(emptySequences) != len(step_mult):
+                        log.error("[serial_zip] different number of empty sequences/legs %d to multiplicities %d", len(emptySequences), len(step_mult))
+                        raise Exception("[serial_zip] Cannot create this chain step, exiting.")
+
+                    if doBonusDebug:
+                        log.debug('[serial_zip] step multiplicity %s',step_mult)
+
+                    stepList[chain_index2] = ChainStep( seqStepName, Sequences=emptySequences,
+                                                  multiplicity = step_mult, chainDicts=emptyChainDicts,
+                                                  isEmpty = True)
+
             newsteps.append(stepList)
     log.debug('After serial_zip')
     for s in newsteps:
         log.debug( ', '.join(map(str, [step.name for step in s]) ) )
     return newsteps
 
+
 def mergeSerial(chainDefList):
     allSteps = []
     nSteps = []
     chainName = ''
     l1Thresholds = []
     alignmentGroups = []
-    log.debug('Merge chainDefList:')
+    log.debug('[mergeSerial] Merge chainDefList:')
     log.debug(chainDefList)
 
     for cConfig in chainDefList:
+
         if chainName == '':
             chainName = cConfig.name
         elif chainName != cConfig.name:
-            log.error("Something is wrong with the combined chain name: cConfig.name = %s while chainName = %s", cConfig.name, chainName)
-            
+            log.error("[mergeSerial] Something is wrong with the combined chain name: cConfig.name = %s while chainName = %s", cConfig.name, chainName)
+            raise Exception("[mergeSerial] Cannot merge this chain, exiting.")
+
         allSteps.append(cConfig.steps)
         nSteps.append(len(cConfig.steps))
         l1Thresholds.extend(cConfig.vseeds)
-        if len(cConfig.alignmentGroups) > 1:
-            log.error("Merging an already merged chain? This is odd! %s",cConfig.alignmentGroups)
-        alignmentGroups.append(cConfig.alignmentGroups[0])
+        alignmentGroups.extend(cConfig.alignmentGroups)
 
-    serialSteps = serial_zip(allSteps, chainName,chainDefList)
+    serialSteps = serial_zip(allSteps, chainName, chainDefList)
     mySerialSteps = deepcopy(serialSteps)
     combChainSteps =[]
+    for chain_index in range(len(chainDefList)):
+        log.debug('[mergeSerial] Chain object to merge (i.e. chainDef) %s', chainDefList[chain_index])
     for step_index, steps in enumerate(mySerialSteps):
         mySteps = list(steps)
         combStep = makeCombinedStep(mySteps, step_index+1, chainDefList)
@@ -181,78 +301,112 @@ def mergeSerial(chainDefList):
     # check if all chain parts have the same number of steps
     sameNSteps = all(x==nSteps[0] for x in nSteps) 
     if sameNSteps is True:
-        log.info("All chain parts have the same number of steps")
+        log.info("[mergeSerial] All chain parts have the same number of steps")
     else:
-        log.info("Have to deal with uneven number of chain steps, there might be none's appearing in sequence list => to be fixed")
+        log.info("[mergeSerial] Have to deal with uneven number of chain steps, there might be none's appearing in sequence list => to be fixed")
                                   
     combinedChainDef = Chain(chainName, ChainSteps=combChainSteps, L1Thresholds=l1Thresholds,
                                nSteps = nSteps, alignmentGroups = alignmentGroups)
 
-    log.debug("Serial merged chain %s with these steps:", chainName)
+    log.debug("[mergeSerial] Serial merged chain %s with these steps:", chainName)
     for step in combinedChainDef.steps:
         log.debug('   %s', step)
 
     return combinedChainDef
 
 
-def makeCombinedStep(steps, stepNumber, chainDefList):
+def makeCombinedStep(parallel_steps, stepNumber, chainDefList, allSteps = [], currentChainSteps = []):
     from TrigCompositeUtils.TrigCompositeUtils import legName
     stepName = 'merged' #we will renumber all steps after chains are aligned #Step' + str(stepNumber)
     stepSeq = []
     stepMult = []
-    log.verbose(" steps %s ", steps)
+    log.verbose("[makeCombinedStep] steps %s ", parallel_steps)
     stepDicts = []
     comboHypoTools = []
     comboHypo = None
 
     # this function only makes sense if we are merging steps corresponding to the chains in the chainDefList
-    assert len(chainDefList)==len(steps), "makeCombinedStep: Length of chain defs %d does not match length of steps to merge %d" % (len(chainDefList), len(steps))
+    assert len(chainDefList)==len(parallel_steps), "[makeCombinedStep] makeCombinedStep: Length of chain defs %d does not match length of steps to merge %d" % (len(chainDefList), len(allSteps))
     
-    for chain_index, step in enumerate(steps):
+    leg_counter = 0
+  
+    for chain_index, step in enumerate(parallel_steps): #this is a horizontal merge!
         if step is None:
             # this happens for merging chains with different numbers of steps, we need to "pad" out with empty sequences to propogate the decisions
-            currentStepName = "Step" + str(stepNumber) + "_Empty" + str(chain_index)
-            seqName = getEmptySeqName(currentStepName, chain_index, stepNumber, chainDefList[0].alignmentGroups[0])
-            log.debug("  step %s,  empty sequence %s", currentStepName, seqName)
-            emptySeq = RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName)
+            # all other chain parts' steps should contain an empty sequence
 
-            stepSeq.append(emptySeq)
-            stepMult.append(1)
+            new_stepDict = deepcopy(chainDefList[chain_index].steps[-1].stepDicts[-1])
+            
+            seqName = getEmptySeqName(new_stepDict['signature'], chain_index, stepNumber, chainDefList[0].alignmentGroups[0])
+
+            currentStepName = ''
+            if isFullScanRoI(chainDefList[chain_index].L1decisions[0]):
+                if noPrecedingStepsPostMerge(currentChainSteps, chain_index):
+                    stepSeq.append(RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName+"FS", mergeUsingFeature = False))
+                else:
+                    stepSeq.append(RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName+'FS', mergeUsingFeature = True))
+                currentStepName = 'Empty' + chainDefList[chain_index].alignmentGroups[0]+'Align'+str(stepNumber)+'_'+new_stepDict['chainParts'][0]['multiplicity']+new_stepDict['signature']+'FS'
+            else:
+                stepSeq.append(RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName))
+                currentStepName = 'Empty' + chainDefList[chain_index].alignmentGroups[0]+'Align'+str(stepNumber)+'_'+new_stepDict['chainParts'][0]['multiplicity']+new_stepDict['signature']
+
+            log.debug("[makeCombinedStep]  step %s,  empty sequence %s", currentStepName, seqName)
+
+            #stepNumber is indexed from 1, need the previous step indexed from 0, so do - 2
+            prev_step_mult = int(currentChainSteps[stepNumber-2].multiplicity[chain_index])
+            stepMult.append(prev_step_mult)
             # we need a chain dict here, use the one corresponding to this leg of the chain
-            stepDicts.append(deepcopy(chainDefList[chain_index].steps[-1].stepDicts[-1]))
+            oldLegName = new_stepDict['chainName']
+            if re.search('^leg[0-9]{3}_',oldLegName):
+                oldLegName = oldLegName[7:]
+            new_stepDict['chainName'] = legName(oldLegName,leg_counter)
+            stepDicts.append(new_stepDict)
+            leg_counter += 1
         else:
             # Standard step, append it to the combined step
-            log.debug("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
+            log.debug("[makeCombinedStep]  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
             if len(step.sequences):
-                log.debug("      with sequences = %s", ' '.join(map(str, [seq.name for seq in step.sequences])))
+                log.debug("[makeCombinedStep]    with sequences = %s", ' '.join(map(str, [seq.name for seq in step.sequences])))
 
             # this function only works if the input chains are single-object chains (one menu seuqnce)
             if len(step.sequences) > 1:
-                log.error("More than one menu sequence found in combined chain!!")
+                log.debug("[makeCombinedStep] combining in an already combined chain")
+
             comboHypo = step.comboHypoCfg
             currentStepName = step.name
-            #remove redundant instances of StepN_
+            #remove redundant instances of StepN_ and merged_ (happens when merging already merged chains)
             if re.search('^Step[0-9]_',currentStepName):
                 currentStepName = currentStepName[6:]
-
-            if len(step.sequences):
-                seq = step.sequences[0]
-                stepSeq.append(seq)
+            if re.search('^merged_',currentStepName):
+                currentStepName = currentStepName[7:]
+            stepSeq.extend(step.sequences)
             # set the multiplicity of all the legs 
-            stepMult.append(sum(step.multiplicity))
+            if len(step.multiplicity) == 0:
+                stepMult.append(0)
+            else:
+                stepMult.extend(step.multiplicity)
             comboHypoTools.extend(step.comboToolConfs)
             # update the chain dict list for the combined step with the chain dict from this step
-            stepDicts += deepcopy(step.stepDicts)
+            log.debug('[makeCombinedStep] adding step dictionaries %s',step.stepDicts)
+            
+            for new_stepDict in deepcopy(step.stepDicts):
+                oldLegName = new_stepDict['chainName']
+                if re.search('^leg[0-9]{3}_',oldLegName):
+                    oldLegName = oldLegName[7:]
+                new_stepDict['chainName'] = legName(oldLegName,leg_counter)
+                log.debug("[makeCombinedStep] stepDict naming old: %s, new: %s", oldLegName, new_stepDict['chainName'])
+                stepDicts.append(new_stepDict)
+                leg_counter += 1
 
 
         # the step naming for combined chains needs to be revisted!!
         stepName += '_' + currentStepName
+        log.debug('[makeCombinedStep] current step name %s',stepName)
         # for merged steps, we need to update the name to add the leg name
-        stepDicts[-1]['chainName'] = legName(stepDicts[-1]['chainName'], chain_index)
         
     comboHypoTools = list(set(comboHypoTools))
     theChainStep = ChainStep(stepName, Sequences=stepSeq, multiplicity=stepMult, chainDicts=stepDicts, comboHypoCfg=comboHypo, comboToolConfs=comboHypoTools) 
-    log.info("Merged step: \n %s", theChainStep)
+    log.info("[makeCombinedStep] Merged step: \n %s", theChainStep)
   
     
     return theChainStep
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
index b4674557188c..deb952c1f7cf 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
@@ -307,7 +307,7 @@ class GenerateMenuMT(object, metaclass=Singleton):
                   alignedChainConfig = menuAlignment.single_align(chainDict, chainConfig)
                   TriggerConfigHLT.registerChain( chainDict, alignedChainConfig )
 
-              elif len(alignmentGroups) == 2:
+              elif len(alignmentGroups) >= 2:
                   alignedChainConfig = menuAlignment.multi_align(chainDict, chainConfig, lengthOfChainConfigs)
                   TriggerConfigHLT.registerChain( chainDict, alignedChainConfig )              
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 1821f9279060..1e1dc9f132aa 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -425,7 +425,7 @@ def setupMenu():
 #        ChainProp(name='HLT_e9_lhvloose_mu20_mu8noL1_L1MU20', l1SeedThresholds=['EM3','MU20','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
 #        ChainProp(name='HLT_g35_loose_mu15_mu2noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','MU6','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
         ChainProp(name='HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
-        #        ChainProp(name='HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
+        ChainProp(name='HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
     
     ]
     TriggerFlags.HeavyIonSlice.signatures  = TriggerFlags.HeavyIonSlice.signatures() + []
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index 023c5dcc0011..95c607bf2669 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -355,10 +355,11 @@ class EmptyMenuSequence(object):
     """ Class to emulate reco sequences with no Hypo"""
     """ By construction it has no Hypo;"""
     
-    def __init__(self, the_name):
+    def __init__(self, the_name, mergeUsingFeature = False):
         self._name = the_name
         Maker = CompFactory.InputMakerForRoI("IM"+the_name)
         Maker.RoITool = CompFactory.ViewCreatorInitialROITool()
+        Maker.mergeUsingFeature = mergeUsingFeature
         self._maker       = InputMakerNode( Alg = Maker )
         self._seed=''
         self._sequence    = Node( Alg = seqAND(the_name, [Maker]))
@@ -740,6 +741,9 @@ class CFSequence(object):
         the filter is connected only once (to avoid multiple DH links)
         """
         log.debug("CFSequence: connect Filter %s with %d menuSequences of step %s, using %d connections", compName(self.filter.Alg), len(self.step.sequences), self.step.name, len(connections))
+        log.debug("   --- sequences: ")
+        for seq in self.step.sequences:
+            log.debug(seq)
         if len(connections) == 0:
             log.error("ERROR, no filter outputs are set!")
 
@@ -789,19 +793,24 @@ class StepComponent(object):
 # next:  can we remove multiplicity array, if it can be retrieved from the ChainDict?
 class ChainStep(object):
     """Class to describe one step of a chain; if multiplicity is greater than 1, the step is combo/combined.  Set one multiplicity value per sequence"""
-    def __init__(self, name,  Sequences=[], multiplicity=[1], chainDicts=[], comboHypoCfg=ComboHypoCfg, comboToolConfs=[]):
+    def __init__(self, name,  Sequences=[], multiplicity=[1], chainDicts=[], comboHypoCfg=ComboHypoCfg, comboToolConfs=[], isEmpty = False):
 
         # include cases of emtpy steps with multiplicity = [] or multiplicity=[0,0,0///]
         if sum(multiplicity)==0:
             multiplicity=[]
         else:
             # sanity check on inputs, excluding empty steps
+            if len(chainDicts) != len(multiplicity):
+                log.error("[ChainStep] Sequences: %s",Sequences)
+                log.error("[ChainStep] chainDicts: %s",chainDicts)
+                log.error("[ChainStep] multiplicity: %s",multiplicity)
+                raise RuntimeError("[ChainStep] Tried to configure a ChainStep %s with %i multiplicity and %i dictionaries. These lists must have the same size" % (name, len(multiplicity), len(chainDicts)) )
+            
             if len(Sequences) != len(multiplicity):
+                log.error("[ChainStep] Sequences: %s",Sequences)
+                log.error("[ChainStep] multiplicities: %s",multiplicity)
                 raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i multiplicities. These lists must have the same size" % (name, len(Sequences), len(multiplicity)) )
-
-            if len(Sequences) != len(chainDicts):
-                raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i dictionaries. These lists must have the same size" % (name, len(Sequences), len(chainDicts)) )
-
+ 
         self.name = name
         self.sequences=Sequences
         self.multiplicity = multiplicity
@@ -809,7 +818,7 @@ class ChainStep(object):
         self.comboToolConfs=comboToolConfs
         self.stepDicts = chainDicts # one dict per leg
         self.isCombo=sum(multiplicity)>1
-        self.isEmpty=sum(multiplicity)==0
+        self.isEmpty=(sum(multiplicity)==0 or isEmpty)
         self.combo=None
         if self.isCombo:
             self.makeCombo()
-- 
GitLab


From 9b22da26d30759aebe45f00b015d8a39806f46f4 Mon Sep 17 00:00:00 2001
From: sherwood <peter.sherwood@cern.ch>
Date: Thu, 24 Dec 2020 15:31:18 +0100
Subject: [PATCH 221/308] jet hypo update trigger test ref files for new and
 modified chains

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref     | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 201a8038ae04..947244ddea8c 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -1470,14 +1470,20 @@ HLT_j0_aggSEP500htSEP30etSEP0eta320_L1J20:
     0: 1
   stepFeatures:
     0: 5
+HLT_j0_fbdjshared_L1J20:
+  eventCount: 7
+  stepCounts:
+    0: 7
+  stepFeatures:
+    0: 179
 HLT_j0_perf_L1J12_EMPTY:
   eventCount: 0
 HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20:
-  eventCount: 15
+  eventCount: 7
   stepCounts:
-    0: 15
+    0: 7
   stepFeatures:
-    0: 386
+    0: 176
 HLT_j225_subjesgscIS_ftf_bmv2c1040_split_L1J100:
   eventCount: 0
   stepCounts:
@@ -1554,6 +1560,12 @@ HLT_j360_subjesgscIS_ftf_bmv2c1077_split_L1J100:
     0: 3
   stepFeatures:
     0: 3
+HLT_j40_j0_aggSEP50htSEP10etSEP0eta320_L1J20:
+  eventCount: 19
+  stepCounts:
+    0: 19
+  stepFeatures:
+    0: 493
 HLT_j420_L1J100:
   eventCount: 0
 HLT_j420_pf_subresjesgscIS_ftf_L1J100:
-- 
GitLab


From f2a79b01bea84a7b10b66afd350bd7da7a446f9b Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Thu, 24 Dec 2020 08:37:17 +0100
Subject: [PATCH 222/308] Bugfix for the Event Service

Bugfix in the mechanism of handling failed MP workers in the Event Service.
This patch covers the case when a worker fails to transition from the event
processing state into the finalization state after receiving "No more events"
message from the range scatterer. The idea here is that instead of releasing
a fixed number of workers (nprocs), the scatterer will keep releasing the
workers until it gets a signal that all of them have finished.
---
 .../AthenaMPTools/src/EvtRangeProcessor.cxx   | 13 ++-
 Control/AthenaMPTools/src/EvtRangeProcessor.h |  3 +-
 .../AthenaMPTools/src/EvtRangeScatterer.cxx   | 79 ++++++++++++-------
 Control/AthenaMPTools/src/EvtRangeScatterer.h |  8 +-
 4 files changed, 67 insertions(+), 36 deletions(-)

diff --git a/Control/AthenaMPTools/src/EvtRangeProcessor.cxx b/Control/AthenaMPTools/src/EvtRangeProcessor.cxx
index d9d8f01cabd8..c931f4f75b3d 100644
--- a/Control/AthenaMPTools/src/EvtRangeProcessor.cxx
+++ b/Control/AthenaMPTools/src/EvtRangeProcessor.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "EvtRangeProcessor.h"
@@ -47,6 +47,7 @@ EvtRangeProcessor::EvtRangeProcessor(const std::string& type
   , m_isPileup(false)
   , m_rankId(-1)
   , m_nEventsBeforeFork(0)
+  , m_activeWorkers(0)
   , m_inpFile("")
   , m_chronoStatSvc("ChronoStatSvc", name)
   , m_incidentSvc("IncidentSvc", name)
@@ -120,6 +121,7 @@ int EvtRangeProcessor::makePool(int, int nprocs, const std::string& topdir)
   }
 
   m_nprocs = (nprocs==-1?sysconf(_SC_NPROCESSORS_ONLN):nprocs);
+  m_activeWorkers = m_nprocs;
   m_subprocTopDir = topdir;
 
   // Create rank queue and fill it
@@ -236,6 +238,15 @@ StatusCode EvtRangeProcessor::wait_once(pid_t& pid)
 	return StatusCode::FAILURE;
       }
     }
+    else {
+      // The worker finished successfully and it was the last worker. Release the Event Range Scatterer
+      if(--m_activeWorkers==0
+	 && !m_sharedFailedPidQueue->send_basic<pid_t>(-1)) {
+	// To Do: how to report this error to the pilot?
+	ATH_MSG_ERROR("Failed to release the Event Range Scatterer");
+	return StatusCode::FAILURE;
+      }
+    }
 
     // Erase the pid from m_procStates map
     m_procStates.erase(itProcState);
diff --git a/Control/AthenaMPTools/src/EvtRangeProcessor.h b/Control/AthenaMPTools/src/EvtRangeProcessor.h
index 82b8268489d2..ea997db12123 100644
--- a/Control/AthenaMPTools/src/EvtRangeProcessor.h
+++ b/Control/AthenaMPTools/src/EvtRangeProcessor.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ATHENAMPTOOLS_EVTRANGEPROCESSOR_H
@@ -66,6 +66,7 @@ class EvtRangeProcessor final : public AthenaMPToolBase
   bool m_isPileup;        // Are we doing pile-up digitization?
   int  m_rankId;          // Each worker has its own unique RankID from the range (0,...,m_nprocs-1) 
   int  m_nEventsBeforeFork;
+  int  m_activeWorkers;   // Keep track of the number of workers
   std::string m_inpFile;  // Cached name of the input file. To avoid reopening
 
   ServiceHandle<IChronoStatSvc>     m_chronoStatSvc;
diff --git a/Control/AthenaMPTools/src/EvtRangeScatterer.cxx b/Control/AthenaMPTools/src/EvtRangeScatterer.cxx
index 0c3da82ad342..e40a15b132da 100644
--- a/Control/AthenaMPTools/src/EvtRangeScatterer.cxx
+++ b/Control/AthenaMPTools/src/EvtRangeScatterer.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "EvtRangeScatterer.h"
@@ -23,8 +23,8 @@
 #include <cstdlib>
 
 EvtRangeScatterer::EvtRangeScatterer(const std::string& type
-			       , const std::string& name
-			       , const IInterface* parent)
+				     , const std::string& name
+				     , const IInterface* parent)
   : AthenaMPToolBase(type,name,parent)
   , m_processorChannel("")
   , m_eventRangeChannel("")
@@ -212,6 +212,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func(
   std::string strReady("Ready for events");
   std::string strStopProcessing("No more events");
   std::string processorWaitRequest("");
+  int workerPid{-1};
 
   ATH_MSG_INFO("Starting main loop");
 
@@ -225,6 +226,12 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func(
 	usleep(1000);
       }
       ATH_MSG_INFO("One of the processors is ready for the next range");
+      // Get PID from the request and Update m_pid2RangeID
+      workerPid = std::atoi(processorWaitRequest.c_str());
+      auto it = m_pid2RangeID.find(workerPid);
+      if(it!=m_pid2RangeID.end()) {
+	m_pid2RangeID.erase(it);
+      }
     }    
 
     // Signal the Pilot that AthenaMP is ready for event processing
@@ -239,7 +246,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func(
       eventRange = eventRange.substr(0,carRet);
 
     // Break the loop if no more ranges are expected
-    if(eventRange.compare(strStopProcessing)==0) {
+    if(eventRange.find(strStopProcessing)!=std::string::npos) {
       ATH_MSG_INFO("Stopped the loop. Last message from the Event Range Channel: " << eventRange);
       break;
     }
@@ -335,6 +342,12 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func(
 	usleep(1000);
       }
       ATH_MSG_INFO("One of the processors is ready for the next range");
+      // Get PID from the request and Update m_pid2RangeID
+      workerPid = std::atoi(processorWaitRequest.c_str());
+      auto it = m_pid2RangeID.find(workerPid);
+      if(it!=m_pid2RangeID.end()) {
+	m_pid2RangeID.erase(it);
+      }
     }
     
     // Send to the Processor: RangeID,evtToken[,evtToken] 
@@ -344,8 +357,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func(
     procReportPending++;
 
     // Get PID from the request and Update m_pid2RangeID
-    int pid = std::atoi(processorWaitRequest.c_str());
-    m_pid2RangeID[pid] = rangeID;
+    m_pid2RangeID[workerPid] = rangeID;
     processorWaitRequest.clear();
 
     ATH_MSG_INFO("Sent response to the processor : " << message2ProcessorStr);
@@ -360,29 +372,32 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeScatterer::exec_func(
       // We already have one processor waiting for the answer
       emptyMess4Processor = malloc(1);
       socket2Processor->send(emptyMess4Processor,1);
-      ATH_MSG_INFO("Set one processor free");
+      ATH_MSG_INFO("Set worker PID=" << workerPid << " free");
+      processorWaitRequest.clear();
     }
-    for(int i(0); i<(processorWaitRequest.empty()?m_nprocs:m_nprocs-1); ++i) {
+    bool endLoop{false};
+    while(true) {
       ATH_MSG_DEBUG("Going to set another processor free");
-      while(getNewRangeRequest(socket2Processor,socket2Pilot,procReportPending).empty()) {
-	pollFailedPidQueue(sharedFailedPidQueue,socket2Pilot,procReportPending);
+      while(processorWaitRequest.empty()) {
+	processorWaitRequest = getNewRangeRequest(socket2Processor,socket2Pilot,procReportPending);
+	if(pollFailedPidQueue(sharedFailedPidQueue,socket2Pilot,procReportPending)==-1) {
+	  endLoop = true;
+	  break;
+	}
 	usleep(1000);
       }
+      if(endLoop) break;
+      // Remove worker from m_pid2RangeID
+      workerPid = std::atoi(processorWaitRequest.c_str());
+      auto it = m_pid2RangeID.find(workerPid);
+      if(it!=m_pid2RangeID.end()) {
+	m_pid2RangeID.erase(it);
+      }
       emptyMess4Processor = malloc(1);
       socket2Processor->send(emptyMess4Processor,1);
-      ATH_MSG_INFO("Set one processor free");
-    }
-
-    ATH_MSG_INFO("Still " << procReportPending << " pending reports");
-    
-    // Final round of colecting output file names from processors
-    while(procReportPending>0) {
-      std::string strProcessorRequest = getNewRangeRequest(socket2Processor,socket2Pilot,procReportPending);
-      if(!strProcessorRequest.empty()) {
-	ATH_MSG_WARNING("Unexpected message received from a processor at this stage : " << strProcessorRequest);
-      }
-      pollFailedPidQueue(sharedFailedPidQueue,socket2Pilot,procReportPending);
-      usleep(1000);
+      ATH_MSG_INFO("Set worker PID=" << workerPid << " free");
+      ATH_MSG_INFO("Still " << procReportPending << " pending reports");
+      processorWaitRequest.clear();
     }
   }
 
@@ -509,22 +524,26 @@ std::string EvtRangeScatterer::getNewRangeRequest(yampl::ISocket* socket2Process
   return strProcessorRequest;
 }
 
-void EvtRangeScatterer::pollFailedPidQueue(AthenaInterprocess::SharedQueue*  sharedFailedPidQueue
-					, yampl::ISocket* socket2Pilot
-					, int& procReportPending)
+pid_t EvtRangeScatterer::pollFailedPidQueue(AthenaInterprocess::SharedQueue* sharedFailedPidQueue
+					    , yampl::ISocket* socket2Pilot
+					    , int& procReportPending)
 {
-  pid_t pid;
-  if(sharedFailedPidQueue->try_receive_basic<pid_t>(pid)) {
+  pid_t pid{0};
+  if(sharedFailedPidQueue->try_receive_basic<pid_t>(pid)
+     && pid!=-1) {
     ATH_MSG_INFO("Procesor with PID=" << pid << " has failed!");
-    if(m_pid2RangeID.find(pid)!=m_pid2RangeID.end()) {
+    auto itPid = m_pid2RangeID.find(pid);
+    if(itPid!=m_pid2RangeID.end()) {
       ATH_MSG_WARNING("The failed RangeID = " << m_pid2RangeID[pid] << " will be reported to Pilot");
 
       std::string errorStr("ERR_ATHENAMP_PROCESS " + m_pid2RangeID[pid] + ": Failed to process event range");
       void* errorMessage = malloc(errorStr.size());
       memcpy(errorMessage,errorStr.data(),errorStr.size());
       socket2Pilot->send(errorMessage,errorStr.size());
+      --procReportPending;
+      m_pid2RangeID.erase(pid);
     }
-    procReportPending--;
     ATH_MSG_INFO("Reports pending: " << procReportPending);
   } 
+  return pid;
 }
diff --git a/Control/AthenaMPTools/src/EvtRangeScatterer.h b/Control/AthenaMPTools/src/EvtRangeScatterer.h
index b7b40e03f13d..2b8a617e6dc3 100644
--- a/Control/AthenaMPTools/src/EvtRangeScatterer.h
+++ b/Control/AthenaMPTools/src/EvtRangeScatterer.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ATHENAMPTOOLS_TOKENSCATTERER_H
@@ -56,9 +56,9 @@ class EvtRangeScatterer final : public AthenaMPToolBase
 				 , int& procReportPending);
 
   // Poll the failed PID queue to see if any of the Processors has failed
-  void pollFailedPidQueue(AthenaInterprocess::SharedQueue*  sharedFailedPidQueue
-			  , yampl::ISocket* socket2Pilot
-			  , int& procReportPending);
+  pid_t pollFailedPidQueue(AthenaInterprocess::SharedQueue*  sharedFailedPidQueue
+			   , yampl::ISocket* socket2Pilot
+			   , int& procReportPending);
 
   StringProperty           m_processorChannel;
   StringProperty           m_eventRangeChannel;
-- 
GitLab


From 02a6eb6255d1513acccc4d9bd9818a065f9b1338 Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Fri, 25 Dec 2020 16:47:22 +0100
Subject: [PATCH 223/308] Fix ATLASRECTS-5797 Duplicated c++ includes in
 InnerDetector packages

---
 .../InDetAlignGenAlgs/src/CreateMisalignAlg.cxx        |  3 +--
 .../NNClusteringCalibration_RunI/TTrainedNetwork.cxx   |  3 +--
 .../NNClusteringCalibration_RunI/errors/trainNN.cxx    |  4 +---
 .../NNClusteringCalibration_RunI/number/trainNN.cxx    |  4 +---
 .../NNClusteringCalibration_RunI/positions/trainNN.cxx |  4 +---
 .../validation/validateNNnum.cxx                       |  3 +--
 .../validation/writeNtuple.C                           |  5 +----
 .../PixelCalibAlgs/run2/src/PixMapOverlayWriter.cxx    |  1 -
 .../InDetCalibAlgs/TRT_CalibAlgs/share/makeplots.cpp   |  1 -
 .../TRT_CalibAlgs/src/TRT_StrawStatus.cxx              |  1 -
 .../TRT_CalibTools/src/FillAlignTRTHits.cxx            |  3 +--
 .../InDetByteStreamErrors/TRT_BSErrContainer_p1.h      |  3 +--
 .../TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx      |  1 -
 .../TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h |  1 -
 .../InDetServMatGeoModel/src/ServicesTracker.cxx       |  1 -
 .../InDetTrackingGeometry/src/TRT_LayerBuilder.cxx     |  1 -
 .../InDetTrackingGeometry/src/TRT_LayerBuilderCond.cxx |  1 -
 .../InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx  |  1 -
 .../TRT_ReadoutGeometry/src/TRT_BaseElement.cxx        |  1 -
 .../TRT_ReadoutGeometry/src/TRT_EndcapElement.cxx      |  2 --
 .../BCM_Digitization/src/BCM_DigitizationTool.cxx      |  2 --
 .../src/PixelFastDigitizationTool.cxx                  |  1 -
 .../src/SiSmearedDigitizationTool.cxx                  |  1 -
 .../PixelDigitization/src/SensorSimTool.h              |  1 -
 .../InDetEventTPCnv/InDetEventTPCnvDict.h              |  4 +---
 .../InDetEventTPCnv/src/InDetEventTPCnv.cxx            |  4 +---
 .../src/IDAlignMonResiduals.cxx                        |  1 -
 .../InDetAlignmentMonitoring/src/TrackSelectionTool.h  |  3 +--
 .../EnhancedVertexMonitoring.C                         |  3 +--
 .../InDetGlobalMonitoring/macros/analyzeFiles.C_old    |  5 -----
 .../InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx |  1 -
 .../InDetPerformanceMonitoring/IDPerfMonZee.h          |  3 +--
 .../InDetPerformanceMonitoring/scripts/AtlasStyle.C    | 10 +---------
 .../InDetTrackPRD_Association.h                        |  3 +--
 .../SiSpacePointFormation/SiTrackerSpacePointFinder.h  |  1 -
 .../src/CompetingPixelClustersOnTrackTool.cxx          |  3 +--
 .../InDetConversionFinderTools.h                       |  2 --
 .../src/SingleTrackConversionTool.cxx                  |  3 ---
 .../src/InDetIterativeSecVtxFinderTool.cxx             |  3 +--
 .../src/InDetIterativePriVxFinderTool.cxx              |  1 -
 .../src/SiDetElementsRoadMaker_xk.cxx                  |  1 -
 .../TRT_DetElementsRoadMaker_xk.h                      |  3 +--
 .../src/TRT_DriftCircleToolCosmics.cxx                 |  5 +----
 .../TRT_ElectronPidTools/TRT_ElectronPidToolRun2.h     |  1 -
 .../src/InDetTrigAmbiguitySolver.cxx                   |  1 -
 .../src/TrigTrackResidualMonitor.cxx                   |  3 +--
 .../src/InDetPerfPlot_Resolution.h                     |  1 -
 .../src/InDetPhysValMonitoringTool.cxx                 |  1 -
 .../InDetRecStatistics/TrackStatHelper.h               |  1 -
 .../InDetRecStatistics/src/InDetRecStatisticsAlg.cxx   |  2 --
 50 files changed, 21 insertions(+), 97 deletions(-)

diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
index 14c8adee43af..83f609f0ff60 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/CreateMisalignAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,6 @@
 // Geometry Stuff
 #include "Identifier/Identifier.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"
-#include "AtlasDetDescr/AtlasDetectorID.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/TRT_ID.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx
index ab3922e10fe1..56ba586a3692 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx
@@ -1,11 +1,10 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TTrainedNetwork.h"
 #include <iostream>
 
-#include <iostream>
 #include <vector>
 
 using namespace std;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/errors/trainNN.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/errors/trainNN.cxx
index 6e9fb23a9721..465e41bbb1c8 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/errors/trainNN.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/errors/trainNN.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <TChain.h>
@@ -22,8 +22,6 @@
 
 #include "../TTrainedNetwork.h"
 
-#include <iostream>
-
 #include "TMatrixD.h"
 #include "TVectorD.h"
 #include "trainNN.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/trainNN.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/trainNN.cxx
index a9db60f15ac8..87a17f6e1efd 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/trainNN.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/trainNN.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <TTree.h>
@@ -21,8 +21,6 @@
 #include "../TTrainedNetwork.h"
 #include "TChain.h"
 
-#include <iostream>
-
 #include "TMatrixD.h"
 #include "TVectorD.h"
 #include "trainNN.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/positions/trainNN.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/positions/trainNN.cxx
index 1e744717bfa1..843d149a19e3 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/positions/trainNN.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/positions/trainNN.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <TTree.h>
@@ -22,8 +22,6 @@
 
 #include "../TTrainedNetwork.h"
 
-#include <iostream>
-
 #include "TMatrixD.h"
 #include "TVectorD.h"
 #include "trainNN.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/validateNNnum.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/validateNNnum.cxx
index 51702260c6ad..122f20e7df5e 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/validateNNnum.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/validateNNnum.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <TTree.h>
@@ -21,7 +21,6 @@
 
 #include "../TTrainedNetwork.h"
 
-#include <iostream>
 #include <sstream>
 #include "TMatrixD.h"
 #include "TVectorD.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C
index 893b9c7cbfed..35d94bcdebd5 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #define writeNtuple_cxx
@@ -9,7 +9,6 @@
 #include <TCanvas.h>
 #include <TTree.h>
 #include <TFile.h>
-#include <TCanvas.h>
 #include <TH1F.h>
 #include <TLegend.h>
 #include <iostream>
@@ -26,8 +25,6 @@
 
 #include "../TTrainedNetwork.h"
 
-#include <iostream>
-
 #include "TMatrixD.h"
 #include "TVectorD.h"
 //#include "trainNN.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixMapOverlayWriter.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixMapOverlayWriter.cxx
index f313a1bff54c..e1995693d209 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixMapOverlayWriter.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixMapOverlayWriter.cxx
@@ -7,7 +7,6 @@
 #include "PixelConditionsData/SpecialPixelMap.h"
 #include "PixelConditionsTools/ISpecialPixelMapSvc.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h" 
-#include "PixelConditionsTools/ISpecialPixelMapSvc.h"
 
 // geometry
 #include "InDetIdentifier/PixelID.h"
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/makeplots.cpp b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/makeplots.cpp
index 7eb4f4b2fe56..4ed60ab1059f 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/makeplots.cpp
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/makeplots.cpp
@@ -19,7 +19,6 @@
 #include <TLine.h>
 #include <TLegend.h>
 #include <TLegendEntry.h>
-#include <THStack.h>
 #include <TEventList.h>
 #include <TPad.h>
 #include <TPaveText.h>
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx
index 83ec8b08bd3c..cf21c217211f 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRT_StrawStatus.cxx
@@ -16,7 +16,6 @@
 
 #include "TrkTrack/Track.h"
 #include "TrkTrack/TrackCollection.h"
-#include "InDetPrepRawData/TRT_DriftCircle.h"
 
 #include "xAODEventInfo/EventInfo.h"
 
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx
index 1db966294169..ebb9ea397e5a 100755
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
@@ -21,7 +21,6 @@ PURPOSE: Tool
 #include "FillAlignTRTHits.h"
 #include "TRT_CalibData/TrackInfo.h"
 #include "TrkTrack/Track.h"
-#include "TrkParameters/TrackParameters.h"
 #include "TrkEventPrimitives/LocalParameters.h"
 #include "EventPrimitives/EventPrimitives.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrors/InDetByteStreamErrors/TRT_BSErrContainer_p1.h b/InnerDetector/InDetConditions/InDetByteStreamErrors/InDetByteStreamErrors/TRT_BSErrContainer_p1.h
index 7419411281b4..855645a4a8b5 100644
--- a/InnerDetector/InDetConditions/InDetByteStreamErrors/InDetByteStreamErrors/TRT_BSErrContainer_p1.h
+++ b/InnerDetector/InDetConditions/InDetByteStreamErrors/InDetByteStreamErrors/TRT_BSErrContainer_p1.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -14,7 +14,6 @@
 #include <stdint.h>
 #include "AthContainers/DataVector.h"
 #include "AthenaKernel/CLASS_DEF.h"
-#include <stdint.h>
 
 typedef DataVector<std::pair<uint8_t, uint32_t> > TRT_BSErrContainer_p1; // <type, index>
 
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx
index d33b61158961..690d72008c53 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_AlignDbSvc.cxx
@@ -23,7 +23,6 @@
 #include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
 
 #include "TRT_ConditionsData/FloatArrayStore.h"
-#include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
 #include "AthenaKernel/IOVSvcDefs.h"
 
 // Amg
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h
index 0749d168c005..d83190a2638b 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DCS_ConditionsSvc.h
@@ -15,7 +15,6 @@
 #include "CxxUtils/checker_macros.h"
 #include "TRT_ConditionsServices/ITRT_DCS_ConditionsSvc.h"
 #include "TRT_ConditionsServices/ITRT_ConditionsSvc.h"
-#include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ICondSvc.h"
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx
index f43b215dd256..9bc3c8c47900 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx
@@ -13,7 +13,6 @@
 #include "InDetServMatGeoModel/ConvertStaveServices.h"
 
 #include <map>
-#include <iostream>
 
 #include <iostream>  // for DEBUG only
 using namespace std;
diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilder.cxx b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilder.cxx
index 4821bdba4e4a..50d448df154f 100755
--- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilder.cxx
+++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilder.cxx
@@ -22,7 +22,6 @@
 #include "TrkDetDescrUtils/BinnedArray2D.h"
 #include "TrkDetDescrUtils/BinnedArray1D.h"
 #include "TrkDetDescrUtils/BinUtility.h"
-#include "TrkDetDescrUtils/BinUtility.h"
 // GeoPrimitives
 #include "GeoPrimitives/GeoPrimitivesHelpers.h"
 #include "GeoPrimitives/GeoPrimitivesToStringConverter.h"
diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilderCond.cxx b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilderCond.cxx
index 874a6a622ddb..832f106603ec 100755
--- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilderCond.cxx
+++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/TRT_LayerBuilderCond.cxx
@@ -22,7 +22,6 @@
 #include "TrkDetDescrUtils/BinnedArray2D.h"
 #include "TrkDetDescrUtils/BinnedArray1D.h"
 #include "TrkDetDescrUtils/BinUtility.h"
-#include "TrkDetDescrUtils/BinUtility.h"
 // GeoPrimitives
 #include "GeoPrimitives/GeoPrimitivesHelpers.h"
 #include "GeoPrimitives/GeoPrimitivesToStringConverter.h"
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx
index 5c8be1c4430f..63330a7192e2 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx
@@ -29,7 +29,6 @@
 #include "GeoModelKernel/GeoTransform.h"
 
 #include "GeoModelKernel/GeoTubs.h"
-#include "GeoModelKernel/GeoPhysVol.h"
 #include "GaudiKernel/SystemOfUnits.h"
 
 #include <sstream>
diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BaseElement.cxx b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BaseElement.cxx
index d438c6eccc8f..17cc25a65907 100755
--- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BaseElement.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_BaseElement.cxx
@@ -11,7 +11,6 @@
 #include "GeoModelUtilities/GeoAlignmentStore.h"
 #include "GeoPrimitives/CLHEPtoEigenConverter.h"
 
-#include "GeoModelUtilities/GeoAlignmentStore.h"
 #include "InDetIdentifier/TRT_ID.h"
 
 #include <vector>
diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_EndcapElement.cxx b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_EndcapElement.cxx
index 122ae59933a3..7b857eac6d45 100755
--- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_EndcapElement.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_EndcapElement.cxx
@@ -22,8 +22,6 @@
 #include "TRT_ConditionsData/ExpandedIdentifier.h"
 #include "TRT_ConditionsData/StrawDxContainer.h"
 
-#include "GeoModelUtilities/GeoAlignmentStore.h"
-
 namespace InDetDD {
 
 TRT_EndcapElement::TRT_EndcapElement(const GeoVFullPhysVol* volume,
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx
index 6f65b86848d6..a0e27bc23205 100644
--- a/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/src/BCM_DigitizationTool.cxx
@@ -17,8 +17,6 @@
 #include "xAODEventInfo/EventInfo.h"             // NEW EDM
 #include "xAODEventInfo/EventAuxInfo.h"          // NEW EDM
 
-#include "CLHEP/Random/RandomEngine.h"
-
 //----------------------------------------------------------------------
 // Constructor with parameters:
 //----------------------------------------------------------------------
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
index 1764ddfdd4b6..0f2051120e62 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/PixelFastDigitizationTool.cxx
@@ -30,7 +30,6 @@
 
 // Pile-up
 
-#include "InDetReadoutGeometry/SiDetectorDesign.h"
 #include "PixelReadoutGeometry/PixelModuleDesign.h"
 
 // Fatras
diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
index 470093020a18..48cbc95c5b24 100644
--- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx
@@ -35,7 +35,6 @@
 // Pile-up
 #include "PileUpTools/PileUpMergeSvc.h"
 
-#include "InDetReadoutGeometry/SiDetectorDesign.h"
 #include "PixelReadoutGeometry/PixelModuleDesign.h"
 #include "SCT_ReadoutGeometry/SCT_ModuleSideDesign.h"
 #include "SCT_ReadoutGeometry/SCT_BarrelModuleSideDesign.h"
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h
index adb5b1a68d52..849cb7cacb36 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h
+++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h
@@ -19,7 +19,6 @@
 #include "HitManagement/TimedHitPtr.h"
 #include "SiDigitization/SiChargedDiodeCollection.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "SiDigitization/SiChargedDiodeCollection.h"
 #include "PixelReadoutGeometry/PixelModuleDesign.h"
 #include "SiPropertiesTool/ISiPropertiesTool.h"
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetEventTPCnvDict.h b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetEventTPCnvDict.h
index 4a8d1785c300..348302975140 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetEventTPCnvDict.h
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetEventTPCnvDict.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETEVENTTPCNV_INDETEVENTTPCNVDICT_H
@@ -28,11 +28,9 @@
 #include "InDetEventTPCnv/PixelClusterContainer_p3.h"
 #include "InDetEventTPCnv/SCT_ClusterContainer_p2.h"
 #include "InDetEventTPCnv/SCT_ClusterContainer_p3.h"
-#include "InDetEventTPCnv/PixelClusterContainer_tlp1.h"
 #include "InDetEventTPCnv/SCT_ClusterContainer_tlp1.h"
 #include "InDetEventTPCnv/TRT_DriftCircleContainer_tlp1.h"
 #include "InDetEventTPCnv/InDetPrepRawData/PixelGangedClusterAmbiguities_p1.h"
-#include "InDetEventTPCnv/TRT_DriftCircleContainer_tlp1.h"
 #include "InDetEventTPCnv/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack_p1.h"
 #include "InDetEventTPCnv/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack_p1.h"
 #include "InDetEventTPCnv/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack_p1.h"
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetEventTPCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetEventTPCnv.cxx
index c828f40b610c..70eb5c3ffcf7 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetEventTPCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetEventTPCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // generate the T/P converter entries
@@ -22,11 +22,9 @@
 #include "InDetEventTPCnv/PixelClusterContainer_p2.h"
 #include "InDetEventTPCnv/PixelClusterContainer_p3.h"
 #include "InDetEventTPCnv/SCT_ClusterContainer_p2.h"
-#include "InDetEventTPCnv/PixelClusterContainer_tlp1.h"
 #include "InDetEventTPCnv/SCT_ClusterContainer_tlp1.h"
 #include "InDetEventTPCnv/TRT_DriftCircleContainer_tlp1.h"
 #include "InDetEventTPCnv/InDetPrepRawData/PixelGangedClusterAmbiguities_p1.h"
-#include "InDetEventTPCnv/TRT_DriftCircleContainer_tlp1.h"
 #include "InDetEventTPCnv/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack_p1.h"
 #include "InDetEventTPCnv/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack_p1.h"
 #include "InDetEventTPCnv/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack_p1.h"
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx
index 18caef478a26..faa1323c5a72 100755
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx
@@ -20,7 +20,6 @@
 #include "TMath.h"
 #include "TProfile2D.h"
 #include "TGraphErrors.h"
-#include "TF1.h"
 #include "TFitResult.h"
 #include "TFitResultPtr.h"
 
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionTool.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionTool.h
index 7c086201a3eb..b835250ad433 100755
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionTool.h
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRACKSELECTIONTOOL_H
@@ -20,7 +20,6 @@
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/VertexContainer.h"
-#include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include <vector>
 
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/EnhancedVertexMonitoring.C b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/EnhancedVertexMonitoring.C
index 84c1d7a20ff2..5c8ac57619f1 100755
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/EnhancedVertexMonitoring.C
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/EnhancedVertexMonitoring.C
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // tope level executable
@@ -24,7 +24,6 @@
 #include "TGraphErrors.h"
 #include "TGraphAsymmErrors.h"
 #include "TMath.h"
-#include "TFile.h"
 
 #include "RealTrackTree.h"
 
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/analyzeFiles.C_old b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/analyzeFiles.C_old
index c4fb3c3f3c52..6411695847ca 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/analyzeFiles.C_old
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/analyzeFiles.C_old
@@ -16,17 +16,12 @@
 #include <TStyle.h>
 #include <TMatrixT.h>
 #include <TMinuit.h>
-#include <iostream>
 #include <TVirtualFitter.h>
 
 using namespace std;
 
 #include "RealTrackTree.h"
 #include "TApplication.h"
-#include "TFile.h"
-#include "TStyle.h"
-#include <iostream>
-#include "TString.h"
 #include "TChain.h"
 
 
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx
index 0c3dcdaa2b13..a0092eb23dc3 100755
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx
@@ -33,7 +33,6 @@
 #include "TrkTrack/TrackCollection.h"            
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetRIO_OnTrack/SiClusterOnTrack.h"
-#include "InDetPrepRawData/PixelClusterContainer.h"         
 #include "TrkTrackSummary/TrackSummary.h"
 
 #include "EventPrimitives/EventPrimitivesHelpers.h"
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h
index ada717ab5ee6..9cd97cddc28b 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/InDetPerformanceMonitoring/IDPerfMonZee.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef IDPerfMonZee_H
@@ -19,7 +19,6 @@
 #include "xAODEgamma/ElectronContainer.h"
 #include "xAODEgamma/Photon.h"
 #include "xAODEgamma/PhotonContainer.h"
-#include "xAODEgamma/PhotonContainer.h"
 #include "xAODCaloEvent/CaloCluster.h"
 #include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODMissingET/MissingET.h"
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/scripts/AtlasStyle.C b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/scripts/AtlasStyle.C
index 790ef0be3cd9..2836f3b984bb 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/scripts/AtlasStyle.C
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/scripts/AtlasStyle.C
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <iostream>
@@ -92,16 +92,8 @@ TStyle * AtlasStyle()
 
 
 
-#include <iostream>
 #include <cmath>
 
-
-#include "TLine.h"
-#include "TLatex.h"
-#include "TMarker.h"
-#include "TPave.h"
-#include "TH1.h"
-
 void ATLAS_LABEL(Double_t x,Double_t y,Color_t color) 
 {
   TLatex l; //l.SetTextAlign(12); l.SetTextSize(tsize); 
diff --git a/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/InDetTrackPRD_Association/InDetTrackPRD_Association.h b/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/InDetTrackPRD_Association/InDetTrackPRD_Association.h
index 8881d2ef1d71..f06994c6bc29 100755
--- a/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/InDetTrackPRD_Association/InDetTrackPRD_Association.h
+++ b/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/InDetTrackPRD_Association/InDetTrackPRD_Association.h
@@ -1,7 +1,7 @@
 //Dear emacs, this is -*-c++-*-*
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -17,7 +17,6 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "TrkToolInterfaces/IPRDtoTrackMapTool.h"
 #include "TrkEventUtils/PRDtoTrackMap.h"
-#include "TrkTrack/TrackCollection.h"
 
 namespace InDet {
 
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
index 5b08e6df375b..4b90c2ebf9c2 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
@@ -24,7 +24,6 @@
 #include "TrkSpacePoint/SpacePoint.h"
 #include "TrkSpacePoint/SpacePointContainer.h"
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
-#include "StoreGate/ReadCondHandleKey.h"
 #include "BeamSpotConditionsData/BeamSpotData.h"
 
 #include "GaudiKernel/ToolHandle.h"
diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx
index d842de5665b5..3a4653c433bf 100755
--- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -20,7 +20,6 @@
 // data model
 #include "TrkEventPrimitives/LocalParameters.h"
 #include "InDetPrepRawData/PixelCluster.h"
-//#include "InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h"
 //#include "TrkParameters/AtaStraightLine.h"
 //#include "TrkSurfaces/DiscSurface.h"
 //#include "TrkSurfaces/StraightLineSurface.h"
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
index 213d4ad851f7..e248ea6be1d8 100755
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/InDetConversionFinderTools/InDetConversionFinderTools.h
@@ -26,8 +26,6 @@
 #include "InDetConversionFinderTools/SingleTrackConversionTool.h"
 #include "InDetConversionFinderTools/ConversionFinderUtils.h"
 #include "InDetConversionFinderTools/VertexPointEstimator.h"
-#include "InDetConversionFinderTools/ConversionPostSelector.h"
-#include "InDetConversionFinderTools/SingleTrackConversionTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
 
 #include "TrkParticleBase/TrackParticleBaseCollection.h"
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
index b6c9dcd95908..51e28aa3b52d 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
@@ -25,9 +25,6 @@
 #include "TrkSurfaces/Surface.h"
 
 
-#include "TrkParameters/TrackParameters.h"
-
-
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/VertexContainer.h"
 
diff --git a/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx
index 1996a73648c0..1c277493b25c 100644
--- a/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetIncSecVxFinderTool/src/InDetIterativeSecVtxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 //Author: Lianyou Shan <lianyou.shan@cern.ch>
 
@@ -42,7 +42,6 @@
 #include "VxVertex/VxTrackAtVertex.h"
 //#include "DataModel/DataVector.h"
 #include "AthContainers/DataVector.h"
-#include "TrkEventPrimitives/ParamDefs.h"
 #include "TrkVertexFitterInterfaces/IVertexFitter.h"
 
 #include "TrkTrackLink/ITrackLink.h"
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
index 03f1643f207b..fa3ceb98a333 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
@@ -30,7 +30,6 @@
 #include "TrkVertexFitterInterfaces/IVertexSeedFinder.h"
 
 #include "AthContainers/DataVector.h"
-#include "TrkEventPrimitives/ParamDefs.h"
 #include "TrkVertexFitterInterfaces/IVertexFitter.h"
 #include "VxVertex/RecVertex.h"
 #include "VxVertex/VxTrackAtVertex.h"
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
index 92576b24e940..4be3ff0dc5b5 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadMaker_xk.cxx
@@ -19,7 +19,6 @@
 #include "SCT_ReadoutGeometry/SCT_DetectorManager.h"
 #include "PixelReadoutGeometry/PixelDetectorManager.h"
 #include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h"
-#include "SiDetElementsRoadUtils_xk.h"
 #include "StoreGate/ReadCondHandle.h"
 #include "TrkPrepRawData/PrepRawData.h"
 #include "GaudiKernel/ContextSpecificPtr.h"
diff --git a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h
index d796ec9c5617..07029028690e 100755
--- a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h
+++ b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -24,7 +24,6 @@
 #include "GaudiKernel/AlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ServiceHandle.h"
 
 #include "StoreGate/ReadCondHandleKey.h"
 
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
index 5dfd012a6a7b..807d2a228dfd 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/src/TRT_DriftCircleToolCosmics.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -31,9 +31,6 @@
 
 #include "StoreGate/ReadHandle.h"
 
-#include "GeoPrimitives/GeoPrimitives.h"
-#include "EventPrimitives/EventPrimitives.h"
-
 #include "StoreGate/ReadCondHandle.h"
 ///////////////////////////////////////////////////////////////////
 // Constructior
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ElectronPidToolRun2.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ElectronPidToolRun2.h
index aac420af6784..a64507eec707 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ElectronPidToolRun2.h
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ElectronPidToolRun2.h
@@ -11,7 +11,6 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"       // Exchange IN
 
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "StoreGate/ReadCondHandleKey.h"
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx
index 2810f8fdac75..036c664c57f5 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/src/InDetTrigAmbiguitySolver.cxx
@@ -9,7 +9,6 @@
 #include "TrkTrack/Track.h"
 #include "TrkTrack/TrackCollection.h"
 #include "TrkEventUtils/PRDtoTrackMap.h"
-#include "TrkToolInterfaces/ITrackAmbiguityProcessorTool.h"
 #include "TrkEventPrimitives/FitQuality.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrigNavigation/NavigationCore.icc"
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx
index 8ceff5d7c558..99bcf295dc47 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/src/TrigTrackResidualMonitor.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h"
@@ -19,7 +19,6 @@
 #include "TrkParameters/TrackParameters.h"
 #include "TrkValTools/TrackDiff.h"
 #include "TrkEventPrimitives/TrackStateDefs.h"
-#include "TrkTrack/Track.h"
 #include "TrkSurfaces/Surface.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetIdentifier/SiliconID.h"
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Resolution.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Resolution.h
index 608abd5e894d..453d5cf999c9 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Resolution.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Resolution.h
@@ -22,7 +22,6 @@
 #include "xAODTracking/TrackParticlexAODHelpers.h"
 #include "xAODTruth/TruthParticle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "InDetPlotBase.h"
 #include "InDetPhysValMonitoring/ResolutionHelper.h"
 
 #include "TFitResultPtr.h"
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
index 16e22d4e2da9..535fd48aa8e5 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
@@ -23,7 +23,6 @@
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackStateValidationContainer.h"
 #include "xAODTracking/TrackStateValidation.h"
-#include "xAODTracking/TrackStateValidationContainer.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTruth/TruthParticle.h"
 #include "xAODTruth/TruthVertex.h"
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h b/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h
index d192e7d7d444..bdc5a1f51c32 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/InDetRecStatistics/TrackStatHelper.h
@@ -22,7 +22,6 @@
 #include "TrkToolInterfaces/IExtendedTrackSummaryTool.h"
 #include "TrkToolInterfaces/IPRDtoTrackMapTool.h"
 #include "TrkTruthData/TrackTruthCollection.h"
-#include "TrkTrack/TrackInfo.h"
 
 #include <vector>
 #include <string>
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
index 10bd093d7e5b..4664cb5e275e 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/InDetRecStatisticsAlg.cxx
@@ -68,8 +68,6 @@
 #include "AtlasHepMC/GenParticle.h"
 #include "TruthHelper/PileUpType.h"
 
-#include "IdDictDetDescr/IdDictManager.h" 
-
 
 
 
-- 
GitLab


From 06c3eb4b62e53c694e1bfd1ef56f876c529ecc4c Mon Sep 17 00:00:00 2001
From: Salvador Marti I Garcia <salvador.marti@cern.ch>
Date: Fri, 25 Dec 2020 18:12:08 +0000
Subject: [PATCH 224/308] IDAlignmentMonitoring resolving some conflicts

---
 .../src/IDAlignMonGenericTracks.cxx           |  89 ++++----
 .../src/IDAlignMonResiduals.cxx               | 194 ++++++++++++------
 .../src/IDAlignMonResiduals.h                 |   1 +
 3 files changed, 187 insertions(+), 97 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx
index 0af2fb4750b9..65e66dd9831e 100644
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonGenericTracks.cxx
@@ -551,7 +551,6 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
   //if ( newLowStatFlag ) {    }
   //if ( newLumiBlockFlag() ) {    }
   if ( newRunFlag() ) {  
-
     //if user environment specified we don't want to book new histograms at every run boundary
     //we instead want one histogram per job
     if(m_histosBooked!=0 && AthenaMonManager::environment()==AthenaMonManager::user) return StatusCode::SUCCESS;
@@ -593,28 +592,37 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     //###############
  
     
-    m_nhits_per_event = TH1F_LW::create("Nhits_per_event","Number of hits per event",1024,-0.5,1023.5);  
+    m_nhits_per_event = TH1F_LW::create("Nhits_per_event","Number of hits per event", 1024, -0.5, 1023.5);  
     RegisterHisto(al_mon,m_nhits_per_event) ;  
     m_nhits_per_event->GetXaxis()->SetTitle("Number of Hits on Tracks per Event"); 
-    m_nhits_per_event->GetYaxis()->SetTitle("Number of Events"); 
-    m_ntrk = TH1F_LW::create("ntracks","Number of Tracks",m_NTracksRange+1, -0.5, m_NTracksRange+0.5);
+    m_nhits_per_event->GetYaxis()->SetTitle("Number of Events");
+ 
+    m_ntrk = TH1F_LW::create("ntracks","Number of Tracks", m_NTracksRange+1, -0.5, m_NTracksRange+0.5);
     RegisterHisto(al_mon,m_ntrk);
+    m_ntrk->GetXaxis()->SetTitle("Number of Tracks");
+    m_ntrk->GetYaxis()->SetTitle("Number of Events");
+
     m_ngtrk = TH1F_LW::create("ngtracks","Number of Good Tracks",m_NTracksRange+1, -0.5, m_NTracksRange+0.5);
     RegisterHisto(al_mon,m_ngtrk);
-    m_nhits_per_track = TH1F_LW::create("Nhits_per_track","Number of hits per track",101,-0.5, 100.5);  
+    m_ngtrk->GetXaxis()->SetTitle("Number of Good Tracks");
+    m_ngtrk->GetYaxis()->SetTitle("Number of Events");
+
+    m_nhits_per_track = TH1F_LW::create("Nhits_per_track","Number of hits per track", 101, -0.5, 100.5);  
     RegisterHisto(al_mon,m_nhits_per_track) ; 
     m_nhits_per_track->GetXaxis()->SetTitle("Number of Hits per Track"); 
     m_nhits_per_track->GetYaxis()->SetTitle("Number of Tracks"); 
  
-    m_npixhits_per_track_barrel = TH1F_LW::create("Npixhits_per_track_barrel","Number of pixhits per track (Barrel)",14,-0.5,13.5);  
+    m_npixhits_per_track_barrel = TH1F_LW::create("Npixhits_per_track_barrel","Number of pixhits per track (Barrel)", 14,-0.5,13.5);  
     RegisterHisto(al_mon,m_npixhits_per_track_barrel) ;  
     m_npixhits_per_track_barrel->GetXaxis()->SetTitle("Number of Pixel Hits per Track in Barrel"); 
     m_npixhits_per_track_barrel->GetYaxis()->SetTitle("Number of Tracks"); 
-    m_nscthits_per_track_barrel = TH1F_LW::create("Nscthits_per_track_barrel","Number of scthits per track (Barrel)",30,-0.5,29.5);  
+
+    m_nscthits_per_track_barrel = TH1F_LW::create("Nscthits_per_track_barrel","Number of scthits per track (Barrel)", 30,-0.5,29.5);  
     RegisterHisto(al_mon,m_nscthits_per_track_barrel) ;  
     m_nscthits_per_track_barrel->GetXaxis()->SetTitle("Number of SCT Hits per Track in Barrel"); 
     m_nscthits_per_track_barrel->GetYaxis()->SetTitle("Number of Tracks"); 
-    m_ntrthits_per_track_barrel = TH1F_LW::create("Ntrthits_per_track_barrel","Number of trthits per track (Barrel)",100,-0.5,99.5);  
+
+    m_ntrthits_per_track_barrel = TH1F_LW::create("Ntrthits_per_track_barrel","Number of trthits per track (Barrel)", 100,-0.5,99.5);  
     RegisterHisto(al_mon,m_ntrthits_per_track_barrel) ; 
     m_ntrthits_per_track_barrel->GetXaxis()->SetTitle("Number of TRT Hits per Track in Barrel"); 
     m_ntrthits_per_track_barrel->GetYaxis()->SetTitle("Number of Tracks");   
@@ -623,10 +631,12 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     RegisterHisto(al_mon,m_npixhits_per_track_eca) ;  
     m_npixhits_per_track_eca->GetXaxis()->SetTitle("Number of Pixel Hits per Track in ECA"); 
     m_npixhits_per_track_eca->GetYaxis()->SetTitle("Number of Tracks"); 
+
     m_nscthits_per_track_eca = TH1F_LW::create("Nscthits_per_track_eca","Number of scthits per track (Eca)",30,-0.5,29.5);  
     RegisterHisto(al_mon,m_nscthits_per_track_eca) ;  
     m_nscthits_per_track_eca->GetXaxis()->SetTitle("Number of SCT Hits per Track in ECA"); 
     m_nscthits_per_track_eca->GetYaxis()->SetTitle("Number of Tracks"); 
+
     m_ntrthits_per_track_eca = TH1F_LW::create("Ntrthits_per_track_eca","Number of trthits per track (Eca)",100,-0.5,99.5);  
     RegisterHisto(al_mon,m_ntrthits_per_track_eca) ;   
     m_ntrthits_per_track_eca->GetXaxis()->SetTitle("Number of TRT Hits per Track in ECA"); 
@@ -636,10 +646,12 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     RegisterHisto(al_mon,m_npixhits_per_track_ecc) ;  
     m_npixhits_per_track_ecc->GetXaxis()->SetTitle("Number of Pixel Hits per Track in ECC"); 
     m_npixhits_per_track_ecc->GetYaxis()->SetTitle("Number of Tracks"); 
+
     m_nscthits_per_track_ecc = TH1F_LW::create("Nscthits_per_track_ecc","Number of scthits per track (Ecc)",30,-0.5,29.5);  
     RegisterHisto(al_mon,m_nscthits_per_track_ecc) ;  
     m_nscthits_per_track_ecc->GetXaxis()->SetTitle("Number of SCT Hits per Track in ECC"); 
     m_nscthits_per_track_ecc->GetYaxis()->SetTitle("Number of Tracks"); 
+
     m_ntrthits_per_track_ecc = TH1F_LW::create("Ntrthits_per_track_ecc","Number of trthits per track (Ecc)",100,-0.5,99.5);  
     RegisterHisto(al_mon,m_ntrthits_per_track_ecc) ;    
     m_ntrthits_per_track_ecc->GetXaxis()->SetTitle("Number of TRT Hits per Track in ECC"); 
@@ -648,30 +660,34 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     ///////////////////////////////////////////////////////////////////////////////////////////////////
     //Monitoring plots shown in the dqm web page
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    m_chi2oDoF = TH1F_LW::create("chi2oDoF","chi2oDoF",100,0,10);  
+    m_chi2oDoF = TH1F_LW::create("chi2oDoF","chi2oDoF", 100, 0., 10.);  
     RegisterHisto(al_mon,m_chi2oDoF) ;  
     m_chi2oDoF->GetXaxis()->SetTitle("Track #chi^{2} / NDoF"); 
     m_chi2oDoF->GetYaxis()->SetTitle("Number of Tracks");  
-    m_eta = TH1F_LW::create("eta","eta",100,-m_etaRange,m_etaRange);  
+
+    m_eta = TH1F_LW::create("eta","eta", 80,-m_etaRange,m_etaRange);  
     RegisterHisto(al_mon_ls,m_eta) ;  
     m_eta->GetXaxis()->SetTitle("Track #eta"); 
-    m_eta->GetYaxis()->SetTitle("Number of Tracks"); 
-    m_phi = TH1F_LW::create("phi","phi",100,0,2*M_PI);  m_phi->SetMinimum(0);
+    m_eta->GetYaxis()->SetTitle("Number of Tracks");
+ 
+    m_phi = TH1F_LW::create("phi","phi", 80, 0,2*M_PI);  
     RegisterHisto(al_mon_ls,m_phi) ;  
+    m_phi->SetMinimum(0);
     m_phi->GetXaxis()->SetTitle("Track #phi"); 
     m_phi->GetYaxis()->SetTitle("Number of Tracks");  
-    m_d0_bscorr = TH1F_LW::create("d0_bscorr","d0 (corrected for beamspot); [mm]",400,-m_d0BsRange,m_d0BsRange);  
+
+    m_d0_bscorr = TH1F_LW::create("d0_bscorr","d0 (corrected for beamspot); d0 [mm]",200,-m_d0BsRange,m_d0BsRange);  
     RegisterHisto(al_mon_ls,m_d0_bscorr) ;  
     
     m_z0 = TH1F_LW::create("z0","z0;[mm]",100,-m_z0Range,m_z0Range);  
     RegisterHisto(al_mon,m_z0) ;  
     m_z0sintheta = TH1F_LW::create("z0sintheta","z0sintheta",100,-m_z0Range,m_z0Range);  
     RegisterHisto(al_mon,m_z0sintheta) ;  
+
     m_d0 = TH1F_LW::create("d0","d0;[mm]",400,-m_d0Range,m_d0Range);  
     RegisterHisto(al_mon,m_d0) ;  
     
 
-    
     m_npixhits_per_track = TH1F_LW::create("Npixhits_per_track","Number of pixhits per track",14,-0.5,13.5);  
     RegisterHisto(al_mon_ls,m_npixhits_per_track) ;  
     m_npixhits_per_track->GetXaxis()->SetTitle("Number of Pixel Hits per Track"); 
@@ -750,8 +766,6 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     m_trk_pT_asym_ecc = TH1F_LW::create("trk_pT_asym_ecc","Track Charge Asymmetry versus pT (Endcap C) ",50,0,100);
     RegisterHisto(al_mon,m_trk_pT_asym_ecc);
     
-    
-    
 
     if(m_extendedPlots){
       
@@ -781,7 +795,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       RegisterHisto(al_mon, m_trk_pT_vs_eta_eca     );
 
       m_trk_d0_barrel  = TH1F_LW::create("trk_d0_barrel","Impact parameter: all tracks (Barrel); d_{0} [mm]",100, -m_d0Range, m_d0Range);
-      m_trk_d0c_barrel = TH1F_LW::create("trk_d0c_barrel","Impact parameter (corrected for vertex): all tracks (Barrel)",100, -5, 5);  
+      m_trk_d0c_barrel = TH1F_LW::create("trk_d0c_barrel","Impact parameter (corrected for vertex): all tracks (Barrel)",100, -4., 4.);  
       m_trk_z0_barrel  = TH1F_LW::create("trk_z0_barrel","Track z0: all tracks (Barrel)",100, -m_z0Range, m_z0Range);
       m_trk_d0_eca     = TH1F_LW::create("trk_d0_eca","Impact parameter: all tracks (Endcap A)",100, -m_d0Range, m_d0Range);
       m_trk_d0c_eca    = TH1F_LW::create("trk_d0c_eca","Impact parameter (corrected for vertex): all tracks  (Endcap A)",100, -m_d0Range, m_d0Range);  
@@ -808,8 +822,6 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       m_trk_chi2Prob = new TProfile("trk_chi2Prob","chi2Prob versus eta",100,-m_etaRange,m_etaRange,-5,5);  
       RegisterHisto(al_mon,m_trk_chi2Prob) ;
 
-    
-
       
       //Detailed IP Plots. All the PV Corrected are broken and need to be fixed.
       m_trk_d0_barrel_zoomin = TH1F_LW::create("trk_d0_barrel_zoomin","Impact parameter: all tracks (Barrel)",100,-5,5);
@@ -887,7 +899,6 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       
       
       
-      
       //PV corrected plots. Broken. 
       m_d0_pvcorr = TH1F_LW::create("d0_pvcorr","d0 (corrected for primVtx); [mm]",400,-m_d0Range,m_d0Range);  
       RegisterHisto(al_mon,m_d0_pvcorr) ; 
@@ -939,32 +950,32 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       m_trk_chi2ProbDist->GetYaxis()->SetTitle("Number of Tracks");
       RegisterHisto(al_mon,m_trk_chi2ProbDist) ;
       
-      m_errCotTheta = TH1F_LW::create("errCotTheta","Error of CotTheta",50,0,0.02);
+      m_errCotTheta = TH1F_LW::create("errCotTheta","Error of CotTheta", 40, 0, 0.02);
       RegisterHisto(al_mon,m_errCotTheta);  
       m_errCotTheta->GetXaxis()->SetTitle("Track #Delta(cot(#theta))"); 
       m_errCotTheta->GetYaxis()->SetTitle("Number of Tracks"); 
       
-      m_errCotThetaVsD0BS = new TH2F("errCotThetaVsD0BS","Error of CotTheta vs d0BS",-m_d0BsRange,m_d0BsRange,40,50,0 ,0.02);
+      m_errCotThetaVsD0BS = new TH2F("errCotThetaVsD0BS","Error of CotTheta vs d0BS", 50, -m_d0BsRange, m_d0BsRange, 40, 0. ,0.02);
       RegisterHisto(al_mon,m_errCotThetaVsD0BS) ;  
       m_errCotThetaVsD0BS->GetXaxis()->SetTitle("d0 (mm)"); 
       m_errCotThetaVsD0BS->GetYaxis()->SetTitle("Track #Delta(cot(#theta))"); 
 
-      m_errCotThetaVsPt = new TH2F("errCotThetaVsPt","Error of CotTheta vs Pt",50,0,40,50,0 ,0.02);
+      m_errCotThetaVsPt = new TH2F("errCotThetaVsPt","Error of CotTheta vs Pt",50,0,40, 40, 0. ,0.02);
       RegisterHisto(al_mon,m_errCotThetaVsPt) ;  
       m_errCotThetaVsPt->GetXaxis()->SetTitle("Pt (GeV/c)"); 
       m_errCotThetaVsPt->GetYaxis()->SetTitle("Track #Delta(cot(#theta))"); 
        
-      m_errCotThetaVsP = new TH2F("errCotThetaVsP","Error of CotTheta vs P",50,0,40,50,0 ,0.02);
+      m_errCotThetaVsP = new TH2F("errCotThetaVsP","Error of CotTheta vs P",50,0,40, 40, 0. ,0.02);
       RegisterHisto(al_mon,m_errCotThetaVsP) ;  
       m_errCotThetaVsP->GetXaxis()->SetTitle("P (GeV/c)"); 
       m_errCotThetaVsP->GetYaxis()->SetTitle("Track #Delta(cot(#theta))"); 
       
-      m_errCotThetaVsPhi = new TH2F("errCotThetaVsPhi","Error of CotTheta vs Phi",50,0,2*M_PI,50, 0 ,0.02);
+      m_errCotThetaVsPhi = new TH2F("errCotThetaVsPhi","Error of CotTheta vs Phi",50,0,2*M_PI, 40, 0. ,0.02);
       RegisterHisto(al_mon,m_errCotThetaVsPhi) ;  
       m_errCotThetaVsPhi->GetXaxis()->SetTitle("#phi0"); 
       m_errCotThetaVsPhi->GetYaxis()->SetTitle("Track #Delta(cot(#theta))"); 
       
-      m_errCotThetaVsEta = new TH2F("errCotThetaVsEta","Error of CotTheta vs Eta",50,-3., 3.,50, 0 ,0.02);
+      m_errCotThetaVsEta = new TH2F("errCotThetaVsEta","Error of CotTheta vs Eta",50,-3., 3., 40, 0. ,0.02);
       RegisterHisto(al_mon,m_errCotThetaVsEta) ;  
       m_errCotThetaVsEta->GetXaxis()->SetTitle("#eta"); 
       m_errCotThetaVsEta->GetYaxis()->SetTitle("Track #Delta(cot(#theta))"); 
@@ -973,12 +984,12 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       RegisterHisto(al_mon,m_errTheta);  
       m_errTheta->GetXaxis()->SetTitle("Track #Delta(#theta)"); 
       m_errTheta->GetYaxis()->SetTitle("Number of Tracks"); 
-    
+
       m_errThetaVsD0BS = new TH2F("errThetaVsD0BS","Error of Theta vs d0BS",50,-m_d0BsRange,m_d0BsRange,50,0 ,0.02);
       RegisterHisto(al_mon,m_errThetaVsD0BS) ;  
       m_errThetaVsD0BS->GetXaxis()->SetTitle("d0 (mm)"); 
       m_errThetaVsD0BS->GetYaxis()->SetTitle("Track #delta(#theta)");
-      
+
       m_errThetaVsPt = new TH2F("errThetaVsPt","Error of Theta vs Pt",50,0,50,50,0 ,0.02);
       RegisterHisto(al_mon,m_errThetaVsPt) ;  
       m_errThetaVsPt->GetXaxis()->SetTitle("Pt (GeV/c)"); 
@@ -1134,7 +1145,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       RegisterHisto(al_mon,m_PtVsPhi0Neg);
       m_PtVsPhi0Neg->GetXaxis()->SetTitle("#phi0 (rad)"); 
       m_PtVsPhi0Neg->GetYaxis()->SetTitle("Pt (GeV/c)");  
-      
+
       m_errPtVsEta = new TH2F("errPtVsEta", "Error of Pt Vs Eta", 50, -3., 3.,50, 0., 0.5);
       RegisterHisto(al_mon,m_errPtVsEta);
       m_errPtVsEta->GetXaxis()->SetTitle("#eta"); 
@@ -1188,7 +1199,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       m_QPtVsEta->GetXaxis()->SetTitle("#eta"); 
       RegisterHisto(al_mon,m_QPtVsEta);
       m_QPtVsEta->GetYaxis()->SetTitle("qPt (GeV)");  
-      
+
       //Plots to check the BeamSpot
       // versus Phi0
       m_D0bsVsPhi0 = new TH2F("D0bsVsPhi0", "d0_{bs} Vs #phi0 ", 50, 0, 2*M_PI, 400, -m_d0BsRange, m_d0BsRange);
@@ -1237,7 +1248,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       m_D0bsVsPtBarrel->GetXaxis()->SetTitle("qPt (GeV)"); 
       RegisterHisto(al_mon,m_D0bsVsPtBarrel);
       m_D0bsVsPtBarrel->GetYaxis()->SetTitle("d0_{bs} mm )");
-     
+
       //BeamSpot Position histos
       m_YBs_vs_XBs = new TH2F("YBs_vs_XBs","BeamSpot Position: y vs x",100, -0.9,-0.1, 100, -0.9,-0.1);
       RegisterHisto(al_mon,m_YBs_vs_XBs);
@@ -1307,7 +1318,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
       m_BeamSpotTiltY_vs_LumiBlock->GetYaxis()->SetRangeUser(-1,1);
         
     }
-    
+
     
     //These plots are broken. Have to be passed to the PVbiases tool
     m_trk_d0_wrtPV = TH1F_LW::create("d0_pvcorr_est","d0 (corrected for primVtx v2); [mm]",400,-0.2,0.2);  
@@ -1551,7 +1562,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     m_eta_asym->GetYaxis()->SetTitle("(pos-neg)/(pos+neg)");   
 
 
-    
+
     // msg(MSG::INFO) << "lumiblock histos done " <<endmsg;
 
  
@@ -1559,27 +1570,27 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
 
     
     // lumiblock histos 
-    m_LumiBlock = TH1F_LW::create("LumiBlock","Lumi block",1024,-0.5,1023.5); 
+    m_LumiBlock = TH1F_LW::create("LumiBlock","Lumi block", 1024, -0.5, 1023.5); 
     RegisterHisto(al_mon,m_LumiBlock) ;
     m_LumiBlock->GetXaxis()->SetTitle("Lumi block ID"); 
     m_LumiBlock->GetYaxis()->SetTitle("# events");   
 
-    m_Tracks_per_LumiBlock = TH1F_LW::create("TracksPerLumiBlock","Tracks per Lumi block",1024,-0.5,1023.5); 
+    m_Tracks_per_LumiBlock = TH1F_LW::create("TracksPerLumiBlock","Tracks per Lumi block", 1024, -0.5, 1023.5); 
     RegisterHisto(al_mon,m_Tracks_per_LumiBlock) ;
     m_Tracks_per_LumiBlock->GetXaxis()->SetTitle("Lumi block ID"); 
     m_Tracks_per_LumiBlock->GetYaxis()->SetTitle("# tracks");   
 
-    m_NPIX_per_LumiBlock = TH1F_LW::create("NPixPerLumiBlock","N pixel hits per Lumi block",1024,-0.5,1023.5); 
+    m_NPIX_per_LumiBlock = TH1F_LW::create("NPixPerLumiBlock","N pixel hits per Lumi block", 1024, -0.5, 1023.5); 
     RegisterHisto(al_mon, m_NPIX_per_LumiBlock) ;
     m_NPIX_per_LumiBlock->GetXaxis()->SetTitle("Lumi block ID"); 
     m_NPIX_per_LumiBlock->GetYaxis()->SetTitle("# pixel hits");   
 
-    m_NSCT_per_LumiBlock = TH1F_LW::create("NSCTPerLumiBlock","N SCT hits per Lumi block",1024,-0.5,1023.5); 
+    m_NSCT_per_LumiBlock = TH1F_LW::create("NSCTPerLumiBlock","N SCT hits per Lumi block", 1024, -0.5, 1023.5); 
     RegisterHisto(al_mon, m_NSCT_per_LumiBlock) ;
     m_NSCT_per_LumiBlock->GetXaxis()->SetTitle("Lumi block ID"); 
     m_NSCT_per_LumiBlock->GetYaxis()->SetTitle("# SCT hits");   
 
-    m_NTRT_per_LumiBlock = TH1F_LW::create("NTRTPerLumiBlock","N TRT hits per Lumi block",1024,-0.5,1023.5); 
+    m_NTRT_per_LumiBlock = TH1F_LW::create("NTRTPerLumiBlock","N TRT hits per Lumi block", 1024, -0.5, 1023.5); 
     RegisterHisto(al_mon, m_NTRT_per_LumiBlock) ;
     m_NTRT_per_LumiBlock->GetXaxis()->SetTitle("Lumi block ID"); 
     m_NTRT_per_LumiBlock->GetYaxis()->SetTitle("# TRT hits");   
@@ -1587,7 +1598,7 @@ StatusCode IDAlignMonGenericTracks::bookHistograms()
     m_histosBooked++;
   }
   return StatusCode::SUCCESS;
-  
+
 }
 
 void IDAlignMonGenericTracks::RegisterHisto(MonGroup& mon, TH1F_LW* histo) {
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx
index 18caef478a26..226a949adc41 100755
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx
@@ -177,6 +177,9 @@ struct IDAlignMonResiduals::TRTEndcapHistograms{
 	TH2F* aveResVsPhiWheel[2]{};
 	TH2F* rmsResVsPhiWheel[2]{};
 
+	TH3F* resVsPhiWheelPos[2]{};
+	TH3F* resVsPhiWheelNeg[2]{};
+
 	/** Residual maps for low pT tracks separated by charge in the TRT Endcap */
 	TH3F* resVsRadiusWheelPos[2]{};
 	TH2F* aveResVsRadiusWheelPos[2]{};
@@ -184,6 +187,9 @@ struct IDAlignMonResiduals::TRTEndcapHistograms{
 	TH3F* resVsRadiusWheelNeg[2]{};
 	TH2F* aveResVsRadiusWheelNeg[2]{};
 	TH2F* rmsResVsRadiusWheelNeg[2]{};
+
+        // Residual vs pt and vs wheel in the endcap 
+	TH3F* resVsqPtWheel[2]{};
 };
 
 ////////////////////////////////////////
@@ -307,6 +313,7 @@ void IDAlignMonResiduals::InitializeHistograms()
 {
 
   m_totalEvents = 0;
+  m_hTotalTracks = 0;
   m_oldlumiblock = 0;
   m_sirescalcfailure =0;
   m_pix_eca_xresvsmodphidisk_3d = 0;
@@ -315,7 +322,7 @@ void IDAlignMonResiduals::InitializeHistograms()
   m_pix_ecc_yresvsmodphidisk_3d = 0;
   m_dbm_xresvsmodphi_2d = 0;
   m_sct_b_pullx_pt = 0;
-  m_sct_eca_pullx_pt = 0       ;
+  m_sct_eca_pullx_pt = 0;
   m_sct_ecc_pullx_pt = 0;
   m_sct_b0_xresvsmodetaphi_3d = 0;
   m_sct_b1_xresvsmodetaphi_3d = 0;
@@ -842,6 +849,9 @@ StatusCode IDAlignMonResiduals::bookHistograms()
       m_totalEvents  = new TH1F("TotalEvents","TotalEvents", 1, -0.5, 0.5);
       RegisterHisto(al_mon,m_totalEvents);
 
+      m_hTotalTracks  = new TH1F("TotalTracks","TotalTracks", 1, -0.5, 0.5);
+      RegisterHisto(al_mon,m_hTotalTracks);
+
       m_mu_perEvent = new TH1F("mu_perEvent","<#mu> per event", m_nBinsMuRange, m_muRangeMin, m_muRangeMax);
       RegisterHisto(al_mon,m_mu_perEvent);
     }
@@ -849,13 +859,17 @@ StatusCode IDAlignMonResiduals::bookHistograms()
 
     //All modules
     m_pix_b0_resXvsetaLumiBlock = new TProfile2D("pix_b0_resXvsetaLumiBlock","2D profile of X unbiased residuals vs IBL eta module per Lumi Block; LumiBlock;Module Eta",
-						 m_nBinsLB,m_LBRangeMin,m_LBRangeMax, 20,-10.5,9.5, m_minPIXResXFillRange,m_maxPIXResXFillRange);
+						 m_nBinsLB, m_LBRangeMin, m_LBRangeMax, 
+						 20, -10.5, 9.5, 
+						 m_minPIXResXFillRange, m_maxPIXResXFillRange);
     RegisterHisto(al_mon,m_pix_b0_resXvsetaLumiBlock);
 
     //Only planars
 
     m_pix_b0_resXvsetaLumiBlock_planars = new TProfile2D("pix_b0_resXvsetaLumiBlock_planars","2D profile of X unbiased residuals vs IBL eta module per Lumi Block;LumiBlock; Module Eta",
-							 m_nBinsLB,m_LBRangeMin,m_LBRangeMax, 12,-6.5,5.5, m_minPIXResXFillRange,m_maxPIXResXFillRange);
+							 m_nBinsLB,m_LBRangeMin,m_LBRangeMax, 
+							 12, -6.5, 5.5, 
+							 m_minPIXResXFillRange, m_maxPIXResXFillRange);
     RegisterHisto(al_mon,m_pix_b0_resXvsetaLumiBlock_planars);
 
 
@@ -935,7 +949,7 @@ StatusCode IDAlignMonResiduals::bookHistograms()
     RegisterHisto(al_mon,m_base_vs_LB_planars);
 
 
-    if(msgLvl(MSG::VERBOSE)) msg() << " INITIALIZED GENERALHISTOS FOR RESIDUALS "<< endmsg;
+    ATH_MSG_VERBOSE (" INITIALIZED GENERALHISTOS FOR RESIDUALS ");
     //PrintIBLGeometry();
     MakePIXBarrelHistograms (al_mon);
     MakePIXEndCapsHistograms(al_mon);
@@ -946,8 +960,9 @@ StatusCode IDAlignMonResiduals::bookHistograms()
     MakeTRTHistograms(al_mon);
 
     MakeSiliconHistograms(al_mon);
-    if(msgLvl(MSG::VERBOSE)) msg() << " INITIALIZED GENERALHISTOS FOR RESIDUALS "<< endmsg;
+    ATH_MSG_VERBOSE (" INITIALIZED GENERALHISTOS FOR RESIDUALS ");
     ++m_histosBooked;
+
   }
 
   ATH_MSG_VERBOSE(" Residual histograms booking COMPLETED");
@@ -1060,10 +1075,15 @@ StatusCode IDAlignMonResiduals::fillHistograms()
   SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey, ctx);
 
   m_changedlumiblock = false;
-  m_lumiblock = eventInfo->lumiBlock();
-  if (m_lumiblock!=m_oldlumiblock){   //Changes every m_LBGranularity
-    m_oldlumiblock=m_lumiblock;
-    m_changedlumiblock=true;
+  if (eventInfo.isValid()) {
+    m_lumiblock = eventInfo->lumiBlock();
+    if (m_lumiblock!=m_oldlumiblock){   //Changes every m_LBGranularity
+      m_oldlumiblock=m_lumiblock;
+      m_changedlumiblock=true;
+    }
+  }
+  else {
+    ATH_MSG_DEBUG ("IDAlignMonResiduals::fillHistograms ** eventInfo retrieving failure");
   }
 
   if (!m_hasBeenCalledThisEvent){
@@ -1073,10 +1093,13 @@ StatusCode IDAlignMonResiduals::fillHistograms()
   else {
     m_mu = -999;
   }
+  ATH_MSG_DEBUG ("IDAlignMonResiduals::fillHistograms ** run number: " << eventInfo->runNumber() 
+		   << "  event number: " << eventInfo->eventNumber() 
+		   << "   lumiblock: " << m_lumiblock << "  mu: " << m_mu);
 
   if (m_extendedPlots){
     m_mu_perEvent->Fill(m_mu);
-    m_totalEvents->Fill(0);
+    m_totalEvents->Fill(0.);
   }
 
   float timeCor = 0.;
@@ -1094,15 +1117,18 @@ StatusCode IDAlignMonResiduals::fillHistograms()
 
   SG::ReadHandle<TrackCollection> inputTracks{m_tracksName};
   if (not inputTracks.isValid()) {
-    ATH_MSG_DEBUG ("IDAlignMonResiduals::fillHistograms() -- " << m_tracksName.key() << " could not be retrieved");
+    ATH_MSG_WARNING ("IDAlignMonResiduals::fillHistograms ** " << m_tracksName.key() << " could not be retrieved");
     return StatusCode::RECOVERABLE;
   }
 
   const DataVector<Trk::Track>* tracks = m_trackSelection->selectTracks(inputTracks);
-  ATH_MSG_DEBUG ("IDAlignMonResiduals::fillHistograms() -- event: " << m_events
-		 << " with Track collection " << m_tracksName.key()
-		 << " has size =" << tracks->size());
-
+  ATH_MSG_DEBUG ("IDAlignMonResiduals::fillHistograms ** event: " << m_events
+		   << "  run: " << eventInfo->runNumber()
+		   << "  event: " << eventInfo->eventNumber()
+		   << "  LB: " << m_lumiblock
+		   << "  --> Track collection " << m_tracksName.key()
+		   << "  has size =" << tracks->size());
+  
   int nTracks = 0;
   int nHitsEvent = 0;
 
@@ -1111,8 +1137,8 @@ StatusCode IDAlignMonResiduals::fillHistograms()
     //need to get the Trk::Track object from which the TrackParticle object was created
     //this has the hit information
     const Trk::Track* track = *trackItr;
-    if(track == NULL){
-      ATH_MSG_WARNING("** IDAlignMonResiduals::fillHistograms ** No associated Trk::Track object found for track "<< nTracks);
+    if(track == nullptr){
+      ATH_MSG_DEBUG("** IDAlignMonResiduals::fillHistograms ** No associated Trk::Track object found for track "<< nTracks);
       continue;
     }
 
@@ -1136,6 +1162,7 @@ StatusCode IDAlignMonResiduals::fillHistograms()
     float trkpt      = -999;
     float trkqoverp2 = -999;
     float trketa_w   = -999;
+    bool countedTrack = false;
     
     if(m_extendedPlots) {
       trkqoverp2 =  track->perigeeParameters()->parameters()[Trk::qOverP]*fabs(track->perigeeParameters()->parameters()[Trk::qOverP])*1000000.;
@@ -1151,36 +1178,47 @@ StatusCode IDAlignMonResiduals::fillHistograms()
     }
     //looping over the hits of this track
     ATH_MSG_DEBUG ("** track " << nTracks << "/" << tracks->size() 
-		   << " pt: " <<  trkpt << "  eta: " << trketa_w << "   weight: " << hweight
-		   << " ** start looping on hits/TSOS ");
+		     << "  pt: " <<  trkpt 
+		     << "  eta: " << trketa_w 
+		     << "  weight: " << hweight
+		     << " ** start looping on hits/TSOS ** ");
     for (const Trk::TrackStateOnSurface* tsos : *track->trackStateOnSurfaces()) {
       ++nTSOS;
-      if (tsos == NULL) {
+      ATH_MSG_DEBUG (" ====> dealing with hit " << nTSOS << "/" << track->trackStateOnSurfaces()->size() << " of track: " << nTracks << "/" << tracks->size());
+      if (tsos == nullptr) {
 	ATH_MSG_DEBUG ("     TSOS (hit) = " << nTSOS << " is NULL ");
 	continue;
       }	
-      ATH_MSG_DEBUG ("** IDAlignMonResiduals::fillHistograms() ** track: " << nTracks << "  dealing with TSOS (hit) = " << nTSOS);
 
       //skipping outliers
+      ATH_MSG_DEBUG (" --> testing hit " << nTSOS << "/" << track->trackStateOnSurfaces()->size() << " to be measurement type");
       if(!tsos->type(Trk::TrackStateOnSurface::Measurement)) {
 	ATH_MSG_DEBUG ("Skipping TSOS " << nTSOS << " because it is an outlier (or the first TSOS on the track)");
 	continue;
       }
+
       const Trk::MeasurementBase* mesh =tsos->measurementOnTrack();
-      ATH_MSG_DEBUG ("Defined hit MeasurementBase for hit " << nTSOS);
+      ATH_MSG_DEBUG ( " --> Defined hit measurementOnTrack() for hit: " << nTSOS <<"/" << track->trackStateOnSurfaces()->size() << " of track " << nTracks);
+      if (!countedTrack) {
+	ATH_MSG_DEBUG ( " --> going to fill: m_hTotalTracks->Fill(0.) ");
+	// m_hTotalTracks->Fill(0.); // count only once
+	countedTrack = true;
+      }
 
       //Trk::RIO_OnTrack object contains information on the hit used to fit the track at this surface
+      ATH_MSG_DEBUG (" --> Going to retrive the Trk::RIO_OnTrack for hit " << nTSOS); 
       const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>(mesh);
-      if (hit== NULL) {
+      if (hit == nullptr) {
 	//for some reason the first tsos has no associated hit - maybe because this contains the defining parameters?
-	if (nHits > 0 && msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No hit associated with TSOS "<< nTSOS << endmsg;
+	if (nHits > 0) ATH_MSG_DEBUG ("No hit associated with TSOS "<< nTSOS);
 	continue;
       }
 
+      ATH_MSG_DEBUG (" --> Going to retrive the track parameters of this TSOS: " << nTSOS); 
       const Trk::TrackParameters* trackParameter = tsos->trackParameters();
-      if(trackParameter==NULL) {
+      if(trackParameter== nullptr) {
 	//if no TrackParameters for TSOS we cannot define residuals
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Skipping TSOS " << nTSOS << " because does not have TrackParameters" << endmsg;
+	ATH_MSG_DEBUG (" Skipping TSOS " << nTSOS << " because it does not have TrackParameters");
 	continue;
       }
 
@@ -1189,10 +1227,10 @@ StatusCode IDAlignMonResiduals::fillHistograms()
       float incidencePhi = -999;
       float incidenceTheta = -999;
 
+      ATH_MSG_DEBUG (" --> going for hit->detectorElement() of hit " << nTSOS << "/" << track->trackStateOnSurfaces()->size());
       const Trk::TrkDetElementBase *de = hit->detectorElement(); //  rio is the measurment at a particular suface
-      const InDetDD::SiDetectorElement *side = dynamic_cast<const
-	InDetDD::SiDetectorElement *>(de);
-      if(side){
+      const InDetDD::SiDetectorElement *side = dynamic_cast<const InDetDD::SiDetectorElement *>(de);
+      if (side){
 	Amg::Vector3D mytrack = trackParameter->momentum(); // track parameters at that surface
 	Amg::Vector3D mynormal = side->normal();
 	Amg::Vector3D myphiax = side->phiAxis();
@@ -1206,12 +1244,13 @@ StatusCode IDAlignMonResiduals::fillHistograms()
 
       const AmgSymMatrix(5)* TrackParCovariance = trackParameter ? trackParameter->covariance() : NULL;
 
-      if(TrackParCovariance==NULL) {
+      if( TrackParCovariance == nullptr) {
 	//if no MeasuredTrackParameters the hit will not have associated convariance error matrix and will not
 	//be able to define a pull or unbiased residual (errors needed for propagation)
 	ATH_MSG_DEBUG ("Skipping TSOS " << nTSOS << " because does not have MeasuredTrackParameters");
 	continue;
       }
+      ATH_MSG_DEBUG (" --> going to define residuals and everything of TSOS  #" << nTSOS << "/" << track->trackStateOnSurfaces()->size());
 
       float residualX = 9999.0;
       float residualY = 9999.0;
@@ -1251,14 +1290,14 @@ StatusCode IDAlignMonResiduals::fillHistograms()
       int ClusSize    = -999;
 
       const Identifier & hitId = hit->identify();
-      ATH_MSG_DEBUG ( "Defined  hit Identifier ");
+      ATH_MSG_DEBUG ( "Defining  hit Identifier ");
       if (m_idHelper->is_trt(hitId)) detType = 2;
       else if (m_idHelper->is_sct(hitId)) detType = 1;
       else  detType = 0;
 
       // TRT hits: detType = 2
       if(detType==2){ 
-	ATH_MSG_DEBUG("** IDAlignMonResiduals::fillHistograms() ** Hit is from the TRT, finding residuals... ");
+	ATH_MSG_DEBUG ("** IDAlignMonResiduals::fillHistograms() ** Hit is from the TRT, finding residuals... ");
 	bool isTubeHit = (mesh->localCovariance()(Trk::locX,Trk::locX) > 1.0) ? 1 : 0;
 	const Trk::TrackParameters* trackParameter = tsos->trackParameters();
 	float hitR = hit->localParameters()[Trk::driftRadius];
@@ -1285,7 +1324,7 @@ StatusCode IDAlignMonResiduals::fillHistograms()
 	  if(msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Cannot define unbiased parameters for hit, skipping it." << endmsg;
 	  continue;
 	}
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Found UnBiased TrackParameters" << endmsg;
+	ATH_MSG_DEBUG (" --> TRT UnBiased TrackParameters of hit " << nTSOS << " FOUND");
 	
 	float perdictR = trackParameterUnbiased->parameters()[Trk::locR];
 	
@@ -1304,7 +1343,7 @@ StatusCode IDAlignMonResiduals::fillHistograms()
 	  pullR = residualPull->pull()[Trk::locR];
 	}
 	else {
-	  if(msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " no covariance of the track parameters given, can not calc pull!" << endmsg;
+	  ATH_MSG_DEBUG (" no covariance of the track parameters given, can not calculate pull!");
 	}
 	
 	delete trackParameterUnbiased;
@@ -1317,17 +1356,17 @@ StatusCode IDAlignMonResiduals::fillHistograms()
 	const InDet::TRT_DriftCircle *RawDriftCircle(NULL);
 	
 	if (trtCircle!=NULL) {
-	  ATH_MSG_DEBUG("Getting RawDriftCircle");
+	  ATH_MSG_DEBUG(" --> Getting TRT RawDriftCircle");
 	  RawDriftCircle = dynamic_cast<const InDet::TRT_DriftCircle*>(trtCircle->prepRawData());
 	}
 	else {
 	  ATH_MSG_DEBUG("trtCircle is a NULL pointer");
 	}
 	
-	if ( trtCircle != NULL){
+	if ( trtCircle != nullptr){
 	  bool isValid;
 	  float leadingEdge = -999;
-	  if (RawDriftCircle != NULL) {
+	  if (RawDriftCircle != nullptr) {
 	    leadingEdge=RawDriftCircle->driftTime(isValid);
 	  }
 	  else {
@@ -4909,11 +4948,13 @@ void IDAlignMonResiduals::MakeTRTEndcapHistograms(MonGroup& al_mon){
       RegisterHisto(al_mon,m_trt_ec_hist->pullR_notube_pt[endcap]);
 
       /** Residuals vs pt per wheel */
-      for (int iWheel=0; iWheel < 40; iWheel++) {
-	m_trt_ec_hist->residualR_ptwheel[endcap][iWheel] = MakeProfile("trt_"+endcapName[endcap]+"_resvspt_wheel_"+intToString(iWheel),
+      for (int iWheel=0; iWheel < 40; iWheel++) { 
+	m_trt_ec_hist->residualR_ptwheel[endcap][iWheel] = MakeProfile("trt_ec_resVspt_wheel_"+intToString(iWheel)+"_"+endcapName[endcap],
 								       "Residual vs p_{T} for TRT "+endcapName[endcap]+" "+intToString(iWheel),
 								       m_nBinsPtRange, -m_PtRange, m_PtRange,
-								       m_minTRTResWindow, m_maxTRTResWindow, "Track p_{T} [GeV]","Residual [mm]");
+								       m_minTRTResWindow, m_maxTRTResWindow,
+								       "Track p_{T} [GeV]","Residual [mm]");
+	SetMinWindow(m_trt_ec_hist->residualR_ptwheel[endcap][iWheel], -0.025, 0.025);
 	RegisterHisto(al_mon,m_trt_ec_hist->residualR_ptwheel[endcap][iWheel]);
       }
       
@@ -4921,13 +4962,13 @@ void IDAlignMonResiduals::MakeTRTEndcapHistograms(MonGroup& al_mon){
       m_trt_ec_hist->residualR_mu[endcap] = MakeHist("trt_ec_residualR_mu_"+endcapName[endcap],
 						     "UnBiased Residual vs mu for TRT "+endcapName[endcap],
 						     m_nBinsMuRange, m_muRangeMin, m_muRangeMax,
-						     100, m_minTRTResWindow, m_maxTRTResWindow,
+						     50, m_minTRTResWindow, m_maxTRTResWindow,
 						     "#mu ","Residual [mm]"); 
       RegisterHisto(al_mon,m_trt_ec_hist->residualR_mu[endcap]);
       
       m_trt_ec_hist->pullR_mu[endcap] = MakeHist("trt_ec_pullR_mu_"+endcapName[endcap],"Unbiased residual pull vs mu for TRT "+endcapName[endcap],
 						 m_nBinsMuRange, m_muRangeMin, m_muRangeMax,
-						 100, -m_RangeOfPullHistos,m_RangeOfPullHistos,
+						 50, -m_RangeOfPullHistos,m_RangeOfPullHistos,
 						 "#mu","Pull");
       RegisterHisto(al_mon,m_trt_ec_hist->pullR_mu[endcap]);
     }
@@ -4940,50 +4981,80 @@ void IDAlignMonResiduals::MakeTRTEndcapHistograms(MonGroup& al_mon){
 						      32, -0.5, 31.5,
 						      50, m_minTRTResWindow, m_maxTRTResWindow);
       RegisterHisto(al_mon,m_trt_ec_hist->resVsPhiWheel[endcap]);
+
       m_trt_ec_hist->aveResVsPhiWheel[endcap] = MakeHist("trt_ec_aveResVsPhiWheel_"+endcapName[endcap],
 							 "Average Residual vs Phi Sector & Wheel for TRT "+endcapName[endcap],
 							 40, -0.5, 39.5,
 							 32, -0.5, 31.5,
 							 "End-cap 4-plane wheel","#phi Sector");
       RegisterHisto(al_mon,m_trt_ec_hist->aveResVsPhiWheel[endcap]);
+
       m_trt_ec_hist->rmsResVsPhiWheel[endcap] = MakeHist("trt_ec_rmsResVsPhiWheel_"+endcapName[endcap],"Residual RMS vs Phi Sector & Wheel for TRT "+endcapName[endcap],
 							 40, -0.5, 39.5,
 							 32, -0.5, 31.5,
 							 "End-cap 4-plane wheel","#phi Sector");
       RegisterHisto(al_mon,m_trt_ec_hist->rmsResVsPhiWheel[endcap]);
 
+      // same for positive and negative charged particles
+      m_trt_ec_hist->resVsPhiWheelPos[endcap] = new TH3F(("trt_ec_resVsPhiWheelPos_"+endcapName[endcap]).c_str(),
+						      ("Residual Distribution vs Phi Sector & Wheel for TRT "+endcapName[endcap]+" positive;Wheel;#phi sector;Residual [mm]").c_str(),
+						      40, -0.5, 39.5,
+						      32, -0.5, 31.5,
+						      50, m_minTRTResWindow, m_maxTRTResWindow);
+      RegisterHisto(al_mon,m_trt_ec_hist->resVsPhiWheelPos[endcap]);
+      m_trt_ec_hist->resVsPhiWheelNeg[endcap] = new TH3F(("trt_ec_resVsPhiWheelNeg_"+endcapName[endcap]).c_str(),
+						      ("Residual Distribution vs Phi Sector & Wheel for TRT "+endcapName[endcap]+" negative;Wheel;#phi sector;Residual [mm]").c_str(),
+						      40, -0.5, 39.5,
+						      32, -0.5, 31.5,
+						      50, m_minTRTResWindow, m_maxTRTResWindow);
+      RegisterHisto(al_mon,m_trt_ec_hist->resVsPhiWheelNeg[endcap]);
+
       /** Endcap Residual plots vs Radius & Wheel */
       m_trt_ec_hist->resVsRadiusWheelPos[endcap] = new TH3F(("trt_ec_resVsRadiusWheelPos_"+endcapName[endcap]).c_str(),
 							    ("Residual Distribution vs Wheel & Radius on Wheel for TRT "+endcapName[endcap]+";Wheel;Radius [mm]; Res [mm]").c_str(),
-							    40, -0.5, 39.5, 30, 644,1004/*these are the radius limits in mm according to TRT SW*/,
+							    40, -0.5, 39.5, 
+							    20, 644., 1004. /*these are the radius limits in mm according to TRT SW*/,
 							    50, m_minTRTResWindow, m_maxTRTResWindow);
       RegisterHisto(al_mon,m_trt_ec_hist->resVsRadiusWheelPos[endcap]);
       m_trt_ec_hist->aveResVsRadiusWheelPos[endcap] = MakeHist("trt_ec_aveResVsRadiusWheelPos_"+endcapName[endcap],
 							       "Average Residual vs Wheel & Radius on Wheel for TRT "+endcapName[endcap],
-							       40, -0.5, 39.5, 30, 644, 1004,
+							       40, -0.5, 39.5, 
+							       20, 644., 1004.,
 							       "Wheel Number","Radius on Wheel [mm]");
       RegisterHisto(al_mon,m_trt_ec_hist->aveResVsRadiusWheelPos[endcap]);
       m_trt_ec_hist->rmsResVsRadiusWheelPos[endcap] = MakeHist("trt_ec_rmsResVsRadiusWheelPos_"+endcapName[endcap],
 							       "Residual RMS vs Wheel & Radius on Wheel for TRT "+endcapName[endcap],
-							       40, -0.5, 39.5, 30, 644, 1004,
+							       40, -0.5, 39.5, 
+							       20, 644., 1004.,
 							       "Wheel Number","Radius on Wheel [mm]");
       RegisterHisto(al_mon,m_trt_ec_hist->rmsResVsRadiusWheelPos[endcap]);
       m_trt_ec_hist->resVsRadiusWheelNeg[endcap] = new TH3F(("trt_ec_resVsRadiusWheelNeg_"+endcapName[endcap]).c_str(),
 							    ("Residual Distribution vs Wheel & Radius on Wheel for TRT "+endcapName[endcap]+";Wheel;Radius [mm]; Res [mm]").c_str(),
-							    40, -0.5, 39.5, 30, 644, 1004/*these are the radius limits in mm according to TRT SW*/,
+							    40, -0.5, 39.5, 
+							    25, 644., 1004./*these are the radius limits in mm according to TRT SW*/,
 							    50, m_minTRTResWindow, m_maxTRTResWindow);
       RegisterHisto(al_mon,m_trt_ec_hist->resVsRadiusWheelNeg[endcap]);
       m_trt_ec_hist->aveResVsRadiusWheelNeg[endcap] = MakeHist("trt_ec_aveResVsRadiusWheelNeg_"+endcapName[endcap],
 							       "Average Residual vs Wheel & Radius on Wheel for TRT "+endcapName[endcap],
-							       40, -0.5, 39.5, 30, 644,1004,
+							       40, -0.5, 39.5, 
+							       20, 644., 1004.,
 							       "Wheel Number","Radius on Wheel [mm]");
       RegisterHisto(al_mon,m_trt_ec_hist->aveResVsRadiusWheelNeg[endcap]);
       m_trt_ec_hist->rmsResVsRadiusWheelNeg[endcap] = MakeHist("trt_ec_rmsResVsRadiusWheelNeg_"+endcapName[endcap],
 							       "Residual RMS vs Wheel & Radius on Wheel for TRT "+endcapName[endcap],
-							       40, -0.5, 39.5, 30, 644, 1004,
+							       40, -0.5, 39.5, 
+							       20, 644., 1004.,
 							       "Wheel Number","Radius on Wheel [mm]");
       RegisterHisto(al_mon,m_trt_ec_hist->rmsResVsRadiusWheelNeg[endcap]);
 
+      /** Endcap residual histograms vs q x pT & Wheel */ 
+      m_trt_ec_hist->resVsqPtWheel[endcap] = new TH3F(("trt_ec_resVsqPtWheel_"+endcapName[endcap]).c_str(),
+						      ("Residual Distribution vs Wheel & p_{T} for TRT "+endcapName[endcap]+";Wheel;q#timesp_{T} [GeV]; Res [mm]").c_str(),
+						      40, -0.5, 39.5,
+						      20, -m_PtRange, m_PtRange,
+						      50, m_minTRTResWindow, m_maxTRTResWindow);
+      RegisterHisto(al_mon,m_trt_ec_hist->resVsqPtWheel[endcap]);
+
       /** R(t) relation */
       m_trt_ec_hist->rt[endcap] = MakeHist("trt_ec_rt_"+endcapName[endcap],"rt relation for TRT "+endcapName[endcap], 100,-12.5,59.375,100,0,2,"leading edge [ns] corrected for t0 and EP ","dist from wire to track [mm]");
       RegisterHisto(al_mon,m_trt_ec_hist->rt[endcap]);
@@ -5257,7 +5328,7 @@ void IDAlignMonResiduals::fillTRTEndcapHistograms(int barrel_ec, int layer_or_wh
     if(m_extendedPlots){
       if (LE != -999) m_trt_ec_hist->rt[endcap] -> Fill(LE - EP - t0,fabs(perdictR), hweight);
       m_trt_ec_hist->residualR_pt[endcap]-> Fill(trkpt, residualR, hweight);
-      m_trt_ec_hist->residualR_ptwheel[endcap][layer_or_wheel]-> Fill(trkpt, residualR, hweight);
+      m_trt_ec_hist->residualR_ptwheel[endcap][getRing(layer_or_wheel,straw_layer)]-> Fill(trkpt, residualR, hweight);
       m_trt_ec_hist->pullR_pt[endcap]    -> Fill(trkpt, pullR    , hweight);
       if (!isTubeHit) m_trt_ec_hist->pullR_notube_pt[endcap] -> Fill(trkpt,pullR, hweight);
 
@@ -5278,22 +5349,29 @@ void IDAlignMonResiduals::fillTRTEndcapHistograms(int barrel_ec, int layer_or_wh
       }
     }
 
+
     // fill TH3F of ave residual vs phi & wheel
     if(m_extendedPlots){
-      m_trt_ec_hist->resVsPhiWheel[endcap]->Fill(getRing(layer_or_wheel,straw_layer),phi_module,residualR,hweight);
+      float theWheel  = static_cast<float>(getRing(layer_or_wheel,straw_layer));
+      float thePhiMod = static_cast<float>(phi_module);
+
+      m_trt_ec_hist->resVsPhiWheel[endcap]->Fill(theWheel, thePhiMod, residualR, hweight);
+
       // fill TH3F of ave residual vs wheel & radius vs charge & LOW PT ONLY
       ATH_MSG_DEBUG ("Going to fill m_trt_ec_hist->resVsRadiusWheelPos["<< endcap<<"] for pt: " << trkpt << "  hitGlobalR= " << hitGlobalR);
       if(fabs(trkpt) < m_maxPtEC){
 	int charge = (trkpt > 0 ? 1 : -1);
-	if (hitGlobalR != -9999)
-	  {
-	    if(charge > 0){
-	      m_trt_ec_hist->resVsRadiusWheelPos[endcap]->Fill(getRing(layer_or_wheel,straw_layer), hitGlobalR, residualR,hweight);
-	    }
-	    else{
-	      m_trt_ec_hist->resVsRadiusWheelNeg[endcap]->Fill(getRing(layer_or_wheel,straw_layer), hitGlobalR, residualR,hweight);
-	    }
+	if (hitGlobalR != -9999) {
+	  if(charge > 0){
+	    m_trt_ec_hist->resVsPhiWheelPos[endcap]   ->Fill(theWheel, thePhiMod,  residualR, hweight);
+	    m_trt_ec_hist->resVsRadiusWheelPos[endcap]->Fill(theWheel, hitGlobalR, residualR, hweight);
+	  }
+	  else{
+	    m_trt_ec_hist->resVsPhiWheelNeg[endcap]   ->Fill(theWheel, thePhiMod,  residualR, hweight);
+	    m_trt_ec_hist->resVsRadiusWheelNeg[endcap]->Fill(theWheel, hitGlobalR, residualR, hweight);
 	  }
+	} // radius known
+	m_trt_ec_hist->resVsqPtWheel[endcap]->Fill(theWheel, trkpt, residualR, hweight);
       }
     }
 
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h
index 954d79ff91da..b24017dd6b0c 100755
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.h
@@ -215,6 +215,7 @@ class IDAlignMonResiduals : public ManagedMonitorToolBase
   //histograms
   
   TH1F* m_totalEvents{};
+  TH1F* m_hTotalTracks{};
   TH1F* m_sirescalcfailure{};
   std::vector<TH3F*> m_sct_b_Oxresxvsmodetaphi_3ds;
   std::vector<TH3F*> m_sct_b_Oyresxvsmodetaphi_3ds;
-- 
GitLab


From e16190ee77e3e8c9d5088fedf3f88d155db4a688 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Sat, 26 Dec 2020 17:13:26 +0100
Subject: [PATCH 225/308] Unset any custom TRUE or FALSE macros, should they be
 defined.

This is necessary on macOS 11, as system headers on that OS do
define these macros for some weird reason.
---
 .../JetUncertainties/UncertaintyEnum.h               | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyEnum.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyEnum.h
index 3433aaa688ec..74dea8c24814 100644
--- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyEnum.h
+++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/UncertaintyEnum.h
@@ -91,7 +91,7 @@ namespace CompScaleVar
     {
         // Error state
         UNKNOWN=0,      // Failure/unset/etc
-        
+
         // Scale uncertainties
         FourVec,        // The full jet 4-vector
         Pt,             // The jet pT
@@ -106,7 +106,7 @@ namespace CompScaleVar
         C2Beta1,        // The value of C_2^{beta=1} (ECF ratio)
         Qw,             // The value of Qw
         TagScaleFactor, // Tagging efficiency SF
-        
+
         // Resolution uncertainties
         MassRes,        // The jet mass resolution, relative
         MassResAbs,     // The jet mass resolution, absolute
@@ -212,6 +212,14 @@ namespace JetTopology
     TypeEnum stringToEnum(const TString type);
 }
 
+// Unset the TRUE and FALSE macros, defined in a custom way on macOS 11.
+#ifdef TRUE
+#  undef TRUE
+#endif
+#ifdef FALSE
+#  undef FALSE
+#endif
+
 namespace ExtendedBool
 {
     enum TypeEnum
-- 
GitLab


From c0ccae8605f3c2e12e79ed60b56e2808f572e611 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Sat, 26 Dec 2020 19:37:43 +0100
Subject: [PATCH 226/308] Transparent reading of R21 ESD with different muon
 segment collection names

---
 Control/AthenaConfiguration/python/AllConfigFlags.py |  8 ++++++++
 .../MuonConfig/python/MuonSegmentNameFixConfig.py    | 11 +++++++++++
 .../CscRawDataMonitoring/CSCSegmValMonAlg.h          |  1 -
 .../python/CscMonitoringESD_Alg.py                   |  4 ++++
 .../CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx    | 12 ++----------
 .../MdtRawDataMonitoring/MdtRawDataMonAlg.h          |  1 -
 .../python/MDTMonitorAlgorithm.py                    |  4 ++++
 .../MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx    | 12 ++----------
 8 files changed, 31 insertions(+), 22 deletions(-)
 create mode 100644 MuonSpectrometer/MuonConfig/python/MuonSegmentNameFixConfig.py

diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index 83e2ed707f96..5025f59995a8 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -48,8 +48,16 @@ def _createCfgFlags():
         collections = [col for col in rawCollections if not col.endswith('Aux.') ]
         return collections
 
+    def _typedInputCollections(inputFile):
+        if not inputFile:
+            return []
+
+        collections = ['%s#%s' % type_key for type_key in GetFileMD(inputFile).get("itemList",[])]
+        return collections
+
     acf.addFlag('Input.Collections', lambda prevFlags : _inputCollections(prevFlags.Input.Files) )
     acf.addFlag('Input.SecondaryCollections', lambda prevFlags : _inputCollections(prevFlags.Input.SecondaryFiles) )
+    acf.addFlag('Input.TypedCollections', lambda prevFlags : _typedInputCollections(prevFlags.Input.Files) )
 
     acf.addFlag('Concurrency.NumProcs', 0)
     acf.addFlag('Concurrency.NumThreads', 0)
diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentNameFixConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentNameFixConfig.py
new file mode 100644
index 000000000000..c23d67428bcc
--- /dev/null
+++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentNameFixConfig.py
@@ -0,0 +1,11 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+# This allows us to convert Run 2 ESD Trk::SegmentCollection "MuonSegments" to
+# Run 3 "TrackMuonSegments"
+def MuonSegmentNameFixCfg(flags):
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    cfg = ComponentAccumulator()
+    if 'Trk::SegmentCollection#MuonSegments' in flags.Input.TypedCollections:
+        from SGComps.AddressRemappingConfig import InputRenameCfg
+        cfg.merge(InputRenameCfg("Trk::SegmentCollection", "MuonSegments", "TrackMuonSegments"))
+    return cfg
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
index 6408400df38c..7567d39993d6 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
@@ -59,7 +59,6 @@ class CSCSegmValMonAlg : public AthMonitorAlgorithm {
     "Handle to the service providing the IMuonEDMHelperSvc interface" };
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","TrackMuonSegments","muon segments"};
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKeyAlt{this,"SegmentKey","MuonSegments","muon segments"};
 
   Gaudi::Property<std::vector<std::string>> m_sampSelTriggers{this,"EventSelTriggers",{}};
   Gaudi::Property<bool> m_doEvtSel{this,"DoEventSelection",false};
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitoringESD_Alg.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitoringESD_Alg.py
index 2935361e4638..a87f507615eb 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitoringESD_Alg.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/python/CscMonitoringESD_Alg.py
@@ -24,6 +24,10 @@ def CscMonitoringESD_AlgConfig(inputFlags):
     from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
     result.merge(MuonGeoModelCfg(inputFlags))
    
+    # Fixup for R21 ESD
+    from MuonConfig.MuonSegmentNameFixConfig import MuonSegmentNameFixCfg
+    result.merge(MuonSegmentNameFixCfg(inputFlags))
+
     # The following class will make a sequence, configure algorithms, and link
     # them to GenericMonitoringTools
     from AthenaMonitoring import AthMonitorCfgHelper
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
index 3ddfb1cf6226..bef9f5e11911 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
@@ -46,7 +46,6 @@ StatusCode CSCSegmValMonAlg::initialize() {
   ATH_CHECK(m_edmHelperSvc.retrieve());
   ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK(m_segmKey.initialize());
-  ATH_CHECK(m_segmKeyAlt.initialize());
 
   return AthMonitorAlgorithm::initialize();
 }  
@@ -78,15 +77,8 @@ StatusCode CSCSegmValMonAlg::fillHistograms(const EventContext& ctx) const{
 
     SG::ReadHandle<Trk::SegmentCollection> segments(m_segmKey, ctx);
     if (!segments.isValid()) {
-      if (m_segmKey.key()=="TrackMuonSegments") {
-        // old DataQuality_required input file (/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q431/21.0/myESD.pool.root) still has 'MuonSegments' stored
-        // -> @TODO: need updated input file (temporary workaround: retrieve 'MuonSegments' instead if 'TrackMuonSegments' here)
-        segments = SG::ReadHandle<Trk::SegmentCollection>(m_segmKeyAlt, ctx);
-      }
-      if (!segments.isValid()) {
-        ATH_MSG_ERROR("Could not retrieve Trk::SegmentCollection "<<m_segmKey.key());
-        return StatusCode::FAILURE;
-      }
+      ATH_MSG_ERROR("Could not retrieve Trk::SegmentCollection "<<m_segmKey.key());
+      return StatusCode::FAILURE;
     }
 
     if ( segments->empty() ){
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
index 1d7de7822b6c..1da9dddb88bd 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
@@ -161,7 +161,6 @@ class MdtRawDataMonAlg: public AthMonitorAlgorithm {
   bool m_atlas_ready;
 
   SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","TrackMuonSegments","muon segments"};
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_typeAlt{this,"Eff_segm_typeAlt","MuonSegments","muon segments"};
 
   std::string returnString(int i) const{
     std::stringstream ss;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py
index 25a11b320206..5ed3d6ce704a 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py
@@ -27,6 +27,10 @@ def MdtMonitoringConfig(inputFlags):
     from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
     result.merge(MuonGeoModelCfg(inputFlags))
 
+    # Fixup for R21 ESD
+    from MuonConfig.MuonSegmentNameFixConfig import MuonSegmentNameFixCfg
+    result.merge(MuonSegmentNameFixCfg(inputFlags))
+
     # The following class will make a sequence, configure algorithms, and link
     # them to GenericMonitoringTools
     from AthenaMonitoring import AthMonitorCfgHelper
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
index decb471fda62..0b53e7916360 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
@@ -205,7 +205,6 @@ StatusCode MdtRawDataMonAlg::initialize()
   ATH_CHECK(m_l1RoiKey.initialize(SG::AllowEmpty));
   ATH_CHECK(m_muonKey.initialize());
   ATH_CHECK(m_segm_type.initialize());
-  ATH_CHECK(m_segm_typeAlt.initialize());
   ATH_CHECK(m_key_mdt.initialize());
   ATH_CHECK(m_key_rpc.initialize());
   ATH_CHECK(m_eventInfo.initialize());
@@ -530,15 +529,8 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const
 
   SG::ReadHandle<Trk::SegmentCollection> segms(m_segm_type, ctx);
   if (!segms.isValid()) {
-    if (m_segm_type.key()=="TrackMuonSegments") {
-      // old DataQuality_required input file (/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q431/21.0/myESD.pool.root) still has 'MuonSegments' stored
-      // -> @TODO: need updated input file (temporary workaround: retrieve 'MuonSegments' instead if 'TrackMuonSegments' here)
-      segms = SG::ReadHandle<Trk::SegmentCollection>(m_segm_typeAlt, ctx);
-    }
-    if (!segms.isValid()) {
-      ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << m_segm_type);
-      return StatusCode::FAILURE;
-    }
+    ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << m_segm_type);
+    return StatusCode::FAILURE;
   }
 
   MDTSegmentHistogramStruct segsPlots[4][4][16]; // [region][layer][phi]
-- 
GitLab


From 131758ec549878f4e8d1d76220077c6645d35580 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Sun, 27 Dec 2020 10:54:28 +0100
Subject: [PATCH 227/308] Revert "EventUtils: Delete unused
 ParticleSortingAlg/Tool"

This reverts commit 2904e609e744365d044903dc80438b0d46dea245.
---
 .../EventUtils/src/ParticleSortingAlg.cxx     | 158 +++++++++
 .../EventUtils/src/ParticleSortingAlg.h       | 149 ++++++++
 .../EventUtils/src/ParticleSortingTool.cxx    | 318 ++++++++++++++++++
 .../EventUtils/src/ParticleSortingTool.h      | 183 ++++++++++
 .../src/components/EventUtils_entries.cxx     |   4 +
 5 files changed, 812 insertions(+)
 create mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
 create mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
 create mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
 create mode 100644 PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h

diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
new file mode 100644
index 000000000000..f5ad85275d7f
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
@@ -0,0 +1,158 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ParticleSortingAlg.cxx
+// Implementation file for class ParticleSortingAlg
+// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
+///////////////////////////////////////////////////////////////////
+
+// EventUtils includes
+#include "ParticleSortingAlg.h"
+
+// FrameWork includes
+#include "Gaudi/Property.h"
+#include "GaudiKernel/IJobOptionsSvc.h"
+#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
+
+///////////////////////////////////////////////////////////////////
+// Public methods:
+///////////////////////////////////////////////////////////////////
+
+// Constructors
+////////////////
+ParticleSortingAlg::ParticleSortingAlg( const std::string& name,
+                                        ISvcLocator* pSvcLocator ) :
+  ::AthAlgorithm( name, pSvcLocator ),
+  m_jos("JobOptionsSvc", name),
+  m_tool("ParticleSortingTool/ParticleSortingTool", this),
+  m_inCollKey(""),
+  m_setInCollKey(false),
+  m_outCollKey(""),
+  m_setOutCollKey(false),
+  m_sortVar("pt"),
+  m_setSortVar(false),
+  m_sortDescending(true),
+  m_setSortDescending(false),
+  m_nEventsProcessed(0)
+{
+  declareProperty("JobOptionsSvc",   m_jos, "The JobOptionService instance.");
+
+  declareProperty("SortingTool",        m_tool, "The private ParticleSortingTool" );
+
+  declareProperty("InputContainer",  m_inCollKey="",   "Input container name" );
+  m_inCollKey.declareUpdateHandler( &ParticleSortingAlg::setupInputContainer, this );
+
+  declareProperty("OutputContainer", m_outCollKey="",
+                  "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" );
+  m_outCollKey.declareUpdateHandler( &ParticleSortingAlg::setupOutputContainer, this );
+
+  declareProperty("SortVariable",    m_sortVar="pt",
+                  "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" );
+  m_sortVar.declareUpdateHandler( &ParticleSortingAlg::setupSortVar, this );
+
+  declareProperty("SortDescending",   m_sortDescending=true,
+                  "Define if the container should be sorted in a descending order (default=true)" );
+  m_sortDescending.declareUpdateHandler( &ParticleSortingAlg::setupSortDescending, this );
+}
+
+
+
+// Destructor
+///////////////
+ParticleSortingAlg::~ParticleSortingAlg()
+{}
+
+
+
+// Athena Algorithm's Hooks
+////////////////////////////
+StatusCode ParticleSortingAlg::initialize()
+{
+  ATH_MSG_DEBUG ("Initializing " << name() << "...");
+
+  // Print out the used configuration
+  ATH_MSG_DEBUG ( " using = " << m_jos );
+  ATH_MSG_DEBUG ( " using = " << m_tool );
+  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
+  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
+  ATH_MSG_DEBUG ( " using = " << m_sortVar );
+  ATH_MSG_DEBUG ( " using = " << m_sortDescending );
+
+
+  // Initialize the counters to zero
+  m_nEventsProcessed = 0 ;
+
+
+  // Get the JobOptionService
+  // We will use this to set the properties of our private skimming tool
+  // from the properties of this algorithm.
+  ATH_MSG_VERBOSE( "Getting the JobOptionService");
+  ATH_CHECK( m_jos.retrieve() );
+
+  // Get the full name of the private skimTool
+  ATH_MSG_VERBOSE( "Getting the full name of the tool");
+  const std::string& fullToolName = this->name() + "." + m_tool.name();
+  ATH_MSG_DEBUG( "Got the full name of the tool: " << fullToolName );
+
+  // Now, set all properties of the private skimTool that were acutally configured
+  if (m_setInCollKey) {
+    ATH_MSG_DEBUG( "Setting property" << m_inCollKey
+                   << " of private tool with name: '" << fullToolName << "'" );
+    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKey) );
+  }
+  if (m_setOutCollKey) {
+    ATH_MSG_DEBUG( "Setting property" << m_outCollKey
+                   << " of private tool with name: '" << fullToolName << "'" );
+    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_outCollKey) );
+  }
+  if (m_setSortVar) {
+    ATH_MSG_DEBUG( "Setting property" << m_sortVar
+                   << " of private tool with name: '" << fullToolName << "'" );
+    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortVar) );
+  }
+  if (m_setSortDescending) {
+    ATH_MSG_DEBUG( "Setting property" << m_sortDescending
+                   << " of private tool with name: '" << fullToolName << "'" );
+    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortDescending) );
+  }
+  ATH_MSG_DEBUG( "Done setting properties of the tool");
+
+  // Get the skimming tool
+  ATH_CHECK( m_tool.retrieve() );
+
+  ATH_MSG_DEBUG ( "==> done with initialize " << name() << "..." );
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+StatusCode ParticleSortingAlg::finalize()
+{
+  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
+
+  // Release all tools and services
+  ATH_CHECK( m_jos.release() );
+  ATH_CHECK( m_tool.release() );
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+StatusCode ParticleSortingAlg::execute()
+{
+  // Increase the event counter
+  ++m_nEventsProcessed;
+
+  // Simple status message at the beginning of each event execute,
+  ATH_MSG_DEBUG ( "==> execute " << name() << " on " << m_nEventsProcessed << ". event..." );
+
+  // Call the tool
+  ATH_CHECK( m_tool->addBranches() );
+
+  return StatusCode::SUCCESS;
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
new file mode 100644
index 000000000000..763f04c952ca
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
@@ -0,0 +1,149 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ParticleSortingAlg.h
+// Header file for class ParticleSortingAlg
+// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
+///////////////////////////////////////////////////////////////////
+#ifndef EVENTUTILS_PARTICLESORTINGALG_H
+#define EVENTUTILS_PARTICLESORTINGALG_H 1
+
+// FrameWork includes
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+
+// STL includes
+#include <string>
+
+// Forward declarations
+class IJobOptionsSvc;
+namespace DerivationFramework {
+  class IAugmentationTool;
+}
+
+class ParticleSortingAlg
+  : public ::AthAlgorithm
+{
+
+  ///////////////////////////////////////////////////////////////////
+  // Public methods:
+  ///////////////////////////////////////////////////////////////////
+ public:
+
+  // Copy constructor:
+
+  /// Constructor with parameters:
+  ParticleSortingAlg( const std::string& name, ISvcLocator* pSvcLocator );
+
+  /// Destructor:
+  virtual ~ParticleSortingAlg();
+
+  /// Athena algorithm's initalize hook
+  virtual StatusCode  initialize();
+
+  /// Athena algorithm's execute hook
+  virtual StatusCode  execute();
+
+  /// Athena algorithm's finalize hook
+  virtual StatusCode  finalize();
+
+
+private:
+  // The update handlers
+
+  /// This internal method will realize if a user sets the 'InputContainer' property
+  void setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
+
+  /// This internal method will realize if a user sets the 'OutputContainer' property
+  void setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ );
+
+  /// This internal method will realize if a user sets the 'SortVariable' property
+  void setupSortVar( Gaudi::Details::PropertyBase& /*prop*/ );
+
+  /// This internal method will realize if a user sets the 'SortDeceding' property
+  void setupSortDescending( Gaudi::Details::PropertyBase& /*prop*/ );
+
+
+
+  ///////////////////////////////////////////////////////////////////
+  // Private data:
+  ///////////////////////////////////////////////////////////////////
+ private:
+  /// The job options service (will be used to forward this algs properties to
+  /// the private tool)
+  ServiceHandle<IJobOptionsSvc> m_jos;
+
+  /// The ToolHandle to the private ParticleSortingTool
+  ToolHandle<DerivationFramework::IAugmentationTool> m_tool;
+
+  /// Input container name
+  StringProperty m_inCollKey;
+
+  /// This boolean is true if the user sets the 'InputContainer' property
+  bool m_setInCollKey;
+
+
+  /// The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects
+  StringProperty m_outCollKey;
+
+  /// This boolean is true if the user sets the 'OutputContainer' property
+  bool m_setOutCollKey;
+
+
+  /// Define by what parameter to sort (default: 'pt')
+  StringProperty m_sortVar;
+
+  /// This boolean is true if the user sets the 'SortVariable' property
+  bool m_setSortVar;
+
+
+  /// Define if the container should be sorted in a descending order (default=true)
+  BooleanProperty m_sortDescending;
+
+  /// This boolean is true if the user sets the 'SortDescending' property
+  bool m_setSortDescending;
+
+
+  /// Internal event counter
+  unsigned long m_nEventsProcessed;
+
+};
+
+
+
+///////////////////////////////////////////////////////////////////
+// Inline methods:
+///////////////////////////////////////////////////////////////////
+
+/// This internal method will realize if a user sets the 'InputContainer' property
+inline void ParticleSortingAlg::setupInputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
+  m_setInCollKey = true;
+  return;
+}
+
+/// This internal method will realize if a user sets the 'OutputContainer' property
+inline void ParticleSortingAlg::setupOutputContainer( Gaudi::Details::PropertyBase& /*prop*/ ) {
+  m_setOutCollKey = true;
+  return;
+}
+
+/// This internal method will realize if a user sets the 'SortVariable' property
+inline void ParticleSortingAlg::setupSortVar( Gaudi::Details::PropertyBase& /*prop*/ )
+{
+  m_setSortVar = true;
+  return;
+}
+
+/// This internal method will realize if a user sets the 'SortDeceding' property
+inline void ParticleSortingAlg::setupSortDescending( Gaudi::Details::PropertyBase& /*prop*/ )
+{
+  m_setSortDescending = true;
+  return;
+}
+
+
+#endif //> !EVENTUTILS_PARTICLESORTINGALG_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
new file mode 100644
index 000000000000..876c7e005d22
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.cxx
@@ -0,0 +1,318 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ParticleSortingTool.cxx
+// Implementation file for class ParticleSortingTool
+// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
+///////////////////////////////////////////////////////////////////
+
+// EventUtils includes
+#include "ParticleSortingTool.h"
+
+// EDM includes
+#include "xAODBase/IParticle.h"
+#include "xAODBase/IParticleContainer.h"
+#include "xAODMuon/MuonContainer.h"
+#include "xAODJet/JetContainer.h"
+#include "xAODEgamma/ElectronContainer.h"
+#include "xAODEgamma/PhotonContainer.h"
+#include "xAODTau/TauJetContainer.h"
+#include "xAODPFlow/PFOContainer.h"
+#include "xAODTracking/NeutralParticleContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTruth/TruthParticleContainer.h"
+#include "xAODParticleEvent/CompositeParticleContainer.h"
+#include "xAODParticleEvent/ParticleContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "AthContainers/ConstDataVector.h"
+
+// Constructors
+////////////////
+ParticleSortingTool::ParticleSortingTool( const std::string& type,
+                                          const std::string& name,
+                                          const IInterface* parent ) :
+  ::AthAlgTool  ( type, name, parent ),
+  m_inCollKey(""),
+  m_outCollKey(""),
+  m_sortVar("pt"),
+  m_sortDescending(true),
+  m_contID(0),
+  m_sortID(0),
+  m_nEventsProcessed(0)
+{
+  declareInterface< DerivationFramework::IAugmentationTool >(this);
+
+  declareProperty("InputContainer",  m_inCollKey="",   "Input container name" );
+
+  declareProperty("OutputContainer", m_outCollKey="",
+                  "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" );
+
+  declareProperty("SortVariable",    m_sortVar="pt",
+                  "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" );
+
+  declareProperty("SortDescending",   m_sortDescending=true,
+                  "Define if the container should be sorted in a descending order (default=true)" );
+}
+
+
+// Destructor
+///////////////
+ParticleSortingTool::~ParticleSortingTool()
+{}
+
+
+
+// Athena algtool's Hooks
+////////////////////////////
+StatusCode ParticleSortingTool::initialize()
+{
+  ATH_MSG_DEBUG ("Initializing " << name() << "...");
+
+  // Print out the used configuration
+  ATH_MSG_DEBUG ( " using = " << m_inCollKey );
+  ATH_MSG_DEBUG ( " using = " << m_outCollKey );
+
+  // initialize the counters
+  m_contID           = 0;
+  m_sortID           = 0;
+  m_nEventsProcessed = 0;
+
+  // Figure out how to sort
+  if ( m_sortVar.value() == "pt" )            { m_sortID = 1; }
+  else if ( m_sortVar.value() == "eta" )      { m_sortID = 2; }
+  else if ( m_sortVar.value() == "phi" )      { m_sortID = 3; }
+  else if ( m_sortVar.value() == "m" )        { m_sortID = 4; }
+  else if ( m_sortVar.value() == "e" )        { m_sortID = 5; }
+  else if ( m_sortVar.value() == "rapidity" ) { m_sortID = 6; }
+  else {
+    ATH_MSG_INFO("Didn't find a valid value for SortVariable=" << m_sortVar.value() << "."
+                 << " Assuming it's an auxdata member");
+    m_sortID = 7;
+  }
+  if ( m_sortDescending.value() ) { m_sortID *= -1; }
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+
+StatusCode ParticleSortingTool::finalize()
+{
+  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+// Declare a short pre-processor macro to deal with the different container types
+#define COPY_AND_SORT_CONTAINER( CONTAINERTYPE )                                       \
+else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) {               \
+  ATH_MSG_DEBUG("Trying to copy, sort, and record container of type "#CONTAINERTYPE ); \
+  const CONTAINERTYPE* inCont;                                                         \
+  ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) );                    \
+  CONTAINERTYPE* outCont = new CONTAINERTYPE( SG::VIEW_ELEMENTS );                     \
+  *outCont = *inCont;                                                                  \
+  ATH_CHECK( evtStore()->record ( outCont, m_outCollKey.value() ) );                   \
+  ATH_CHECK( this->doSort(outCont) );                                                  \
+}
+
+
+// Declare a short pre-processor macro to deal with the different container types
+#define OVERWRITE_AND_SORT_CONTAINER( CONTAINERTYPE )                                                \
+else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) {                             \
+  ATH_MSG_DEBUG("Trying to copy, sort, and overwrite container of type "#CONTAINERTYPE );            \
+  const CONTAINERTYPE* inCont;                                                                       \
+  ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) );                                  \
+  ConstDataVector<CONTAINERTYPE>* outCont = new ConstDataVector<CONTAINERTYPE>( SG::VIEW_ELEMENTS ); \
+  for ( const CONTAINERTYPE::base_value_type* inPart : *inCont ){                                    \
+    outCont->push_back(inPart);                                                                      \
+  }                                                                                                  \
+  ATH_CHECK( evtStore()->overwrite( outCont, m_inCollKey.value() ) );                                \
+  ATH_CHECK( this->doSortConst<CONTAINERTYPE>(outCont) );                                            \
+}
+
+
+
+StatusCode ParticleSortingTool::addBranches() const
+{
+  // Increase the event counter
+  ++m_nEventsProcessed;
+
+  // Simple status message at the beginning of each event execute,
+  ATH_MSG_DEBUG ( "==> addBranches " << name() << " on " << m_nEventsProcessed << ". event..." );
+
+  if ( m_outCollKey.value().empty() ) {
+    // Try to get the input container as non-const
+    ATH_MSG_DEBUG("Got an empty 'OutputCollection' property. "
+                  << "Trying to retrieve a non-const version of the 'InputContainer'...");
+    xAOD::IParticleContainer* inCont = evtStore()->tryRetrieve<xAOD::IParticleContainer>( m_inCollKey.value() );
+    if (inCont){ ATH_CHECK( this->doSort(inCont) ); }
+    else {
+      ATH_MSG_DEBUG("We couldn't retrieve a non-const version of the input container... try const.");
+      const xAOD::IParticleContainer* inCont2 = nullptr;
+      ATH_CHECK( evtStore()->retrieve( inCont2, m_inCollKey.value()) );
+      // Now, do the copy and sorting and overwriting of all known container types
+      if (false) {
+      }
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::MuonContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::ElectronContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::PhotonContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::TauJetContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::JetContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::PFOContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::NeutralParticleContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::TrackParticleContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::TruthParticleContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::CompositeParticleContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::ParticleContainer)
+      OVERWRITE_AND_SORT_CONTAINER(xAOD::CaloClusterContainer)
+      else {
+        ATH_MSG_ERROR("Couln't find the provided intput container in store gate for later overwriting");
+        return StatusCode::FAILURE;
+      }
+    }
+  }
+  else {
+    ATH_MSG_DEBUG("Got a non-empty 'OutputCollection' property. "
+                  << "Trying to retrieve a const version of the 'InputContainer'...");
+
+    // Now, do the copy and sorting of all known container types
+    if (false) {
+    }
+    COPY_AND_SORT_CONTAINER(xAOD::MuonContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::ElectronContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::PhotonContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::TauJetContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::JetContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::PFOContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::NeutralParticleContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::TrackParticleContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::TruthParticleContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::CompositeParticleContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::ParticleContainer)
+    COPY_AND_SORT_CONTAINER(xAOD::CaloClusterContainer)
+    else {
+      ATH_MSG_ERROR("Couln't find the provided intput container in store gate");
+      return StatusCode::FAILURE;
+    }
+
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+StatusCode ParticleSortingTool::doSort( xAOD::IParticleContainer* cont ) const
+{
+  if ( !cont ) {
+    ATH_MSG_ERROR("No container to be sorted");
+    return StatusCode::FAILURE;
+  }
+  // Actually do the sorting, using a C++11 lambda function construct
+  // to be able to use the member function here
+  if ( std::abs(m_sortID) == 1 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->comparePt(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 2 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareEta(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 3 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->comparePhi(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 4 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareMass(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 5 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareEnergy(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 6 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareRapidity(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 7 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareAuxData(a,b);
+                } );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+bool ParticleSortingTool::comparePt( const xAOD::IParticle* partA,
+                                     const xAOD::IParticle* partB ) const
+{
+  const double a = partA->pt();
+  const double b = partB->pt();
+  return this->compareDouble(a,b);
+}
+
+
+bool ParticleSortingTool::compareEta( const xAOD::IParticle* partA,
+                                      const xAOD::IParticle* partB ) const
+{
+  const double a = partA->eta();
+  const double b = partB->eta();
+  return this->compareDouble(a,b);
+}
+
+
+bool ParticleSortingTool::comparePhi( const xAOD::IParticle* partA,
+                                      const xAOD::IParticle* partB ) const
+{
+  const double a = partA->phi();
+  const double b = partB->phi();
+  return this->compareDouble(a,b);
+}
+
+
+bool ParticleSortingTool::compareMass( const xAOD::IParticle* partA,
+                                       const xAOD::IParticle* partB ) const
+{
+  const double a = partA->m();
+  const double b = partB->m();
+  return this->compareDouble(a,b);
+}
+
+
+bool ParticleSortingTool::compareEnergy( const xAOD::IParticle* partA,
+                                         const xAOD::IParticle* partB ) const
+{
+  const double a = partA->e();
+  const double b = partB->e();
+  return this->compareDouble(a,b);
+}
+
+
+bool ParticleSortingTool::compareRapidity( const xAOD::IParticle* partA,
+                                           const xAOD::IParticle* partB ) const
+{
+  const double a = partA->rapidity();
+  const double b = partB->rapidity();
+  return this->compareDouble(a,b);
+}
+
+bool ParticleSortingTool::compareAuxData( const xAOD::IParticle* partA,
+                                       const xAOD::IParticle* partB ) const
+{
+  const double a = partA->auxdata<float>( this->m_sortVar.value() );
+  const double b = partB->auxdata<float>( this->m_sortVar.value() );
+  return this->compareDouble(a,b);
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h
new file mode 100644
index 000000000000..dc097711cfb2
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingTool.h
@@ -0,0 +1,183 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ParticleSortingTool.h
+// Header file for class ParticleSortingTool
+// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
+///////////////////////////////////////////////////////////////////
+#ifndef EVENTUTILS_PARTICLESORTINGTOOL_H
+#define EVENTUTILS_PARTICLESORTINGTOOL_H 1
+
+// FrameWork includes
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
+#include "CxxUtils/fpcompare.h"
+
+// EDM inlcudes
+#include "xAODBase/IParticle.h"
+#include "xAODBase/IParticleContainer.h"
+#include "AthContainers/ConstDataVector.h"
+
+// STL includes
+#include <vector>
+#include <string>
+#include <cmath>
+
+class ParticleSortingTool
+  : virtual public ::DerivationFramework::IAugmentationTool,
+            public ::AthAlgTool
+{
+
+  ///////////////////////////////////////////////////////////////////
+  // Public methods:
+  ///////////////////////////////////////////////////////////////////
+public:
+
+  // Copy constructor:
+
+  /// Constructor with parameters:
+  ParticleSortingTool( const std::string& type,
+                       const std::string& name,
+                       const IInterface* parent );
+
+  /// Destructor:
+  virtual ~ParticleSortingTool();
+
+  /// Athena algtool's initialize
+  virtual StatusCode  initialize() override;
+
+  /// Athena algtool's finalize
+  virtual StatusCode  finalize() override;
+
+
+  /// Implement the method from the ISkimmingTool interface
+  virtual StatusCode addBranches() const final override;
+
+
+
+// Private methods
+private:
+
+  /// Helper method that implements the call to the right sort function
+  StatusCode doSort( xAOD::IParticleContainer* cont ) const;
+
+  /// Helper method to sort a ConstDataVector
+  template<class CONTAINERTYPE>
+  StatusCode doSortConst( ConstDataVector<CONTAINERTYPE>* cont ) const;
+
+  /// The method to compare the particle's pt
+  bool comparePt( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// The method to compare the particle's eta
+  bool compareEta( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// The method to compare the particle's phi
+  bool comparePhi( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// The method to compare the particle's mass
+  bool compareMass( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// The method to compare the particle's energy
+  bool compareEnergy( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// The method to compare the particle's rapidity
+  bool compareRapidity( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// The method to compare an auxdata member of the particle
+  bool compareAuxData( const xAOD::IParticle* partA, const xAOD::IParticle* partB ) const;
+
+  /// Method to compare two doubles
+  inline bool compareDouble( double a, double b ) const;
+
+
+  ///////////////////////////////////////////////////////////////////
+  // Private data:
+  ///////////////////////////////////////////////////////////////////
+private:
+
+  /// Input container name
+  StringProperty m_inCollKey;
+
+  /// The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects
+  StringProperty m_outCollKey;
+
+  /// Define by what parameter to sort (default: 'pt')
+  StringProperty m_sortVar;
+
+  /// Define if the container should be sorted in a descending order (default=true)
+  BooleanProperty m_sortDescending;
+
+
+  /// Internal container type identifier
+  mutable unsigned int m_contID;
+
+  /// Internal identifier for the type of sorting
+  mutable int m_sortID;
+
+  /// Internal event counter
+  mutable unsigned long m_nEventsProcessed;
+
+};
+
+
+inline bool ParticleSortingTool::compareDouble( double a, double b ) const
+{
+  if ( m_sortID < 0 ) { return CxxUtils::fpcompare::greater(a,b); }
+  else { return CxxUtils::fpcompare::less(a,b); }
+}
+
+
+template<class CONTAINERTYPE>
+StatusCode ParticleSortingTool::doSortConst( ConstDataVector<CONTAINERTYPE>* cont ) const
+{
+  if ( !cont ) {
+    ATH_MSG_ERROR("No ConstDataVector to be sorted");
+    return StatusCode::FAILURE;
+  }
+  // Actually do the sorting, using a C++11 lambda function construct
+  // to be able to use the member function here
+  if ( std::abs(m_sortID) == 1 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->comparePt(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 2 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareEta(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 3 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->comparePhi(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 4 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareMass(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 5 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareEnergy(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 6 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareRapidity(a,b);
+                } );
+  }
+  else if ( std::abs(m_sortID) == 7 ) {
+    cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
+                  return this->compareAuxData(a,b);
+                } );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+#endif //> !EVENTUTILS_PARTICLESORTINGTOOL_H
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
index 557082712e44..1f217ab44bc0 100644
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/components/EventUtils_entries.cxx
@@ -1,3 +1,5 @@
+#include "../ParticleSortingTool.h"
+#include "../ParticleSortingAlg.h"
 #include "../CutTool.h"
 #include "../CutAlg.h"
 #include "../ParticleSelectionTool.h"
@@ -7,6 +9,8 @@
 #include "../TriggerSelectionAlg.h"
 #include "../EventDecisionAlg.h"
 
+DECLARE_COMPONENT( ParticleSortingTool )
+DECLARE_COMPONENT( ParticleSortingAlg )
 DECLARE_COMPONENT( CutTool )
 DECLARE_COMPONENT( CutAlg )
 DECLARE_COMPONENT( ParticleSelectionTool )
-- 
GitLab


From cdfb22165dba155645500f45d3fe7f6de601df60 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Sun, 27 Dec 2020 15:10:47 +0100
Subject: [PATCH 228/308] EventUtils: Migrate ParticleSortingAlg to IOptionsSvc

---
 .../EventUtils/src/ParticleSortingAlg.cxx              |  9 ++++-----
 .../AnalysisCommon/EventUtils/src/ParticleSortingAlg.h | 10 +++++-----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
index f5ad85275d7f..d6d72da87982 100644
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.cxx
@@ -14,7 +14,6 @@
 
 // FrameWork includes
 #include "Gaudi/Property.h"
-#include "GaudiKernel/IJobOptionsSvc.h"
 #include "DerivationFrameworkInterfaces/IAugmentationTool.h"
 
 ///////////////////////////////////////////////////////////////////
@@ -101,22 +100,22 @@ StatusCode ParticleSortingAlg::initialize()
   if (m_setInCollKey) {
     ATH_MSG_DEBUG( "Setting property" << m_inCollKey
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_inCollKey) );
+    m_jos->set (fullToolName + "." + m_inCollKey.name(), m_inCollKey.toString());
   }
   if (m_setOutCollKey) {
     ATH_MSG_DEBUG( "Setting property" << m_outCollKey
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_outCollKey) );
+    m_jos->set (fullToolName + "." + m_outCollKey.name(), m_outCollKey.toString());
   }
   if (m_setSortVar) {
     ATH_MSG_DEBUG( "Setting property" << m_sortVar
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortVar) );
+    m_jos->set (fullToolName + "." + m_sortVar.name(), m_sortVar.toString());
   }
   if (m_setSortDescending) {
     ATH_MSG_DEBUG( "Setting property" << m_sortDescending
                    << " of private tool with name: '" << fullToolName << "'" );
-    ATH_CHECK( m_jos->addPropertyToCatalogue (fullToolName,m_sortDescending) );
+    m_jos->set (fullToolName + "." + m_sortDescending.name(),  m_sortDescending.toString());
   }
   ATH_MSG_DEBUG( "Done setting properties of the tool");
 
diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
index 763f04c952ca..dd83b6bd8df2 100644
--- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
+++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleSortingAlg.h
@@ -12,6 +12,7 @@
 #define EVENTUTILS_PARTICLESORTINGALG_H 1
 
 // FrameWork includes
+#include "Gaudi/Interfaces/IOptionsSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
@@ -20,7 +21,6 @@
 #include <string>
 
 // Forward declarations
-class IJobOptionsSvc;
 namespace DerivationFramework {
   class IAugmentationTool;
 }
@@ -43,13 +43,13 @@ class ParticleSortingAlg
   virtual ~ParticleSortingAlg();
 
   /// Athena algorithm's initalize hook
-  virtual StatusCode  initialize();
+  virtual StatusCode initialize() override;
 
   /// Athena algorithm's execute hook
-  virtual StatusCode  execute();
+  virtual StatusCode execute() override;
 
   /// Athena algorithm's finalize hook
-  virtual StatusCode  finalize();
+  virtual StatusCode finalize() override;
 
 
 private:
@@ -75,7 +75,7 @@ private:
  private:
   /// The job options service (will be used to forward this algs properties to
   /// the private tool)
-  ServiceHandle<IJobOptionsSvc> m_jos;
+  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jos;
 
   /// The ToolHandle to the private ParticleSortingTool
   ToolHandle<DerivationFramework::IAugmentationTool> m_tool;
-- 
GitLab


From b08d151a1be378d876c76f8b8046662d3b23b3e7 Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Sun, 27 Dec 2020 16:38:23 +0100
Subject: [PATCH 229/308] Adding new categories for Tau trigger online
 monitoring

---
 .../TrigTauRec/python/TrigTauRecConfigMT.py   |  11 +-
 .../TrigTauRec/python/TrigTauRecMonitoring.py | 173 ++++++++++++++++++
 2 files changed, 181 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py
index 675072af2226..9a180e97add0 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py
+++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from TrigTauRec.TrigTauRecConf import TrigTauRecMergedMT
-from TrigTauRec.TrigTauRecMonitoring import tauMonitoringCaloOnly
+from TrigTauRec.TrigTauRecMonitoring import tauMonitoringCaloOnly, tauMonitoringCaloOnlyMVA, tauMonitoringPreselection, tauMonitoringPrecision, tauMonitoringPrecisionMVA
 
 class TrigTauRecMerged_TauCaloOnly (TrigTauRecMergedMT) :
 
@@ -45,7 +45,9 @@ class TrigTauRecMerged_TauCaloOnlyMVA (TrigTauRecMergedMT) :
 
         def __init__(self, name = "TrigTauRecMerged_TauCaloOnlyMVA"):
             super( TrigTauRecMerged_TauCaloOnlyMVA , self ).__init__( name )
-
+            self.MonTool = tauMonitoringCaloOnlyMVA()
+            self._mytools = [] 
+          
             import TrigTauRec.TrigTauAlgorithmsHolder as taualgs
             tools = []
 
@@ -84,8 +86,9 @@ class TrigTauRecMerged_TauPreselection (TrigTauRecMergedMT) :
         __slots__ = [ '_mytools']
         def __init__(self, name = "TrigTauRecMerged_TauPreselection"):
             super( TrigTauRecMerged_TauPreselection , self ).__init__( name )
+            self.MonTool = tauMonitoringPreselection()
             self._mytools = []
-            
+             
             import TrigTauRec.TrigTauAlgorithmsHolder as taualgs
             tools = []
 
@@ -129,6 +132,7 @@ class TrigTauRecMerged_TauPrecision (TrigTauRecMergedMT) :
         __slots__ = [ '_mytools']
         def __init__(self, name = "TrigTauRecMerged_TauPrecision"):
             super( TrigTauRecMerged_TauPrecision , self ).__init__( name )
+            self.MonTool = tauMonitoringPrecision()
             self._mytools = []
 
             import TrigTauRec.TrigTauAlgorithmsHolder as taualgs
@@ -189,6 +193,7 @@ class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMergedMT) :
         def __init__(self, name = "TrigTauRecMerged_TauPrecisionMVA", doMVATES=False, doTrackBDT=False, doRNN=False):
         
             super( TrigTauRecMerged_TauPrecisionMVA , self ).__init__( name )
+            self.MonTool = tauMonitoringPrecisionMVA()
 
             import TrigTauRec.TrigTauAlgorithmsHolder as taualgs
             tools = []
diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py
index f47473bbe10f..b8873a391566 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py
+++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py
@@ -148,3 +148,176 @@ def tauMonitoringCaloOnly():
    return monTool
 
 
+def tauMonitoringCaloOnlyMVA():
+   monTool = GenericMonitoringTool('MonTool')
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
+   monTool.defineHistogram('nRoI_EFTauTracks', path='EXPERT', type='TH1F', title="EF N RoI Tracks; N Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('dPhiEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI phi ; Dphi; nRoIs", xbins=100, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI eta ; Deta; nRoIs", xbins=80, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI, dPhiEFTau_RoI', path='EXPERT', type='TH2F', title="dEta vs dPhi in TrigTauRec FEX; Delta-eta; Delta-phi",
+                                                           xbins=40 , xmin=-0.2, xmax=0.2,
+                                                           ybins=40 , ymin=-0.2, ymax=0.2)
+   monTool.defineHistogram('EMRadius', path='EXPERT', type='TH1F', title="EF EMRadius; EM radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('HadRadius', path='EXPERT', type='TH1F', title="EF HadRadius; Had radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('EtHad, EtEm', path='EXPERT', type='TH2F', title="EF Et had vs Em in TrigTauRecMerged FEX; Et Had (at EM scale) [GeV]; Et EM (at EM scale) [GeV]",
+                                                xbins=30, xmin=0., xmax=150.,
+                                                ybins=30, ymin=0., ymax=150.)
+   monTool.defineHistogram('EMFrac', path='EXPERT', type='TH1F', title="EM Fraction;EM Fraction;nRoIs", xbins=70, xmin=-0.1, xmax=1.3)
+   monTool.defineHistogram('IsoFrac', path='EXPERT', type='TH1F', title="Isolation Fraction;Isolation Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('centFrac', path='EXPERT', type='TH1F', title="EF central Fraction;central Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('nWideTrk', path='EXPERT', type='TH1F', title="EF N Wide Tracks;N Wide Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('ipSigLeadTrk', path='EXPERT', type='TH1F', title="EF IPsig Leading Track;iIPsig Leading Track; nRoIs", xbins=100, xmin=-50., xmax=50)
+   monTool.defineHistogram('trFlightPathSig', path='EXPERT', type='TH1F', title="EF Flightpath sig Track;Flightpath sig Track; nRoIs", xbins=100, xmin=-20., xmax=40)
+   monTool.defineHistogram('massTrkSys', path='EXPERT', type='TH1F', title="EF Mass Trk Sys;Mass Trk Sys [GeV]; nRoIs", xbins=100, xmin=0., xmax=50.)
+   monTool.defineHistogram('dRmax', path='EXPERT', type='TH1F', title="EF dR max;dR max; nRoIs", xbins=50, xmin=-0., xmax=0.25)
+   monTool.defineHistogram('NTrk', path='EXPERT', type='TH1F', title="Number of tracks;Number of tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('TrkAvgDist', path='EXPERT', type='TH1F', title="Track Average Distance; TrkAvgDist; nRoIs", xbins=41, xmin=-0.01, xmax=0.4)
+   monTool.defineHistogram('EtovPtLead', path='EXPERT', type='TH1F', title="Et over lead track Pt; EtovPtLead; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('PSSFraction', path='EXPERT', type='TH1F', title="EF Presampler strip energy fraction;PSS energy fraction; nRoIs", xbins=50, xmin=-0.5, xmax=1.)
+   monTool.defineHistogram('EMPOverTrkSysP', path='EXPERT', type='TH1F', title="EF EMP over TrkSysP;EMP over TrkSysP; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('ChPiEMEOverCaloEME', path='EXPERT', type='TH1F', title="EF EM energy of charged pions over calorimetric EM energy;ChPiEME over CaloEME; nRoIs", xbins=40, xmin=-20., xmax=20.)
+   monTool.defineHistogram('innerTrkAvgDist', path='EXPERT', type='TH1F', title="EF inner track average distance; innerTrkAvgDist; nRoIs", xbins=40, xmin=-0.05, xmax=0.5)
+   monTool.defineHistogram('nCand', path='EXPERT', type='TH1F', title="Number of tau candidates;Number of tau candidates; nevents", xbins=10, xmin=-1.0, xmax=9.)
+   monTool.defineHistogram('PhiL1', path='EXPERT', type='TH1F', title="L1 RoI Phi; L1 RoI Phi; nRoIs", xbins=65, xmin=-3.1415936-0.098174/2., xmax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('EtaL1, PhiL1', path='EXPERT', type='TH2F', title="L1 ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaEF, PhiEF', path='EXPERT', type='TH2F', title="EF ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+   return monTool
+
+
+def tauMonitoringPreselection():
+   monTool = GenericMonitoringTool('MonTool')
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
+   monTool.defineHistogram('nRoI_EFTauTracks', path='EXPERT', type='TH1F', title="EF N RoI Tracks; N Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('dPhiEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI phi ; Dphi; nRoIs", xbins=100, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI eta ; Deta; nRoIs", xbins=80, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI, dPhiEFTau_RoI', path='EXPERT', type='TH2F', title="dEta vs dPhi in TrigTauRec FEX; Delta-eta; Delta-phi",
+                                                           xbins=40 , xmin=-0.2, xmax=0.2,
+                                                           ybins=40 , ymin=-0.2, ymax=0.2)
+   monTool.defineHistogram('EMRadius', path='EXPERT', type='TH1F', title="EF EMRadius; EM radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('HadRadius', path='EXPERT', type='TH1F', title="EF HadRadius; Had radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('EtHad, EtEm', path='EXPERT', type='TH2F', title="EF Et had vs Em in TrigTauRecMerged FEX; Et Had (at EM scale) [GeV]; Et EM (at EM scale) [GeV]",
+                                                xbins=30, xmin=0., xmax=150.,
+                                                ybins=30, ymin=0., ymax=150.)
+   monTool.defineHistogram('EMFrac', path='EXPERT', type='TH1F', title="EM Fraction;EM Fraction;nRoIs", xbins=70, xmin=-0.1, xmax=1.3)
+   monTool.defineHistogram('IsoFrac', path='EXPERT', type='TH1F', title="Isolation Fraction;Isolation Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('centFrac', path='EXPERT', type='TH1F', title="EF central Fraction;central Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('nWideTrk', path='EXPERT', type='TH1F', title="EF N Wide Tracks;N Wide Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('ipSigLeadTrk', path='EXPERT', type='TH1F', title="EF IPsig Leading Track;iIPsig Leading Track; nRoIs", xbins=100, xmin=-50., xmax=50)
+   monTool.defineHistogram('trFlightPathSig', path='EXPERT', type='TH1F', title="EF Flightpath sig Track;Flightpath sig Track; nRoIs", xbins=100, xmin=-20., xmax=40)
+   monTool.defineHistogram('massTrkSys', path='EXPERT', type='TH1F', title="EF Mass Trk Sys;Mass Trk Sys [GeV]; nRoIs", xbins=100, xmin=0., xmax=50.)
+   monTool.defineHistogram('dRmax', path='EXPERT', type='TH1F', title="EF dR max;dR max; nRoIs", xbins=50, xmin=-0., xmax=0.25)
+   monTool.defineHistogram('NTrk', path='EXPERT', type='TH1F', title="Number of tracks;Number of tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('TrkAvgDist', path='EXPERT', type='TH1F', title="Track Average Distance; TrkAvgDist; nRoIs", xbins=41, xmin=-0.01, xmax=0.4)
+   monTool.defineHistogram('EtovPtLead', path='EXPERT', type='TH1F', title="Et over lead track Pt; EtovPtLead; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('PSSFraction', path='EXPERT', type='TH1F', title="EF Presampler strip energy fraction;PSS energy fraction; nRoIs", xbins=50, xmin=-0.5, xmax=1.)
+   monTool.defineHistogram('EMPOverTrkSysP', path='EXPERT', type='TH1F', title="EF EMP over TrkSysP;EMP over TrkSysP; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('ChPiEMEOverCaloEME', path='EXPERT', type='TH1F', title="EF EM energy of charged pions over calorimetric EM energy;ChPiEME over CaloEME; nRoIs", xbins=40, xmin=-20., xmax=20.)
+   monTool.defineHistogram('innerTrkAvgDist', path='EXPERT', type='TH1F', title="EF inner track average distance; innerTrkAvgDist; nRoIs", xbins=40, xmin=-0.05, xmax=0.5)
+   monTool.defineHistogram('nCand', path='EXPERT', type='TH1F', title="Number of tau candidates;Number of tau candidates; nevents", xbins=10, xmin=-1.0, xmax=9.)
+   monTool.defineHistogram('PhiL1', path='EXPERT', type='TH1F', title="L1 RoI Phi; L1 RoI Phi; nRoIs", xbins=65, xmin=-3.1415936-0.098174/2., xmax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('EtaL1, PhiL1', path='EXPERT', type='TH2F', title="L1 ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaEF, PhiEF', path='EXPERT', type='TH2F', title="EF ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+
+   return monTool
+
+
+def tauMonitoringPrecision():
+   monTool = GenericMonitoringTool('MonTool')
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
+   monTool.defineHistogram('nRoI_EFTauTracks', path='EXPERT', type='TH1F', title="EF N RoI Tracks; N Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('dPhiEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI phi ; Dphi; nRoIs", xbins=100, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI eta ; Deta; nRoIs", xbins=80, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI, dPhiEFTau_RoI', path='EXPERT', type='TH2F', title="dEta vs dPhi in TrigTauRec FEX; Delta-eta; Delta-phi",
+                                                           xbins=40 , xmin=-0.2, xmax=0.2,
+                                                           ybins=40 , ymin=-0.2, ymax=0.2)
+   monTool.defineHistogram('EMRadius', path='EXPERT', type='TH1F', title="EF EMRadius; EM radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('HadRadius', path='EXPERT', type='TH1F', title="EF HadRadius; Had radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('EtHad, EtEm', path='EXPERT', type='TH2F', title="EF Et had vs Em in TrigTauRecMerged FEX; Et Had (at EM scale) [GeV]; Et EM (at EM scale) [GeV]",
+                                                xbins=30, xmin=0., xmax=150.,
+                                                ybins=30, ymin=0., ymax=150.)
+   monTool.defineHistogram('EMFrac', path='EXPERT', type='TH1F', title="EM Fraction;EM Fraction;nRoIs", xbins=70, xmin=-0.1, xmax=1.3)
+   monTool.defineHistogram('IsoFrac', path='EXPERT', type='TH1F', title="Isolation Fraction;Isolation Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('centFrac', path='EXPERT', type='TH1F', title="EF central Fraction;central Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('nWideTrk', path='EXPERT', type='TH1F', title="EF N Wide Tracks;N Wide Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('ipSigLeadTrk', path='EXPERT', type='TH1F', title="EF IPsig Leading Track;iIPsig Leading Track; nRoIs", xbins=100, xmin=-50., xmax=50)
+   monTool.defineHistogram('trFlightPathSig', path='EXPERT', type='TH1F', title="EF Flightpath sig Track;Flightpath sig Track; nRoIs", xbins=100, xmin=-20., xmax=40)
+   monTool.defineHistogram('massTrkSys', path='EXPERT', type='TH1F', title="EF Mass Trk Sys;Mass Trk Sys [GeV]; nRoIs", xbins=100, xmin=0., xmax=50.)
+   monTool.defineHistogram('dRmax', path='EXPERT', type='TH1F', title="EF dR max;dR max; nRoIs", xbins=50, xmin=-0., xmax=0.25)
+   monTool.defineHistogram('NTrk', path='EXPERT', type='TH1F', title="Number of tracks;Number of tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('TrkAvgDist', path='EXPERT', type='TH1F', title="Track Average Distance; TrkAvgDist; nRoIs", xbins=41, xmin=-0.01, xmax=0.4)
+   monTool.defineHistogram('EtovPtLead', path='EXPERT', type='TH1F', title="Et over lead track Pt; EtovPtLead; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('PSSFraction', path='EXPERT', type='TH1F', title="EF Presampler strip energy fraction;PSS energy fraction; nRoIs", xbins=50, xmin=-0.5, xmax=1.)
+   monTool.defineHistogram('EMPOverTrkSysP', path='EXPERT', type='TH1F', title="EF EMP over TrkSysP;EMP over TrkSysP; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('ChPiEMEOverCaloEME', path='EXPERT', type='TH1F', title="EF EM energy of charged pions over calorimetric EM energy;ChPiEME over CaloEME; nRoIs", xbins=40, xmin=-20., xmax=20.)
+   monTool.defineHistogram('innerTrkAvgDist', path='EXPERT', type='TH1F', title="EF inner track average distance; innerTrkAvgDist; nRoIs", xbins=40, xmin=-0.05, xmax=0.5)
+   monTool.defineHistogram('nCand', path='EXPERT', type='TH1F', title="Number of tau candidates;Number of tau candidates; nevents", xbins=10, xmin=-1.0, xmax=9.)
+   monTool.defineHistogram('PhiL1', path='EXPERT', type='TH1F', title="L1 RoI Phi; L1 RoI Phi; nRoIs", xbins=65, xmin=-3.1415936-0.098174/2., xmax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('EtaL1, PhiL1', path='EXPERT', type='TH2F', title="L1 ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaEF, PhiEF', path='EXPERT', type='TH2F', title="EF ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+
+   return monTool
+
+
+def tauMonitoringPrecisionMVA():
+   monTool = GenericMonitoringTool('MonTool')
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
+   monTool.defineHistogram('nRoI_EFTauTracks', path='EXPERT', type='TH1F', title="EF N RoI Tracks; N Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('dPhiEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI phi ; Dphi; nRoIs", xbins=100, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI eta ; Deta; nRoIs", xbins=80, xmin=-0.4, xmax=0.4)
+   monTool.defineHistogram('dEtaEFTau_RoI, dPhiEFTau_RoI', path='EXPERT', type='TH2F', title="dEta vs dPhi in TrigTauRec FEX; Delta-eta; Delta-phi",
+                                                           xbins=40 , xmin=-0.2, xmax=0.2,
+                                                           ybins=40 , ymin=-0.2, ymax=0.2)
+   monTool.defineHistogram('EMRadius', path='EXPERT', type='TH1F', title="EF EMRadius; EM radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('HadRadius', path='EXPERT', type='TH1F', title="EF HadRadius; Had radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
+   monTool.defineHistogram('EtHad, EtEm', path='EXPERT', type='TH2F', title="EF Et had vs Em in TrigTauRecMerged FEX; Et Had (at EM scale) [GeV]; Et EM (at EM scale) [GeV]",
+                                                xbins=30, xmin=0., xmax=150.,
+                                                ybins=30, ymin=0., ymax=150.)
+   monTool.defineHistogram('EMFrac', path='EXPERT', type='TH1F', title="EM Fraction;EM Fraction;nRoIs", xbins=70, xmin=-0.1, xmax=1.3)
+   monTool.defineHistogram('IsoFrac', path='EXPERT', type='TH1F', title="Isolation Fraction;Isolation Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('centFrac', path='EXPERT', type='TH1F', title="EF central Fraction;central Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
+   monTool.defineHistogram('nWideTrk', path='EXPERT', type='TH1F', title="EF N Wide Tracks;N Wide Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('ipSigLeadTrk', path='EXPERT', type='TH1F', title="EF IPsig Leading Track;iIPsig Leading Track; nRoIs", xbins=100, xmin=-50., xmax=50)
+   monTool.defineHistogram('trFlightPathSig', path='EXPERT', type='TH1F', title="EF Flightpath sig Track;Flightpath sig Track; nRoIs", xbins=100, xmin=-20., xmax=40)
+   monTool.defineHistogram('massTrkSys', path='EXPERT', type='TH1F', title="EF Mass Trk Sys;Mass Trk Sys [GeV]; nRoIs", xbins=100, xmin=0., xmax=50.)
+   monTool.defineHistogram('dRmax', path='EXPERT', type='TH1F', title="EF dR max;dR max; nRoIs", xbins=50, xmin=-0., xmax=0.25)
+   monTool.defineHistogram('NTrk', path='EXPERT', type='TH1F', title="Number of tracks;Number of tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
+   monTool.defineHistogram('TrkAvgDist', path='EXPERT', type='TH1F', title="Track Average Distance; TrkAvgDist; nRoIs", xbins=41, xmin=-0.01, xmax=0.4)
+   monTool.defineHistogram('EtovPtLead', path='EXPERT', type='TH1F', title="Et over lead track Pt; EtovPtLead; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('PSSFraction', path='EXPERT', type='TH1F', title="EF Presampler strip energy fraction;PSS energy fraction; nRoIs", xbins=50, xmin=-0.5, xmax=1.)
+   monTool.defineHistogram('EMPOverTrkSysP', path='EXPERT', type='TH1F', title="EF EMP over TrkSysP;EMP over TrkSysP; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
+   monTool.defineHistogram('ChPiEMEOverCaloEME', path='EXPERT', type='TH1F', title="EF EM energy of charged pions over calorimetric EM energy;ChPiEME over CaloEME; nRoIs", xbins=40, xmin=-20., xmax=20.)
+   monTool.defineHistogram('innerTrkAvgDist', path='EXPERT', type='TH1F', title="EF inner track average distance; innerTrkAvgDist; nRoIs", xbins=40, xmin=-0.05, xmax=0.5)
+   monTool.defineHistogram('nCand', path='EXPERT', type='TH1F', title="Number of tau candidates;Number of tau candidates; nevents", xbins=10, xmin=-1.0, xmax=9.)
+   monTool.defineHistogram('PhiL1', path='EXPERT', type='TH1F', title="L1 RoI Phi; L1 RoI Phi; nRoIs", xbins=65, xmin=-3.1415936-0.098174/2., xmax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
+   monTool.defineHistogram('EtaL1, PhiL1', path='EXPERT', type='TH2F', title="L1 ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+   monTool.defineHistogram('EtaEF, PhiEF', path='EXPERT', type='TH2F', title="EF ROI Eta vs Phi in TrigTauRecMerged FEX; #eta; #phi",
+                                           xbins=51, xmin=-2.55, xmax=2.55,
+                                           ybins=65, ymin=-3.1415936-0.098174/2., ymax=3.1415936+0.098174/2.)
+
+   return monTool
+
+
+
+
-- 
GitLab


From 8d792ccce312a8926106d3a7a262e62fc69a7aa1 Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Sun, 27 Dec 2020 17:54:45 +0100
Subject: [PATCH 230/308] removing empty track histograms for CaloOnly
 selection

---
 .../TrigTauRec/python/TrigTauRecMonitoring.py | 33 ++-----------------
 .../TrigTauRec/src/TrigTauRecMergedMT.cxx     |  2 +-
 2 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py
index b8873a391566..ec25963ae296 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py
+++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecMonitoring.py
@@ -110,7 +110,6 @@ def tauMonitoringCaloOnly():
    monTool = GenericMonitoringTool('MonTool')
    monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
    monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
-   monTool.defineHistogram('nRoI_EFTauTracks', path='EXPERT', type='TH1F', title="EF N RoI Tracks; N Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
    monTool.defineHistogram('dPhiEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI phi ; Dphi; nRoIs", xbins=100, xmin=-0.4, xmax=0.4)
    monTool.defineHistogram('dEtaEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI eta ; Deta; nRoIs", xbins=80, xmin=-0.4, xmax=0.4)
    monTool.defineHistogram('dEtaEFTau_RoI, dPhiEFTau_RoI', path='EXPERT', type='TH2F', title="dEta vs dPhi in TrigTauRec FEX; Delta-eta; Delta-phi",
@@ -124,18 +123,6 @@ def tauMonitoringCaloOnly():
    monTool.defineHistogram('EMFrac', path='EXPERT', type='TH1F', title="EM Fraction;EM Fraction;nRoIs", xbins=70, xmin=-0.1, xmax=1.3)
    monTool.defineHistogram('IsoFrac', path='EXPERT', type='TH1F', title="Isolation Fraction;Isolation Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
    monTool.defineHistogram('centFrac', path='EXPERT', type='TH1F', title="EF central Fraction;central Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
-   monTool.defineHistogram('nWideTrk', path='EXPERT', type='TH1F', title="EF N Wide Tracks;N Wide Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
-   monTool.defineHistogram('ipSigLeadTrk', path='EXPERT', type='TH1F', title="EF IPsig Leading Track;iIPsig Leading Track; nRoIs", xbins=100, xmin=-50., xmax=50)
-   monTool.defineHistogram('trFlightPathSig', path='EXPERT', type='TH1F', title="EF Flightpath sig Track;Flightpath sig Track; nRoIs", xbins=100, xmin=-20., xmax=40)
-   monTool.defineHistogram('massTrkSys', path='EXPERT', type='TH1F', title="EF Mass Trk Sys;Mass Trk Sys [GeV]; nRoIs", xbins=100, xmin=0., xmax=50.)
-   monTool.defineHistogram('dRmax', path='EXPERT', type='TH1F', title="EF dR max;dR max; nRoIs", xbins=50, xmin=-0., xmax=0.25)
-   monTool.defineHistogram('NTrk', path='EXPERT', type='TH1F', title="Number of tracks;Number of tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
-   monTool.defineHistogram('TrkAvgDist', path='EXPERT', type='TH1F', title="Track Average Distance; TrkAvgDist; nRoIs", xbins=41, xmin=-0.01, xmax=0.4)
-   monTool.defineHistogram('EtovPtLead', path='EXPERT', type='TH1F', title="Et over lead track Pt; EtovPtLead; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
-   monTool.defineHistogram('PSSFraction', path='EXPERT', type='TH1F', title="EF Presampler strip energy fraction;PSS energy fraction; nRoIs", xbins=50, xmin=-0.5, xmax=1.)
-   monTool.defineHistogram('EMPOverTrkSysP', path='EXPERT', type='TH1F', title="EF EMP over TrkSysP;EMP over TrkSysP; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
-   monTool.defineHistogram('ChPiEMEOverCaloEME', path='EXPERT', type='TH1F', title="EF EM energy of charged pions over calorimetric EM energy;ChPiEME over CaloEME; nRoIs", xbins=40, xmin=-20., xmax=20.)
-   monTool.defineHistogram('innerTrkAvgDist', path='EXPERT', type='TH1F', title="EF inner track average distance; innerTrkAvgDist; nRoIs", xbins=40, xmin=-0.05, xmax=0.5)
    monTool.defineHistogram('nCand', path='EXPERT', type='TH1F', title="Number of tau candidates;Number of tau candidates; nevents", xbins=10, xmin=-1.0, xmax=9.)
    monTool.defineHistogram('PhiL1', path='EXPERT', type='TH1F', title="L1 RoI Phi; L1 RoI Phi; nRoIs", xbins=65, xmin=-3.1415936-0.098174/2., xmax=3.1415936+0.098174/2.)
    monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
@@ -152,12 +139,6 @@ def tauMonitoringCaloOnlyMVA():
    monTool = GenericMonitoringTool('MonTool')
    monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
    monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
-   monTool.defineHistogram('nRoI_EFTauTracks', path='EXPERT', type='TH1F', title="EF N RoI Tracks; N Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
-   monTool.defineHistogram('dPhiEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI phi ; Dphi; nRoIs", xbins=100, xmin=-0.4, xmax=0.4)
-   monTool.defineHistogram('dEtaEFTau_RoI', path='EXPERT', type='TH1F', title="diff EF vs RoI eta ; Deta; nRoIs", xbins=80, xmin=-0.4, xmax=0.4)
-   monTool.defineHistogram('dEtaEFTau_RoI, dPhiEFTau_RoI', path='EXPERT', type='TH2F', title="dEta vs dPhi in TrigTauRec FEX; Delta-eta; Delta-phi",
-                                                           xbins=40 , xmin=-0.2, xmax=0.2,
-                                                           ybins=40 , ymin=-0.2, ymax=0.2)
    monTool.defineHistogram('EMRadius', path='EXPERT', type='TH1F', title="EF EMRadius; EM radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
    monTool.defineHistogram('HadRadius', path='EXPERT', type='TH1F', title="EF HadRadius; Had radius; nRoIs", xbins=50, xmin=-0.1, xmax=1.)
    monTool.defineHistogram('EtHad, EtEm', path='EXPERT', type='TH2F', title="EF Et had vs Em in TrigTauRecMerged FEX; Et Had (at EM scale) [GeV]; Et EM (at EM scale) [GeV]",
@@ -166,18 +147,6 @@ def tauMonitoringCaloOnlyMVA():
    monTool.defineHistogram('EMFrac', path='EXPERT', type='TH1F', title="EM Fraction;EM Fraction;nRoIs", xbins=70, xmin=-0.1, xmax=1.3)
    monTool.defineHistogram('IsoFrac', path='EXPERT', type='TH1F', title="Isolation Fraction;Isolation Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
    monTool.defineHistogram('centFrac', path='EXPERT', type='TH1F', title="EF central Fraction;central Fraction; nRoIs", xbins=80, xmin=-0.4, xmax=1.2)
-   monTool.defineHistogram('nWideTrk', path='EXPERT', type='TH1F', title="EF N Wide Tracks;N Wide Tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
-   monTool.defineHistogram('ipSigLeadTrk', path='EXPERT', type='TH1F', title="EF IPsig Leading Track;iIPsig Leading Track; nRoIs", xbins=100, xmin=-50., xmax=50)
-   monTool.defineHistogram('trFlightPathSig', path='EXPERT', type='TH1F', title="EF Flightpath sig Track;Flightpath sig Track; nRoIs", xbins=100, xmin=-20., xmax=40)
-   monTool.defineHistogram('massTrkSys', path='EXPERT', type='TH1F', title="EF Mass Trk Sys;Mass Trk Sys [GeV]; nRoIs", xbins=100, xmin=0., xmax=50.)
-   monTool.defineHistogram('dRmax', path='EXPERT', type='TH1F', title="EF dR max;dR max; nRoIs", xbins=50, xmin=-0., xmax=0.25)
-   monTool.defineHistogram('NTrk', path='EXPERT', type='TH1F', title="Number of tracks;Number of tracks; nRoIs", xbins=17, xmin=-2.0, xmax=15.)
-   monTool.defineHistogram('TrkAvgDist', path='EXPERT', type='TH1F', title="Track Average Distance; TrkAvgDist; nRoIs", xbins=41, xmin=-0.01, xmax=0.4)
-   monTool.defineHistogram('EtovPtLead', path='EXPERT', type='TH1F', title="Et over lead track Pt; EtovPtLead; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
-   monTool.defineHistogram('PSSFraction', path='EXPERT', type='TH1F', title="EF Presampler strip energy fraction;PSS energy fraction; nRoIs", xbins=50, xmin=-0.5, xmax=1.)
-   monTool.defineHistogram('EMPOverTrkSysP', path='EXPERT', type='TH1F', title="EF EMP over TrkSysP;EMP over TrkSysP; nRoIs", xbins=41, xmin=-0.5, xmax=20.0)
-   monTool.defineHistogram('ChPiEMEOverCaloEME', path='EXPERT', type='TH1F', title="EF EM energy of charged pions over calorimetric EM energy;ChPiEME over CaloEME; nRoIs", xbins=40, xmin=-20., xmax=20.)
-   monTool.defineHistogram('innerTrkAvgDist', path='EXPERT', type='TH1F', title="EF inner track average distance; innerTrkAvgDist; nRoIs", xbins=40, xmin=-0.05, xmax=0.5)
    monTool.defineHistogram('nCand', path='EXPERT', type='TH1F', title="Number of tau candidates;Number of tau candidates; nevents", xbins=10, xmin=-1.0, xmax=9.)
    monTool.defineHistogram('PhiL1', path='EXPERT', type='TH1F', title="L1 RoI Phi; L1 RoI Phi; nRoIs", xbins=65, xmin=-3.1415936-0.098174/2., xmax=3.1415936+0.098174/2.)
    monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
@@ -191,6 +160,7 @@ def tauMonitoringCaloOnlyMVA():
 
 
 def tauMonitoringPreselection():
+
    monTool = GenericMonitoringTool('MonTool')
    monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
    monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
@@ -234,6 +204,7 @@ def tauMonitoringPreselection():
 
 
 def tauMonitoringPrecision():
+
    monTool = GenericMonitoringTool('MonTool')
    monTool.defineHistogram('EtaL1', path='EXPERT', type='TH1F', title="L1 RoI Eta; L1 RoI Eta; nRoIs", xbins=51, xmin=-2.55, xmax=2.55)
    monTool.defineHistogram('nRoI_EFTauCells', path='EXPERT', type='TH1F', title="EF N RoI cells; N Cells; nRoIs", xbins=100, xmin=0., xmax=6000.)
diff --git a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
index e160628d3186..473428cfd5cf 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
@@ -117,7 +117,7 @@ StatusCode TrigTauRecMergedMT::execute(const EventContext& ctx) const
   auto dEta               = Monitored::Scalar<float>("dEtaEFTau_RoI",    -10.);
   auto dPhi               = Monitored::Scalar<float>("dPhiEFTau_RoI",    -10.);
   auto emRadius           = Monitored::Scalar<float>("EMRadius", -0.099);
-  auto hadRadius          = Monitored::Scalar<float>("EMRadius", -0.099);
+  auto hadRadius          = Monitored::Scalar<float>("HadRadius", -0.099);
   auto EtFinal            = Monitored::Scalar<float>("EtFinal", 0.);
   auto Et                 = Monitored::Scalar<float>("Et", 0.);
   auto EtHad              = Monitored::Scalar<float>("EtHad",-10.);
-- 
GitLab


From e94b37875cdf28ae15fed6428cdf6b0fdbdf7521 Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Sun, 27 Dec 2020 18:40:01 +0100
Subject: [PATCH 231/308] minor adjustment for track counting variables

---
 Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
index 473428cfd5cf..db507b9092fc 100644
--- a/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigTauRec/src/TrigTauRecMergedMT.cxx
@@ -125,12 +125,12 @@ StatusCode TrigTauRecMergedMT::execute(const EventContext& ctx) const
   auto EMFrac             = Monitored::Scalar<float>("EMFrac",-10.);
   auto IsoFrac            = Monitored::Scalar<float>("IsoFrac",-1.);
   auto centFrac           = Monitored::Scalar<float>("centFrac",-10.);
-  auto nWideTrk           = Monitored::Scalar<int>("EF_nWideTrk",0);
+  auto nWideTrk           = Monitored::Scalar<int>("nWideTrk",-10);
   auto ipSigLeadTrk       = Monitored::Scalar<float>("ipSigLeadTrk",-1000.);
   auto trFlightPathSig    = Monitored::Scalar<float>("trFlightPathSig",-10.);
   auto massTrkSys         = Monitored::Scalar<float>("massTrkSys",-10.);
   auto dRmax              = Monitored::Scalar<float>("dRmax",-10.);
-  auto numTrack           = Monitored::Scalar<int>("EF_NTrk", -10);
+  auto numTrack           = Monitored::Scalar<int>("NTrk", -10);
   auto trkAvgDist         = Monitored::Scalar<float>("TrkAvgDist",-1.0);
   auto etovPtLead         = Monitored::Scalar<float>("EtovPtLead",-10.);
   auto PSSFraction        = Monitored::Scalar<float>("PSSFraction",-999.9);
-- 
GitLab


From bb6d03d10dcca8fdb9cba645fdd29e24223b933b Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Tue, 29 Dec 2020 18:28:55 +0000
Subject: [PATCH 232/308] Hepmc3 nightly fixes 26122020 part 1

---
 .../src/TruthLeptonNearbyAssociationTool.cxx  | 52 +++++++++++--------
 .../src/TruthLeptonNearbyAssociationTool.h    |  2 +-
 .../src/TruthParticleCnvTool.cxx              |  8 +--
 3 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx
index 321da3fb40d2..73736615c56a 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx
@@ -64,35 +64,35 @@ StatusCode TruthLeptonNearbyAssociationTool::fill (const TruthParticle& p)
     // We have an McEventCollection
     for (McEventCollection::const_iterator currentGenEventIter = mcCollection->begin();
          currentGenEventIter!=mcCollection->end(); ++currentGenEventIter) {
-      for (HepMC::GenEvent::particle_const_iterator currentGenParticleIter= (*currentGenEventIter)->particles_begin(); 
-           currentGenParticleIter!= (*currentGenEventIter)->particles_end(); ++currentGenParticleIter) {
-        if (!(*currentGenParticleIter)) continue;
-        if ((*currentGenParticleIter)->status()!=1) continue;
-        if ((*currentGenParticleIter)->barcode()==p.barcode()) continue; // The same particle twice!
 
-        dR2 = p.phi() - (*currentGenParticleIter)->momentum().phi();
+      for (auto currentGenParticle: *(*currentGenEventIter)) {
+        if (!currentGenParticle) continue;
+        if (currentGenParticle->status()!=1) continue;
+        if (HepMC::barcode(currentGenParticle)==p.barcode()) continue; // The same particle twice!
+
+        dR2 = p.phi() - currentGenParticle->momentum().phi();
         if (dR2>M_PI) dR2-=2.*M_PI;
         else if (dR2<-M_PI) dR2+=2.*M_PI;
 
-        dR2 = std::pow(dR2,2)+std::pow(p.eta()-(*currentGenParticleIter)->momentum().eta(),2);
+        dR2 = std::pow(dR2,2)+std::pow(p.eta()-currentGenParticle->momentum().eta(),2);
 
         if (dR2>=0.09) continue; // Save a little time
 
         // Isolation section - exclude neutrinos
-        if (!MC::PID::isNeutrino( (*currentGenParticleIter)->pdg_id() ) ){
-          *m_iso03 = (*m_iso03)+(*currentGenParticleIter)->momentum().perp();
-          if (dR2<0.04) *m_iso02 = (*m_iso02)+(*currentGenParticleIter)->momentum().perp();
+        if (!MC::PID::isNeutrino( currentGenParticle->pdg_id() ) ){
+          *m_iso03 = (*m_iso03)+currentGenParticle->momentum().perp();
+          if (dR2<0.04) *m_iso02 = (*m_iso02)+currentGenParticle->momentum().perp();
         }
 
         // Dressing section
-        if ((*currentGenParticleIter)->pdg_id()!=22) continue; // Only photons
-        if (dR2>=0.01) continue; // Only DR<0.1
+        if (currentGenParticle->pdg_id()!=22) continue; // Only photons
+        if (dR2>=0.01) continue; // Only DR<0.1 //AV this is a magic number.
 
-        real_parent = std::fabs(get_real_parent( *currentGenParticleIter ));
+        real_parent = std::abs(get_real_parent( currentGenParticle ));
         if (real_parent>=26 || real_parent==15) continue; // Veto hadron parents
 
-        dressed_4mom += CLHEP::HepLorentzVector((*currentGenParticleIter)->momentum().x(),(*currentGenParticleIter)->momentum().y(),
-                                                (*currentGenParticleIter)->momentum().z(),(*currentGenParticleIter)->momentum().t());
+        dressed_4mom += CLHEP::HepLorentzVector(currentGenParticle->momentum().x(),currentGenParticle->momentum().y(),
+                                                currentGenParticle->momentum().z(),currentGenParticle->momentum().t());
 
       } // Loop over particles
     } // Loop over events
@@ -106,20 +106,30 @@ StatusCode TruthLeptonNearbyAssociationTool::fill (const TruthParticle& p)
   return StatusCode::SUCCESS;
 }
 
-int TruthLeptonNearbyAssociationTool::get_real_parent( HepMC::GenParticle * p , int depth ) const
+int TruthLeptonNearbyAssociationTool::get_real_parent( HepMC::GenParticlePtr p , int depth ) const
 {
   if (depth>10) return 0;
-  if (!p->production_vertex()) return 0;
 
   // Work assuming one parent...
-  HepMC::GenVertex::particle_iterator itrPar = p->production_vertex()->particles_begin(HepMC::parents);
-  if ( !(*itrPar) ) return 0;  // parent didn't exist
+//AV This algorithm is ambiguous as it assumesnot more than one parent per particle.
+//AV In HepMC2 this could be wrong more often than expected.
+
+  auto prodvertex = p->production_vertex();
+  if ( !prodvertex ) return 0;  // parent didn't exist
+#ifdef HEPMC3
+  if (!prodvertex->particles_in().size()) return 0;
+  auto parentparticle=prodvertex->particles_in()[0];
+#else
+  if (!prodvertex->particles_in_size()) return 0;
+  auto parentparticle=*(prodvertex->particles_begin(HepMC::parents));
+#endif
+  if ( !parentparticle ) return 0;  // parent didn't exist
 
   // Not a photon - return the parent
-  if ((*itrPar)->pdg_id()!=22) return (*itrPar)->pdg_id();
+  if (parentparticle->pdg_id()!=22) return parentparticle->pdg_id();
 
   // Photon - iterate
-  return get_real_parent( *itrPar , depth+1 );
+  return get_real_parent( parentparticle , depth+1 );
 }
 
 } // namespace D3PD
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h
index 32b8f875f938..1a637ac595b6 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h
@@ -59,7 +59,7 @@ private:
   float *m_iso02;
   float *m_iso03;
 
-  int get_real_parent( HepMC::GenParticle * , int depth=0 ) const;
+  int get_real_parent( HepMC::GenParticlePtr , int depth=0 ) const;
 
 };
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
index b4211ce14cba..3809895e0a67 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
@@ -265,11 +265,7 @@ TruthParticleCnvTool::convert( const McEventCollection * mcCollection,
   /// Create a map to enhance access between GenParticles and TruthParticles
   TruthParticleContainer::Map_t bcToMcPart = container->m_particles;
 
-  const HepMC::GenEvent::particle_const_iterator itrEnd = evt->particles_end();
-  for ( HepMC::GenEvent::particle_const_iterator itrPart=evt->particles_begin();
-	itrPart != itrEnd;
-	++itrPart ) {
-    const HepMC::GenParticle * hepMcPart = (*itrPart);
+  for (auto hepMcPart: *evt) {
 
     TruthParticle * mcPart = new TruthParticle( hepMcPart, container );
     container->push_back( mcPart );
@@ -285,7 +281,7 @@ TruthParticleCnvTool::convert( const McEventCollection * mcCollection,
       ATH_MSG_ERROR("TruthParticle is not wrapping the GenParticle : " 
 		    << HepMC::barcode(hepMcPart) << " !!");
     }
-    //bcToMcPart[ hepMcPart->barcoade() ] = mcPart;
+    //bcToMcPart[ hepMcPart->barcode() ] = mcPart;
     HepMcParticleLink mcLink( HepMC::barcode(hepMcPart), genEventIndex, EBC_MAINEVCOLL, HepMcParticleLink::IS_POSITION, sg ); // FIXME assuming that we are using the hard-scatter McEventCollection - would need to pass this info as an argument to the convert function.
     bcToMcPart[ mcLink.compress() ] = mcPart;
 
-- 
GitLab


From 87f3b16440d086ad39ac936b41288d4b2eea1f99 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Wed, 30 Dec 2020 11:11:17 +0000
Subject: [PATCH 233/308] Option to run part of the menu in newJO

---
 .../python/TriggerConfigFlags.py              |  4 ++++
 .../Menu/GenerateMenuMT_newJO.py              | 20 ++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
index 40450fa9998b..43ec20c30fb5 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py
@@ -206,6 +206,10 @@ def createTriggerFlags():
     # name of the trigger menu
     flags.addFlag('Trigger.triggerMenuSetup', 'LS2_v1')
 
+    # modify the slection of chains that are run (default run all), see more in GenerateMenuMT_newJO
+
+    flags.addFlag('Trigger.triggerMenuModifier', ['all'])
+
     # name of the trigger menu
     flags.addFlag('Trigger.generateMenuDiagnostics', False)
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
index 1ce863f74f56..d9622d9f6758 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py
@@ -35,11 +35,28 @@ def obtainChainsOfMenu(flags):
     return setupMenuModule.setupMenu(flags)
 
 
+def acceptChain(chainDict, whichSignatures):
+    """
+    Helper to accept chains to be part of the menu depending on their name or which signatures they belong to.
 
+    If the keyword "all" is present all chains that are in the menu are accepted.
+    If the keyword "emptyMenu" is present other keywords are checked.
+      They can be name of signature: e.g. Muon or name of chain(s) HLT_j50_L1J30
+    Leaving the "emptyMenu" keyword only results in no chains that are configured. As a consequence would cause an issue somewhere downstream.
+    """
+    if "all" in whichSignatures:
+        return True
+    if "emptyMenu" in whichSignatures:
+        if chainDict["chainName"] in whichSignatures:  #explicit list of chains specified
+            return True
+        if all( [ sig in whichSignatures for sig in chainDict['signatures'] ]): # all signatures for the chain are mentioned 
+            return True
+    return False
 
 def generateMenu(flags):
     """
     Using flags generate appropriate Control Flow Graph wiht all HLT algorithms
+    
     """
 
     # convert to chainDefs
@@ -75,7 +92,8 @@ def generateMenu(flags):
         for chain in chains:
             # TODO topo threshold
             mainChainDict = dictFromChainName( chain )
-            
+            if not acceptChain( mainChainDict, flags.Trigger.triggerMenuModifier ):
+                continue
             counter += 1
             mainChainDict['chainCounter'] = counter
 
-- 
GitLab


From b5ca2c4dfef26f7e9221f45e36bd34e6642bd019 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Wed, 30 Dec 2020 11:17:03 +0000
Subject: [PATCH 234/308] Corrected spaces to make linter happy

---
 .../share/runHLT_standalone_newJO.py          | 69 +++++++++----------
 1 file changed, 34 insertions(+), 35 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
index b524cd9622b4..30d9e06a9dc2 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_newJO.py
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 #
 
 from AthenaConfiguration.ComponentAccumulator import CompFactory
@@ -7,29 +7,29 @@ from AthenaConfiguration.MainServicesConfig import MainServicesCfg
 from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
 
 from AthenaCommon.Configurable import Configurable
-Configurable.configurableRun3Behavior=1
+Configurable.configurableRun3Behavior = 1
 
 
 flags.Detector.GeometryPixel = True
-flags.Detector.GeometrySCT   = True
-flags.Detector.GeometryTRT   = True
-flags.Detector.GeometryID    = True
+flags.Detector.GeometrySCT = True
+flags.Detector.GeometryTRT = True
+flags.Detector.GeometryID = True
 flags.Detector.GeometryBpipe = True
 flags.Detector.GeometryCavern = False
 flags.Detector.GeometryPixel = True
-flags.Detector.GeometrySCT   = True
-flags.Detector.GeometryTRT   = True
+flags.Detector.GeometrySCT = True
+flags.Detector.GeometryTRT = True
 
-flags.Detector.GeometryLAr   = True
-flags.Detector.GeometryTile  = True
-flags.Detector.GeometryMDT   = True
-flags.Detector.GeometryTGC   = True
-flags.Detector.GeometryCSC   = True
-flags.Detector.GeometryRPC   = True
+flags.Detector.GeometryLAr = True
+flags.Detector.GeometryTile = True
+flags.Detector.GeometryMDT = True
+flags.Detector.GeometryTGC = True
+flags.Detector.GeometryCSC = True
+flags.Detector.GeometryRPC = True
 
 
 flags.Detector.RecoPixel = True
-flags.Detector.RecoSCT   = True
+flags.Detector.RecoSCT = True
 
 
 # Output configuration - currently testing offline workflow
@@ -44,17 +44,17 @@ flags.Scheduler.ShowDataFlow = True
 flags.Scheduler.ShowControlFlow = True
 flags.Scheduler.EnableVerboseViews = True
 
-flags.Exec.MaxEvents=50
+flags.Exec.MaxEvents = 50
 flags.Input.isMC = False
-flags.Common.isOnline=True
-flags.IOVDb.GlobalTag="CONDBR2-HLTP-2018-01"
+flags.Common.isOnline = True
+flags.IOVDb.GlobalTag = "CONDBR2-HLTP-2018-01"
 
 
-flags.Concurrency.NumThreads=1
-flags.Concurrency.NumConcurrentEvents=1
+flags.Concurrency.NumThreads = 1
+flags.Concurrency.NumConcurrentEvents = 1
 
-flags.InDet.useSctDCS=False
-flags.InDet.usePixelDCS=False
+flags.InDet.useSctDCS = False
+flags.InDet.usePixelDCS = False
 
 # command line handling
 # options that are defined in: AthConfigFlags are handled here
@@ -65,37 +65,36 @@ flags.fillFromArgs(parser=parser)
 flags.lock()
 
 
-from AthenaCommon.Constants import INFO,DEBUG,WARNING
-acc = MainServicesCfg( flags )
+from AthenaCommon.Constants import INFO, DEBUG, WARNING
+acc = MainServicesCfg(flags)
 acc.getService('AvalancheSchedulerSvc').VerboseSubSlots = True
 
 # this delcares to the scheduer that EventInfo object is produced
-acc.addEventAlgo( CompFactory.SGInputLoader( Load = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )] ),
-                      "AthAlgSeq" )
+acc.addEventAlgo(CompFactory.SGInputLoader(Load=[('xAOD::EventInfo', 'StoreGateSvc+EventInfo')]), "AthAlgSeq")
 
 
 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
-acc.merge(ByteStreamReadCfg( flags ))
+acc.merge(ByteStreamReadCfg(flags))
 
 
 from TriggerJobOpts.TriggerHistSvcConfig import TriggerHistSvcConfig
-acc.merge(TriggerHistSvcConfig( flags ))
+acc.merge(TriggerHistSvcConfig(flags))
 
 
 from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT_newJO import generateMenu as generateHLTMenu
 from TriggerJobOpts.TriggerConfig import triggerRunCfg
-acc.merge( triggerRunCfg( flags, seqName = "AthMasterSeq", menu=generateHLTMenu ) )
+acc.merge(triggerRunCfg(flags, seqName="AthMasterSeq", menu=generateHLTMenu))
 
 from RegionSelector.RegSelConfig import regSelCfg
-acc.merge( regSelCfg( flags ) )
+acc.merge(regSelCfg(flags))
 
 # The L1 presacles do not get created in the avoce menu setup
 from TrigConfigSvc.TrigConfigSvcCfg import createL1PrescalesFileFromMenu
 createL1PrescalesFileFromMenu(flags)
 
 
-acc.getEventAlgo( "TrigSignatureMoniMT" ).OutputLevel=DEBUG
-acc.getEventAlgo( "L1Decoder" ).ctpUnpacker.UseTBPBits=True # test setup
+acc.getEventAlgo("TrigSignatureMoniMT").OutputLevel = DEBUG
+acc.getEventAlgo("L1Decoder").ctpUnpacker.UseTBPBits = True # test setup
 
 
 
@@ -116,10 +115,10 @@ acc.foreach_component("*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING #
 acc.printConfig(withDetails=False, summariseProps=True, printDefaults=True)
 
 
-fname = "runHLT_standalone_newJO.pkl"
-print( "Storing config in the file {}".format( fname ) )
-with open(fname, "wb") as p:
-    acc.store( p )
+fName = "runHLT_standalone_newJO.pkl"
+print("Storing config in the file {}".format(fName))
+with open(fName, "wb") as p:
+    acc.store(p)
     p.close()
 status = acc.run()
 if status.isFailure():
-- 
GitLab


From 129149cb25e53ee04147f221ba4971cdd9cb9442 Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Tue, 15 Dec 2020 23:26:51 +0100
Subject: [PATCH 235/308] Added gsf chains to menu and monitor

---
 .../python/TrigEgammaMonitoringMTConfig.py                  | 6 +++++-
 .../TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py       | 6 ++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
index 7b8c93e6aca7..b05e6b4ad3c7 100644
--- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
+++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
@@ -172,6 +172,7 @@ class TrigEgammaMonAlgBuilder:
             'HLT_e5_etcut_L1EM3',
             'HLT_e5_lhtight_noringer_L1EM3',
             'HLT_e5_lhtight_L1EM3',
+            'HLT_e5_lhtight_gsf_L1EM3',
 
             ]
 
@@ -199,6 +200,8 @@ class TrigEgammaMonAlgBuilder:
 
     monitoringTP_electron = [
             'HLT_e17_lhvloose_L1EM15VHI', 
+            'HLT_e17_lhvloose_gsf_L1EM15VHI', 
+            'HLT_e24_lhvloose_gsf_L1EM20VH', 
             'HLT_e24_lhvloose_L1EM20VH', 
             'HLT_e26_lhloose_L1EM15VH',
             'HLT_e26_lhmedium_L1EM15VH',
@@ -208,7 +211,8 @@ class TrigEgammaMonAlgBuilder:
             'HLT_e26_lhtight_ivartight_L1EM15VH',
             'HLT_e26_lhloose_L1EM22VHI',
             'HLT_e26_lhmedium_L1EM22VHI',
-            'HLT_e26_lhtight_L1EM22VHI',
+            'HLT_e26_lhtight_gsf_L1EM22VHI',
+            'HLT_e26_lhtight_ivarloose_gsf_L1EM22VHI',
             'HLT_e26_lhtight_ivarloose_L1EM22VHI',
             'HLT_e26_lhtight_ivarmedium_L1EM22VHI',
             'HLT_e26_lhtight_ivartight_L1EM22VHI',
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 1e1dc9f132aa..37a9a4d249bf 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -104,12 +104,17 @@ def setupMenu():
         ChainProp(name='HLT_e5_lhloose_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e5_lhtight_gsf_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup),
         
         # Primary
         ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH',  groups=SingleElectronGroup),
         ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VHI',  groups=SingleElectronGroup),
+        ChainProp(name='HLT_e17_lhvloose_L1EM15VH',  groups=SingleElectronGroup),
+        ChainProp(name='HLT_e17_lhvloose_L1EM15VHI',  groups=SingleElectronGroup),
+        ChainProp(name='HLT_e17_lhvloose_gsf_L1EM15VHI',  groups=SingleElectronGroup),
         ChainProp(name='HLT_e24_lhvloose_L1EM20VH', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e24_lhvloose_gsf_L1EM20VH', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhloose_L1EM15VH', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhmedium_L1EM15VH', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_L1EM15VH', groups=SingleElectronGroup),
@@ -118,6 +123,7 @@ def setupMenu():
         ChainProp(name='HLT_e26_lhtight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_gsf_L1EM22VHI', groups=SingleElectronGroup), #Placeholder for GSF chain
         ChainProp(name='HLT_e26_lhtight_ivarloose_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_lhtight_ivarloose_gsf_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_ivarmedium_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_ivartight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM22VHI', groups=SingleElectronGroup),
-- 
GitLab


From 0b3f79a5e1d8951349ee3aa1ee6f3cc52a7689fd Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Wed, 16 Dec 2020 23:55:15 +0100
Subject: [PATCH 236/308] Updated Refs

---
 .../python/HLTMenuConfig/Egamma/ElectronDef.py | 18 +++++++++---------
 .../python/HLTMenuConfig/Menu/LS2_v1.py        |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
index 7441ed68d838..8a0051f66db6 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
@@ -97,15 +97,15 @@ class ElectronChainConfiguration(ChainConfigurationBase):
                 'lhvloosegsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhmediumgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhtightgsf'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhloosegsfivarloose'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhloosegsfivarmedium' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhloosegsfivartight'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhmediumgsfivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhmediumgsfivarmedium': ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhmediumgsfivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhtightgsfivarloose'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhtightgsfivarmedium'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhtightgsfivartight'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhlooseivarloosegsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhlooseivarmediumgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhlooseivartightgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhlmediumivarloosegsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhlmediumivarmedium': ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhlmediumivartightgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhtightivarloosegsf'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhtightivarmediumgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhtightivartightgsf'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
 
                 }
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 37a9a4d249bf..cacbfe527c1c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -123,7 +123,7 @@ def setupMenu():
         ChainProp(name='HLT_e26_lhtight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_gsf_L1EM22VHI', groups=SingleElectronGroup), #Placeholder for GSF chain
         ChainProp(name='HLT_e26_lhtight_ivarloose_L1EM22VHI', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e26_lhtight_ivarloose_gsf_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_lhtight_gsf_ivarloose_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_ivarmedium_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_ivartight_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM22VHI', groups=SingleElectronGroup),
-- 
GitLab


From bc5954857924577604403f2603af68614abf06e5 Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Thu, 17 Dec 2020 00:01:21 +0100
Subject: [PATCH 237/308] Fixed TrigEgammaMon config

---
 .../TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
index b05e6b4ad3c7..7dccd81c9210 100644
--- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
+++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py
@@ -212,7 +212,7 @@ class TrigEgammaMonAlgBuilder:
             'HLT_e26_lhloose_L1EM22VHI',
             'HLT_e26_lhmedium_L1EM22VHI',
             'HLT_e26_lhtight_gsf_L1EM22VHI',
-            'HLT_e26_lhtight_ivarloose_gsf_L1EM22VHI',
+            'HLT_e26_lhtight_gsf_ivarloose_L1EM22VHI',
             'HLT_e26_lhtight_ivarloose_L1EM22VHI',
             'HLT_e26_lhtight_ivarmedium_L1EM22VHI',
             'HLT_e26_lhtight_ivartight_L1EM22VHI',
-- 
GitLab


From f2121d89f9c2d14cf83728876b4e382a10da005a Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Mon, 21 Dec 2020 14:15:57 +0100
Subject: [PATCH 238/308] updated ElectronDef

---
 .../python/HLTMenuConfig/Egamma/ElectronDef.py       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
index 8a0051f66db6..7d6d29933551 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
@@ -100,12 +100,12 @@ class ElectronChainConfiguration(ChainConfigurationBase):
                 'lhlooseivarloosegsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhlooseivarmediumgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhlooseivartightgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhlmediumivarloosegsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhlmediumivarmedium': ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhlmediumivartightgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhtightivarloosegsf'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhtightivarmediumgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhtightivartightgsf'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhmediumivarloosegsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhmediumivarmedium'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhmediumivartightgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhtightivarloosegsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhtightivarmediumgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhtightivartightgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
 
                 }
 
-- 
GitLab


From ae706a8bc4fa6373885edb4e4dbd4a3611db7e5f Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Mon, 21 Dec 2020 15:20:30 +0100
Subject: [PATCH 239/308] Fixed conflicts and updated Refs

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 84 +++++++++++++++++++
 .../share/ref_data_v1Dev_build.ref            | 22 +++++
 2 files changed, 106 insertions(+)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index df116303bdfd..6acfb75452eb 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -592,6 +592,48 @@ HLT_e17_lhloose_mu14_L1EM15VH_MU10:
     6: 4
     7: 4
     8: 4
+HLT_e17_lhvloose_L1EM15VH:
+  eventCount: 5
+  stepCounts:
+    0: 6
+    1: 5
+    2: 5
+    3: 5
+    4: 5
+  stepFeatures:
+    0: 6
+    1: 7
+    2: 5
+    3: 5
+    4: 5
+HLT_e17_lhvloose_L1EM15VHI:
+  eventCount: 4
+  stepCounts:
+    0: 5
+    1: 4
+    2: 4
+    3: 4
+    4: 4
+  stepFeatures:
+    0: 5
+    1: 6
+    2: 4
+    3: 4
+    4: 4
+HLT_e17_lhvloose_gsf_L1EM15VHI:
+  eventCount: 4
+  stepCounts:
+    0: 5
+    1: 4
+    2: 4
+    3: 4
+    4: 4
+  stepFeatures:
+    0: 5
+    1: 6
+    2: 4
+    3: 4
+    4: 4
 HLT_e17_lhvloose_nod0_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -652,6 +694,20 @@ HLT_e24_lhvloose_L1EM20VH:
     2: 5
     3: 5
     4: 5
+HLT_e24_lhvloose_gsf_L1EM20VH:
+  eventCount: 5
+  stepCounts:
+    0: 6
+    1: 5
+    2: 5
+    3: 5
+    4: 5
+  stepFeatures:
+    0: 6
+    1: 7
+    2: 5
+    3: 5
+    4: 5
 HLT_e26_etcut_L1EM22VHI:
   eventCount: 5
   stepCounts:
@@ -780,6 +836,20 @@ HLT_e26_lhtight_gsf_L1EM22VHI:
     2: 4
     3: 4
     4: 4
+HLT_e26_lhtight_gsf_ivarloose_L1EM22VHI:
+  eventCount: 3
+  stepCounts:
+    0: 5
+    1: 4
+    2: 4
+    3: 4
+    4: 3
+  stepFeatures:
+    0: 5
+    1: 6
+    2: 4
+    3: 4
+    4: 3
 HLT_e26_lhtight_ivarloose_L1EM22VHI:
   eventCount: 3
   stepCounts:
@@ -956,6 +1026,20 @@ HLT_e5_lhtight_L1EM3:
     2: 74
     3: 43
     4: 5
+HLT_e5_lhtight_gsf_L1EM3:
+  eventCount: 4
+  stepCounts:
+    0: 18
+    1: 15
+    2: 15
+    3: 15
+    4: 4
+  stepFeatures:
+    0: 57
+    1: 128
+    2: 74
+    3: 43
+    4: 5
 HLT_e5_lhtight_nod0_L1EM3:
   eventCount: 4
   stepCounts:
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 1bbb99ec0c34..25d53e53207e 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -324,6 +324,12 @@ HLT_e140_lhloose_nod0_L1EM22VHI:
   eventCount: 0
 HLT_e17_lhloose_mu14_L1EM15VH_MU10:
   eventCount: 0
+HLT_e17_lhvloose_L1EM15VH:
+  eventCount: 0
+HLT_e17_lhvloose_L1EM15VHI:
+  eventCount: 0
+HLT_e17_lhvloose_gsf_L1EM15VHI:
+  eventCount: 0
 HLT_e17_lhvloose_nod0_L1EM15VH:
   eventCount: 0
 HLT_e17_lhvloose_nod0_L1EM15VHI:
@@ -338,6 +344,8 @@ HLT_e24_lhvloose_2e12_lhvloose_L1EM20VH_3EM10VH:
   eventCount: 0
 HLT_e24_lhvloose_L1EM20VH:
   eventCount: 0
+HLT_e24_lhvloose_gsf_L1EM20VH:
+  eventCount: 0
 HLT_e26_etcut_L1EM22VHI:
   eventCount: 1
   stepCounts:
@@ -366,6 +374,8 @@ HLT_e26_lhtight_L1EM22VHI:
   eventCount: 0
 HLT_e26_lhtight_gsf_L1EM22VHI:
   eventCount: 0
+HLT_e26_lhtight_gsf_ivarloose_L1EM22VHI:
+  eventCount: 0
 HLT_e26_lhtight_ivarloose_L1EM22VHI:
   eventCount: 0
 HLT_e26_lhtight_ivarmedium_L1EM22VHI:
@@ -472,6 +482,18 @@ HLT_e5_lhtight_L1EM3:
     1: 17
     2: 11
     3: 8
+HLT_e5_lhtight_gsf_L1EM3:
+  eventCount: 0
+  stepCounts:
+    0: 9
+    1: 7
+    2: 6
+    3: 6
+  stepFeatures:
+    0: 17
+    1: 17
+    2: 11
+    3: 8
 HLT_e5_lhtight_nod0_L1EM3:
   eventCount: 0
   stepCounts:
-- 
GitLab


From dc5d06157e6ac6a7a91bad39e507fc125da1fd79 Mon Sep 17 00:00:00 2001
From: fernando <Fernando.Monticelli@cern.ch>
Date: Tue, 22 Dec 2020 14:47:38 +0100
Subject: [PATCH 240/308] Fixed typo in Dictionary in ElectronDef.py

---
 .../TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
index 7d6d29933551..c880aafcf297 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py
@@ -101,7 +101,7 @@ class ElectronChainConfiguration(ChainConfigurationBase):
                 'lhlooseivarmediumgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhlooseivartightgsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhmediumivarloosegsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-                'lhmediumivarmedium'   : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
+                'lhmediumivarmediumgsf': ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhmediumivartightgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhtightivarloosegsf'  : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
                 'lhtightivarmediumgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'],
-- 
GitLab


From d1bb27991c5c08d30462635c74c33cab7edd46b9 Mon Sep 17 00:00:00 2001
From: Michel Angelo Aguilera Pulgar <michel.angelo.aguilera.pulgar@cern.ch>
Date: Wed, 30 Dec 2020 21:45:13 +0100
Subject: [PATCH 241/308] Fix errors filling l1 variables

---
 .../src/TrigTauMonitorAlgorithm.cxx           | 42 +++++++++++++------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
index 7807e86a61e0..d86a75e07cec 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx
@@ -229,7 +229,6 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, std::ve
 void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::vector< std::pair< const xAOD::TauJet*, const TrigCompositeUtils::Decision * >> pairObjs, std::string trigger,  const std::string trigL1Item, float L1thr) const
   {
     ATH_MSG_DEBUG ("TrigTauMonitorAlgorithm::fillL1Distributions");
-
     const double thresholdOffset{10.0};
     const TrigInfo info = getTrigInfo(trigger);
     std::vector<const xAOD::TauJet*> tau_vec; //  offline taus
@@ -250,23 +249,38 @@ void TrigTauMonitorAlgorithm::fillL1Distributions(const EventContext& ctx, std::
       }
       }
 
-    const std::vector<Trig::Feature<TrigRoiDescriptor> > vec_L1roi_EFall =
-      m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs).get<TrigRoiDescriptor>("initialRoI",TrigDefs::alsoDeactivateTEs);
-    std::vector<Trig::Feature<TrigRoiDescriptor> >::const_iterator CI = vec_L1roi_EFall.begin();
 
-    for (;CI!=vec_L1roi_EFall.end(); ++CI){
-      if(!(CI->cptr())) continue;
-      const xAOD::EmTauRoI *aEmTau_ROI = findLVL1_ROI(ctx, CI->cptr());
+    std::string tauContainerName = "HLT_TrigTauRecMerged_Precision";
+    if(trigger.find("EF_")!=std::string::npos || trigger.find("MVA_")!=std::string::npos) tauContainerName="HLT_TrigTauRecMerged_MVA";
+    ATH_MSG_DEBUG("Tau ContainerName is: " << tauContainerName);
+
+    auto vec =  m_trigDecTool->features<xAOD::TauJetContainer>(trigger,TrigDefs::includeFailedDecisions , tauContainerName );
+    for( auto &featLinkInfo : vec ){
+      const auto *feat = *(featLinkInfo.link);
+      if(!feat) continue;
+      // If not pass, continue                                                                                                                                                    
+      const TrigCompositeUtils::Decision* decision = featLinkInfo.source;
+
+      const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> initialRoILinkInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( decision, "initialRoI" );
+      if (!initialRoILinkInfo.isValid()) {
+        ATH_MSG_WARNING("Invalid TrigRoiDescriptor");
+  	continue;
+      }
+      ElementLink<TrigRoiDescriptorCollection> roi = initialRoILinkInfo.link;
+      const xAOD::EmTauRoI *aEmTau_ROI = findLVL1_ROI(ctx, *roi);
       if(!aEmTau_ROI) continue;
       L1rois.push_back(aEmTau_ROI);
     }
 
+    if(L1rois.size()==0) {ATH_MSG_DEBUG("L1rois vector is empty");return;}
+    else ATH_MSG_DEBUG("L1rois vector size is: "<< L1rois.size());
+
     //if(info.isL1){
-      fillL1(trigL1Item, L1rois);
+    fillL1(trigL1Item, L1rois);
     //}
 
-      fillL1Efficiencies(ctx, offline_for_l1_tau_vec_1p, "1P", trigL1Item, L1rois);
-      fillL1Efficiencies(ctx, offline_for_l1_tau_vec_mp, "MP", trigL1Item, L1rois);
+    fillL1Efficiencies(ctx, offline_for_l1_tau_vec_1p, "1P", trigL1Item, L1rois);
+    fillL1Efficiencies(ctx, offline_for_l1_tau_vec_mp, "MP", trigL1Item, L1rois);
     
     offline_for_l1_tau_vec_1p.clear();
     offline_for_l1_tau_vec_mp.clear();
@@ -308,7 +322,7 @@ void TrigTauMonitorAlgorithm::fillHLTEfficiencies(const EventContext& ctx, const
 void TrigTauMonitorAlgorithm::fillL1Efficiencies( const EventContext& ctx , std::vector<const xAOD::TauJet*> offline_tau_vec, std::string nProng, const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois) const
 {
   ATH_MSG_DEBUG("Fill L1 efficiencies: " << trigL1Item);
- 
+  ATH_MSG_DEBUG("CHECK4" << L1rois.size()); 
   std::string monGroupName = trigL1Item+"_L1_Efficiency_"+nProng;
 
   auto monGroup = getGroup(monGroupName);
@@ -361,13 +375,15 @@ const xAOD::EmTauRoI* TrigTauMonitorAlgorithm::findLVL1_ROI(const EventContext&
  void TrigTauMonitorAlgorithm::fillL1(const std::string trigL1Item, std::vector<const xAOD::EmTauRoI*> L1rois)  const
  {
    ATH_MSG_DEBUG("Fill L1: " << trigL1Item);
-
+   //ATH_MSG_DEBUG("CHECK2" << L1rois);
    std::string monGroupName = trigL1Item+"_L1";
-
+    
    auto monGroup = getGroup(monGroupName);
    //EmTauRoI_v2.h
 
    auto L1RoIEt           = Monitored::Collection("L1RoIEt"     , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->eT()/1e3;});
+   //ATH_MSG_DEBUG("CHECK3" << L1RoIEt);  
+   ATH_MSG_DEBUG("CHECK3");
    auto L1RoIEta          = Monitored::Collection("L1RoIEta"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->eta();});
    auto L1RoIPhi          = Monitored::Collection("L1RoIPhi"    , L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->phi();});
    auto L1RoITauClus      = Monitored::Collection("L1RoITauClus", L1rois,  [] (const xAOD::EmTauRoI* L1roi){ return L1roi->tauClus();});
-- 
GitLab


From fb4638239758edffc370b416c22eff239fb13437 Mon Sep 17 00:00:00 2001
From: Debo <debottam.bakshi.gupta@cern.ch>
Date: Thu, 31 Dec 2020 11:17:20 +0100
Subject: [PATCH 242/308] Updating references

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 50 +++++++++++++++++++
 .../share/ref_data_v1Dev_build.ref            | 10 ++--
 2 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index df116303bdfd..d809b53b940f 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -620,6 +620,20 @@ HLT_e17_lhvloose_nod0_L1EM15VHI:
     2: 4
     3: 4
     4: 4
+HLT_e20_lhmedium_e15_idperf_Zee_L12EM3:
+  eventCount: 19
+  stepCounts:
+    0: 20
+    1: 20
+    2: 20
+    3: 19
+    4: 19
+  stepFeatures:
+    0: 176
+    1: 715
+    2: 331
+    3: 159
+    4: 115
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
   eventCount: 0
   stepCounts:
@@ -664,6 +678,18 @@ HLT_e26_etcut_L1EM22VHI:
     1: 30
     2: 6
     3: 6
+HLT_e26_idperf_L1EM24VHI:
+  eventCount: 6
+  stepCounts:
+    0: 6
+    1: 6
+    2: 6
+    3: 6
+  stepFeatures:
+    0: 7
+    1: 7
+    2: 14
+    3: 7
 HLT_e26_lhloose_L1EM15VH:
   eventCount: 5
   stepCounts:
@@ -850,6 +876,18 @@ HLT_e26_lhtight_nod0_L1EM24VHI:
     2: 4
     3: 4
     4: 4
+HLT_e28_idperf_L1EM24VHI:
+  eventCount: 6
+  stepCounts:
+    0: 6
+    1: 6
+    2: 6
+    3: 6
+  stepFeatures:
+    0: 7
+    1: 7
+    2: 14
+    3: 7
 HLT_e300_etcut_L1EM22VHI:
   eventCount: 0
 HLT_e3_etcut1step_g5_etcut_L12EM3:
@@ -886,6 +924,18 @@ HLT_e5_etcut_L1EM3:
     1: 458
     2: 173
     3: 102
+HLT_e5_idperf_L1EM3:
+  eventCount: 20
+  stepCounts:
+    0: 20
+    1: 20
+    2: 20
+    3: 20
+  stepFeatures:
+    0: 176
+    1: 166
+    2: 331
+    3: 160
 HLT_e5_lhloose_L1EM3:
   eventCount: 6
   stepCounts:
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 0a23766172bc..e96e84804f5f 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -339,9 +339,9 @@ HLT_e20_lhmedium_e15_idperf_Zee_L12EM3:
   stepFeatures:
     0: 47
     1: 106
-    2: 70
-    3: 36
-    4: 36
+    2: 74
+    3: 37
+    4: 37
 HLT_e20_lhmedium_e15_lhmedium_Zee_L12EM3:
   eventCount: 0
 HLT_e24_lhmedium_2g12_loose_L1EM20VH_3EM10VH:
@@ -460,8 +460,8 @@ HLT_e5_idperf_L1EM3:
   stepFeatures:
     0: 49
     1: 40
-    2: 70
-    3: 37
+    2: 74
+    3: 38
 HLT_e5_lhloose_L1EM3:
   eventCount: 0
   stepCounts:
-- 
GitLab


From 96526057c99e7e7b9e89b743a9cc179fdfc234da Mon Sep 17 00:00:00 2001
From: Michel Angelo Aguilera Pulgar <michel.angelo.aguilera.pulgar@cern.ch>
Date: Thu, 31 Dec 2020 20:14:37 +0100
Subject: [PATCH 243/308] Comment deleted

---
 .../TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py        | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
index 372d8d211339..efe09d743023 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
@@ -292,7 +292,6 @@ class TrigTauMonAlgBuilder:
 
     monGroup = self.helper.addGroup( monAlg, monGroupName,
                               self.basePath+'/'+monGroupPath )
-    #hL1EtVsEta hL1EtVsPhi hL1EtaVsPhi hL1RoIEMIso hL1RoIEta hL1RoIHadCore hL1RoIHadIsol hL1RoIPhi hL1RoITauClus hL1RoITauClusEMIso hL1RoITauVsJet hL1RoITauVsJetDEt hL1RoITauVsJetMismatch hL1RoIeT hL1RoIisol
 
     monGroup.defineHistogram('L1RoIEt;L1RoIEta', type='TH2F', title='L1 RoI Et vs Eta; E_{T}[GeV]; #eta',
                             path=monGroupPath,
-- 
GitLab


From f191538ea3ef70aad740d9bc0f22207b0ab966e8 Mon Sep 17 00:00:00 2001
From: Michel Angelo Aguilera Pulgar <michel.angelo.aguilera.pulgar@cern.ch>
Date: Thu, 31 Dec 2020 20:18:51 +0100
Subject: [PATCH 244/308] Comment deleted 2

---
 .../TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py        | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
index efe09d743023..e83208c45753 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfigMT.py
@@ -315,7 +315,6 @@ class TrigTauMonAlgBuilder:
                             path=monGroupPath,
                             xbins=140,xmin=10,xmax=80,
                             ybins=42,ymin=-1,ymax=20)
-    #hL1RoITauVsJet hL1RoITauVsJetDEt hL1RoITauVsJetMismatch
     monGroup.defineHistogram('L1RoIeT', title='L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI',xbins=260,xmin=0,xmax=130)
 
                              
-- 
GitLab


From 9e9bed18c7abb3d5afaa61232b80d48c1407e7a4 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Fri, 1 Jan 2021 14:26:06 +0000
Subject: [PATCH 245/308] Use precision tracking in min-bias slice

---
 .../TrigInDetConfig/python/EFIDTracking.py    | 39 ++++++++++---------
 .../TrigEDMConfig/python/TriggerEDMRun3.py    |  4 +-
 .../MinBias/MinBiasMenuSequences.py           | 27 +++++--------
 3 files changed, 32 insertions(+), 38 deletions(-)

diff --git a/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py b/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py
index 839a58ba4ab2..a66a496281f2 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/EFIDTracking.py
@@ -24,17 +24,14 @@ def get_idtrig_view_verifier(name):
    viewDataVerifier = CfgMgr.AthViews__ViewDataVerifier( name )
    viewDataVerifier.DataObjects = [
                                      ( 'InDet::SCT_ClusterContainer',   TrigSCTKeys.Clusters ),
-                                     ( 'InDet::PixelClusterContainer',  TrigPixelKeys.Clusters ), 
-                                     ( 'SpacePointContainer',           TrigSCTKeys.SpacePoints ),  
+                                     ( 'InDet::PixelClusterContainer',  TrigPixelKeys.Clusters ),
+                                     ( 'SpacePointContainer',           TrigSCTKeys.SpacePoints ),
                                      ( 'SpacePointContainer',           TrigPixelKeys.SpacePoints ),
-   #                                  ( 'SpacePointOverlapCollection',   'StoreGateSvc+OverlapSpacePoints' ), 
-   #                                  ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_FlaggedCondData_TRIG' ), 
-   #                                  ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_ByteStreamErrs' ), 
-   #                                  ( 'IDCInDetBSErrContainer',        'StoreGateSvc+PixelByteStreamErrs' ),
-   #    #( 'xAOD::EventInfo', 'StoreGateSvc+EventInfo' ) 
+                                     ( 'SpacePointOverlapCollection',   'StoreGateSvc+OverlapSpacePoints' ),
+                                     ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+TrigPixelClusterAmbiguitiesMap' )
                                      ]
    
-   viewDataVerifier.DataObjects = [( 'InDet::PixelClusterContainerCache' , InDetCacheNames.Pixel_ClusterKey ),
+   viewDataVerifier.DataObjects += [( 'InDet::PixelClusterContainerCache' , InDetCacheNames.Pixel_ClusterKey ),
                                    ( 'PixelRDO_Cache' , InDetCacheNames.PixRDOCacheKey ),
                                    ( 'InDet::SCT_ClusterContainerCache' , InDetCacheNames.SCT_ClusterKey ),
                                    ( 'SCT_RDO_Cache' , InDetCacheNames.SCTRDOCacheKey ),
@@ -43,6 +40,10 @@ def get_idtrig_view_verifier(name):
                                    ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.PixBSErrCacheKey ),
                                    ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.SCTBSErrCacheKey ),
                                    ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.SCTFlaggedCondCacheKey ),
+                                   ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_FlaggedCondData' ),
+                                   ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
+                                   ( 'IDCInDetBSErrContainer',        'StoreGateSvc+SCT_ByteStreamErrs' ),
+                                   ( 'IDCInDetBSErrContainer',        'StoreGateSvc+PixelByteStreamErrs' ),
                                    ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
                                    ( 'TagInfo' , 'DetectorStore+ProcessingTags' )]
    
@@ -56,11 +57,13 @@ def get_idtrig_view_verifier(name):
      viewDataVerifier.DataObjects +=   [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
                                         ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
                                         ( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
-                                        ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
-     topSequence.SGInputLoader.Load += [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
-                                        ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
-                                        ( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
-                                        ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
+                                        ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() ), 
+                                        ( 'IDCInDetBSErrContainer',  'StoreGateSvc+SCT_FlaggedCondData' ),
+                                        ]
+   #   topSequence.SGInputLoader.Load += [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
+   #                                      ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
+   #                                      ( 'IDCInDetBSErrContainer' , InDetKeys.PixelByteStreamErrs() ),
+   #                                      ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
    
    return viewDataVerifier
 
@@ -155,7 +158,7 @@ def makeInDetPatternRecognition( config, verifier = 'IDTrigViewDataVerifier'  ):
 
          from .InDetTrigCommon import siSPSeededTrackFinder_builder, get_full_name
          siSPSeededTrackFinder = siSPSeededTrackFinder_builder( name                  = get_full_name( 'siSPSeededTrackFinder', config.name ),
-                                                                outputTracks          = config.EFID.trkTracksEFID(), ##outEFIDTracks, 
+                                                                outputTracks          = config.PT.trkTracksPT(),  # config.EFID.trkTracksEFID(), ##outEFIDTracks, 
                                                                 trackingCuts          = trackingCuts,
                                                                 usePrdAssociationTool = usePrdAssociationTool,
                                                                 nameSuffix            = config.name )
@@ -179,7 +182,7 @@ def makeInDetPatternRecognition( config, verifier = 'IDTrigViewDataVerifier'  ):
       #Verifier should not be necessary when both patt. rec. and PT runs in the same view -> None
       #Also provides particle cnv alg inside
       precisionAlgs = makePrecisionInDetPatternRecognition(config      = config,
-                                                           inputTracks = config.EFID.trkTracksEFID(),
+                                                           inputTracks = config.PT.trkTracksPT(), #config.EFID.trkTracksEFID(),
                                                            verifier    = None )
 
 
@@ -216,8 +219,8 @@ def makePrecisionInDetPatternRecognition( config, inputTracks,verifier = None ):
    ambiguitySolverAlg = ambiguitySolverAlg_builder( name                  = get_full_name( core = 'TrkAmbiguitySolver', suffix = config.name ),
                                                     config                = config,
                                                     inputTrackScoreMap    = get_scoremap_name( config.name ), #Map of tracks and their scores, 
-                                                    outputTrackCollection = config.PT.trkTracksPT() ) #FIXME: for now keep PT but if TRT added this will ahve to become intermediate collection
-                         
+                                                    outputTrackCollection = config.PT.trkTracksPT()+"_Amb" )  #FIXME: for now keep PT but if TRT added this will ahve to become intermediate collection
+
    ptAlgs.append( ambiguitySolverAlg )
    
    #-----------------------------------------------------------------------------
@@ -225,7 +228,7 @@ def makePrecisionInDetPatternRecognition( config, inputTracks,verifier = None ):
    from .InDetTrigCommon import trackParticleCnv_builder
    trackParticleCnvAlg = trackParticleCnv_builder(name                 = get_full_name( 'xAODParticleCreatorAlg',config.name + '_IDTrig' ), 
                                                   config               = config,
-                                                  inTrackCollectionKey = config.PT.trkTracksPT(),
+                                                  inTrackCollectionKey = config.PT.trkTracksPT()+"_Amb",
                                                   outTrackParticlesKey = config.PT.tracksPT( doRecord = config.isRecordable),
                                                   )
    
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index c407db4b6584..c2a0d7f5437d 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -510,8 +510,8 @@ TriggerHLTListRun3 = [
 
     # MinBias
 
-    ('xAOD::TrackParticleContainer#HLT_IDTrack_MinBias_FTF',                 'BS ESD AODFULL', 'MinBias', 'inViews:TrkView'),
-    ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_MinBias_FTFAux.',          'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::TrackParticleContainer#HLT_IDTrack_MinBias_IDTrig',                 'BS ESD AODFULL', 'MinBias', 'inViews:TrkView'),
+    ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_MinBias_IDTrigAux.',          'BS ESD AODFULL', 'MinBias'),
 
 
     # Cosmic
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py
index a23cf16951fa..de19773da588 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasMenuSequences.py
@@ -5,10 +5,10 @@ from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence
 from AthenaCommon.CFElements import parOR
 from AthenaCommon.CFElements import seqAND
 from TrigInDetConfig.InDetSetup import makeInDetAlgs
+from TrigInDetConfig.EFIDTracking import makeInDetPatternRecognition
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
 from DecisionHandling.DecisionHandlingConf import ViewCreatorInitialROITool
-from AthenaCommon.GlobalFlags import globalflags
 from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
 
 
@@ -55,7 +55,8 @@ def MinBiasSPSequence():
     idTrigConfig = getInDetTrigConfig('minBias')
     idAlgs, verifier = makeInDetAlgs(config=idTrigConfig, 
                                      rois=spInputMakerAlg.InViewRoIs, 
-                                     viewVerifier='SPViewDataVerifier')
+                                     viewVerifier='SPViewDataVerifier', 
+                                     doFTF=False)
     verifier.DataObjects += [('TrigRoiDescriptorCollection', 'StoreGateSvc+InputRoI'),
                              ('SCT_ID', 'DetectorStore+SCT_ID'),
                              ('PixelID', 'DetectorStore+PixelID'),
@@ -68,7 +69,9 @@ def MinBiasSPSequence():
                                        ('PixelID', 'DetectorStore+PixelID'),
                                        ('TagInfo', 'DetectorStore+ProcessingTags')]
 
-    spAlgsList = idAlgs[:-2]
+#    spAlgsList = idAlgs[:-2]
+    spAlgsList = idAlgs
+
 
     spCount = TrigCountSpacePointsMT()
     spCount.SpacePointsKey = recordable("HLT_SpacePointCounts")
@@ -104,28 +107,16 @@ def MinBiasTrkSequence():
         # prepare algorithms to run in views, first,
         # inform scheduler that input data is available in parent view (has to be done by hand)
         idTrigConfig = getInDetTrigConfig('minBias')
-        idAlgs, verifier = makeInDetAlgs(config=idTrigConfig, rois=trkInputMakerAlg.InViewRoIs, viewVerifier='TrkrecoSeqDataVerifier')
-        verifier.DataObjects += [('TrigRoiDescriptorCollection', 'StoreGateSvc+InputRoI'),
-                                 ('IDCInDetBSErrContainer', 'StoreGateSvc+SCT_FlaggedCondData_TRIG'),
-                                 ('InDet::SCT_ClusterContainer', 'StoreGateSvc+SCT_TrigClusters'),
-                                 ('SpacePointContainer', 'StoreGateSvc+SCT_TrigSpacePoints'),
-                                 ('InDet::PixelClusterContainer', 'StoreGateSvc+PixelTrigClusters'),
-                                 ('SpacePointContainer', 'StoreGateSvc+PixelTrigSpacePoints')]
-
-        if globalflags.InputFormat.is_bytestream():
-          verifier.DataObjects += [('IDCInDetBSErrContainer', 'StoreGateSvc+PixelByteStreamErrs'),
-                                   ('IDCInDetBSErrContainer', 'StoreGateSvc+SCT_ByteStreamErrs')]
-
 
-        trkList = idAlgs[-2:] # FTF and Track to xAOD::TrackParticle conversion alg
+        algs,_ = makeInDetPatternRecognition(idTrigConfig, verifier='VDVMinBiasIDTracking')
         trackCountHypo = TrackCountHypoAlgMT()
         trackCountHypo.trackCountKey = recordable("HLT_TrackCount")
-        trackCountHypo.tracksKey = recordable("HLT_IDTrack_MinBias_FTF")
+        trackCountHypo.tracksKey = recordable("HLT_IDTrack_MinBias_IDTrig")
 
         from TrigMinBias.TrackCountMonitoringMT import TrackCountMonitoring
         trackCountHypo.MonTool = TrackCountMonitoring()
 
-        trkRecoSeq = parOR("TrkrecoSeq", [verifier]+trkList)
+        trkRecoSeq = parOR("TrkrecoSeq", algs)
         trkSequence = seqAND("TrkSequence", [trkInputMakerAlg, trkRecoSeq])
         trkInputMakerAlg.ViewNodeName = trkRecoSeq.name()
 
-- 
GitLab


From c6ca0ae90bb4360caa0049ba39e94120a55eaab8 Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Mon, 4 Jan 2021 06:46:54 +0100
Subject: [PATCH 246/308] update reference

---
 Tools/PROCTools/python/RunTier0TestsTools.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 8ccd831bb2fa..2db0dbd6979b 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -31,7 +31,7 @@ ciRefFileMap = {
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
                 'overlay-d1498-22.0'   : 'v38',
-                'overlay-d1592-22.0'   : 'v2',
+                'overlay-d1592-22.0'   : 'v3',
                 'overlay-bkg-21.0'     : 'v1',
                 'overlay-bkg-22.0'     : 'v4',
                 'dataoverlay-d1590-22.0' : 'v5',
-- 
GitLab


From 7954295c34ca69aa18eaa87e5d6332737c19c24a Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Mon, 4 Jan 2021 12:34:11 +0100
Subject: [PATCH 247/308] Update jets from ESD test to run in ART grid, rather
 than local. Then we can see it along with all the other RecExRecoTests.

---
 .../test/test_recexreco_art_jets_fromesd_newJobConfig.sh        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh
index 5bf6a5d4ed3e..d5868c3d60b5 100755
--- a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh
+++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_jets_fromesd_newJobConfig.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # art-description: Athena runs jet reconstruction, using the new job configuration for Run 3, from an ESD file
-# art-type: local
+# art-type: grid
 # art-athena-mt
 # art-include: master/Athena
 
-- 
GitLab


From d74cd4129b03ab654c1a781491f1abc6b9d6b043 Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Mon, 4 Jan 2021 12:36:51 +0100
Subject: [PATCH 248/308] Remove ART local tests that are no longer of use.

---
 .../test/test_recoshift_mc15_13tev.sh         | 18 ---------------
 .../test/test_recoshift_recotf_7teV_data.sh   | 21 -----------------
 .../test/test_recoshift_recotf_8teV_data.sh   | 23 -------------------
 .../test/test_recoshift_recotf_q220.sh        | 17 --------------
 .../test/test_recoshift_recotf_q221.sh        | 20 ----------------
 .../test/test_recoshift_recotf_q222.sh        | 20 ----------------
 .../test/test_recoshift_recotf_q223.sh        | 19 ---------------
 .../test/test_recotf_8teV_data_no.sh          | 18 ---------------
 .../test/test_recotf_cosmic_data_2011.sh      | 17 --------------
 .../test/test_recotf_mc15.sh                  | 18 ---------------
 .../test/test_recotf_mc15_no.sh               | 16 -------------
 11 files changed, 207 deletions(-)
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_mc15_13tev.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_7teV_data.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_8teV_data.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q220.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q221.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q222.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q223.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_8teV_data_no.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_cosmic_data_2011.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15.sh
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15_no.sh

diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_mc15_13tev.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_mc15_13tev.sh
deleted file mode 100755
index cfa60a831e59..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_mc15_13tev.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# art-description: Xiaohu Sun, Carl Gwilliam and Marie-Helene Genest
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-export TRF_ECHO=True; Reco_tf.py  '--inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root' '--jobNumber=64' '--maxEvents=10' '--postInclude=RecJobTransforms/UseFrontier.py' '--preExec' 'rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' 'RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False' 'ESDtoAOD:TriggerFlags.AODEDMSet="AODFULL"' 'RAWtoESD:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doSlimming.set_Value_and_Lock(False)' 'ESDtoAOD:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doSlimming.set_Value_and_Lock(False)' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup="MC_pp_v6_tight_mc_prescale"' '--skipEvents=0' '--autoConfiguration=everything' '--conditionsTag=OFLCOND-MC15c-SDR-09' '--geometryVersion=ATLAS-R2-2015-03-01-00' '--digiSeedOffset1=1' '--digiSeedOffset2=1'  '--steering=doRDO_TRIG'  '--outputAODFile=AOD.pool.root' '--outputRDOFile=RDO.pool.root' '--outputESDFile=ESD.pool.root'  --runNumber="110401" --pileupFinalBunch 6 --inputHighPtMinbiasHitsFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2195/HITS.05608152._002668.pool.root.1" --inputLowPtMinbiasHitsFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc15_13TeV.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2195/HITS.05608147._000503.pool.root.1"
-
-RES=$?
-echo "art-result: $RES Reco"
-
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_7teV_data.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_7teV_data.sh
deleted file mode 100755
index 84facbf48fcc..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_7teV_data.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# art-description: Jamie Boyd, Running on highmu Data at 7 TeV
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-
-export TRF_ECHO=True; Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/high_mu-data11_7TeV.00179725.physics_JetTauEtmiss.merge.RAW._lb0021.data --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --maxEvents 5 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputHISTFile myHist.root --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'rec.doTrigger=False'
-
-RES=$?
-
-xAODDigest.py myAOD.pool.root digest.txt
-
-echo "art-result: $RES Reco"
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_8teV_data.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_8teV_data.sh
deleted file mode 100755
index f29183400662..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_8teV_data.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# art-description: Jamie Boyd, data12_8TeV reconstruction
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-export TRF_ECHO=True; Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --autoConfiguration everything --conditionsTag="COMCOND-BLKPA-RUN1-07" --maxEvents 5 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputHISTFile myHist.root --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'rec.doTrigger=False'
-
-RES=$?
-
-xAODDigest.py myAOD.pool.root digest.txt
-
-echo "art-result: $RES Reco"
-
-
-
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q220.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q220.sh
deleted file mode 100755
index e0c647167a85..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q220.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# art-description: RIG convenors - q220 reconstruction
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-export TRF_ECHO=True; Reco_tf.py --AMIConfig=q220 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'DQMonFlags.doCTPMon=False' --inputBSFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data15_cos.00251363.physics_IDCosmic.merge.RAW._lb0057._SFO-ALL._0001.1'
-
-RES=$?
-echo "art-result: $RES Reco"
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q221.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q221.sh
deleted file mode 100755
index f37471dbfa6a..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q221.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#!/bin/sh
-#
-# art-description: RIG convenors - q221 reconstruction
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-export TRF_ECHO=True; Reco_tf.py --AMIConfig=q221 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True'
-
-RES=$?
-
-xAODDigest.py myAOD.pool.root digest.txt
-
-echo "art-result: $RES Reco"
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q222.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q222.sh
deleted file mode 100755
index cc1e50caef23..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q222.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# art-description: RIG convenors - q222 reconstruction
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-export TRF_ECHO=True; Reco_tf.py --AMIConfig=q222 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'DQMonFlags.doCTPMon=False' 'DQMonFlags.doHLTMon=False' --inputBSFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1'
-
-RES=$?
-
-xAODDigest.py myAOD.pool.root digest.txt
-
-echo "art-result: $RES Reco"
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q223.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q223.sh
deleted file mode 100755
index 904f55b2ed79..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recoshift_recotf_q223.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# art-description: RIG convenors - q223 reconstruction
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-export TRF_ECHO=True; Reco_tf.py --AMIConfig=q223 --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'DQMonFlags.doCTPMon=False' --inputBSFile='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data15_comm.00264034.physics_MinBias.daq.RAW._lb0644._SFO-6._0001.data'
-
-RES=$?
-
-xAODDigest.py myAOD.pool.root digest.txt
-
-echo "art-result: $RES Reco"
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_8teV_data_no.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_8teV_data_no.sh
deleted file mode 100755
index 3168211d06a1..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_8teV_data_no.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# art-description: David Rousseau, data12_8TeV reconstruction, all reco switched off
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-export TRF_ECHO=True; Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --maxEvents 5 --autoConfiguration everything --preExec 'rec.doCalo=False' 'rec.doInDet=False' 'rec.doMuon=False' 'rec.doJetMissingETTag=False' 'rec.doEgamma=False' 'rec.doMuonCombined=False' 'rec.doTau=False' 'rec.doTrigger=False' 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' --outputESDFile my.ESD.pool.root
-
-RES=$?
-echo "art-result: $RES Reco"
-
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_cosmic_data_2011.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_cosmic_data_2011.sh
deleted file mode 100755
index fc0dbf98eaca..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_cosmic_data_2011.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# art-description: Jamie Boyd - should be updated for 2015
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-export TRF_ECHO=True; Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data11_cos.00193024.physics_CosmicCalo.merge.RAW._lb0096._SFO-ALL._0001.1 --maxEvents 10 --autoConfiguration everything --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputHISTFile myHIST.root --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 
-
-RES=$?
-echo "art-result: $RES Reco"
-
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15.sh
deleted file mode 100755
index 13cf60a58847..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# art-description: David Rousseau
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-export TRF_ECHO=True; Reco_tf.py --inputRDOFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/RDO.pool.root --maxEvents 5 --autoConfiguration everything --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' --outputESDFile my.ESD.pool.root
-
-RES=$?
-echo "art-result: $RES Reco"
-
-
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15_no.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15_no.sh
deleted file mode 100755
index 36541b24ed60..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_recotf_mc15_no.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-#
-# art-description: David Rousseau
-# art-athena-mt: 4
-# art-type: build
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-export TRF_ECHO=True; Reco_tf.py --inputRDOFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/RDO.pool.root --maxEvents 5 --autoConfiguration everything --preExec 'rec.doDetailedAuditor=True' 'rec.doNameAuditor=True' 'rec.doCalo=False' 'rec.doInDet=False' 'rec.doMuon=False' 'rec.doJetMissingETTag=False' 'rec.doEgamma=False' 'rec.doMuonCombined=False' 'rec.doTau=False' 'rec.doTrigger=False' --outputESDFile my.ESD.pool.root
-
-RES=$?
-echo "art-result: $RES Reco"
-
-- 
GitLab


From 81b7defee071e1b4838f0b2e006181359bf52a39 Mon Sep 17 00:00:00 2001
From: Heather Russell <heather.russell@cern.ch>
Date: Mon, 4 Jan 2021 12:40:59 +0100
Subject: [PATCH 249/308] ATR-21609, adapting merging to allow for empty steps
 in parallel merging

---
 .../python/HLTMenuConfig/Menu/ChainMerging.py | 62 +++++++++++++++++--
 1 file changed, 58 insertions(+), 4 deletions(-)

diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
index d10b30487f71..7b8eaec2ec0f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
@@ -6,6 +6,7 @@ log = logging.getLogger( __name__ )
 
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, EmptyMenuSequence, RecoFragmentsPool
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuAlignmentTools import get_alignment_group_ordering as getAlignmentGroupOrdering
+from DecisionHandling.DecisionHandlingConfig import ComboHypoCfg
 from collections import OrderedDict
 from copy import deepcopy
 import re
@@ -314,6 +315,15 @@ def mergeSerial(chainDefList):
 
     return combinedChainDef
 
+def checkStepContent(parallel_steps):
+  
+    for step in parallel_steps:
+        if step is None:
+            continue
+        for seq in step.sequences:
+            if type(seq).__name__ != 'EmptyMenuSequence':
+                return True    
+    return False   
 
 def makeCombinedStep(parallel_steps, stepNumber, chainDefList, allSteps = [], currentChainSteps = []):
     from TrigCompositeUtils.TrigCompositeUtils import legName
@@ -329,17 +339,61 @@ def makeCombinedStep(parallel_steps, stepNumber, chainDefList, allSteps = [], cu
     assert len(chainDefList)==len(parallel_steps), "[makeCombinedStep] makeCombinedStep: Length of chain defs %d does not match length of steps to merge %d" % (len(chainDefList), len(allSteps))
     
     leg_counter = 0
+    currentStepName = ''
+    # if *all* the steps we're trying to merge are either empty sequences or empty steps
+    # we need to create a single empty step instead. 
+    hasNonEmptyStep = checkStepContent(parallel_steps)
   
+    if not hasNonEmptyStep:
+        for chain_index, step in enumerate(parallel_steps): 
+            # every step is empty but some might have empty sequences and some might not
+            if len(step.sequences) == 0:
+                new_stepDict = deepcopy(chainDefList[chain_index].steps[-1].stepDicts[-1])
+                currentStepName = 'Empty' + chainDefList[chain_index].alignmentGroups[0]+'Align'+str(stepNumber)+'_'+new_stepDict['chainParts'][0]['multiplicity']+new_stepDict['signature']
+
+                # we need a chain dict here, use the one corresponding to this leg of the chain
+                oldLegName = new_stepDict['chainName']
+                if re.search('^leg[0-9]{3}_',oldLegName):
+                    oldLegName = oldLegName[7:]
+                new_stepDict['chainName'] = legName(oldLegName,leg_counter)
+                stepDicts.append(new_stepDict)
+                leg_counter += 1
+            else:
+                # Standard step with empty sequence(s)
+                currentStepName = step.name
+                #remove redundant instances of StepN_ and merged_ (happens when merging already merged chains)
+                if re.search('^Step[0-9]_',currentStepName):
+                    currentStepName = currentStepName[6:]
+                if re.search('^merged_',currentStepName):
+                    currentStepName = currentStepName[7:]
+
+                # update the chain dict list for the combined step with the chain dict from this step
+                log.debug('[makeCombinedStep] adding step dictionaries %s',step.stepDicts)
+
+                for new_stepDict in deepcopy(step.stepDicts):
+                    oldLegName = new_stepDict['chainName']
+                    if re.search('^leg[0-9]{3}_',oldLegName):
+                        oldLegName = oldLegName[7:]
+                    new_stepDict['chainName'] = legName(oldLegName,leg_counter)
+                    log.debug("[makeCombinedStep] stepDict naming old: %s, new: %s", oldLegName, new_stepDict['chainName'])
+                    stepDicts.append(new_stepDict)
+                    leg_counter += 1
+
+            stepName += '_' + currentStepName
+
+        theChainStep = ChainStep(stepName, Sequences=[], multiplicity=[], chainDicts=stepDicts, comboHypoCfg=ComboHypoCfg) 
+        log.info("[makeCombinedStep] Merged empty step: \n %s", theChainStep)
+        return theChainStep
+
     for chain_index, step in enumerate(parallel_steps): #this is a horizontal merge!
-        if step is None:
+
+        if step is None or (hasNonEmptyStep and len(step.sequences) == 0):
             # this happens for merging chains with different numbers of steps, we need to "pad" out with empty sequences to propogate the decisions
             # all other chain parts' steps should contain an empty sequence
 
             new_stepDict = deepcopy(chainDefList[chain_index].steps[-1].stepDicts[-1])
-            
             seqName = getEmptySeqName(new_stepDict['signature'], chain_index, stepNumber, chainDefList[0].alignmentGroups[0])
 
-            currentStepName = ''
             if isFullScanRoI(chainDefList[chain_index].L1decisions[0]):
                 if noPrecedingStepsPostMerge(currentChainSteps, chain_index):
                     stepSeq.append(RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName+"FS", mergeUsingFeature = False))
@@ -403,7 +457,7 @@ def makeCombinedStep(parallel_steps, stepNumber, chainDefList, allSteps = [], cu
         stepName += '_' + currentStepName
         log.debug('[makeCombinedStep] current step name %s',stepName)
         # for merged steps, we need to update the name to add the leg name
-        
+    
     comboHypoTools = list(set(comboHypoTools))
     theChainStep = ChainStep(stepName, Sequences=stepSeq, multiplicity=stepMult, chainDicts=stepDicts, comboHypoCfg=comboHypo, comboToolConfs=comboHypoTools) 
     log.info("[makeCombinedStep] Merged step: \n %s", theChainStep)
-- 
GitLab


From b69c0adf86fb82ba452aec3944f9b8da1892e966 Mon Sep 17 00:00:00 2001
From: Zach Marshall <ZLMarshall@lbl.gov>
Date: Mon, 4 Jan 2021 12:44:57 +0100
Subject: [PATCH 250/308] Adding ART tests for truth derivations in master

Title says it all.
---
 .../DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh        | 1 +
 .../DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh        | 1 +
 .../DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh        | 1 +
 3 files changed, 3 insertions(+)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh
index 18c2019e0148..b31f58961210 100755
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 # art-include: 21.2/AthDerivation
+# art-include master/Athena
 # art-description: DAOD building TRUTH0 mc15
 # art-type: grid
 # art-output: *.pool.root
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh
index 8264118a40b5..b23da261bbcd 100755
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 # art-include: 21.2/AthDerivation
+# art-include master/Athena
 # art-description: DAOD building TRUTH1 mc15
 # art-type: grid
 # art-output: *.pool.root
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh
index 418e6cd4c636..12d1e826b8e9 100755
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 # art-include: 21.2/AthDerivation
+# art-include master/Athena
 # art-description: DAOD building TRUTH3 mc15
 # art-type: grid
 # art-output: *.pool.root
-- 
GitLab


From d1a88e750baaef03a462cb4be7177191ec29efea Mon Sep 17 00:00:00 2001
From: Mark Hodgkinson <mhodgkin@aiatlas025.cern.ch>
Date: Mon, 4 Jan 2021 12:45:08 +0100
Subject: [PATCH 251/308] Remove test running large radius tracking (LRT) on
 data18. Nowadays the default reconstruction includes LRT, so there is no need
 for this test.

---
 ...test_data18_13TeV_largeRadiusTrackingOn.sh | 19 -------------------
 1 file changed, 19 deletions(-)
 delete mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_data18_13TeV_largeRadiusTrackingOn.sh

diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_data18_13TeV_largeRadiusTrackingOn.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_data18_13TeV_largeRadiusTrackingOn.sh
deleted file mode 100755
index 6e42b579165a..000000000000
--- a/Reconstruction/RecExample/RecJobTransformTests/test/test_data18_13TeV_largeRadiusTrackingOn.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# art-description: Reco_tf runs on 13TeV collision data 2018
-# art-athena-mt: 4
-# art-type: grid
-# art-include: 21.0/Athena
-# art-include: 21.0-TrigMC/Athena
-# art-include: master/Athena
-# art-include: 21.3/Athena
-# art-include: 21.9/Athena
-
-
-Reco_tf.py --inputBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data18_13TeV/data18_13TeV.00348885.physics_Main.daq.RAW._lb0827._SFO-8._0002.data --preExec r2a:'from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doR3LargeD0.set_Value_and_Lock(True);InDetFlags.storeSeparateLargeD0Container.set_Value_and_Lock(True);' --maxEvents 300 --AMI=f1089 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputHISTFile myHist.root
-
-#Remember retval of transform as art result
-RES=$?
-echo "art-result: $RES Reco"
-return $RES
-
-- 
GitLab


From 3a206d9cf723afab06b9fe66574d2029d10a776a Mon Sep 17 00:00:00 2001
From: Zach Marshall <ZLMarshall@lbl.gov>
Date: Mon, 4 Jan 2021 12:46:13 +0100
Subject: [PATCH 252/308] Need that colon

---
 .../DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh       | 2 +-
 .../DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh       | 2 +-
 .../DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh
index b31f58961210..193f83ca9d3c 100755
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH0.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # art-include: 21.2/AthDerivation
-# art-include master/Athena
+# art-include: master/Athena
 # art-description: DAOD building TRUTH0 mc15
 # art-type: grid
 # art-output: *.pool.root
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh
index b23da261bbcd..a03e7e9796d6 100755
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # art-include: 21.2/AthDerivation
-# art-include master/Athena
+# art-include: master/Athena
 # art-description: DAOD building TRUTH1 mc15
 # art-type: grid
 # art-output: *.pool.root
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh
index 12d1e826b8e9..1a240a09541d 100755
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkART/DerivationFrameworkMCTruthART/test/test_mc15TRUTH3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # art-include: 21.2/AthDerivation
-# art-include master/Athena
+# art-include: master/Athena
 # art-description: DAOD building TRUTH3 mc15
 # art-type: grid
 # art-output: *.pool.root
-- 
GitLab


From 3b0b21c1164c49b708fe17f233a77dbdfc94e861 Mon Sep 17 00:00:00 2001
From: Johannes Elmsheuser <johannes.elmsheuser@cern.ch>
Date: Mon, 4 Jan 2021 12:58:46 +0100
Subject: [PATCH 253/308] Fix typo of --multiprocess parameter

---
 .../test/test_directioart_athenamp_recotf_with_raw_https.sh     | 2 +-
 .../test/test_directioart_athenamp_recotf_with_raw_root.sh      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh
index f60236d56b29..dff226907f85 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_https.sh
@@ -9,6 +9,6 @@
 set -e
 
 export ATHENA_CORE_NUMBER=2
-Reco_tf.py --AMI q431 --multiprocess--inputBSFile https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root
+Reco_tf.py --AMI q431 --multiprocess --inputBSFile https://lcg-lrz-http.grid.lrz.de:443/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root
 
 echo "art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_HTTPS"
diff --git a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh
index 7e19dba9ff45..90c4403d0741 100755
--- a/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh
+++ b/Tools/DirectIOART/test/test_directioart_athenamp_recotf_with_raw_root.sh
@@ -9,6 +9,6 @@
 set -e
 
 export ATHENA_CORE_NUMBER=2
-Reco_tf.py --AMI q431 --multiproces --inputBSFile root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root
+Reco_tf.py --AMI q431 --multiprocess --inputBSFile root://lcg-lrz-rootd.grid.lrz.de:1094/pnfs/lrz-muenchen.de/data/atlas/dq2/atlasdatadisk/rucio/data15_13TeV/71/42/data15_13TeV.00284285.physics_Main.daq.RAW._lb0856._SFO-1._0003.data --outputESDFile art.pool.root
 
 echo "art-result: $? DirectIOART_AthenaMP_RecoTF_inputBS_protocol_ROOT"
-- 
GitLab


From 90b360a999fb9c46739872a351d8568b4bc0bb42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Mon, 4 Jan 2021 14:02:42 +0100
Subject: [PATCH 254/308] fix input Trk::SegmentCollection name when running on
 old ESDs

---
 MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
index 3036fb462f03..812e254a6e5a 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
@@ -526,6 +526,10 @@ def MuonTrackBuildingCfg(flags, name = "MuPatTrackBuilder"):
     acc = MuonTrackSteeringCfg(flags)
     track_steering = acc.getPrimary()
     result.merge(acc)
+
+    # release 21 ESDs contain a Trk::SegmentCollection named 'MuonSegments' instead of 'TrackMuonSegments', the following 2 lines account for that
+    from MuonConfig.MuonSegmentNameFixConfig import MuonSegmentNameFixCfg
+    result.merge(MuonSegmentNameFixCfg(flags))
     
     track_builder = MuPatTrackBuilder(name=name, TrackSteering = track_steering, MuonSegmentCollection="TrackMuonSegments", SpectrometerTrackOutputLocation="MuonSpectrometerTracks" )
 
-- 
GitLab


From 5149f11b23723b4ac4155b726448a78d061da990 Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <teng.jian.khoo@cern.ch>
Date: Mon, 4 Jan 2021 14:09:30 +0100
Subject: [PATCH 255/308] JetRec flake8 fixes

---
 Reconstruction/Jet/JetRec/CMakeLists.txt      |  2 +-
 .../JetRec/python/FastJetInterfaceConfig.py   |  9 +-
 .../Jet/JetRec/python/JetAlgorithm.py         | 14 +--
 .../Jet/JetRec/python/JetFlavorAlgs.py        |  3 +-
 .../Jet/JetRec/python/JetRecStandard.py       |  7 +-
 .../python/JetRecStandardToolManager.py       |  6 +-
 .../Jet/JetRec/python/JetRecStandardTools.py  | 91 ++-----------------
 .../Jet/JetRec/python/JetRecUtils.py          |  5 +-
 .../Jet/JetRec/python/JetToolSupport.py       | 44 ++++-----
 9 files changed, 43 insertions(+), 138 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/CMakeLists.txt b/Reconstruction/Jet/JetRec/CMakeLists.txt
index c37361923ea8..51e4510e5497 100644
--- a/Reconstruction/Jet/JetRec/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRec/CMakeLists.txt
@@ -92,5 +92,5 @@ if ( NOT GENERATIONBASE AND NOT XAOD_STANDALONE )
 endif()
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
diff --git a/Reconstruction/Jet/JetRec/python/FastJetInterfaceConfig.py b/Reconstruction/Jet/JetRec/python/FastJetInterfaceConfig.py
index d9641147035e..26ce5e8a3f26 100644
--- a/Reconstruction/Jet/JetRec/python/FastJetInterfaceConfig.py
+++ b/Reconstruction/Jet/JetRec/python/FastJetInterfaceConfig.py
@@ -1,7 +1,7 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 
-from AthenaCommon.SystemOfUnits import *
+from AthenaCommon.SystemOfUnits import GeV
 from AthenaCommon.Logging import logging
 
 from JetRec.JetRecConf import FastJetInterfaceTool
@@ -96,10 +96,10 @@ def checkAndUpdate(**options):
     for k in options.keys():
         if k not in defFastJetInterfaceConfigDict :
             if ignoreUnknown :
-                _fastjetLog.warning("Option %s unknown - ignoring it!"%(k))
+                _fastjetLog.warning("Option %s unknown - ignoring it!",k)
                 options.pop(k)
             else :
-                _fastjetLog.error("Option %s unknown - abort configuration!"%(k))
+                _fastjetLog.error("Option %s unknown - abort configuration!",k)
                 raise Exception
 
     checkedOptions = dict(defFastJetInterfaceConfigDict)
@@ -114,7 +114,6 @@ def checkAndUpdate(**options):
     # check settings for Strategy
     key = "Strategy"
     #    print checkedOptions
-    tag = checkedOptions[key]
     _fastjetLog.info("Test option %s",key)
     if checkedOptions[key] not in fastjet_conf_tags.Strategy :
         _fastjetLog.error("Strategy \042%s\042 not recognized - fatal! Allowed values are: ",checkedOptions['Strategy'])
diff --git a/Reconstruction/Jet/JetRec/python/JetAlgorithm.py b/Reconstruction/Jet/JetRec/python/JetAlgorithm.py
index 24aaf13dddf0..79ea227347da 100644
--- a/Reconstruction/Jet/JetRec/python/JetAlgorithm.py
+++ b/Reconstruction/Jet/JetRec/python/JetAlgorithm.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 # JetAlgorithm.py
 #
@@ -40,16 +40,16 @@ def addJetRecoToAlgSequence(job =None, useTruth =None, eventShapeTools =None,
   from JetRec.JetRecStandard import jtm
 
   # Set sequence and flags as needed.
-  if job == None:
+  if job is None:
     from AthenaCommon.AlgSequence import AlgSequence
     job = AlgSequence()
-  if useTruth == None:
+  if useTruth is None:
     useTruth = jetFlags.useTruth()
-  if eventShapeTools == None:
+  if eventShapeTools is None:
     eventShapeTools = jetFlags.eventShapeTools()
-    if eventShapeTools == None:
+    if eventShapeTools is None:
       eventShapeTools = []
-  if separateJetAlgs == None:
+  if separateJetAlgs is None:
     separateJetAlgs = jetFlags.separateJetAlgs()
 
 
@@ -198,7 +198,7 @@ def addJetRecoToAlgSequence(job =None, useTruth =None, eventShapeTools =None,
     from JetRec.JetRecConf import JetToolRunner
     jtm += JetToolRunner("jetrun",
                          EventShapeTools=[],
-                         Tools=rtools+jtm.jetrecs,
+                         Tools=jtm.jetrecs,
                          Timer=jetFlags.timeJetToolRunner()
                          )
     runners += [jtm.jetrun]
diff --git a/Reconstruction/Jet/JetRec/python/JetFlavorAlgs.py b/Reconstruction/Jet/JetRec/python/JetFlavorAlgs.py
index d80bd0589564..3bc37378ac21 100644
--- a/Reconstruction/Jet/JetRec/python/JetFlavorAlgs.py
+++ b/Reconstruction/Jet/JetRec/python/JetFlavorAlgs.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 # JetFlavorAlgs.py
 #
@@ -20,7 +20,6 @@ def scheduleCopyTruthParticles():
   from ParticleJetTools.ParticleJetToolsConf import CopyFlavorLabelTruthParticles
   from ParticleJetTools.ParticleJetToolsConf import CopyBosonTopLabelTruthParticles
   from ParticleJetTools.ParticleJetToolsConf import CopyTruthPartons
-  from ParticleJetTools.CopyTruthParticlesAlg import CopyTruthParticlesAlg
 
   tools = []
   for ptype in jetFlags.truthFlavorTags():
diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandard.py b/Reconstruction/Jet/JetRec/python/JetRecStandard.py
index 2773bc56b02f..9f8f073385b0 100644
--- a/Reconstruction/Jet/JetRec/python/JetRecStandard.py
+++ b/Reconstruction/Jet/JetRec/python/JetRecStandard.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 # JetRecStandard.py
 #
@@ -23,7 +23,6 @@ jetlog.info( myname + "Begin.")
 
 from RecExConfig.RecFlags import rec 
 from InDetRecExample.InDetJobProperties import InDetFlags
-from JetRec.JetRecFlags import jetFlags
 
 # Function to display flag value and status.
 def sflagstat(flag):
@@ -106,7 +105,7 @@ if not recAlgs.doEFlow():
 
 # Set the list of rho calculations.
 # If caller has set jetFlags.eventShapeTools(), then we use those values.
-if jetFlags.eventShapeTools() == None:
+if jetFlags.eventShapeTools() is None:
   jetFlags.eventShapeTools = []
   if jetFlags.useTopo():
     jetFlags.eventShapeTools += ['emtopo', 'lctopo']
@@ -117,7 +116,9 @@ if jetFlags.eventShapeTools() == None:
 
 # Import the jet tool manager.
 from JetRec.JetRecStandardToolManager import jtm
+jetlog.verbose("Initialised jtm with tools %s", jtm.tools)
 # Import the constituent tool manager
 from JetRecTools.ConstitToolManager import ctm
+jetlog.verbose("Initialised ctm with modifiers %s", ctm.modifiersMap)
 
 jetlog.info( myname + "End." )
diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py b/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py
index 4c1f68fb1922..5562d4a2b19c 100644
--- a/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py
+++ b/Reconstruction/Jet/JetRec/python/JetRecStandardToolManager.py
@@ -15,8 +15,6 @@
 from AthenaCommon import Logging
 jetlog = Logging.logging.getLogger('JetRec_jobOptions')
 
-import copy
-
 myname = "JetRecStandardToolManager.py: "
 
 jetlog.info( myname + "Defining standard tools" )
@@ -73,13 +71,13 @@ jtm.ptminFinder = 2000
 jtm.ptminFilter =    0
 
 # Add standard tool definitions to the tool manager.
-import JetRec.JetRecStandardTools
+import JetRec.JetRecStandardTools as JetRecStandardTools
+jetlog.verbose("Use trigger store? %s", JetRecStandardTools.UseTriggerStore)
 
 # Function to filter out skipped tools.
 def filterout(skiptoolnames, tools):
   outtools = []
   remtoolnames = []
-  nrem = 0
   for tool in tools:
     keep = True
     for toolname in skiptoolnames:
diff --git a/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py b/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py
index 954540ed1059..186a490c312d 100644
--- a/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py
+++ b/Reconstruction/Jet/JetRec/python/JetRecStandardTools.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 # JetRecStandardTools.py
 #
@@ -17,12 +17,9 @@
 # Import the jet flags.
 from JetRec.JetRecFlags import jetFlags
 
-if not "UseTriggerStore " in locals():
+if "UseTriggerStore " not in locals():
   UseTriggerStore = False
 
-# get levels defined VERBOSE=1 etc.
-from GaudiKernel.Constants import *
-
 from eflowRec.eflowRecFlags import jobproperties
 
 from JetRec.JetRecStandardToolManager import jtm
@@ -38,13 +35,11 @@ from JetRecTools.JetRecToolsConf import SimpleJetTrackSelectionTool
 from JetRecTools.JetRecToolsConf import TrackVertexAssociationTool
 
 try:
-  from JetRecCalo.JetRecCaloConf import MissingCellListTool
   jtm.haveJetRecCalo = True
 except ImportError:
   jtm.haveJetRecCalo = False
 from JetRec.JetRecConf import JetPseudojetRetriever
 from JetRec.JetRecConf import JetConstituentsRetriever
-from JetRec.JetRecConf import JetRecTool
 from JetRec.JetRecConf import JetFromPseudojet
 from JetRec.JetRecConf import JetConstitRemover
 from JetRec.JetRecConf import JetSorter
@@ -59,7 +54,6 @@ except ImportError:
 from JetMomentTools.JetMomentToolsConf import JetWidthTool
 from JetMomentTools.JetMomentToolsConf import JetCaloEnergies
 try:
-  from JetMomentTools.JetMomentToolsConf import JetJetBadChanCorrTool
   jtm.haveJetBadChanCorrTool = True
 except ImportError:
   jtm.haveJetBadChanCorrTool = False
@@ -96,7 +90,7 @@ except ImportError:
 try:
   from ParticleJetTools.ParticleJetToolsConf import Analysis__JetQuarkLabel
   jtm.haveParticleJetTools = True
-except:
+except ImportError:
   jtm.haveParticleJetTools = False
 if jtm.haveParticleJetTools:
   from ParticleJetTools.ParticleJetToolsConf import Analysis__JetConeLabeling
@@ -295,16 +289,16 @@ jtm += MuonSegmentPseudoJetAlgorithm(
 )
 
 useVertices = True
-if False == jetFlags.useVertices:
+if not jetFlags.useVertices:
   useVertices = False
 
-if True == jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction:
+if jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction:
   useChargedWeights = True
 else:
   useChargedWeights = False
 
 useTrackVertexTool = False
-if True == jetFlags.useTrackVertexTool:
+if jetFlags.useTrackVertexTool:
   useTrackVertexTool = True
 
 # Weight tool for charged pflow objects.
@@ -314,7 +308,7 @@ jtm += WeightPFOTool("pflowweighter")
 import cppyy
 try:
     cppyy.load_library('libxAODBaseObjectTypeDict')
-except:
+except Exception:
     pass
 from ROOT import xAODType
 xAODType.ObjectType
@@ -530,74 +524,6 @@ jtm += JetWidthTool("width")
 # Calo layer energies.
 jtm += JetCaloEnergies("jetens")
 
-# Read in missing cell map (needed for the following)
-# commented out : incompatible with trigger : ATR-9696
-## if jtm.haveJetRecCalo:
-##     def missingCellFileReader(): 
-##       import os
-##       dataPathList = os.environ[ 'DATAPATH' ].split(os.pathsep)
-##       dataPathList.insert(0, os.curdir)
-##       from AthenaCommon.Utils.unixtools import FindFile
-##       RefFileName = FindFile( "JetBadChanCorrTool.root" ,dataPathList, os.R_OK )
-##       from AthenaCommon.AppMgr import ServiceMgr
-##       if not hasattr(ServiceMgr, 'THistSvc'):
-##         from GaudiSvc.GaudiSvcConf import THistSvc
-##         ServiceMgr += THistSvc()
-##       ServiceMgr.THistSvc.Input += ["JetBadChanCorrTool DATAFILE=\'%s\' OPT=\'READ\'" % RefFileName]
-##       missingCellFileReader.called = True 
-
-##     missingCellFileReader()
-
-##     jtm += MissingCellListTool(
-##       "missingcells",
-##       AddCellList = [],
-##       RemoveCellList = [],
-##       AddBadCells = True,
-##       DeltaRmax = 1.0,
-##       AddCellFromTool = False,
-##       LArMaskBit = 608517,
-##       TileMaskBit = 1,
-##       MissingCellMapName = "MissingCaloCellsMap"
-## )
-
-## # Bad channel corrections from cells
-## if jtm.haveJetBadChanCorrTool:
-##   jtm += JetBadChanCorrTool(
-##     "bchcorrcell",
-##     NBadCellLimit = 10000,
-##     StreamName = "/JetBadChanCorrTool/",
-##     ProfileName = "JetBadChanCorrTool.root",
-##     ProfileTag = "",
-##     UseCone = True,
-##     UseCalibScale = False,
-##     MissingCellMap = "MissingCaloCellsMap",
-##     ForceMissingCellCheck = False,
-##     UseClusters = False,
-##   )
-  
-##   # Bad channel corrections from clusters
-##   jtm += JetBadChanCorrTool(
-##     "bchcorrclus",
-##     NBadCellLimit = 0,
-##     StreamName = "",
-##     ProfileName = "",
-##     ProfileTag = "",
-##     UseCone = True,
-##     UseCalibScale = False,
-##     MissingCellMap = "",
-##     ForceMissingCellCheck = False,
-##     UseClusters = True
-##   )
-
-# Jet vertex fraction.
-# jtm += JetVertexFractionTool(
-#   "jvfold",
-#   VertexContainer = jtm.vertexContainer,
-#   AssociatedTracks = "GhostTrack",
-#   TrackVertexAssociation = jtm.tvassoc.TrackVertexAssociation,
-#   JVFName = "JVFOld"
-# )
-
 # Jet vertex fraction with selection.
 jtm += JetVertexFractionTool(
   "jvf",
@@ -616,9 +542,6 @@ jtm += JetVertexFractionTool(
 jtm += JetVertexTaggerTool(
   "jvt",
   VertexContainer = jtm.vertexContainer,
-  # AssociatedTracks = "GhostTrack",
-  # TrackVertexAssociation = jtm.tvassoc.TrackVertexAssociation,
-  # TrackSelector = jtm.trackselloose,
   JVTName = "Jvt",
 )
 
diff --git a/Reconstruction/Jet/JetRec/python/JetRecUtils.py b/Reconstruction/Jet/JetRec/python/JetRecUtils.py
index 0d0f11efe543..9afc11ea29c1 100644
--- a/Reconstruction/Jet/JetRec/python/JetRecUtils.py
+++ b/Reconstruction/Jet/JetRec/python/JetRecUtils.py
@@ -1,6 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from AthenaCommon.AppMgr import ToolSvc
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import Logging
 jetlog = Logging.logging.getLogger('JetRec_jobOptions')
@@ -103,7 +101,6 @@ def buildJetContName(finder, mainParam, input, variableRMassScale=0, variableRMi
     return buildJetAlgName(finder, mainParam, variableRMassScale, variableRMinRadius) +input+"Jets" # could be more elaborated...
 
 def interpretJetName(jetcollName,  finder = None,input=None, mainParam=None):
-    myname = "JetRecUtils: "
     from AthenaCommon import Logging
     jetlog = Logging.logging.getLogger('JetRecUtils')
     # first step : guess the finder, input , mainParam, if needed
diff --git a/Reconstruction/Jet/JetRec/python/JetToolSupport.py b/Reconstruction/Jet/JetRec/python/JetToolSupport.py
index 40c03ce0e71c..185af2a244b5 100644
--- a/Reconstruction/Jet/JetRec/python/JetToolSupport.py
+++ b/Reconstruction/Jet/JetRec/python/JetToolSupport.py
@@ -40,12 +40,6 @@ jetlog = Logging.logging.getLogger('JetRec_jobOptions')
 # import the jet flags.
 from JetRec.JetRecFlags import jetFlags
 
-from GaudiKernel.Constants import (VERBOSE,
-                                   DEBUG,
-                                   INFO,
-                                   WARNING,
-                                   ERROR,
-                                   FATAL,)
 # The tool manager
 class JetToolManager:
   prefix = "JetToolManager: "
@@ -154,7 +148,7 @@ class JetToolManager:
   # If the argument is a list, a copy is returned directly.
   # Also configures any necessary container names in the copy.
   def getModifiers(self, modifiersin, altname =None):
-    if modifiersin == None:
+    if modifiersin is None:
       if altname in ["lctopo","emtopo"]:
         return self.modifiersMap[altname+"_ungroomed"]
       elif "pflow" in altname:
@@ -170,7 +164,6 @@ class JetToolManager:
   # the appropriate calibration tool.
   def buildModifiers(self, modifiersin, finder, getters, altname, output, calibOpt, constmods=[]):
     from GaudiKernel.Proxy.Configurable import ConfigurableAlgTool
-    from JetRec.JetRecConf import JetFinder
     outmods = []
     inmods = self.getModifiers(modifiersin, altname)
     ncalib = 0
@@ -240,11 +233,11 @@ class JetToolManager:
             jetlog.info( sinp, cname, output )
             raise TypeError
         # Check that the building of the association tool has been scheduled.
-        if not cname in self.jetcons:
+        if cname not in self.jetcons:
           jetlog.info( self.prefix + "Truth association skipped because container is missing: " + cname )
           jetlog.info( self.prefix + "Add to jetcons if input stream is expected to have this." )
         tname = mod + "_" + salg + srad
-        if not tname in self.tools:
+        if tname not in self.tools:
           from JetMomentTools.JetMomentToolsConf import JetPtAssociationTool
           self += JetPtAssociationTool(tname, JetContainer=output, MatchingJetContainer=cname, AssociationName="GhostTruth")
         outmods += [self.tools[tname]]
@@ -258,12 +251,12 @@ class JetToolManager:
             jetlog.info( sinp, cname, output )
             raise TypeError
         # Check that the building of the association tool has been scheduled.
-        if not cname in self.jetcons:
+        if cname not in self.jetcons:
           jetlog.info( self.prefix + "Track association skipped because container is missing: " + cname )
           jetlog.info( self.prefix + "Add to jetcons if input stream is expected to have this." )
         else:
           tname = mod + "_" + salg + srad
-          if not tname in self.tools:
+          if tname not in self.tools:
             from JetMomentTools.JetMomentToolsConf import JetPtAssociationTool
             self += JetPtAssociationTool(tname, JetContainer=output, MatchingJetContainer=cname, AssociationName="GhostTrack")
           outmods += [self.tools[tname]]
@@ -273,7 +266,7 @@ class JetToolManager:
           jetlog.info( self.prefix + "Jet filter requested without a threshold." )
           raise Exception
         tname = "jetpt" + str(self.ptminFilter)
-        if not tname in self.tools:
+        if tname not in self.tools:
           from JetRec.JetRecConf import JetFilterTool
           self.add( JetFilterTool(tname, PtMin=self.ptminFilter) ) 
         outmods += [self.tools[tname]]
@@ -292,7 +285,7 @@ class JetToolManager:
         self.add(btagger)
         outmods += [btagger]
       elif mod == "largeR":
-        outmods += jtm.modifiersMap["largeR"]
+        outmods += self.modifiersMap["largeR"]
       else:
         raise TypeError
     # Check calibration.
@@ -336,12 +329,11 @@ class JetToolManager:
       self.m_jetBuilder = self.jetBuilderWithoutArea
     else:
       self.m_jetBuilder = self.jetBuilderWithArea
-    if self.m_jetBuilder == None:
+    if self.m_jetBuilder is None:
       self.msg(0, "Jet builder must be specified")
-      raise Error
+      raise Exception
     from JetRec.JetRecConf import JetFinder
-    areaSuffix= "Area" if ghostArea>0.0 else ""
-    finder = JetFinder(toolname);
+    finder = JetFinder(toolname)
     finder.JetAlgorithm = alg
     finder.JetRadius = radius
     finder.VariableRMinRadius = variableRMinRadius
@@ -355,7 +347,7 @@ class JetToolManager:
     finder.JetBuilder = self.m_jetBuilder
     self += finder
     self.finders += [finder]
-    hifinder = finder;
+    hifinder = finder
     if type(ivtx) is int:
       from JetRec.JetRecConf import JetByVertexFinder
       vfinder = JetByVertexFinder(
@@ -365,7 +357,7 @@ class JetToolManager:
       )
       self += vfinder
       self.finders += [vfinder]
-      hifinder = vfinder;
+      hifinder = vfinder
     return (finder, hifinder)
 
   # Create a jet finder and rectool.
@@ -407,10 +399,10 @@ class JetToolManager:
     
     # Accumulate all PseudoJetGetters such that we can schedule all
     # needed PseudoJetAlgorithms before jet building
-    self.allGetters += [getter for getter in getters if not getter in self.allGetters]
+    self.allGetters += [getter for getter in getters if getter not in self.allGetters]
     # If jet finding by vertex is not specified, check for special input type names
     ivtx = ivtxin
-    if ivtx == None:
+    if ivtx is None:
       if gettersin == "ztrack": ivtx = -1        # Find tracs separatesly for each vertex
       elif gettersin == "pv0track": ivtx = 0     # Find tracks only for 1st vertex
     # Retrieve/build the jet finder.
@@ -424,14 +416,13 @@ class JetToolManager:
     if ptminFilter > 0.0: self.ptminFilter = ptminFilter
     jetrec.JetModifiers = self.buildModifiers(modifiersin, lofinder, getters, gettersin, output, calibOpt, constmods=constmods)
     self.autoconfigureModifiers(jetrec.JetModifiers, output)
-    if consumers != None:
+    if consumers is not None:
       jetrec.JetConsumers = consumers
     self.ptminFilter = ptminSave
     jetrec.Trigger = isTrigger or useTriggerStore
     jetrec.Timer = jetFlags.timeJetRecTool()
     #jetrec.WarnIfDuplicate = warnIfDuplicate
     #jetrec.Overwrite = overwrite
-    # JetRecTool.OutputLevel = VERBOSE
     self += jetrec
     if isTrigger:
       self.trigjetrecs += [jetrec]
@@ -725,7 +716,7 @@ class JetToolManager:
     jetrec.JetGroomer = groomer
     jetrec.JetModifiers = self.getModifiers(modifiersin)
     self.autoconfigureModifiers(jetrec.JetModifiers, output)
-    if consumers != None:
+    if consumers is not None:
       jetrec.JetConsumers = consumers
     jetrec.Trigger = isTrigger or useTriggerStore
     jetrec.Timer = jetFlags.timeJetRecTool()
@@ -772,7 +763,6 @@ class JetToolManager:
 
   # Change the output level of a tool.
   def setOutputLevel(self, toolid, level):
-    from GaudiKernel.Proxy.Configurable import ConfigurableAlgTool
     if type(toolid) == str:
       tool = self[toolid]
     else:
@@ -780,11 +770,9 @@ class JetToolManager:
     locked = tool.isLocked()
     oldlevel = "undefined"
     if locked:
-      dbglvl = 0
       slock = "locked"
       tool.unlock()
     else:
-      dbglvl = 1
       slock = "unlocked"
     aname = "OutputLevel"
     if hasattr(tool, aname):
-- 
GitLab


From 62542dddef53bc7ccd232648d0aa8fb733a89709 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Mon, 4 Jan 2021 14:15:27 +0100
Subject: [PATCH 256/308] Fix AthAnalysis compilation warnings

---
 .../test/ut_xaodrootaccess_tevent_copy_test.cxx           | 8 ++++----
 .../test/ut_PRWDataWeightExample_test.cxx                 | 8 ++++----
 .../MET/METUtilities/util/example_rebuildTrackMET.cxx     | 2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx
index 176b00d2264a..ab48f41cf999 100644
--- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx
+++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx
@@ -17,7 +17,7 @@
 #include "xAODRootAccess/tools/ReturnCheck.h"
 
 /// Helper macro
-#define CHECK( CONTEXT, EXP )                                        \
+#define TEST_CHECK( CONTEXT, EXP )                                        \
    do {                                                              \
       const StatusCode result = EXP;                          \
       if( ! result.isSuccess() ) {                                   \
@@ -36,12 +36,12 @@ int main() {
    static const char* APP_NAME = "ut_xaodrootaccess_tevent_copy_test";
 
    // Initialise the environment:
-   CHECK( APP_NAME, xAOD::Init() );
+   TEST_CHECK( APP_NAME, xAOD::Init() );
 
    // Test the copying in class access mode:
-   CHECK( APP_NAME, copyObjects( xAOD::TEvent::kClassAccess ) );
+   TEST_CHECK( APP_NAME, copyObjects( xAOD::TEvent::kClassAccess ) );
    // Test the copying in athena access mode:
-   CHECK( APP_NAME, copyObjects( xAOD::TEvent::kAthenaAccess ) );
+   TEST_CHECK( APP_NAME, copyObjects( xAOD::TEvent::kAthenaAccess ) );
 
    // Return gracefully:
    return 0;
diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/test/ut_PRWDataWeightExample_test.cxx b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/test/ut_PRWDataWeightExample_test.cxx
index 73715427be37..a7d73a13345f 100644
--- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/test/ut_PRWDataWeightExample_test.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/test/ut_PRWDataWeightExample_test.cxx
@@ -34,11 +34,11 @@ int main() {
                                       "dev/PileupReweighting/ilumicalc_histograms_HLT_e12_lhvloose_nod0_L1EM10VH_297730-304494_OflLumi-13TeV-005.root:HLT_e12_lhvloose_nod0_L1EM10VH",
                                       "dev/PileupReweighting/ilumicalc_histograms_HLT_e24_lhvloose_nod0_L1EM20VH_297730-304494_OflLumi-13TeV-005.root:HLT_e24_lhvloose_nod0_L1EM20VH"}; //feed with lc files for each trigger
   
-  prwTool.setProperty( "DataScaleFactor", 1/1.09 );
-  prwTool.setProperty( "LumiCalcFiles" , lcFiles );
-  //prwTool.setProperty( "OutputLevel", 1 ); //VERBOSE OUTPUT LEVEL
+  ANA_CHECK(prwTool.setProperty( "DataScaleFactor", 1/1.09 ));
+  ANA_CHECK(prwTool.setProperty( "LumiCalcFiles" , lcFiles ));
+  //ANA_CHECK(prwTool.setProperty( "OutputLevel", 1 )); //VERBOSE OUTPUT LEVEL
 
-  prwTool.initialize();
+  ANA_CHECK(prwTool.initialize());
   
   std::cout << prwTool->expert()->GetDataWeight( 297730 , "HLT_e12_lhvloose_nod0_L1EM10VH", 4) << std::endl;
   if(! ( fabs(prwTool->expert()->GetDataWeight( 297730 , "HLT_e12_lhvloose_nod0_L1EM10VH", 4)  - 8797.7) < 1e-3 ) ) {
diff --git a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
index df8b54eacc98..8dbe1635e5be 100644
--- a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
@@ -265,7 +265,7 @@ int main( int argc, char* argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl
   }
 
 #ifndef XAOD_STANDALONE // POOL::TEvent should handle this when changing events
-  app->finalize();
+  ANA_CHECK( app->finalize() );
 #endif
 
   xAOD::IOStats::instance().stats().printSmartSlimmingBranchList();
-- 
GitLab


From 79d87d51eb6582fb92cf07a3d0ba394ebbb4f887 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Mon, 4 Jan 2021 15:45:44 +0100
Subject: [PATCH 257/308] define MuonPhysValMonitoringTool properties inline in
 header

---
 .../src/MuonPhysValMonitoringTool.cxx         | 41 +++-------------
 .../src/MuonPhysValMonitoringTool.h           | 48 +++++++++----------
 .../share/PhysValMuon_jobOptions.py           | 24 ++--------
 3 files changed, 35 insertions(+), 78 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
index e706b0081e11..b94293e21703 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
@@ -61,7 +61,10 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
 						      const IInterface* parent ):
   ManagedMonitorToolBase( type, name, parent ),
   m_MSTracks(nullptr),
-  m_isData(false),
+  m_counterBits(),
+  m_muonItems(),
+  m_L1Seed(),
+  m_SelectedAuthor(0),
   m_muonSelectionTool("CP::MuonSelectionTool/MuonSelectionTool"),
   m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool"),
   m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
@@ -75,18 +78,7 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   m_h_overview_Z_mass_ME(nullptr),
   m_h_overview_Z_mass_ID(nullptr)
 {
-  // default for muon chains
   declareProperty( "TrackSelector", m_trackSelector);
-  declareProperty( "IsoTool", m_isoTool );
-  
-  declareProperty( "SelectMuonWorkingPoints", m_selectMuonWPs);
-  declareProperty( "SelectMuonAuthors", m_selectMuonAuthors);
-  declareProperty( "SelectHLTMuonItems", m_selectHLTMuonItems);
-  declareProperty( "SelectL1MuonItems", m_L1MuonItems);
-  declareProperty( "SelectMuonCategories", m_selectMuonCategories );
-  declareProperty( "DoBinnedResolutionPlots", m_doBinnedResolutionPlots = true);
-
-  m_SelectedAuthor = 0;
 }
 
 // Athena algtool's Hooks
@@ -112,12 +104,6 @@ StatusCode MuonPhysValMonitoringTool::initialize()
     m_doTrigMuonL2Validation = false;
     m_doTrigMuonEFValidation = false;
   }
-  if (m_isData) {
-    m_selectMuonCategories.clear();
-    m_selectMuonCategories.push_back(ALL);
-    m_selectMuonCategories.push_back(PROMPT);
-    m_selectMuonCategories.push_back(REST);
-  }
   
   ATH_CHECK(m_eventInfo.initialize());
   ATH_CHECK(m_muonSelectionTool.retrieve());
@@ -174,22 +160,9 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
 {
   ATH_MSG_INFO ("Booking hists " << name() << "...");
 
-  if (m_selectMuonWPs.size()==0) {       
-    int defaultWPList[]={xAOD::Muon::Loose,xAOD::Muon::Medium};
-    for (const auto wp : defaultWPList) m_selectMuonWPs.push_back(wp);
-  }
-  else if (m_selectMuonWPs.size()==1 && m_selectMuonWPs[0]<0 ) m_selectMuonWPs.clear();  
+  if (m_selectMuonWPs.size()==1 && m_selectMuonWPs[0]<0 ) m_selectMuonWPs.clear();  
 
-  if (m_selectMuonAuthors.size()==0) {
-    unsigned int defaultAuthorList[]={xAOD::Muon::MuidCo,xAOD::Muon::MuTagIMO,xAOD::Muon::MuidSA,xAOD::Muon::MuGirl,xAOD::Muon::CaloTag,xAOD::Muon::CaloLikelihood};
-    for (const auto author : defaultAuthorList) m_selectMuonAuthors.push_back(author);
-  }
-  else if (m_selectMuonAuthors.size()==1 && m_selectMuonAuthors[0]==0) m_selectMuonAuthors.clear();  
-
-  if (m_selectMuonCategories.size()==0) {
-    unsigned int defaultMuonCategories[]={ ALL, PROMPT, INFLIGHT, NONISO, REST };
-    for (const auto category: defaultMuonCategories) m_selectMuonCategories.push_back(category);
-  }
+  if (m_selectMuonAuthors.size()==1 && m_selectMuonAuthors[0]==0) m_selectMuonAuthors.clear();
 
   std::string theMuonCategories[5];
   theMuonCategories[ALL]="All";
@@ -208,7 +181,7 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     std::string categoryPath = m_muonsName+"/"+category+"/";
     m_muonValidationPlots.push_back( new MuonValidationPlots(0, categoryPath,
               m_selectMuonWPs, m_selectMuonAuthors, m_isData,
-	      (category==theMuonCategories[ALL]? false : m_doBinnedResolutionPlots),
+	      (category==theMuonCategories[ALL]? false : m_doBinnedResolutionPlots.value()),
               separateSAFMuons,
 	      m_doMuonTree));
     m_slowMuonValidationPlots.push_back( new SlowMuonValidationPlots( 0, categoryPath, m_isData ) );
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
index fa897be1a74e..9c2fd6dc1434 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
@@ -79,6 +79,8 @@ class MuonPhysValMonitoringTool
   /// Default constructor: 
   MuonPhysValMonitoringTool();
 
+  enum MUCATEGORY{ALL=0, PROMPT, INFLIGHT, NONISO, REST};
+
   void handleMuon(const xAOD::Muon* mu,const xAOD::SlowMuon *smu=0);
   void handleSlowMuon(const xAOD::SlowMuon *smu);
   void handleTruthMuon(const xAOD::TruthParticle* truthMu);
@@ -106,57 +108,53 @@ class MuonPhysValMonitoringTool
   xAOD::Muon* getCorrectedMuon(const xAOD::Muon &mu);
     
   const xAOD::TrackParticleContainer* m_MSTracks;
-  
+  std::map<std::string,int> m_counterBits;
+  std::vector<std::string> m_muonItems;
+  std::vector<std::string> m_L1Seed;
+  int m_SelectedAuthor;
+
   TH1F* findHistogram(std::vector<HistData> hists,std::string hnameTag,std::string hdirTag,std::string hNewName);
   void modifyHistogram(TH1* hist);
 
-  Gaudi::Property<bool> m_isData{this,"IsData",false};
-
-  // Containers
-  Gaudi::Property<std::string> m_tracksName{this,"TrackContainerName",""};
+  Gaudi::Property<std::string> m_tracksName{this,"TrackContainerName","InDetTrackParticles"};
   Gaudi::Property<std::string> m_fwdtracksName{this,"FwdTrackContainerName",""};
   Gaudi::Property<std::string> m_muonsName{this,"MuonContainerName","Muons"};
   Gaudi::Property<std::string> m_slowMuonsName{this,"SlowMuonContainerName","SlowMuons"};
   Gaudi::Property<std::string> m_muonsTruthName{this,"MuonTruthParticleContainerName","MuonTruthParticles"};
-  Gaudi::Property<std::string> m_muonTracksName{this,"MuonTrackContainerName",""};
-  Gaudi::Property<std::string> m_muonExtrapolatedTracksName{this,"MuonExtrapolatedTrackContainerName",""};
-  Gaudi::Property<std::string> m_muonMSOnlyExtrapolatedTracksName{this,"MuonOnlyExtrapolatedTrackContainerName",""};
-  Gaudi::Property<std::string> m_muonSegmentsName{this,"MuonSegmentContainerName",""};
+  Gaudi::Property<std::string> m_muonTracksName{this,"MuonTrackContainerName","MuonSpectrometerTrackParticles"};
+  Gaudi::Property<std::string> m_muonExtrapolatedTracksName{this,"MuonExtrapolatedTrackContainerName","ExtrapolatedMuonTrackParticles"};
+  Gaudi::Property<std::string> m_muonMSOnlyExtrapolatedTracksName{this,"MuonOnlyExtrapolatedTrackContainerName","MSOnlyExtrapolatedMuonTrackParticles"};
+  Gaudi::Property<std::string> m_muonSegmentsName{this,"MuonSegmentContainerName","MuonSegments"};
   Gaudi::Property<std::string> m_muonSegmentsTruthName{this,"MuonTruthSegmentContainerName","MuonTruthSegments"};
   Gaudi::Property<std::string> m_muonL1TrigName{this,"L1TrigMuonContainerName","LVL1MuonRoIs"};
   Gaudi::Property<std::string> m_muonL2SAName{this,"L2SAMuonContainerName","HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfo"};
   Gaudi::Property<std::string> m_muonL2CBName{this,"L2CBMuonContainerName","HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfo"};
   Gaudi::Property<std::string> m_muonEFCombTrigName{this,"EFCombTrigMuonContainerName","HLT_xAOD__MuonContainer_MuonEFInfo"};
 
-  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","event info"};
+  Gaudi::Property<std::vector<int>> m_selectMuonWPs{this,"SelectMuonWorkingPoints",{xAOD::Muon::Loose,xAOD::Muon::Medium}};
+  Gaudi::Property<std::vector<unsigned int>> m_selectMuonAuthors{this,"SelectMuonAuthors",{xAOD::Muon::MuidCo,xAOD::Muon::MuTagIMO,xAOD::Muon::MuidSA,xAOD::Muon::MuGirl,xAOD::Muon::CaloTag,xAOD::Muon::CaloLikelihood}};
+  Gaudi::Property<std::vector<std::vector<std::string>>> m_selectHLTMuonItems{this,"SelectHLTMuonItems",{}};
+  Gaudi::Property<std::vector<std::string>> m_L1MuonItems{this,"SelectL1MuonItems",{}};
+  Gaudi::Property<std::vector<unsigned int>> m_selectMuonCategories{this,"SelectMuonCategories",{MUCATEGORY::ALL,MUCATEGORY::PROMPT,MUCATEGORY::INFLIGHT,MUCATEGORY::NONISO,MUCATEGORY::REST}};
 
-  // Configurable properties
-  std::map<std::string,int> m_counterBits;
-  std::vector<int> m_selectMuonWPs;
-  std::vector<unsigned int> m_selectMuonAuthors;
-  std::vector<std::vector<std::string>> m_selectHLTMuonItems;
-  std::vector<std::string> m_muonItems;
-  std::vector<std::string> m_L1Seed;
-  std::vector<std::string> m_L1MuonItems;
-  int m_SelectedAuthor;
-  std::vector<unsigned int> m_selectMuonCategories;  
-  bool m_doBinnedResolutionPlots;
+  Gaudi::Property<bool> m_doBinnedResolutionPlots{this,"DoBinnedResolutionPlots",true};
   Gaudi::Property<bool> m_doTrigMuonValidation{this,"DoTrigMuonValidation",false};
   Gaudi::Property<bool> m_doTrigMuonL1Validation{this,"DoTrigMuonL1Validation",false};
   Gaudi::Property<bool> m_doTrigMuonL2Validation{this,"DoTrigMuonL2Validation",false};
   Gaudi::Property<bool> m_doTrigMuonEFValidation{this,"DoTrigMuonEFValidation",false};
   Gaudi::Property<bool> m_doMuonTree{this,"DoMuonTree",false};
+  Gaudi::Property<bool> m_isData{this,"IsData",false};
+
+  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","event info"};
   
   // Tools
   ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool;
   ToolHandle<Rec::IMuonPrintingTool> m_muonPrinter;
   ToolHandle<Trig::TrigDecisionTool> m_trigDec;
   ToolHandle<Trk::ITrackSelectorTool> m_trackSelector;
-  ToolHandle<CP::IIsolationSelectionTool> m_isoTool;
-
-
+  ToolHandle<CP::IIsolationSelectionTool> m_isoTool{this,"IsoTool",""};
  
-  enum MUCATEGORY{ALL=0, PROMPT, INFLIGHT, NONISO, REST};
+  
   std::vector<std::string> m_selectMuonCategoriesStr;
   MuonPhysValMonitoringTool::MUCATEGORY getMuonSegmentTruthCategory(const xAOD::MuonSegment* truthMuSeg, const xAOD::TruthParticleContainer* muonTruthContainer);
   MuonPhysValMonitoringTool::MUCATEGORY getMuonTruthCategory(const xAOD::IParticle* prt);
diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
index e67aa8c518ce..beeb35a7053b 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
@@ -7,26 +7,10 @@ from RecExConfig.RecFlags import rec as recFlags
 tool1 = MuonPhysValMonitoring__MuonPhysValMonitoringTool( name = 'muphysval' )
 tool1.IsData = not recFlags.doTruth()
 
-#
-tool1.MuonContainerName = 'Muons'
+#add if you need any of the following containers
+#tool1.FwdTrackContainerName='InDetForwardTrackParticles'
 tool1.SlowMuonContainerName = ''
-tool1.MuonTruthParticleContainerName = 'MuonTruthParticles'
-tool1.DoBinnedResolutionPlots = True
 
-#comment out if you don't need any of the following containers
-tool1.TrackContainerName = 'InDetTrackParticles'
-# #tool1.FwdTrackContainerName='InDetForwardTrackParticles'
-tool1.MuonTrackContainerName = 'MuonSpectrometerTrackParticles'
-tool1.MuonExtrapolatedTrackContainerName = 'ExtrapolatedMuonTrackParticles'
-tool1.MuonOnlyExtrapolatedTrackContainerName = 'MSOnlyExtrapolatedMuonTrackParticles'
-tool1.MuonSegmentContainerName = 'MuonSegments'
-
-
-#tool1.MuonTruthParticleContainerName = 'MuonTruthParticle' # uncomment for release 19
-# tool1.DoTrigMuonValidation =True
-# tool1.DoTrigMuonEFValidation = True
-# tool1.DoTrigMuonL2Validation = True
-# tool1.DoTrigMuonL1Validation = True
 tool1.SelectHLTMuonItems = [
   ["HLT_mu20","L1_MU20"],
   ["HLT_mu20_iloose_L1MU15","L1_MU15"],
@@ -54,9 +38,11 @@ tool1.SelectMuonWorkingPoints = [ 1 ]
 tool1.SelectMuonAuthors = [ 1, 2, 4 ,5, 6, 8, 9 ]
 
 #Select Muon Categories... (origin of muons, empty: all categories, 0: ALL, 1: PROMPT, 2: IN-FLIGHT, 3: NON-ISOLATED, 4: REST)
-#tool1.SelectMuonCategories = [ 0, 1, 2, 3, 4 ] # all possible categories
 tool1.SelectMuonCategories = [ 0, 1 ] # lighter version, good for official validation tasks overriden when in data mode
 
+if not recFlags.doTruth():
+    tool1.SelectMuonCategories = [0, 1, 4]
+
 from IsolationSelection.IsolationSelectionConf import CP__IsolationSelectionTool
 IsolationTool = CP__IsolationSelectionTool( "IsolationSelectionTool",
                                             CalibFileName = "IsolationSelection/v1/MC15_Z_Jpsi_cutMap.root",
-- 
GitLab


From 7752fb519020e95e556703bad5ed5b1a120029e3 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Mon, 4 Jan 2021 16:07:02 +0100
Subject: [PATCH 258/308] Recompute MET name hash in standalone code if not
 available

---
 .../xAOD/xAODMissingET/Root/MissingET_v1.cxx  |  4 +---
 .../xAODMissingET/xAODMissingET/selection.xml |  6 +++++
 .../xAODMissingET/versions/MissingET_v1.h     |  9 +++----
 .../xAODMissingET/versions/MissingET_v1.icc   | 14 +++++++----
 .../src/xAODMissingETContainerCnv.cxx         | 15 +++---------
 .../src/xAODMissingETContainerCnv.h           | 24 ++-----------------
 6 files changed, 27 insertions(+), 45 deletions(-)

diff --git a/Event/xAOD/xAODMissingET/Root/MissingET_v1.cxx b/Event/xAOD/xAODMissingET/Root/MissingET_v1.cxx
index c76ee8387db5..1ea40279b060 100644
--- a/Event/xAOD/xAODMissingET/Root/MissingET_v1.cxx
+++ b/Event/xAOD/xAODMissingET/Root/MissingET_v1.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -20,8 +20,6 @@ MissingET_v1::MissingET_v1( bool createStore )
       createPrivateStore();
       setName(this->name());
    }
-   else
-      m_nameHash = 0;
 }
 
 MissingET_v1::MissingET_v1( const std::string& name,
diff --git a/Event/xAOD/xAODMissingET/xAODMissingET/selection.xml b/Event/xAOD/xAODMissingET/xAODMissingET/selection.xml
index 781949aae28e..5caac7fccb78 100644
--- a/Event/xAOD/xAODMissingET/xAODMissingET/selection.xml
+++ b/Event/xAOD/xAODMissingET/xAODMissingET/selection.xml
@@ -5,6 +5,12 @@
    <class name="xAOD::MissingET_v1" >
       <field name="m_nameHash" transient="true" />
    </class>
+   <read sourceClass="xAOD::MissingET_v1" version="[1-]"
+         targetClass="xAOD::MissingET_v1" source="" target="m_nameHash" >
+      <![CDATA[
+         m_nameHash.reset();
+      ]]>
+   </read>
    <class name="DataVector<xAOD::MissingET_v1>" />
    <class name="xAOD::MissingETContainer_v1"
           id="F49162FE-6BC0-49BC-A7DA-A792136BD939" />
diff --git a/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.h b/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.h
index c11056709e94..8b273fa702aa 100644
--- a/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.h
+++ b/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.h
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAODMISSINGET_VERSIONS_MISSINGET_V1_H
@@ -9,8 +9,9 @@
 
 #include "AthContainers/AuxElement.h"
 
-#include "xAODBase/IParticle.h"
+#include "CxxUtils/CachedValue.h"
 
+#include "xAODBase/IParticle.h"
 #include "xAODMissingET/versions/MissingETBase.h"
 
 #include <string>
@@ -108,12 +109,12 @@ namespace xAOD
     float&                           f_mpy();     /*!< @brief Returns reference to @f$ p_{y} @f$ store */
     float&                           f_sumet();  /*!< @brief Returns reference to @f$ \Sigma E_{\rm T} @f$ store */
     std::string&                      f_name();   /*!< @brief Returns reference to MET object name store */
-    const std::string&                f_nameConst(); /*!< @brief Returns const reference to the MET object name store*/
+    const std::string&                f_nameConst() const; /*!< @brief Returns const reference to the MET object name store*/
     MissingETBase::Types::bitmask_t&  f_source(); /*!< @brief Returns reference to MET object source store */
     /*!@}*/
 
   private:
-    std::size_t m_nameHash;/*!< @brief Stores the hash for the current f_name string */
+    CxxUtils::CachedValue<std::size_t> m_nameHash; /*!< @brief Stores the hash for the current f_name string */
 
     static const SG::AuxElement::Accessor<float> m_acc_mpx;
     static const SG::AuxElement::Accessor<float> m_acc_mpy;
diff --git a/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.icc b/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.icc
index 5dbe64ade328..4d4360ce8c61 100644
--- a/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.icc
+++ b/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingET_v1.icc
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -16,7 +16,10 @@ inline float xAOD::MissingET_v1::mpy()   const { return m_acc_mpy(*this); }
 inline float xAOD::MissingET_v1::sumet() const { return m_acc_sumet(*this); }
 
 inline const std::string&              xAOD::MissingET_v1::name()     const { static const SG::AuxElement::Accessor<std::string> acc("name"); return acc(*this); }
-inline std::size_t xAOD::MissingET_v1::nameHash() const { return m_nameHash; }
+inline std::size_t xAOD::MissingET_v1::nameHash() const {
+  if (!m_nameHash.isValid()) { m_nameHash.set(std::hash<std::string>()(this->f_nameConst())); }
+  return *m_nameHash.ptr();
+}
 inline MissingETBase::Types::bitmask_t xAOD::MissingET_v1::source()   const { static const SG::AuxElement::Accessor<MissingETBase::Types::bitmask_t> acc("source"); return acc(*this); }
 
 ////////////////////////////////////////////
@@ -28,7 +31,7 @@ inline float& xAOD::MissingET_v1::f_mpy()   { return m_acc_mpy(*this); }
 inline float& xAOD::MissingET_v1::f_sumet() { return m_acc_sumet(*this); }
 
 inline std::string& xAOD::MissingET_v1::f_name()                       { static const SG::AuxElement::Accessor<std::string> acc("name"); return acc(*this); }
-inline const std::string& xAOD::MissingET_v1::f_nameConst()            { static const SG::AuxElement::ConstAccessor<std::string> acc("name"); return acc(*this); }
+inline const std::string& xAOD::MissingET_v1::f_nameConst() const      { static const SG::AuxElement::ConstAccessor<std::string> acc("name"); return acc(*this); }
 inline MissingETBase::Types::bitmask_t& xAOD::MissingET_v1::f_source() { static const SG::AuxElement::Accessor<MissingETBase::Types::bitmask_t> acc("source"); return acc(*this); }
 
 inline void xAOD::MissingET_v1::setMpx(float mpx)     { this->f_mpx() = mpx; }
@@ -40,7 +43,10 @@ inline void xAOD::MissingET_v1::setName(const std::string& name) {
   updateHash();
 }
 
-inline void xAOD::MissingET_v1::updateHash() { m_nameHash = std::hash<std::string>()(this->f_nameConst()); }
+inline void xAOD::MissingET_v1::updateHash() {
+  m_nameHash.reset();
+  m_nameHash.set(std::hash<std::string>()(this->f_nameConst()));
+}
 inline void xAOD::MissingET_v1::setSource(MissingETBase::Types::bitmask_t src) { this->f_source() = src; }
 
 ///////////////////////////////////////////////////
diff --git a/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.cxx b/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.cxx
index 86faffcd9b55..4ec4bf69026b 100644
--- a/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.cxx
+++ b/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.cxx
@@ -1,15 +1,6 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
- 
-// Local include(s):
-#include "xAODMissingETContainerCnv.h"
-
-xAOD::MissingETContainer*
-xAODMissingETContainerCnv::createTransientWithKey (const std::string& key)
-{
-  xAOD::MissingETContainer* c = xAODMissingETContainerCnvBase::createTransientWithKey (key);
-  for(xAOD::MissingET* metObj : *c) metObj->updateHash();
-  return c;
-}
+// Dummy source file so that the build system knows that this
+// is a custom converter.
diff --git a/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.h b/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.h
index 9319756a26e0..aeb417649fff 100644
--- a/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.h
+++ b/Event/xAOD/xAODMissingETAthenaPool/src/xAODMissingETContainerCnv.h
@@ -1,41 +1,21 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: xAODMissingETContainerCnv.h 795699 2017-02-05 23:26:05Z khoo $
 #ifndef XAODMISSINGETATHENAPOOL_XAODMISSINGETCONTAINERCNV_H
 #define XAODMISSINGETATHENAPOOL_XAODMISSINGETCONTAINERCNV_H
 
-// System include(s):
-#include <string>
-
 // Gaudi/Athena include(s):
 #include "AthenaPoolCnvSvc/T_AthenaPoolxAODCnv.h"
 
 // EDM include(s):
-#include "xAODMissingET/MissingET.h"
 #include "xAODMissingET/MissingETContainer.h"
 
 /// Type definition for the converter's base
 typedef T_AthenaPoolxAODCnv< xAOD::MissingETContainer >
-   xAODMissingETContainerCnvBase;
-
-/**
- *  @short POOL converter for the xAOD::MissingETContainer class
- *
- * We need to extend the default version to handle maintaining the name hashing
- * in the interface class.
- */
-class xAODMissingETContainerCnv : public xAODMissingETContainerCnvBase
-{
-public:
-   using xAODMissingETContainerCnvBase::xAODMissingETContainerCnvBase;
-
-   /// Function reading in the persistent object
-   virtual xAOD::MissingETContainer* createTransientWithKey (const std::string& key) override;
-}; // class xAODMissingETContainerCnv
-
+   xAODMissingETContainerCnv;
 
 #endif // XAODMISSINGETATHENAPOOL_XAODMISSINGETCONTAINERCNV_H
-- 
GitLab


From f78330805845a70bd2d20b25d0cdc15f696a1371 Mon Sep 17 00:00:00 2001
From: Bertrand Martin <martindl@cern.ch>
Date: Mon, 4 Jan 2021 17:19:23 +0100
Subject: [PATCH 259/308] tauRecTools: protect against Log10(0) in very rare
 cases

Hello,

This MR adds a protection against computing Log10(0) for very rare cases (10 taus in 15 million events, as observed in gamma* MC).
It seems we can have "pathological" taus where clusters have FIRST_ENG_DENS = 0.
This seems to happen when |eta|~1.5, when all the cluster energy is in the presampler.
This MR does not change the reconstruction output except in very rare case, where xAOD::TauJetParameters::ClustersMeanFirstEngDens used to be -inf, and is now 0.

Cheers,
Bertrand
---
 .../Root/MvaTESVariableDecorator.cxx          | 31 +++++++++----------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx b/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx
index 25c566020dfe..f032164f3e20 100644
--- a/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx
+++ b/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 // local include(s)
@@ -32,7 +32,6 @@ StatusCode MvaTESVariableDecorator::initialize() {
 
 StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
   
-  // Decorate event info
   // need to check mu can be retrieved via EventInfo for Run3 trigger
   int mu = 0;
   SG::ReadDecorHandle<xAOD::EventInfo, float> eventInfoDecorHandle( m_aveIntPerXKey );
@@ -45,7 +44,6 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
 
   int nVtxPU = 0;
   if(!m_vertexContainerKey.empty()) {
-    // Get the primary vertex container from StoreGate
     SG::ReadHandle<xAOD::VertexContainer> vertexInHandle( m_vertexContainerKey );
     if (!vertexInHandle.isValid()) {
       ATH_MSG_WARNING ("Could not retrieve HiveDataObj with key " << vertexInHandle.key() << ", will set nVtxPU=0.");
@@ -59,13 +57,12 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
     }
   }
   
-  SG::AuxElement::Accessor<float> acc_mu("mu");
-  SG::AuxElement::Accessor<int> acc_nVtxPU("nVtxPU");
+  static const SG::AuxElement::Accessor<float> acc_mu("mu");
+  static const SG::AuxElement::Accessor<int> acc_nVtxPU("nVtxPU");
   
   acc_mu(xTau) = mu;
   acc_nVtxPU(xTau) = nVtxPU;
 
-  // Decorate jet seed variables
   double center_lambda=0.       , first_eng_dens=0.      , em_probability=0.      , second_lambda=0.      ;
   double mean_center_lambda=0.  , mean_first_eng_dens=0. , mean_em_probability=0. , mean_second_lambda=0. ;
   double mean_presampler_frac=0., lead_cluster_frac = 0. ;
@@ -116,7 +113,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
     mean_presampler_frac += (cluster.eSample(CaloSampling::PreSamplerB) + cluster.eSample(CaloSampling::PreSamplerE));
   }
   
-  // ----calculate mean values
+  // calculate mean values
   if(Etot>0.) {
     mean_center_lambda /= Etot;
     mean_first_eng_dens /= Etot; 
@@ -125,7 +122,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
     mean_presampler_frac /= Etot;
     lead_cluster_frac /= Etot;
 
-    mean_first_eng_dens = TMath::Log10(mean_first_eng_dens/Etot);
+    if(mean_first_eng_dens>0.) mean_first_eng_dens = TMath::Log10(mean_first_eng_dens/Etot);
   }
   
   // cluster-based upsilon, ranges from -1 to 1
@@ -133,18 +130,18 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
   if(clusters_had_P4.E()+clusters_EM_P4.E()!=0.)
     upsilon_cluster = (clusters_had_P4.E()-clusters_EM_P4.E())/(clusters_had_P4.E()+clusters_EM_P4.E());
   
-  // ----decorating jet seed information to tau
   xTau.setDetail(xAOD::TauJetParameters::ClustersMeanCenterLambda, (float) mean_center_lambda);
   xTau.setDetail(xAOD::TauJetParameters::ClustersMeanFirstEngDens, (float) mean_first_eng_dens);
   xTau.setDetail(xAOD::TauJetParameters::ClustersMeanEMProbability, (float) mean_em_probability);
   xTau.setDetail(xAOD::TauJetParameters::ClustersMeanSecondLambda, (float) mean_second_lambda);
   xTau.setDetail(xAOD::TauJetParameters::ClustersMeanPresamplerFrac, (float) mean_presampler_frac);
-  SG::AuxElement::Accessor<float> acc_ClusterTotalEnergy("ClusterTotalEnergy");
+
+  static const SG::AuxElement::Accessor<float> acc_ClusterTotalEnergy("ClusterTotalEnergy");
   acc_ClusterTotalEnergy(xTau) = (float) Etot;
 
   // online-specific, not defined in TauDefs enum
-  SG::AuxElement::Accessor<float> acc_LeadClusterFrac("LeadClusterFrac");
-  SG::AuxElement::Accessor<float> acc_UpsilonCluster("UpsilonCluster");
+  static const SG::AuxElement::Accessor<float> acc_LeadClusterFrac("LeadClusterFrac");
+  static const SG::AuxElement::Accessor<float> acc_UpsilonCluster("UpsilonCluster");
   acc_LeadClusterFrac(xTau) = (float) lead_cluster_frac;
   acc_UpsilonCluster(xTau) = (float) upsilon_cluster;
 
@@ -152,7 +149,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
     return StatusCode::SUCCESS;
   }
 
-  // ----retrieve Ghost Muon Segment Count (for punch-through studies)
+  // retrieve Ghost Muon Segment Count (for punch-through studies)
   if (! xTau.jetLink().isValid()) {
     ATH_MSG_ERROR("Tau jet link is invalid.");
     return StatusCode::FAILURE;
@@ -163,7 +160,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
   if(!jetSeed->getAttribute<int>("GhostMuonSegmentCount", nMuSeg)) nMuSeg=0;
   xTau.setDetail(xAOD::TauJetParameters::GhostMuonSegmentCount, nMuSeg);
   
-  // ----summing corrected Pi0 PFO energies
+  // summing corrected Pi0 PFO energies
   TLorentzVector Pi0_totalP4;
   Pi0_totalP4.SetPtEtaPhiM(0,0,0,0);
   
@@ -173,7 +170,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
   
   double Pi0_totalE = Pi0_totalP4.E();
   
-  // ----summing charged PFO energies
+  // summing charged PFO energies
   TLorentzVector charged_totalP4;
   charged_totalP4.SetPtEtaPhiM(0,0,0,0);
   
@@ -183,9 +180,9 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const {
   
   double charged_totalE = charged_totalP4.E();
   
-  // ----calculate relative difference and decorate to tau
+  // calculate relative difference and decorate onto tau
   double relDiff=0.;
-  if(Pi0_totalE+charged_totalE){
+  if(Pi0_totalE+charged_totalE != 0.){
     relDiff = (charged_totalE - Pi0_totalE) / (charged_totalE + Pi0_totalE) ;
   }
   xTau.setDetail(xAOD::TauJetParameters::PFOEngRelDiff, (float) relDiff);
-- 
GitLab


From 61e5e9cdc9feab9a5557f4cdadf9a80b70d2f55a Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Mon, 4 Jan 2021 17:08:01 +0000
Subject: [PATCH 260/308] hepmc3 nightly fixes 29122020 part 1

---
 .../src/TrackParticleCnvAlg.cxx               |  4 ++
 .../GeneratorObjects/HepMcParticleLink.h      |  7 ++
 .../src/HepMcParticleLink.cxx                 | 70 +++++++++++++++++++
 .../src/InDetAlignFillTrack.cxx               |  4 ++
 .../src/DetailedIDNtupleTool.cxx              |  4 ++
 .../src/PixelPrepDataToxAOD.cxx               |  1 +
 .../src/IDAlignMonNtuple.cxx                  |  4 ++
 .../src/IDAlignMonTruthComparison.cxx         |  8 +++
 .../src/TrackStatHelper.cxx                   | 18 ++---
 .../src/TruthLeptonNearbyAssociationTool.cxx  |  2 +-
 .../src/TruthLeptonNearbyAssociationTool.h    |  2 +-
 .../src/TruthParticleCnvTool.cxx              |  4 ++
 .../src/RecMomentumQualityValidation.cxx      | 19 +++--
 .../src/TrackValidationNtupleWriter.cxx       | 16 +++--
 .../src/TrkPriVxPurityTool.cxx                |  4 ++
 15 files changed, 140 insertions(+), 27 deletions(-)

diff --git a/Event/xAOD/xAODTrackingCnv/src/TrackParticleCnvAlg.cxx b/Event/xAOD/xAODTrackingCnv/src/TrackParticleCnvAlg.cxx
index 4a1d5be5fb4f..ed6f51ccc661 100644
--- a/Event/xAOD/xAODTrackingCnv/src/TrackParticleCnvAlg.cxx
+++ b/Event/xAOD/xAODTrackingCnv/src/TrackParticleCnvAlg.cxx
@@ -256,7 +256,11 @@ namespace xAODMaker {
 			    << " eta " << (*link)->eta() << " phi " << (*link)->phi());
 	      // if configured also get truth classification
               if( result->second.particleLink().cptr() && !m_truthClassifier.empty() ){
+#ifdef HEPMC3
+                auto truthClass = m_truthClassifier->particleTruthClassifier(result->second.particleLink().scptr());
+#else
                 auto truthClass = m_truthClassifier->particleTruthClassifier(result->second.particleLink().cptr());
+#endif
                 type = truthClass.first;
                 origin = truthClass.second;
                 ATH_MSG_VERBOSE("Got truth type  " << static_cast<int>(type) << "  origin " << static_cast<int>(origin));
diff --git a/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h b/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h
index 5cde62711dc8..6f59b1fc5522 100644
--- a/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h
+++ b/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h
@@ -489,6 +489,13 @@ public:
    */
   const HepMC::GenParticle* cptr() const;
 
+#ifdef HEPMC3
+  /**
+   * @brief Dereference/smart pointer.
+   */
+  HepMC3::ConstGenParticlePtr scptr() const;
+#endif
+
 
   /** 
    * @brief Validity check.  Dereference and check for null.
diff --git a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
index be4e96ac8016..716971ee1a7e 100644
--- a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
+++ b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
@@ -237,6 +237,76 @@ const HepMC::GenParticle* HepMcParticleLink::cptr() const
   }
   return p;
 }
+#ifdef HEPMC3
+/**
+ * @brief Dereference/smart pointer.
+ */
+HepMC3::ConstGenParticlePtr HepMcParticleLink::scptr() const
+{
+  HepMC3::ConstGenParticlePtr pp{nullptr};
+  const IProxyDict* sg = nullptr;
+  auto p = m_ptrs.get (sg);
+  if (!p) {
+    if (0 == barcode()) {
+#if 0
+      MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink");
+      log << MSG::DEBUG
+             << "scptr: no truth particle associated with this hit (barcode==0)."
+             << " Probably this is a noise hit" << endmsg;
+#endif
+      return nullptr;
+    }
+    if (!sg) {
+      sg = SG::CurrentEventStore::store();
+    }
+    if (const McEventCollection* pEvtColl = retrieveMcEventCollection(sg)) {
+      const HepMC::GenEvent *pEvt = nullptr;
+      index_type index, position;
+      m_extBarcode.eventIndex (index, position);
+      if (index == 0) {
+        pEvt = pEvtColl->at(0);
+      }
+      else if (position != ExtendedBarCode::UNDEFINED) {
+        if (position < pEvtColl->size()) {
+          pEvt = pEvtColl->at (position);
+        }
+        else {
+#if 0
+          MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink");
+          log << MSG::WARNING << "scptr: position = " << position << ", McEventCollection size = "<< pEvtColl->size() << endmsg;
+#endif
+          return nullptr;
+        }
+      }
+      else {
+        pEvt = pEvtColl->find (index);
+      }
+      if (0 != pEvt) {
+        pp = HepMC::barcode_to_particle(pEvt,barcode());
+        if (position != ExtendedBarCode::UNDEFINED) {
+          m_extBarcode.makeIndex (pEvt->event_number(), position);
+        }
+      } else {
+        MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink");
+        if (position != ExtendedBarCode::UNDEFINED) {
+          log << MSG::WARNING
+            << "scptr: Mc Truth not stored for event at " << position
+            << endmsg;
+        } else {
+          log << MSG::WARNING
+            << "scptr: Mc Truth not stored for event with event number " << index
+            << endmsg;
+        }
+      }
+    } else {
+      MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink");
+      log << MSG::WARNING << "scptr: McEventCollection not found" << endmsg;
+    }
+  }
+  return pp;
+}
+
+#endif
 
 
 /**
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx
index af237112034a..ff7f5b5351c8 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx
@@ -300,7 +300,11 @@ StatusCode InDetAlignFillTrack::FillTrack() {
           HepMcParticleLink HMPL = trkTruth.particleLink();
 
           if (HMPL.isValid()) {
+#ifdef HEPMC3
+            HepMC::ConstGenParticlePtr genParticle = HMPL.scptr();
+#else
             const HepMC::GenParticle* genParticle = HMPL.cptr();
+#endif
 
             double charge = 1.0;
             if (genParticle->pdg_id() < 0) charge = -charge;
diff --git a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx
index 492211acc5cd..3583cf8e9470 100644
--- a/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignNtupleTools/src/DetailedIDNtupleTool.cxx
@@ -401,7 +401,11 @@ namespace InDet {
         HepMcParticleLink HMPL = trtruth.particleLink();
 
         if (HMPL.isValid()) {
+#ifdef HEPMC3
+          HepMC::ConstGenParticlePtr genparptr = HMPL.scptr();
+#else
           const HepMC::GenParticle* genparptr = HMPL.cptr();
+#endif
 
           if (genparptr) {
             if (genparptr->production_vertex()) {
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
index f25ae994aea0..4a1b60f89962 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
@@ -23,6 +23,7 @@
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "AtlasHepMC/GenParticle.h"
 #include "AtlasHepMC/GenVertex.h"
+#include "AtlasHepMC/SimpleVector.h"
 #include "InDetSimEvent/SiHit.h"
 #include "InDetSimData/InDetSimDataCollection.h"
 
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx
index 5f017a380f96..5f61e6140979 100644
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonNtuple.cxx
@@ -590,7 +590,11 @@ StatusCode IDAlignMonNtuple::fillHistograms()
       	HepMcParticleLink HMPL = trkTruth.particleLink();
 
 	if ( HMPL.isValid()) {
+#ifdef HEPMC3
+     HepMC::ConstGenParticlePtr genParticle = HMPL.scptr(); 
+#else
 	  const HepMC::GenParticle *genParticle = HMPL.cptr(); 
+#endif
 	  
 	  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Particle with PDG "<< genParticle->pdg_id() << " Status "<< genParticle->status()<<" mass "<< genParticle->momentum().m() <<" pt "<<genParticle->momentum().perp()<<" eta "<<genParticle->momentum().eta()<<" phi "<<genParticle->momentum().phi()<<endmsg;
 
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx
index b49387154288..001e267d1dde 100755
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonTruthComparison.cxx
@@ -421,7 +421,11 @@ StatusCode IDAlignMonTruthComparison::fillHistograms()
           
 	  if ( HMPL.isValid()) 
 	    {
+#ifdef HEPMC3
+              HepMC::ConstGenParticlePtr genparptr = HMPL.scptr(); 
+#else
 	      const HepMC::GenParticle *genparptr = HMPL.cptr(); 
+#endif
 
 	      if (genparptr) {
 		if (genparptr->production_vertex()) { 
@@ -579,7 +583,11 @@ StatusCode IDAlignMonTruthComparison::fillHistograms()
           
 	  if ( HMPL.isValid()) 
 	    {
+#ifdef HEPMC3
+              HepMC::ConstGenParticlePtr genparptr = HMPL.scptr(); 
+#else
 	      const HepMC::GenParticle *genparptr = HMPL.cptr(); 
+#endif
 	      
 	      if (genparptr) {
 		if (genparptr->production_vertex()) { 
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
index 4d283224b34a..1b6dc9c82379 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
@@ -131,7 +131,7 @@ void InDet::TrackStatHelper::SetCuts(struct cuts ct)
 void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTracks, 
 				      std::vector <const Trk::Track *>   & rec, 
                                       Trk::PRDtoTrackMap *prd_to_track_map,
-				      std::vector <std::pair<HepMC::GenParticle *,int> > & gen, 
+				      std::vector <std::pair<HepMC::GenParticlePtr,int> > & gen, 
 				      const TrackTruthCollection         * truthMap, 
 				      const AtlasDetectorID              * const idHelper, 
 				      const PixelID                      * pixelID, 
@@ -274,8 +274,11 @@ void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTr
 	}
 	else {
 	  //classify track as coming from primary, secondary or truncated gen particle
-	  //	    if(HMPL.isValid()){
+#ifdef HEPMC3
+	  HepMC::ConstGenParticlePtr particle = HMPL.scptr();
+#else
 	  const HepMC::GenParticle *particle = HMPL.cptr();
+#endif
 	  recoClassification = ClassifyParticle(particle, trprob);
 	    
 	  if (trprob < m_cuts.fakeTrackCut)
@@ -409,13 +412,12 @@ void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTr
   int classification=-999;
   for (auto truth = gen.begin(); truth != gen.end();  ++truth) {
     classification=-999; 
-    bool inTimePileup = truth->second == 0
-      || (truth->second >= (int)*inTimeStart && truth->second <= (int)*inTimeEnd);
+    bool inTimePileup = truth->second == 0 || (truth->second >= (int)*inTimeStart && truth->second <= (int)*inTimeEnd);
     
-    HepMC::GenParticle * const particle = truth->first;
+    auto particle = truth->first;
     
     //determine eta region
-    Eta = fabs(particle->momentum().pseudoRapidity());
+    Eta = std::abs(particle->momentum().pseudoRapidity());
     if (Eta < m_cuts.maxEtaBarrel) Region = ETA_BARREL;
     else if  (Eta < m_cuts.maxEtaTransition) Region = ETA_TRANSITION;
     else if  (Eta < m_cuts.maxEtaEndcap) Region = ETA_ENDCAP;
@@ -501,10 +503,10 @@ void InDet::TrackStatHelper::addEvent(const TrackCollection              * recTr
       
       classification=-999; 
       
-      HepMC::GenParticle * const particle = truth->first;
+      auto particle = truth->first;
       
       //determine eta region
-      Eta = fabs(particle->momentum().pseudoRapidity());
+      Eta = std::abs(particle->momentum().pseudoRapidity());
       if (Eta < m_cuts.maxEtaBarrel) Region = ETA_BARREL;
       else if  (Eta < m_cuts.maxEtaTransition) Region = ETA_TRANSITION;
       else if  (Eta < m_cuts.maxEtaEndcap) Region = ETA_ENDCAP;
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx
index 73736615c56a..5787c1c4df11 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.cxx
@@ -106,7 +106,7 @@ StatusCode TruthLeptonNearbyAssociationTool::fill (const TruthParticle& p)
   return StatusCode::SUCCESS;
 }
 
-int TruthLeptonNearbyAssociationTool::get_real_parent( HepMC::GenParticlePtr p , int depth ) const
+int TruthLeptonNearbyAssociationTool::get_real_parent( HepMC::ConstGenParticlePtr p , int depth ) const
 {
   if (depth>10) return 0;
 
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h
index 1a637ac595b6..6ca115aba192 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/TruthLeptonNearbyAssociationTool.h
@@ -59,7 +59,7 @@ private:
   float *m_iso02;
   float *m_iso03;
 
-  int get_real_parent( HepMC::GenParticlePtr , int depth=0 ) const;
+  int get_real_parent( HepMC::ConstGenParticlePtr , int depth=0 ) const;
 
 };
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
index 3809895e0a67..8a61a16fca4a 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
@@ -260,7 +260,11 @@ TruthParticleCnvTool::convert( const McEventCollection * mcCollection,
   container->setGenEvent( mcCollection, genEventIndex, sg );
 
   // reserve enough space for the container so we don't have to relocate it
+#ifdef HEPMC3
+  container->reserve( container->size() + evt->particles().size() );
+#else
   container->reserve( container->size() + evt->particles_size() );
+#endif
 
   /// Create a map to enhance access between GenParticles and TruthParticles
   TruthParticleContainer::Map_t bcToMcPart = container->m_particles;
diff --git a/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx b/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx
index 9e37c70845e0..40ed122bc3d5 100644
--- a/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx
+++ b/Tracking/TrkValidation/TrkValAlgs/src/RecMomentumQualityValidation.cxx
@@ -10,7 +10,6 @@
 #include "TrkTrack/TrackCollection.h"
 #include "TrkTruthData/TrackTruthCollection.h"
 #include "TrkParameters/TrackParameters.h"
-//#include "TrkParameters/Perigee.h"
 #include "AtlasHepMC/GenParticle.h"
 #include "TrkToolInterfaces/ITruthToTrack.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
@@ -126,9 +125,6 @@ StatusCode Trk::RecMomentumQualityValidation::execute()
   TrackCollection::const_iterator trackIterator = trackCollection->begin();
   for (;trackIterator!=trackCollection->end();++trackIterator) {
 
-    /*    const Trk::TrackInfo& info = (*trackIterator)->info();
-          if ( ! info.patternRecoInfo(Trk::TrackInfo::TRTStandalone) &&
-          ! info.patternRecoInfo(Trk::TrackInfo::TRTSeededSingleSpTrackFinder)) { */
     if (!m_trackSelector.empty() && (*trackIterator)!=NULL && 
         m_trackSelector->decision(**trackIterator) ) {
       const Trk::TrackParameters* generatedTrackPerigee(0);
@@ -146,11 +142,15 @@ StatusCode Trk::RecMomentumQualityValidation::execute()
           if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Link to generated particle information is not there - assuming a lost G4 particle ('fake fake')." << endmsg;
           //        genParticle = m_visibleParticleWithoutTruth; // with pdg_id 0
         } else {
+#ifdef HEPMC3
+          genParticle = trackTruth->particleLink().scptr();
+#else
           genParticle = trackTruth->particleLink().cptr();
-          if ( genParticle!=NULL && genParticle->pdg_id() == 0 ) {
+#endif
+          if ( genParticle && genParticle->pdg_id() == 0 ) {
             if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Associated Particle ID " << genParticle->pdg_id()
                                                     << " does not conform to PDG requirements... ignore it!" << endmsg;
-            genParticle = 0;
+            genParticle = nullptr;
           } 
         }
       }
@@ -182,7 +182,6 @@ StatusCode Trk::RecMomentumQualityValidation::execute()
         
         if (!reconstructedPerigee) return StatusCode::FAILURE;
 
-        //      double this_eta = generatedTrackPerigee->eta();
         double this_eta = reconstructedPerigee->eta();
         
         double truth_over_recP = generatedTrackPerigee->parameters()[Trk::qOverP]
@@ -240,9 +239,9 @@ StatusCode Trk::RecMomentumQualityValidation::execute()
 void Trk::RecMomentumQualityValidation::monitorTrackFits(std::vector<unsigned int>& Ntracks,
                                          const double& eta) const {
   Ntracks[Trk::RecMomentumQualityValidation::iAll] += 1;
-  if (fabs(eta) < 0.80 ) ++Ntracks[Trk::RecMomentumQualityValidation::iBarrel];
-  else if (fabs(eta) < 1.60) ++Ntracks[Trk::RecMomentumQualityValidation::iTransi];
-  else if (fabs(eta) < 2.40) ++Ntracks[Trk::RecMomentumQualityValidation::iEndcap];
+  if (std::abs(eta) < 0.80 ) ++Ntracks[Trk::RecMomentumQualityValidation::iBarrel];
+  else if (std::abs(eta) < 1.60) ++Ntracks[Trk::RecMomentumQualityValidation::iTransi];
+  else if (std::abs(eta) < 2.40) ++Ntracks[Trk::RecMomentumQualityValidation::iEndcap];
 }
 
 
diff --git a/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx b/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx
index 7ebe04335e8e..1fc34029656f 100644
--- a/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx
+++ b/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx
@@ -565,9 +565,6 @@ StatusCode Trk::TrackValidationNtupleWriter::writeTrackData(unsigned int trackCo
 
     const unsigned int nTruthTreeRecordsAtCurrentEvent = 
       (m_doTruth ? m_truthNtupleTool->getNumberOfTreeRecords() : 0 );
-    //truthData.truthToTrackIndices
-    //std::vector< std::vector<unsigned int> >    truthToTrackIndices(selecParticles ? selecParticles->size() : 0);
-    //std::vector< std::vector<float> >           truthToTrackMatchingProbabilities(selecParticles ? selecParticles->size() : 0);
 
     int trackTreeIndexBegin = m_trees[trackColIndex]->GetEntries();
     int nTracksPerEvent = 0;
@@ -604,11 +601,15 @@ StatusCode Trk::TrackValidationNtupleWriter::writeTrackData(unsigned int trackCo
                     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Link to generated particle information is not there - assuming a lost G4 particle ('fake fake')." << endmsg;
                     genParticle = m_visibleParticleWithoutTruth; // with pdg_id 0
                   } else {
+#ifdef HEPMC3
+                    genParticle = trackTruth->particleLink().scptr();
+#else
                     genParticle = trackTruth->particleLink().cptr();
+#endif
                     if ( genParticle!=NULL && genParticle->pdg_id() == 0 ) {
                       if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Associated Particle ID " << genParticle->pdg_id()
                             << " does not conform to PDG requirements... ignore it!" << endmsg;
-                      genParticle = 0;
+                      genParticle = nullptr;
                     } 
                   }
                 }
@@ -618,9 +619,7 @@ StatusCode Trk::TrackValidationNtupleWriter::writeTrackData(unsigned int trackCo
                   const Trk::TrackParameters* generatedTrackPerigee(0);
                   const Trk::TrackParameters* newTrackPerigee(0);
                   // fill the truth data in the track tree
-                  //unsigned int truthIndex = particleToIndexMap[genParticle];
                   int truthIndex = -1;
-                  //std::vector<const HepMC::GenParticle*>::const_iterator matchedPartIter = find(selecParticles->begin(), selecParticles->end(), genParticle);
                   // TODO: do the search somehow better:
                   std::vector<Trk::ValidationTrackTruthData>::iterator matchedPartIter = truthData.begin();
                   for (; matchedPartIter != truthData.end(); matchedPartIter++) {
@@ -636,7 +635,6 @@ StatusCode Trk::TrackValidationNtupleWriter::writeTrackData(unsigned int trackCo
                       generatedTrackPerigee = newTrackPerigee;
                     }
                   } else {
-                    //truthIndex = int(matchedPartIter - selecParticles->begin());
                     // store the index in the track tree of the current track (establish link from truth to track)
                     (*matchedPartIter).truthToTrackIndices[trackColIndex].push_back(m_nTrackTreeRecords[trackColIndex]);
                     (*matchedPartIter).truthToTrackMatchingProbabilities[trackColIndex].push_back(trackTruth->probability());
@@ -737,7 +735,11 @@ StatusCode Trk::TrackValidationNtupleWriter::finalize() {
 
     msg(MSG::INFO)  << "TrackValidationNtupleWriter finalize()" << endmsg;
 
+#ifdef HEPMC3
+    //This is smart pointer in HepMC3
+#else
     delete m_visibleParticleWithoutTruth;
+#endif
     for (unsigned int toolIndex = 0 ; toolIndex < m_eventPropertyNtupleTools.size(); ++toolIndex ){
       if (m_eventPropertyNtupleTools[toolIndex]->resetVariables( ).isFailure()){};
     }
diff --git a/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx b/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx
index 9a9d2eb64510..2b437fe4cf78 100755
--- a/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx
+++ b/Tracking/TrkValidation/TrkVertexFitterValidationUtils/src/TrkPriVxPurityTool.cxx
@@ -175,7 +175,11 @@ namespace Trk {
 
                                 if (ttItr != trackParticleTruthCollection->end() ) {
                                     const HepMcParticleLink& particleLink = ttItr->second.particleLink();
+#ifdef HEPMC3
+                                    HepMC::ConstGenParticlePtr genParticle = particleLink.scptr();
+#else
                                     HepMC::ConstGenParticlePtr genParticle = particleLink.cptr();
+#endif
 
                                     if(genParticle) {
                                         auto tpEvent = genParticle->parent_event();
-- 
GitLab


From 251dd2d6aadad7c8eb30deeeecf76eacd80e8468 Mon Sep 17 00:00:00 2001
From: stapiaar <stapiaar@cern.ch>
Date: Mon, 4 Jan 2021 18:29:04 +0100
Subject: [PATCH 261/308] adding new test for HI reco in 2018 data/MC

---
 .../test/test_data18_heavy_ion_notrigger.sh   | 21 ++++++++++++++++++
 .../test/test_mc18_heavy_ion_notrigger.sh     | 22 +++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_data18_heavy_ion_notrigger.sh
 create mode 100755 Reconstruction/RecExample/RecJobTransformTests/test/test_mc18_heavy_ion_notrigger.sh

diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_data18_heavy_ion_notrigger.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_data18_heavy_ion_notrigger.sh
new file mode 100755
index 000000000000..ba16e4a32665
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_data18_heavy_ion_notrigger.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# art-description: heavy ion reconstruction test from Sebastian Tapia 
+# art-type: grid
+# art-include: master/Athena
+
+
+export TRF_ECHO=True; Reco_tf.py \
+--inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/data18_hi.00367384.physics_HardProbes.daq.RAW._lb0145._SFO-8._0001.data \
+--outputESDFile=ESD.pool.root \
+--outputAODFile=AOD.pool.root \
+--maxEvents=20 \
+--conditionsTag 'default:CONDBR2-BLKPA-2018-12' \
+--geometryVersion 'default:ATLAS-R2-2016-01-00-01' \
+--autoConfiguration 'everything' \
+--steering='doRAWtoALL' \
+--postExec  'r2a:y=(StreamAOD.ItemList if "StreamAOD" in dir() else []);y+=["xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.SECOND_R.SECOND_LAMBDA.CENTER_MAG.CENTER_LAMBDA.FIRST_ENG_DENS.ENG_FRAC_MAX.ISOLATION.ENG_BAD_CELLS.N_BAD_CELLS.BADLARQ_FRAC.ENG_POS.AVG_LAR_Q.AVG_TILE_Q.EM_PROBABILITY.BadChannelList.CELL_SIGNIFICANCE.CELL_SIG_SAMPLING"];' \
+--preExec  'r2a:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.cutLevel.set_Value_and_Lock(4);from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags;InDetGeometryFlags.useDynamicAlignFolders.set_Value_and_Lock(True);jobproperties.Beam.bunchSpacing.set_Value_and_Lock(100);rec.doTrigger.set_Value_and_Lock(False);TriggerFlags.AODEDMSet="AODFULL";rec.doHeavyIon.set_Value_and_Lock(True);rec.doDPD.set_Value_and_Lock(True); from CaloRec.CaloRecFlags import jobproperties;jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True);from AthenaMonitoring.DQMonFlags import jobproperties; jobproperties.DQMonFlagsCont.doHIMon.set_Value_and_Lock(False);AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False);AODFlags.AddEgammaMuonTracksInAOD.set_Value_and_Lock(False);AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False);' \
+RES=$?
+echo "art-result: $RES Reco"
+return $RES
diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc18_heavy_ion_notrigger.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc18_heavy_ion_notrigger.sh
new file mode 100755
index 000000000000..ce85e355342f
--- /dev/null
+++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc18_heavy_ion_notrigger.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# art-description: heavy ion reconstruction test from Sebastian Tapia
+# art-type: grid
+# art-include: master/Athena
+
+
+export TRF_ECHO=True; Reco_tf.py \
+--inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_5TeV.420000.Hijing_PbPb_5p02TeV_MinBias_Flow_JJFV6.merge.HITS.e4962_a890_s3136/HITS.17784755._001903.pool.root.1 \
+--outputESDFile=ESD.pool.root \
+--outputAODFile=AOD.pool.root \
+--maxEvents=20 \
+--postInclude 'all:RecJobTransforms/UseFrontier.py,SimulationJobOptions/postInclude.HijingPars.py' \
+--postExec  'r2a:y=(StreamAOD.ItemList if "StreamAOD" in dir() else []);y+=["xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.SECOND_R.SECOND_LAMBDA.CENTER_MAG.CENTER_LAMBDA.FIRST_ENG_DENS.ENG_FRAC_MAX.ISOLATION.ENG_BAD_CELLS.N_BAD_CELLS.BADLARQ_FRAC.ENG_POS.AVG_LAR_Q.AVG_TILE_Q.EM_PROBABILITY.BadChannelList.CELL_SIGNIFICANCE.CELL_SIG_SAMPLING"];' \
+--preExec  'r2a:from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.cutLevel.set_Value_and_Lock(4);from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags;InDetGeometryFlags.useDynamicAlignFolders.set_Value_and_Lock(True);jobproperties.Beam.bunchSpacing.set_Value_and_Lock(100);rec.doDPD.set_Value_and_Lock(True); from CaloRec.CaloRecFlags import jobproperties;jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True);from AthenaMonitoring.DQMonFlags import jobproperties; jobproperties.DQMonFlagsCont.doHIMon.set_Value_and_Lock(False);from ParticleBuilderOptions.AODFlags import AODFlags;AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False); AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False); AODFlags.AddEgammaMuonTracksInAOD.set_Value_and_Lock(False);AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False);' 'all:rec.doHeavyIon.set_Value_and_Lock(True);rec.doTrigger.set_Value_and_Lock(False);' \
+--autoConfiguration 'everything' \
+--DataRunNumber '313000' \
+
+RES=$?
+echo "art-result: $RES Reco"
+return $RES
+
-- 
GitLab


From ea6219da8a3a338720cb9ed962dff6a786d5da7a Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Mon, 4 Jan 2021 20:04:18 +0100
Subject: [PATCH 262/308] BookkeeperTool: fallback to POOL metadata if xAOD one
 is not OK

---
 .../Root/BookkeeperTool.cxx                   | 26 +++++++++++++++----
 .../test/test_CutFlowSvc.py                   |  8 ++++--
 2 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx b/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx
index 05da271a408b..8bfc710ce92f 100644
--- a/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx
+++ b/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx
@@ -65,12 +65,19 @@ StatusCode BookkeeperTool::beginInputFile(const SG::SourceID &source)
     ATH_MSG_DEBUG("Determining number of weight variations");
 #ifndef GENERATIONBASE
     if (inputMetaStore()->contains<xAOD::TruthMetaDataContainer>("TruthMetaData")) {
-      ATH_CHECK(loadXAODMetaData());
+      StatusCode status = loadXAODMetaData();
+      if (!status.isSuccess()) {
+        if (status.isRecoverable()) {
+          ATH_CHECK(loadPOOLMetaData());
+        } else {
+          return StatusCode::FAILURE;
+        }
+      }
     } else {
-#endif
       ATH_CHECK(loadPOOLMetaData());
-#ifndef GENERATIONBASE
     }
+#else
+    ATH_CHECK(loadPOOLMetaData());
 #endif
 
     if (m_numberOfWeightVariations == 0) {
@@ -256,7 +263,7 @@ StatusCode BookkeeperTool::copyCutflowFromService()
 StatusCode BookkeeperTool::loadXAODMetaData()
 {
 #ifdef GENERATIONBASE
-  return StatusCode::SUCCESS;
+  return StatusCode::RECOVERABLE;
 #else
 
   // Try to load MC channel number from file metadata
@@ -271,8 +278,12 @@ StatusCode BookkeeperTool::loadXAODMetaData()
     }
   }
   if (mcChannelNumber == uint32_t(-1)) {
-    ATH_MSG_WARNING("... MC channel number could not be loaded");
+    ATH_MSG_WARNING("... MC channel number could not be loaded from FileMetaData");
+#ifdef XAOD_STANDALONE
     mcChannelNumber = 0;
+#else
+    return StatusCode::RECOVERABLE;
+#endif
   }
 
   // Find the correct truth meta data object
@@ -292,9 +303,14 @@ StatusCode BookkeeperTool::loadXAODMetaData()
 
   // If no such object is found then return
   if (itTruthMetaDataPtr == metaDataContainer->end()) {
+#ifdef XAOD_STANDALONE
     m_numberOfWeightVariations = 1;
     ATH_MSG_DEBUG("Could not load weight meta data! Assumming 1 variation.");
     return StatusCode::SUCCESS;
+#else
+    ATH_MSG_DEBUG("Could not load weight meta data from TruthMetaData!");
+    return StatusCode::RECOVERABLE;
+#endif
   }
 
   // Update cached weight data
diff --git a/Event/EventBookkeeperTools/test/test_CutFlowSvc.py b/Event/EventBookkeeperTools/test/test_CutFlowSvc.py
index 9f54cc7e543b..3eced20b9df7 100755
--- a/Event/EventBookkeeperTools/test/test_CutFlowSvc.py
+++ b/Event/EventBookkeeperTools/test/test_CutFlowSvc.py
@@ -20,6 +20,8 @@ from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg, CutFl
 parser = ArgumentParser(prog='test_CutFlowSvc')
 parser.add_argument('input', type=str, nargs='?',
                     help='Specify the input file')
+parser.add_argument('-t', '--threads', default=2, type=int,
+                    help='The number of concurrent threads to run. 0 uses serial Athena.')
 args = parser.parse_args()
 
 # Setup configuration
@@ -31,9 +33,11 @@ else:
 ConfigFlags.Output.AODFileName = "testAOD.pool.root"
 
 # Flags relating to multithreaded execution
-threads = 2
+threads = args.threads
+maxEvents = 10
 ConfigFlags.Concurrency.NumThreads = threads
 if threads > 0:
+  maxEvents = 10 * threads
   ConfigFlags.Scheduler.ShowDataDeps = True
   ConfigFlags.Scheduler.ShowDataFlow = True
   ConfigFlags.Scheduler.ShowControlFlow = True
@@ -62,7 +66,7 @@ acc.getPublicTool('CutBookkeepersTool').OutputLevel = VERBOSE
 acc.getEventAlgo('AllExecutedEventsCounterAlg').OutputLevel = VERBOSE
 
 # Execute and finish
-sc = acc.run(maxEvents=10*threads)
+sc = acc.run(maxEvents=maxEvents)
 
 # Success should be 0
 sys.exit(not sc.isSuccess())
-- 
GitLab


From 47ff853258d91abd47bbbfae36f147732d1958ec Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 4 Jan 2021 16:54:44 +0100
Subject: [PATCH 263/308] BPhysTools: Fix clang warning.

Max uint64_t cannot be represented exactly as a double.
---
 PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx b/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx
index 77cc5475f192..66341ded31fd 100644
--- a/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx
+++ b/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 // system include:
@@ -21,8 +21,12 @@ namespace xAOD {
   //--------------------------------------------------------------------------
   // Private static constants
   //--------------------------------------------------------------------------
+  // This gives 0x10000 on a 64-bit platform.
+  // ??? Would probably be better to write these using bit operations,
+  // rather than FP, to avoid potential rounding issues.
+  //  (eg. the maximum uint64_t cannot be represented exactly as a double)
   const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MAXRANGE =
-    (SimpleEncrypter::ULLI_t)pow(std::numeric_limits<ULLI_t>::max(), 0.25);
+    (SimpleEncrypter::ULLI_t)pow(static_cast<double>(std::numeric_limits<ULLI_t>::max()), 0.25);
   const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MINRANGE =
     (SimpleEncrypter::ULLI_t)SimpleEncrypter::m_MAXRANGE/10;
   const unsigned int SimpleEncrypter::m_MAXHEXDIGITS =
-- 
GitLab


From ff1006e4d44e32f79f70999ac3bda7bb028ef2cf Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 4 Jan 2021 16:52:28 +0100
Subject: [PATCH 264/308] DerivationFrameworkBPhys: Fix clang warnings.

 - Unused private data member.
 - Misleading operation ordering in conditional.
 - Bugfix: misplaced parenthesis in abs() call.
---
 .../DerivationFrameworkBPhys/BPhysPVCascadeTools.h            | 3 +--
 .../DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx     | 4 ++--
 .../DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx        | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h
index c1561102db76..cc0eb8c7726d 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef DERIVATIONFRAMEWORK_PVCASCADETOOLS_H
@@ -38,7 +38,6 @@ namespace DerivationFramework {
   typedef ElementLink<xAOD::VertexContainer> VertexLink;
   typedef std::vector<VertexLink> VertexLinkVector;
   private:
-       const Trk::V0Tools *m_v0Tools;
        const CascadeTools *m_cascadeTools;
        const InDet::BeamSpotData *m_beamSpotData;
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx
index 2f2cef79bfca..8ea8e0d31a44 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 //============================================================================
@@ -362,7 +362,7 @@ namespace DerivationFramework {
     std::istringstream stream(lines);
     std::string line;
     while ( std::getline(stream, line) ) {
-      if ( !ostr.length() == 0 ) ostr += "\n";
+      if ( !ostr.empty() ) ostr += "\n";
       ostr += prefix + line;
     }
     return ostr;
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx
index f7d485b75f79..78027a049682 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 /////////////////////////////////////////////////////////////////
 // JpsiPlusDsCascade.cxx, (c) ATLAS Detector software
@@ -537,7 +537,7 @@ namespace DerivationFramework {
                }
            }
 
-           if(abs(m_Dx_pid==411)) { // D+/-
+           if(abs(m_Dx_pid)==411) { // D+/-
                SG::AuxElement::Accessor<Char_t> flagAcc1("passed_Dp");
                SG::AuxElement::Accessor<Char_t> flagAcc2("passed_Dm");
                bool isDp(true);
-- 
GitLab


From b8e5c4c13a566050688e7285130a27fbdc4bf782 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 4 Jan 2021 16:56:03 +0100
Subject: [PATCH 265/308] FastTRT_Digitization: Fix clang warning.

Don't use fabs() with an integer argument; use std::abs instead.
---
 .../FastTRT_Digitization/src/TRTFastDigitizationTool.cxx      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
index 38913f15bc9c..cd88c2d970c4 100644
--- a/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/src/TRTFastDigitizationTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -391,7 +391,7 @@ StatusCode TRTFastDigitizationTool::produceDriftCircles(const EventContext& ctx)
 
       if ( m_useTrtElectronPidTool ) {
 
-        double position = ( fabs(BEC) == 1 ? hitGlobalPosition.z() : hitGlobalPosition.perp() );
+        double position = ( std::abs(BEC) == 1 ? hitGlobalPosition.z() : hitGlobalPosition.perp() );
 
         double probability;
         if ( abs( particleEncoding ) == 11 && kineticEnergy > 5000. ) {  // electron
-- 
GitLab


From e6a28200a0ffc005530b77b89c1f65edf421eade Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 4 Jan 2021 16:57:10 +0100
Subject: [PATCH 266/308] InDetEtaDependentCuts: Fix clang warning.

If a dtor is declared final, then the class itself must also be final.
---
 .../InDetEtaDependentCuts/InDetEtaDependentCutsSvc.h      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetEtaDependentCuts/InDetEtaDependentCuts/InDetEtaDependentCutsSvc.h b/InnerDetector/InDetRecTools/InDetEtaDependentCuts/InDetEtaDependentCuts/InDetEtaDependentCutsSvc.h
index 11e8edb932bd..e85bf88234df 100644
--- a/InnerDetector/InDetRecTools/InDetEtaDependentCuts/InDetEtaDependentCuts/InDetEtaDependentCutsSvc.h
+++ b/InnerDetector/InDetRecTools/InDetEtaDependentCuts/InDetEtaDependentCuts/InDetEtaDependentCutsSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 #ifndef INDETETADEPENDENTCUTS_INDETETADEPENDENTCUTSSVC_H
 #define INDETETADEPENDENTCUTS_INDETETADEPENDENTCUTSSVC_H
@@ -18,9 +18,9 @@
 #include "GaudiKernel/ISvcLocator.h"
 
 namespace InDet {
-  class InDetEtaDependentCutsSvc: virtual public IInDetEtaDependentCutsSvc,
-                                  public AthService {
-
+  class InDetEtaDependentCutsSvc final
+    : virtual public IInDetEtaDependentCutsSvc, public AthService
+  {
     /////////////////////////////////////////////////////////////////// 
     // Public methods: 
     /////////////////////////////////////////////////////////////////// 
-- 
GitLab


From 5ff217f752f0b8f4300f181f6ad4f39e91678a8f Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 4 Jan 2021 16:59:00 +0100
Subject: [PATCH 267/308] GeoModelEnvelopes: Fix clang warning.

If a dtor is final, the class itself should also be final.
---
 .../GeoModelEnvelopes/src/ForDetEnvelopeTool.h                | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h
index a083d7e17da6..eb1d2009dd28 100755
--- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h
+++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ForDetEnvelopeTool_h 
@@ -8,7 +8,7 @@
 #include "GeoModelUtilities/GeoModelTool.h"
 class ForDetEnvelopeManager;
 
-class ForDetEnvelopeTool : public GeoModelTool 
+class ForDetEnvelopeTool final : public GeoModelTool 
 {
  public:
 
-- 
GitLab


From 76d901043ed4e486c8e7a790ffe544e02028e153 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Mon, 4 Jan 2021 21:42:27 +0100
Subject: [PATCH 268/308] Factor common code used by std and LRT egamma config.
 Reduce LRT config log verbosity. Some flake8 related stylistic fixes

---
 .vscode/settings.json                         |   3 +-
 .../egamma/egammaRec/python/egammaKeys.py     | 152 +++++++++++++-----
 .../egammaLRTOutputItemList_jobOptions.py     |  94 ++++-------
 .../share/egammaLRTRec_jobOptions.py          |  26 +--
 .../share/egammaOutputItemList_jobOptions.py  |  53 ++----
 .../egammaRec/share/egammaRec_jobOptions.py   |   4 +-
 6 files changed, 172 insertions(+), 160 deletions(-)

diff --git a/.vscode/settings.json b/.vscode/settings.json
index e1ebff53d0f2..25f4f91c00d5 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -3,5 +3,6 @@
         "ms-vscode.cpptools",
         "twxs.cmake"
     ],
-    "remote.SSH.lockfilesInTmp": true
+    "remote.SSH.lockfilesInTmp": true,
+    "python.pythonPath": "/bin/python3"
 }
diff --git a/Reconstruction/egamma/egammaRec/python/egammaKeys.py b/Reconstruction/egamma/egammaRec/python/egammaKeys.py
index 51f654eb9a9e..587a20400409 100644
--- a/Reconstruction/egamma/egammaRec/python/egammaKeys.py
+++ b/Reconstruction/egamma/egammaRec/python/egammaKeys.py
@@ -3,7 +3,8 @@
 __doc__ = "egammaKeys.py"
 __author__ = "Bruno Lenzi"
 
-# Name (i.e Electron) = [type =type of the collection, key = name of the collection,
+# Name (i.e Electron) = [
+# type =type of the collection, key = name of the collection,
 # option = for aux container applied in ALL cases (ESD and AOD),
 # option =  for additional suppression for  AOD only]
 
@@ -18,52 +19,90 @@ class egammaKeysDict:
     FwdElectronisemSupress = '-isEMTight.-isEMMedium.-isEMLoose'
 
     outputs = dict(
-        Conversion=['xAOD::VertexContainer',
-                    'GSFConversionVertices', '-vxTrackAtVertex.', ''],
-        Cluster=['xAOD::CaloClusterContainer', 'egammaClusters', '', ''],
-        EgammaLargeClusters=['xAOD::CaloClusterContainer',
-                             'egamma711Clusters', '', ''],  # not output to AOD
-        EgammaLargeFWDClusters=['xAOD::CaloClusterContainer',
-                                'egamma66FWDClusters', '', ''],  # not output to AOD
-        TopoSeededCluster=['xAOD::CaloClusterContainer',
-                           'egammaTopoSeededClusters', '', '-CellLink'],
-        Electron=['xAOD::ElectronContainer', 'Electrons',
-                  '', ShowerShapesSuppress+ElectronisemSupress],
-        EgammaRec=['egammaRecContainer', 'egammaRecCollection', '', ''],
-        PhotonSuperRec=['egammaRecContainer',
-                        'PhotonSuperRecCollection', '', ''],
-        ElectronSuperRec=['egammaRecContainer',
-                          'ElectronSuperRecCollection', '', ''],
+        Conversion=[
+            'xAOD::VertexContainer',
+            'GSFConversionVertices',
+            '-vxTrackAtVertex.',
+            ''],
+        Cluster=[
+            'xAOD::CaloClusterContainer',
+            'egammaClusters',
+            '',
+            ''],
+        EgammaLargeClusters=[
+            'xAOD::CaloClusterContainer',
+            'egamma711Clusters', '', ''],
+        EgammaLargeFWDClusters=[
+            'xAOD::CaloClusterContainer',
+            'egamma66FWDClusters',
+            '',
+            ''],
+        TopoSeededCluster=[
+            'xAOD::CaloClusterContainer',
+            'egammaTopoSeededClusters',
+            '',
+            '-CellLink'],
+        Electron=[
+            'xAOD::ElectronContainer',
+            'Electrons',
+            '',
+            ShowerShapesSuppress+ElectronisemSupress],
+        EgammaRec=['egammaRecContainer',
+                   'egammaRecCollection',
+                   '',
+                   ''],
+        PhotonSuperRec=[
+            'egammaRecContainer',
+            'PhotonSuperRecCollection', '', ''],
+        ElectronSuperRec=[
+            'egammaRecContainer',
+            'ElectronSuperRecCollection', '', ''],
         FwdElectron=['xAOD::ElectronContainer',
-                     'ForwardElectrons', '', FwdElectronisemSupress],
+                     'ForwardElectrons',
+                     '',
+                     FwdElectronisemSupress],
         FwdCluster=['xAOD::CaloClusterContainer',
-                    'ForwardElectronClusters', '-SisterCluster', ''],
-        Photon=['xAOD::PhotonContainer', 'Photons', '',
+                    'ForwardElectronClusters',
+                    '-SisterCluster', ''],
+        Photon=['xAOD::PhotonContainer',
+                'Photons', '',
                 ShowerShapesSuppress+PhotonisemSupress],
-        TrackParticle=['xAOD::TrackParticleContainer', 'GSFTrackParticles',
-                       '-caloExtension.-cellAssociation.-perigeeExtrapEta.-perigeeExtrapPhi', ''],
-        Track=['TrackCollection', 'GSFTracks', '', ''],
+        TrackParticle=[
+            'xAOD::TrackParticleContainer',
+            'GSFTrackParticles',
+            '-caloExtension.-cellAssociation.-perigeeExtrapEta.-perigeeExtrapPhi', ''],
+        Track=['TrackCollection',
+               'GSFTracks',
+               '',
+               ''],
         Truth=['xAOD::TruthParticleContainer',
-               'egammaTruthParticles', '-caloExtension', '']
+               'egammaTruthParticles',
+               '-caloExtension',
+               '']
     )
     #
-    outputs['CellLink'] = ['CaloClusterCellLinkContainer',
-                           outputs['Cluster'][1] + '_links', '', '']
-    outputs['TopoSeededCellLink'] = ['CaloClusterCellLinkContainer',
-                                     outputs['TopoSeededCluster'][1] +
-                                     '_links',
-                                     '', '']
-    outputs['FwdClusterCellLink'] = ['CaloClusterCellLinkContainer',
-                                     outputs['FwdCluster'][1] + '_links',
-                                     '', '']
-    outputs['EgammaLargeClustersCellLink'] = ['CaloClusterCellLinkContainer',
-                                              outputs['EgammaLargeClusters'][1] +
-                                              '_links',
-                                              '', '']
-    outputs['EgammaLargeFWDClustersCellLink'] = ['CaloClusterCellLinkContainer',
-                                              outputs['EgammaLargeFWDClusters'][1] +
-                                              '_links',
-                                              '', '']
+    outputs['CellLink'] = [
+        'CaloClusterCellLinkContainer',
+        outputs['Cluster'][1] + '_links', '', '']
+    outputs['TopoSeededCellLink'] = [
+        'CaloClusterCellLinkContainer',
+        outputs['TopoSeededCluster'][1] +
+        '_links',
+        '', '']
+    outputs['FwdClusterCellLink'] = [
+        'CaloClusterCellLinkContainer',
+        outputs['FwdCluster'][1] + '_links',
+        '', '']
+    outputs['EgammaLargeClustersCellLink'] = [
+        'CaloClusterCellLinkContainer',
+        outputs['EgammaLargeClusters'][1] +
+        '_links',
+        '', '']
+    outputs['EgammaLargeFWDClustersCellLink'] = [
+        'CaloClusterCellLinkContainer',
+        outputs['EgammaLargeFWDClusters'][1] +
+        '_links',
+        '', '']
     #
 
 
@@ -99,3 +138,34 @@ def truthParticleKey():
 
 def truthEventKey():
     return 'TruthEvents'
+
+
+def getItem(cType, cKey):
+    """getItem(cType, cKey) -> Return item to be added
+    to the output list: <cType>#<cKey>"""
+    return '%s#%s' % (cType, cKey)
+
+
+def getAuxItem(cType, cKey, auxOptionAll='', auxOptionAOD=''):
+    """getAuxItem(cType, cKey, auxOption='')
+    -> <cType>#<cKey>Aux.<auxOption>"""
+    auxType = cType.replace('Container', 'AuxContainer')
+    auxKey = cKey + 'Aux.'
+    return '%s#%s%s%s' % (auxType, auxKey, auxOptionAll, auxOptionAOD)
+
+
+def addContainer(outputList, cType, cKey):
+    """addContainer(outputList, cType, cKey)
+    -> Add container to outputList"""
+    # Skip containers if already in outputList
+    item = getItem(cType, cKey)
+    if item not in outputList:
+        outputList.append(item)
+
+
+def addAuxContainer(outputList, cType, cKey, auxOptionAll='', auxOptionAOD=''):
+    """addAux(outputList, cType, cKey, auxOption='')
+     -> Add aux container to outputList"""
+    item = getAuxItem(cType, cKey, auxOptionAll, auxOptionAOD)
+    if item not in outputList:
+        outputList.append(item)
diff --git a/Reconstruction/egamma/egammaRec/share/egammaLRTOutputItemList_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaLRTOutputItemList_jobOptions.py
index cffca24281b4..08eb3e8928fb 100755
--- a/Reconstruction/egamma/egammaRec/share/egammaLRTOutputItemList_jobOptions.py
+++ b/Reconstruction/egamma/egammaRec/share/egammaLRTOutputItemList_jobOptions.py
@@ -3,79 +3,52 @@
 __doc__ = """Add containers to ESD/AOD ItemList using
 the definitions from egammaKeys"""
 from egammaRec import egammaKeys
-from egammaRec.egammaKeys import egammaKeysDict
+from egammaRec.egammaKeys import (
+    egammaKeysDict,
+    getItem,
+    addContainer,
+    addAuxContainer)
 from AthenaCommon.Logging import logging
 from RecExConfig.RecFlags import rec
 
 
-def getItem(cType, cKey):
-    """getItem(cType, cKey) -> Return item to be added
-    to the output list: <cType>#<cKey>"""
-    return '%s#%s' % (cType, cKey)
-
-
-def getAuxItem(cType, cKey, auxOptionAll='', auxOptionAOD=''):
-    """getAuxItem(cType, cKey, auxOption='')
-    -> <cType>#<cKey>Aux.<auxOption>"""
-    auxType = cType.replace('Container', 'AuxContainer')
-    auxKey = cKey + 'Aux.'
-    return '%s#%s%s%s' % (auxType, auxKey, auxOptionAll, auxOptionAOD)
-
-
-def addContainer(outputList, cType, cKey):
-    """addContainer(outputList, cType, cKey)
-    -> Add container to outputList"""
-    # Skip containers if already in outputList
-    item = getItem(cType, cKey)
-    if item not in outputList:
-        outputList.append(item)
-
-
-def addAuxContainer(outputList, cType, cKey, auxOptionAll='', auxOptionAOD=''):
-    """addAux(outputList, cType, cKey, auxOption='')
-     -> Add aux container to outputList"""
-    item = getAuxItem(cType, cKey, auxOptionAll, auxOptionAOD)
-    if item not in outputList:
-        outputList.append(item)
-
-
 # List for of keys to be written to AOD.
 # All egammaKeys.outputs but EgammaRec and TopoSeededCellLink
 
 AOD_outputs = [i for i, j in egammaKeysDict.outputs.items()
-               if i not in ('EgammaRec', 
-                            'ElectronSuperRec', 
+               if i not in ('EgammaRec',
+                            'ElectronSuperRec',
                             'EgammaLargeClusters',
                             'EgammaLargeClustersCellLink',
                             'CellLink',
                             'TopoSeededCellLink',
-                            'EgammaLargeClusters', 
-                            'EgammaLargeClustersCellLink', 
-                            'Photon', 
-                            'PhotonSuperRec', 
-                            'FwdElectron', 
-                            'FwdCluster', 
-                            'FwdClusterCellLink', 
+                            'EgammaLargeClusters',
+                            'EgammaLargeClustersCellLink',
+                            'Photon',
+                            'PhotonSuperRec',
+                            'FwdElectron',
+                            'FwdCluster',
+                            'FwdClusterCellLink',
                             'Conversion'
-                        )]
+                            )]
 
 
 ESD_outputs = [i for i, j in egammaKeysDict.outputs.items()
-               if i not in ('EgammaRec', 
-                            'ElectronSuperRec', 
+               if i not in ('EgammaRec',
+                            'ElectronSuperRec',
                             'EgammaLargeClusters',
                             'EgammaLargeClustersCellLink',
                             'TopoSeededCellLink',
                             'CellLink',
-                            'EgammaLargeClusters', 
-                            'EgammaLargeClustersCellLink', 
-                            'Photon', 
-                            'PhotonSuperRec', 
-                            'FwdElectron', 
-                            'FwdCluster', 
-                            'FwdClusterCellLink', 
+                            'EgammaLargeClusters',
+                            'EgammaLargeClustersCellLink',
+                            'Photon',
+                            'PhotonSuperRec',
+                            'FwdElectron',
+                            'FwdCluster',
+                            'FwdClusterCellLink',
                             'Conversion'
-                        )]
+                            )]
 
 # Define egammaLRTAODList in the proper format (<type>#<key><option>),
 # including aux containers
@@ -99,7 +72,8 @@ for i in AOD_outputs:
 
     # Add aux containers for xAOD containers
     if 'xAOD::' in cType:
-        addAuxContainer(egammaLRTAODList, cType, cKey, auxOptionAll, auxOptionAOD)
+        addAuxContainer(egammaLRTAODList, cType, cKey,
+                        auxOptionAll, auxOptionAOD)
 
 for i in ESD_outputs:
     cType, cKey, auxOptionAll, auxOptionAOD = egammaKeysDict.outputs[i]
@@ -107,7 +81,6 @@ for i in ESD_outputs:
     # Tag LRT containers
     cKey = 'LRT' + cKey
 
-
     # Skip truth if doTruth = False
     if not rec.doTruth() and 'Truth' in cKey:
         continue
@@ -124,12 +97,15 @@ for i in ESD_outputs:
 
 
 # Add the non xAOD kind of  collection in the ESD
-egammaLRTESDList.append(getItem(egammaKeys.outputTrackType(),
-                                egammaKeys.outputTrackKey()).replace('#','#LRT'))
+egammaLRTESDList.append(getItem(
+    egammaKeys.outputTrackType(),
+    egammaKeys.outputTrackKey()).replace('#', '#LRT'))
 egammaLRTESDList.append(getItem(egammaKeys.outputTopoSeededCellLinkType(
-), egammaKeys.outputTopoSeededCellLinkKey()).replace('#','#LRT'))
+), egammaKeys.outputTopoSeededCellLinkKey()).replace('#', '#LRT'))
 
 logEgammaLRTOutputItemList_jobOptions = logging.getLogger(
     'egammaLRTOutputItemList_jobOptions')
-logEgammaLRTOutputItemList_jobOptions.info('egammaLRTESDList: %s',  egammaLRTESDList)
-logEgammaLRTOutputItemList_jobOptions.info('egammaLRTAODList: %s',  egammaLRTAODList)
+logEgammaLRTOutputItemList_jobOptions.info(
+    'egammaLRTESDList: %s',  egammaLRTESDList)
+logEgammaLRTOutputItemList_jobOptions.info(
+    'egammaLRTAODList: %s',  egammaLRTAODList)
diff --git a/Reconstruction/egamma/egammaRec/share/egammaLRTRec_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaLRTRec_jobOptions.py
index 39d59d0afc3e..3b7f4ca669a5 100755
--- a/Reconstruction/egamma/egammaRec/share/egammaLRTRec_jobOptions.py
+++ b/Reconstruction/egamma/egammaRec/share/egammaLRTRec_jobOptions.py
@@ -1,9 +1,6 @@
 # all these tests, except egamma, should be in egammaGetter
-from CaloRec.CaloRecFlags import jobproperties
 from egammaRec.egammaRecFlags import jobproperties
-from RecExConfig.RecFlags import rec
 from AthenaCommon.Resilience import treatException
-from AthenaCommon.DetFlags import DetFlags
 from AthenaCommon.AlgSequence import AlgSequence
 
 topSequence = AlgSequence()
@@ -16,7 +13,7 @@ def setupGSF_LRT():
     try:
         from egammaRec.LRTEgammaConfig import (
             LRTegammaSelectedTrackCopy)
-        LRTegammaSelectedTrackCopy(doPrint=True) # for debugging
+        LRTegammaSelectedTrackCopy(doPrint=False)  # for debugging
     except Exception:
         treatException(
             "Could not set up the egamma track Selection for LRT GSF."
@@ -24,7 +21,7 @@ def setupGSF_LRT():
     try:
         from egammaRec.LRTEgammaConfig import (
             LRTEMBremCollectionBuilder)
-        LRTEMBremCollectionBuilder(doPrint=True)
+        LRTEMBremCollectionBuilder(doPrint=False)
     except Exception:
         treatException(
             "Could not set up LRTEMBremCollectionBuilder."
@@ -32,7 +29,7 @@ def setupGSF_LRT():
     try:
         from egammaRec.LRTEgammaConfig import (
             LRTEMGSFCaloExtensionBuilder)
-        LRTEMGSFCaloExtensionBuilder(doPrint=True)
+        LRTEMGSFCaloExtensionBuilder(doPrint=False)
     except Exception:
         treatException("Could not set up LRTEMGSFCaloExtensionBuilder.")
 
@@ -45,29 +42,18 @@ def setupTopoSeededEgamma_LRT():
         from egammaRec.LRTtopoEgammaGetter import LRTtopoEgammaGetter
         LRTtopoEgammaGetter(ignoreExistingDataObject=True)
     except Exception:
-        treatException("Could not set up  LRTtopoEgammaGetter. Switch it off !")
+        treatException(
+            "Could not set up  LRTtopoEgammaGetter. Switch it off !")
         # If we wanted Topo based cluster seeded egamma it just failed
         jobproperties.egammaRecFlags.doEgammaCaloSeeded = False
         LRTtopoEgammaGetter(disable=True)
 
-#def setupTopoSeededEgamma_LRT():
-#    try:
-#        from egammaRec.LRTEgammaConfig import (
-#            LRTtopoEgammaBuilder)
-#        LRTtopoEgammaBuilder(doPrint=True)
-#    except Exception:
-#        treatException("Could not set up  LRTtopoEgammaBuilder. Switch it off !")
-#        # If we wanted Topo based cluster seeded egamma it just failed
-#        LRTtopoEgammaBuilder(disable=True)
-
-# Function to schedule the Truth Association
-
 
 def setupTruthAssociation_LRT():
     try:
         from egammaRec.LRTEgammaConfig import (
             LRTegammaTruthAssociationAlg)
-        LRTegammaTruthAssociationAlg(doPrint=True)
+        LRTegammaTruthAssociationAlg(doPrint=False)
     except Exception:
         treatException(
             "Could not set up LRTegammaTruthAssociationAlg. Switched off !")
diff --git a/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py
index 7b3d2acebc67..463e3fa26495 100755
--- a/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py
+++ b/Reconstruction/egamma/egammaRec/share/egammaOutputItemList_jobOptions.py
@@ -3,54 +3,33 @@
 __doc__ = """Add containers to ESD/AOD ItemList using
 the definitions from egammaKeys"""
 from egammaRec import egammaKeys
-from egammaRec.egammaKeys import egammaKeysDict
+from egammaRec.egammaKeys import (
+    egammaKeysDict,
+    getItem,
+    addContainer,
+    addAuxContainer)
 from AthenaCommon.Logging import logging
 from RecExConfig.RecFlags import rec
 
 
-def getItem(cType, cKey):
-    """getItem(cType, cKey) -> Return item to be added
-    to the output list: <cType>#<cKey>"""
-    return '%s#%s' % (cType, cKey)
-
-
-def getAuxItem(cType, cKey, auxOptionAll='', auxOptionAOD=''):
-    """getAuxItem(cType, cKey, auxOption='')
-    -> <cType>#<cKey>Aux.<auxOption>"""
-    auxType = cType.replace('Container', 'AuxContainer')
-    auxKey = cKey + 'Aux.'
-    return '%s#%s%s%s' % (auxType, auxKey, auxOptionAll, auxOptionAOD)
-
-
-def addContainer(outputList, cType, cKey):
-    """addContainer(outputList, cType, cKey)
-    -> Add container to outputList"""
-    # Skip containers if already in outputList
-    item = getItem(cType, cKey)
-    if item not in outputList:
-        outputList.append(item)
-
-
-def addAuxContainer(outputList, cType, cKey, auxOptionAll='', auxOptionAOD=''):
-    """addAux(outputList, cType, cKey, auxOption='')
-     -> Add aux container to outputList"""
-    item = getAuxItem(cType, cKey, auxOptionAll, auxOptionAOD)
-    if item not in outputList:
-        outputList.append(item)
-
-
 # List for of keys to be written to AOD.
 # All egammaKeys.outputs but EgammaRec and TopoSeededCellLink
 AOD_outputs = [i for i, j in egammaKeysDict.outputs.items()
-               if i not in ('EgammaRec', 'PhotonSuperRec',
-                            'ElectronSuperRec', 'TopoSeededCellLink',
+               if i not in ('EgammaRec',
+                            'PhotonSuperRec',
+                            'ElectronSuperRec',
+                            'TopoSeededCellLink',
                             'EgammaLargeClusters',
-                            'EgammaLargeClustersCellLink','EgammaLargeFWDClusters', 'EgammaLargeFWDClustersCellLink')]
+                            'EgammaLargeClustersCellLink',
+                            'EgammaLargeFWDClusters',
+                            'EgammaLargeFWDClustersCellLink')]
 
 
 ESD_outputs = [i for i, j in egammaKeysDict.outputs.items()
-               if i not in ('EgammaRec', 'PhotonSuperRec',
-                            'ElectronSuperRec', 'TopoSeededCellLink')]
+               if i not in ('EgammaRec',
+                            'PhotonSuperRec',
+                            'ElectronSuperRec',
+                            'TopoSeededCellLink')]
 
 # Define egammaAODList in the proper format (<type>#<key><option>),
 # including aux containers
diff --git a/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py b/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py
index 813a11cab2a3..7ac2adcfcd9b 100755
--- a/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py
+++ b/Reconstruction/egamma/egammaRec/share/egammaRec_jobOptions.py
@@ -1,5 +1,5 @@
 # all these tests, except egamma, should be in egammaGetter
-from CaloRec.CaloRecFlags import jobproperties
+from CaloRec.CaloRecFlags import jobproperties as caloproperties
 from egammaRec.egammaRecFlags import jobproperties
 from RecExConfig.RecFlags import rec
 from AthenaCommon.Resilience import treatException
@@ -21,7 +21,7 @@ if not DetFlags.detdescr.ID_on():
     jobproperties.egammaRecFlags.doVertexBuilding = False
 
 # We can not run without having the Calo
-if not (rec.readESD() or jobproperties.CaloRecFlags.doCaloTopoCluster()):
+if not (rec.readESD() or caloproperties.CaloRecFlags.doCaloTopoCluster()):
     jobproperties.egammaRecFlags.doEgammaCaloSeeded = False
     jobproperties.egammaRecFlags.doEgammaForwardSeeded = False
 
-- 
GitLab


From e48d59fadf5d46d665bb9b648d962fef1ab65dcd Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Mon, 4 Jan 2021 21:44:39 +0100
Subject: [PATCH 269/308] Factor common code used by std and LRT egamma config.
 Reduce LRT config log verbosity. Some flake8 related stylistic fixes

---
 .vscode/settings.json | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.vscode/settings.json b/.vscode/settings.json
index 25f4f91c00d5..e1ebff53d0f2 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -3,6 +3,5 @@
         "ms-vscode.cpptools",
         "twxs.cmake"
     ],
-    "remote.SSH.lockfilesInTmp": true,
-    "python.pythonPath": "/bin/python3"
+    "remote.SSH.lockfilesInTmp": true
 }
-- 
GitLab


From 8c65f2549540a34f50f6f303d15d3416f2438ad4 Mon Sep 17 00:00:00 2001
From: sherwood <peter.sherwood@cern.ch>
Date: Mon, 4 Jan 2021 22:35:32 +0100
Subject: [PATCH 270/308] jet hypo: comment change

---
 .../TrigHLTJetHypo/python/chainDict2jetLabel.py            | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
index b6a788a08ec4..f4e4451bbe93 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
@@ -169,9 +169,10 @@ def _make_vbenf_label(chain_parts, leg_label):
 
 
 def  _make_fbdjshared_label(chain_parts, leg_label):
-    """example label for a 2-tree forest. Same cuts as 
-    HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20, but the cuts are hardwired
-    here. The dijet and the forward-backward cuts run in separate trees."""
+    """example label for a 2-tree forest.
+    The fbdjshared contains a dijet and forward backward jets, in separate 
+    trees, to allow the fb jets to particoate in the dijet."""
+
     
     return """
     simple
-- 
GitLab


From 816f3c27a527ec3549bb609fa48a3746b0d0189a Mon Sep 17 00:00:00 2001
From: Nils Erik Krumnack <nils.erik.krumnack@cern.ch>
Date: Mon, 4 Jan 2021 15:52:29 +0000
Subject: [PATCH 271/308] Merge branch '21.2-AT_Adding_Antimuon_Systematics'
 into '21.2'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

AnalysisTop: Implementation of anti-muon shape systematics - ANALYSISTO-1044

See merge request atlas/athena!39426

(cherry picked from commit 7226bab72c29d79a5d05ae2cb33a7199902dc3bc)

39709e18 Implementation of anti-muon shape systematics - ANALYSISTO-1044
877d20c4 Mettre à jour PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/AntiMuonMC15.cxx
3afe4035 Adding check of pointer after dynamic_cast; bugfix for use of AntiMuon_nominal for MuonIsolation
6f5530f2 Removing useless comments
---
 .../Root/ObjectLoaderStandardCuts.cxx         |  6 +-
 .../Root/ConfigurationSettings.cxx            |  2 +-
 .../Root/AntiMuonMC15.cxx                     | 33 ++-----
 .../Root/IsolationTools.cxx                   | 90 +++++++++++++++++++
 .../TopObjectSelectionTools/AntiMuonMC15.h    |  5 +-
 .../TopObjectSelectionTools/IsolationTools.h  | 34 +++++++
 6 files changed, 137 insertions(+), 33 deletions(-)

diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx
index facd9d757320..f6f6b5af79c7 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/ObjectLoaderStandardCuts.cxx
@@ -92,10 +92,8 @@ namespace top {
     ///-- Muons --///
     if (topConfig->useMuons()) {
       if (topConfig->useAntiMuons()) objectSelection->muonSelection(new top::AntiMuonMC15(topConfig->muonPtcut(),
-                                                                                          new top::StandardIsolation(
-                                                                                            topConfig->muonIsolation(),
-                                                                                            topConfig->
-        muonIsolationLoose())));
+                                                                                          new top::AntiMuonIsolation(
+                                                                                            topConfig->muonIsolation())));
       else objectSelection->muonSelection(new top::MuonMC15(topConfig->muonPtcut(),
                                                             new top::StandardIsolation(topConfig->muonIsolation(),
                                                                                        topConfig->muonIsolationLoose()),
diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx
index e82352ac44cb..f316a07c1299 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx
@@ -125,7 +125,7 @@ namespace top {
 		      "Allows muon reconstruction using 2-station muons with missing inner MS station for |eta|<1.3 for Loose tree - Default: True (only for HighPt)",
 		      "True");
     registerParameter("MuonIsolation",
-                      "Isolation to use : PflowTight_VarRad, PflowTight_FixedRad, PflowLoose_VarRad, PflowLoose_FixedRad, HighPtTrackOnly, TightTrackOnly_VarRad, TightTrackOnly_FixedRad, PLVTight, PLVLoose, Tight_VarRad, Tight_FixedRad, Loose_VarRad, Loose_FixedRad, FCTight, FCLoose, FCTightTrackOnly, FCTightTrackOnly_FixedRad, FCLoose_FixedRad, FCTight_FixedRad, FixedCutPflowTight, FixedCutPflowLoose, FCTight_FixedRad, None",
+                      "Isolation to use : PflowTight_VarRad, PflowTight_FixedRad, PflowLoose_VarRad, PflowLoose_FixedRad, HighPtTrackOnly, TightTrackOnly_VarRad, TightTrackOnly_FixedRad, PLVTight, PLVLoose, Tight_VarRad, Tight_FixedRad, Loose_VarRad, Loose_FixedRad, FCTight, FCLoose, FCTightTrackOnly, FCTightTrackOnly_FixedRad, FCLoose_FixedRad, FCTight_FixedRad, FixedCutPflowTight, FixedCutPflowLoose, FCTight_FixedRad, AntiMuon_nominal, AntiMuon_shapeSyst1, AntiMuon_shapeSyst2, None",
 		      "PflowTight_FixedRad");
     registerParameter("MuonIsolationLoose",
                       "Isolation to use : PflowTight_VarRad, PflowTight_FixedRad, PflowLoose_VarRad, PflowLoose_FixedRad, HighPtTrackOnly, TightTrackOnly_VarRad, TightTrackOnly_FixedRad, PLVTight, PLVLoose, Tight_VarRad, Tight_FixedRad, Loose_VarRad, Loose_FixedRad, FCTight, FCLoose, FCTightTrackOnly, FCTightTrackOnly_FixedRad, FCLoose_FixedRad, FCTight_FixedRad, FixedCutPflowTight, FixedCutPflowLoose, FCTight_FixedRad, None",
diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/AntiMuonMC15.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/AntiMuonMC15.cxx
index 979bd53901cd..090bec4dbaf0 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/AntiMuonMC15.cxx
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/AntiMuonMC15.cxx
@@ -7,13 +7,11 @@
 #include "TopEvent/EventTools.h"
 
 namespace top {
-  AntiMuonMC15::AntiMuonMC15(const double ptcut, IsolationBase* /* isolation */) :
+  AntiMuonMC15::AntiMuonMC15(const double ptcut, AntiMuonIsolation* isolation) :
     m_ptcut(ptcut),
-    m_muonSelectionTool("CP::MuonSelectionTool") {
-    //m_muonSelectionToolLoose("CP::MuonSelectionToolLoose"),
-    //m_isolation(isolation)
+    m_muonSelectionTool("CP::MuonSelectionTool"),
+    m_isolation(isolation) {
     top::check(m_muonSelectionTool.retrieve(), "Failed to retrieve muonSelectionTool");
-//  top::check( m_muonSelectionToolLoose.retrieve() , "Failed to retrieve muonSelectionToolLoose" );
   }
 
   bool AntiMuonMC15::passSelection(const xAOD::Muon& mu) const {
@@ -22,22 +20,7 @@ namespace top {
     ///-- https://twiki.cern.ch/twiki/bin/view/AtlasProtected/MCPAnalysisGuidelinesMC15 --///
     if (!m_muonSelectionTool->accept(mu)) return false;
 
-
-    if (mu.energyLossType() != xAOD::Muon::NotIsolated) return false;
-
-    float eloss = 0;
-    bool ok = mu.parameter(eloss, xAOD::Muon::EnergyLoss);
-    if (ok && eloss > 6000) return false;
-
-    float etcone20 = 0, ptvarcone40 = 0;
-    ok = mu.isolation(etcone20, xAOD::Iso::etcone20);
-    if (ok && etcone20 / mu.pt() < 0.03) return false;
-
-    //if (mu.auxdataConst<float>("miniIso")/mu.pt() > .1) return false;
-    ok = mu.isolation(ptvarcone40, xAOD::Iso::ptvarcone40);
-    if (ok && ptvarcone40 / mu.pt() > 0.1) return false;
-
-    return true;
+    return m_isolation->passSelection(mu);
   }
 
   bool AntiMuonMC15::passSelectionLoose(const xAOD::Muon& /*mu*/) const {
@@ -53,9 +36,9 @@ namespace top {
 //         << "    * quality=" <<  m_quality << " (tight=0, medium=1, loose=2, v.loose=3)\n"
        << "    * Everything else from muon tool - fill this in?\n";
 
-//      if (!m_isolation)
-//        os << "    * No isolation requirement\n";
-//      else
-//        m_isolation->print(os);
+     if (!m_isolation)
+       os << "    * No isolation requirement\n";
+     else
+       m_isolation->print(os);
   }
 }
diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/IsolationTools.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/IsolationTools.cxx
index ece125b44f9b..ca7568df92ad 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/IsolationTools.cxx
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/Root/IsolationTools.cxx
@@ -105,6 +105,79 @@ namespace top {
     os << "    * Approximate Mini Isolation\n";
     os << "        * iso/pT > " << m_fraction << "\n";
   }
+  
+  AntiMuonIsolation::AntiMuonIsolation(const std::string& workingPoint) :
+        m_workingPoint(workingPoint) {
+    if (m_workingPoint.substr(0,9) != "AntiMuon_") {
+      ATH_MSG_WARNING("Ignoring isolation working point \""
+          << workingPoint
+          << "\" which is not appropriate for AntiMuons.\n"
+          << "Will use \"AntiMuon_nominal\" instead.");
+      m_workingPoint = "AntiMuon_nominal";
+    }
+    else if (m_workingPoint != "AntiMuon_nominal"
+      && m_workingPoint != "AntiMuon_shapeSyst1"
+      && m_workingPoint != "AntiMuon_shapeSyst2") {
+      ATH_MSG_ERROR("Cannot use undefined isolation working point "
+          << workingPoint
+          << " for AntiMuons.\n"
+          << "Should be one of \"AntiMuon_nominal\", \"AntiMuon_shapeSyst1\", \"AntiMuon_shapeSyst2\".");
+      throw std::runtime_error("Attempt to use inappropriate isolation working point for AntiMuons");
+    }
+  }
+  
+  bool AntiMuonIsolation::passSelection(const xAOD::IParticle& p) const {
+    //muons
+    if (p.type() != xAOD::Type::Muon) {
+      ATH_MSG_ERROR("Cannot use this function for anything else but muons");
+      throw std::runtime_error("Cannot use this function for anything else but muons");
+    }
+    
+    const xAOD::Muon* mu = dynamic_cast<const xAOD::Muon*>(&p);
+    if (mu == nullptr) {
+      ATH_MSG_ERROR("Impossible to cast pointer to xAOD::IParticle into pointer to xAOD::Muon");
+      throw std::runtime_error("Impossible to cast pointer to xAOD::IParticle into pointer to xAOD::Muon");
+    }
+    
+    if (mu->energyLossType() != xAOD::Muon::NotIsolated) return false;
+
+    float eloss = 0;
+    bool ok = mu->parameter(eloss, xAOD::Muon::EnergyLoss);
+    if (ok && eloss > 6000) return false;
+
+    float etcone20 = 0, ptvarcone40 = 0;
+    ok = mu->isolation(etcone20, xAOD::Iso::etcone20);
+    if (ok && etcone20 / mu->pt() < 0.03) return false;
+
+    ok = mu->isolation(ptvarcone40, xAOD::Iso::ptvarcone40);
+    if (m_workingPoint == "AntiMuon_nominal") {
+      if (ok && ptvarcone40 / mu->pt() > 0.1) return false;
+    }
+    else if (m_workingPoint == "AntiMuon_shapeSyst1") {
+      if (ok && ptvarcone40 / mu->pt() > 0.05) return false;
+    }
+    else if (m_workingPoint == "AntiMuon_shapeSyst2") {
+      if (ok && (ptvarcone40 / mu->pt() <= 0.05 || ptvarcone40 / mu->pt() > 0.1)) return false;
+    }
+
+    return true;
+  }
+
+  void AntiMuonIsolation::print(std::ostream& os) const {
+    os << "    * AntiMuon Isolation : " << m_workingPoint << "\n";
+    os << "        * energyLossType : NotIsolated\n";
+    os << "        * EnergyLoss <= 6 GeV\n";
+    os << "        * etcone20/pT > 0.03\n";
+    if (m_workingPoint == "AntiMuon_nominal") {
+      os << "        * ptvarcone40/pT <= 0.1\n";
+    }
+    else if (m_workingPoint == "AntiMuon_shapeSyst1") {
+      os << "        * ptvarcone40/pT <= 0.05\n";
+    }
+    else if (m_workingPoint == "AntiMuon_shapeSyst2") {
+      os << "        * 0.05 < ptvarcone40/pT <= 0.1\n";
+    }
+  }
 
   StandardIsolation::StandardIsolation(const std::string& tightLeptonIsolation,
                                        const std::string& looseLeptonIsolation) :
@@ -123,6 +196,23 @@ namespace top {
     if (tightLeptonIsolation == "None") m_doTightIsolation = false;
 
     if (looseLeptonIsolation == "None") m_doLooseIsolation = false;
+    
+    if ( tightLeptonIsolation == "AntiMuon_nominal"
+      || tightLeptonIsolation == "AntiMuon_shapeSyst1"
+      || tightLeptonIsolation == "AntiMuon_shapeSyst2" ) {
+      ATH_MSG_ERROR("Cannot use isolation working point "
+          << tightLeptonIsolation
+          << " which is suitable for AntiMuons only.");
+      throw std::runtime_error("Attempt to use inappropriate isolation working point, suitable for AntiMuons only");
+    }
+    if ( looseLeptonIsolation == "AntiMuon_nominal"
+      || looseLeptonIsolation == "AntiMuon_shapeSyst1"
+      || looseLeptonIsolation == "AntiMuon_shapeSyst2" ) {
+      ATH_MSG_ERROR("Cannot use isolation working point "
+          << looseLeptonIsolation
+          << " which is suitable for AntiMuons only.");
+      throw std::runtime_error("Attempt to use inappropriate isolation working point, suitable for AntiMuons only");
+    }
   }
 
   bool StandardIsolation::passSelection(const xAOD::IParticle& p) const {
diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/AntiMuonMC15.h b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/AntiMuonMC15.h
index 66c7dbec39e0..f2649f72dc3f 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/AntiMuonMC15.h
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/AntiMuonMC15.h
@@ -24,7 +24,7 @@ namespace top {
      * @param isolation The isolation the user wants to apply.  Don't want any
      * isolation to be applied?  Then leave this as a nullptr.
      */
-    AntiMuonMC15(const double ptcut, IsolationBase* isolation);
+    AntiMuonMC15(const double ptcut, AntiMuonIsolation* isolation);
 
     ///Does nothing.
     virtual ~AntiMuonMC15() {}
@@ -53,10 +53,9 @@ namespace top {
 
     ///Proper tool to select muons.
     ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool;
-//    ToolHandle<CP::IMuonSelectionTool> m_muonSelectionToolLoose;
 
     ///Isolation tool, can be nullptr meaning "no isolation requirement"
-//    std::unique_ptr<top::IsolationBase> m_isolation;
+   std::unique_ptr<top::AntiMuonIsolation> m_isolation;
   };
 }
 
diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/IsolationTools.h b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/IsolationTools.h
index f503b60d8f4b..895812faecad 100644
--- a/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/IsolationTools.h
+++ b/PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/IsolationTools.h
@@ -191,6 +191,40 @@ namespace top {
     double m_fractionLoose;
   };
 
+/**
+ * @brief Apply the cuts relevant for Anti-muon model
+ */
+  class AntiMuonIsolation: public IsolationBase {
+  public:
+    /**
+     * @brief Applies the cuts to etcone and ptcone like we used to in Run-I
+     *
+     * This sets up the isolation tool and configures it with the cuts.
+     */
+    AntiMuonIsolation(const std::string& workingPoint = "AntiMuon_Nominal");
+
+    /**
+     * @brief Does this particle pass the anti-muon isolation cuts?
+     *
+     * @param p Particle that we're worried about.
+     * @return True if it passes the isolation cuts.
+     */
+    virtual bool passSelection(const xAOD::IParticle& p) const override;
+
+    /**
+     * @brief Loose WP not implemented for Anti-muon
+     *
+     * @param p Particle that we're worried about.
+     * @return Always true.
+     */
+    virtual bool passSelectionLoose(const xAOD::IParticle& /*p*/) const override {return true;};
+
+    ///Come on, you really need me to tell you what this does?
+    virtual void print(std::ostream& os) const override;
+  protected:
+    std::string m_workingPoint;
+  };
+
 /**
  * @brief Apply the cuts to etcone and ptcone like we used to in Run-I
  */
-- 
GitLab


From d3d902fc899bc98d8cc3d9684a53fb7a7362728a Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 5 Jan 2021 03:15:25 +0100
Subject: [PATCH 272/308] Disable TRTNN for PID for now , reprocessing.
 autopep8/flake8 aesthetic fixes

---
 .../python/EMBremCollectionBuilder.py         |  4 +-
 .../python/EMGSFCaloExtensionBuilder.py       |  5 +-
 .../python/EMGSFCaloExtensionBuilderConfig.py | 40 +++++++++------
 .../python/egammaForwardBuilderConfig.py      | 49 +++++++++++++------
 .../egammaLargeClusterMakerAlgConfig.py       | 31 +++++++-----
 .../egammaLargeFWDClusterMakerAlgConfig.py    | 29 ++++++-----
 .../egammaAlgs/python/egammaRecBuilder.py     |  4 +-
 .../python/egammaRecBuilderConfig.py          | 21 +++++---
 .../python/egammaSelectedTrackCopyConfig.py   | 31 +++++++-----
 .../python/egammaSuperClusterBuilder.py       |  2 +-
 .../python/egammaSuperClusterBuilderConfig.py | 34 +++++++++----
 .../python/egammaTopoClusterCopier.py         | 11 +++--
 .../python/egammaTopoClusterCopierConfig.py   | 21 +++++---
 .../python/egammaTrackSlimmerConfig.py        | 24 ++++++---
 .../python/egammaTruthAssociationConfig.py    | 41 +++++++++++-----
 .../python/topoEgammaBuilderConfig.py         | 31 ++++++++----
 16 files changed, 249 insertions(+), 129 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py
index 4732fd0e3628..50481a3372a0 100644
--- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 __doc__ = """ToolFactory to instantiate  egammaBremCollectionBuilder
 with default configuration"""
@@ -73,7 +73,7 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder):
             GSFBuildTRT_ElectronPidTool = (
                 TrackingCommon.getInDetTRT_ElectronPidTool(
                     name="GSFBuildTRT_ElectronPidTool",
-                    CalculateNNPid=True,
+                    CalculateNNPid=False,
                     MinimumTrackPtForNNPid=0.,
                     private=True))
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
index ec3efeba67d6..23359d40c498 100644
--- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py
@@ -1,6 +1,7 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "ToolFactory to instantiate the EMGSFCaloExtensionBuilder with default configuration"
+__doc__ = """ToolFactory to instantiate the
+              EMGSFCaloExtensionBuilder with default configuration"""
 __author__ = "Christos"
 
 from egammaAlgs import egammaAlgsConf
diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py
index ad5fae0a1be6..38b76725cecc 100644
--- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py
@@ -1,15 +1,19 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "Instantiate the EMGSFCaloExtensionBuilder with default configuration"
-
-from AthenaCommon.Logging import logging
-from AthenaConfiguration.ComponentFactory import CompFactory
-from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
-EMGSFCaloExtensionBuilder=CompFactory.EMGSFCaloExtensionBuilder
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+from AthenaCommon.Logging import logging
+__doc__ = """ Instantiate the EMGSFCaloExtensionBuilder
+with default configuration """
+
+EMGSFCaloExtensionBuilder = CompFactory.EMGSFCaloExtensionBuilder
 
 
-def EMGSFCaloExtensionBuilderCfg(flags, name='EMGSFCaloExtensionBuilder', **kwargs):
+def EMGSFCaloExtensionBuilderCfg(
+        flags,
+        name='EMGSFCaloExtensionBuilder',
+        **kwargs):
 
     mlog = logging.getLogger(name)
     mlog.info('Starting configuration')
@@ -17,21 +21,25 @@ def EMGSFCaloExtensionBuilderCfg(flags, name='EMGSFCaloExtensionBuilder', **kwar
     acc = ComponentAccumulator()
 
     if "PerigeeCaloExtensionTool" not in kwargs:
-        perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags,
-                                                            name="PerigeeCaloExtensionTool",
-                                                            ParticleType="electron",
-                                                            StartFromPerigee=True)
+        perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg(
+            flags,
+            name="PerigeeCaloExtensionTool",
+            ParticleType="electron",
+            StartFromPerigee=True)
         kwargs["PerigeeCaloExtensionTool"] = perigeeCaloExtrapAcc.popPrivateTools()
         acc.merge(perigeeCaloExtrapAcc)
 
     if "LastCaloExtensionTool" not in kwargs:
-        lastCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags,
-                                                         name="LastCaloExtensionTool",
-                                                         ParticleType="electron")
+        lastCaloExtrapAcc = ParticleCaloExtensionToolCfg(
+            flags,
+            name="LastCaloExtensionTool",
+            ParticleType="electron")
         kwargs["LastCaloExtensionTool"] = lastCaloExtrapAcc.popPrivateTools()
         acc.merge(lastCaloExtrapAcc)
 
-    kwargs.setdefault("GFFTrkPartContainerName", flags.Egamma.Keys.Output.GSFTrackParticles)
+    kwargs.setdefault(
+        "GFFTrkPartContainerName",
+        flags.Egamma.Keys.Output.GSFTrackParticles)
 
     emgscaloextfAlg = EMGSFCaloExtensionBuilder(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py
index b8db76eb73b4..5ebb0a91a7be 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py
@@ -1,14 +1,15 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
+from ROOT import egammaPID
+from ElectronPhotonSelectorTools.AsgForwardElectronIsEMSelectorsConfig import (
+    AsgForwardElectronIsEMSelectorCfg)
 import cppyy
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from egammaTools.egammaOQFlagsBuilderConfig import egammaOQFlagsBuilderCfg
-EMFourMomBuilder=CompFactory.EMFourMomBuilder
-from ElectronPhotonSelectorTools.AsgForwardElectronIsEMSelectorsConfig import AsgForwardElectronIsEMSelectorCfg
-egammaForwardBuilder=CompFactory.egammaForwardBuilder
-from ROOT import egammaPID
+EMFourMomBuilder = CompFactory.EMFourMomBuilder
+egammaForwardBuilder = CompFactory.egammaForwardBuilder
 
 cppyy.load_library('libElectronPhotonSelectorToolsDict')
 
@@ -21,14 +22,26 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs):
     acc = ComponentAccumulator()
 
     if "forwardelectronIsEMselectors" not in kwargs:
-        LooseFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "LooseForwardElectronSelector", egammaPID.ForwardElectronIDLoose)
-        MediumFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "MediumForwardElectronSelector", egammaPID.ForwardElectronIDMedium)
-        TightFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "TightForwardElectronSelector", egammaPID.ForwardElectronIDTight)
+        LooseFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(
+            flags,
+            "LooseForwardElectronSelector",
+            egammaPID.ForwardElectronIDLoose)
+        MediumFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(
+            flags,
+            "MediumForwardElectronSelector",
+            egammaPID.ForwardElectronIDMedium)
+        TightFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(
+            flags,
+            "TightForwardElectronSelector",
+            egammaPID.ForwardElectronIDTight)
 
-        kwargs.setdefault("forwardelectronIsEMselectors", [LooseFwdElectronSelector.popPrivateTools(),
-                                                           MediumFwdElectronSelector.popPrivateTools(),
-                                                           TightFwdElectronSelector.popPrivateTools()])
-        kwargs.setdefault("forwardelectronIsEMselectorResultNames", ["Loose", "Medium", "Tight"])
+        kwargs.setdefault("forwardelectronIsEMselectors",
+                          [LooseFwdElectronSelector.popPrivateTools(),
+                           MediumFwdElectronSelector.popPrivateTools(),
+                           TightFwdElectronSelector.popPrivateTools()])
+        kwargs.setdefault(
+            "forwardelectronIsEMselectorResultNames",
+            ["Loose", "Medium", "Tight"])
 
         acc.merge(LooseFwdElectronSelector)
         acc.merge(MediumFwdElectronSelector)
@@ -39,10 +52,14 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs):
         kwargs["ObjectQualityTool"] = egOQ.popPrivateTools()
         acc.merge(egOQ)
 
-    kwargs.setdefault("ElectronOutputName",   flags.Egamma.Keys.Output.ForwardElectrons)
-    kwargs.setdefault("TopoClusterName",      flags.Egamma.Keys.Input.ForwardTopoClusters)
-    kwargs.setdefault("ClusterContainerName", flags.Egamma.Keys.Output.ForwardClusters)
-    kwargs.setdefault("FourMomBuilderTool",   EMFourMomBuilder())
+    kwargs.setdefault("ElectronOutputName",
+                      flags.Egamma.Keys.Output.ForwardElectrons)
+    kwargs.setdefault("TopoClusterName",
+                      flags.Egamma.Keys.Input.ForwardTopoClusters)
+    kwargs.setdefault("ClusterContainerName",
+                      flags.Egamma.Keys.Output.ForwardClusters)
+    kwargs.setdefault("FourMomBuilderTool",
+                      EMFourMomBuilder())
 
     fwdAlg = egammaForwardBuilder(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py
index 0436e5b6d8a8..4c16498a582d 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py
@@ -1,31 +1,38 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "Configure egammaLargeClusterMaker, which chooses cells to store in the AOD" 
+__doc__ = """
+         Configure egammaLargeClusterMaker, 
+         which chooses cells to store in the AOD"""
 __author__ = "Jovan Mitrevski"
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from egammaTools.egammaLargeClusterMakerConfig import egammaLargeClusterMakerCfg
 from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
-CaloClusterMaker=CompFactory.CaloClusterMaker
+CaloClusterMaker = CompFactory.CaloClusterMaker
 
-def egammaLargeClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs):
+
+def egammaLargeClusterMakerAlgCfg(
+        flags,
+        name="egammaLargeClusterMaker",
+        **kwargs):
 
     acc = ComponentAccumulator
-    
+
     kwargs.setdefault("SaveUncalibratedSignalState", False)
-    kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeClusters)
+    kwargs.setdefault("ClustersOutputName",
+                      flags.Egamma.Keys.Output.EgammaLargeClusters)
 
     if "ClusterMakerTools" not in kwargs:
         toolAcc = egammaLargeClusterMakerCfg(flags)
-        kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ]
+        kwargs["ClusterMakerTools"] = [toolAcc.popPrivateTools()]
         acc.merge(toolAcc)
 
-    kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("ele7_11",
-                                                                       suffix="Nocorr",
-                                                                       version="none",
-                                                                       cells_name=flags.Egamma.Keys.Input.CaloCells))
+    kwargs.setdefault("ClusterCorrectionTools",
+                      make_CaloSwCorrections("ele7_11",
+                                             suffix="Nocorr",
+                                             version="none",
+                                             cells_name=flags.Egamma.Keys.Input.CaloCells))
 
     acc.addEventAlgo(CaloClusterMaker(name, **kwargs))
     return acc
-
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
index 5bfcfc53493f..054435602180 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py
@@ -1,31 +1,36 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" 
+__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD"
 __author__ = "Jovan Mitrevski"
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from egammaTools.egammaLargeFWDClusterMakerConfig import egammaLargeFWDClusterMakerCfg
 from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections
-CaloClusterMaker=CompFactory.CaloClusterMaker
+CaloClusterMaker = CompFactory.CaloClusterMaker
 
-def egammaLargeFWDClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs):
+
+def egammaLargeFWDClusterMakerAlgCfg(
+        flags,
+        name="egammaLargeClusterMaker",
+        **kwargs):
 
     acc = ComponentAccumulator
-    
+
     kwargs.setdefault("SaveUncalibratedSignalState", False)
-    kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeFWDClusters)
+    kwargs.setdefault("ClustersOutputName",
+                      flags.Egamma.Keys.Output.EgammaLargeFWDClusters)
 
     if "ClusterMakerTools" not in kwargs:
         toolAcc = egammaLargeFWDClusterMakerCfg(flags)
-        kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ]
+        kwargs["ClusterMakerTools"] = [toolAcc.popPrivateTools()]
         acc.merge(toolAcc)
 
-    kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("FWDele6_6",
-                                                                       suffix="Nocorr",
-                                                                       version="none",
-                                                                       cells_name=flags.Egamma.Keys.Input.CaloCells))
+    kwargs.setdefault("ClusterCorrectionTools",
+                      make_CaloSwCorrections("FWDele6_6",
+                                             suffix="Nocorr",
+                                             version="none",
+                                             cells_name=flags.Egamma.Keys.Input.CaloCells))
 
     acc.addEventAlgo(CaloClusterMaker(name, **kwargs))
     return acc
-
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py
index f80be96ec0f9..fd9078a89935 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py
@@ -1,6 +1,6 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = """ToolFactory to instantiate 
+__doc__ = """ToolFactory to instantiate
 egammaRecBuilder with default configuration"""
 __author__ = "Jovan Mitrevski"
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py
index 71d40ce6798b..f7ab862c60c9 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py
@@ -1,16 +1,21 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "Instantiate egammaRecBuilder with default configuration"
+__doc__ = """
+          Instantiate egammaRecBuilder with default configuration
+          """
 
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from egammaTools.EMTrackMatchBuilderConfig import EMTrackMatchBuilderCfg
 from egammaTools.EMConversionBuilderConfig import EMConversionBuilderCfg
-egammaRecBuilder=CompFactory.egammaRecBuilder
+egammaRecBuilder = CompFactory.egammaRecBuilder
 
 
-def egammaRecBuilderCfg(flags, name='egammaRecBuilder', **kwargs):
+def egammaRecBuilderCfg(
+        flags,
+        name='egammaRecBuilder',
+        **kwargs):
 
     mlog = logging.getLogger(name)
     mlog.debug('Start configuration')
@@ -26,8 +31,12 @@ def egammaRecBuilderCfg(flags, name='egammaRecBuilder', **kwargs):
         kwargs["ConversionBuilderTool"] = emcnv.popPrivateTools()
         acc.merge(emcnv)
 
-    kwargs.setdefault("egammaRecContainer", flags.Egamma.Keys.Internal.EgammaRecs)
-    kwargs.setdefault("InputTopoClusterContainerName", flags.Egamma.Keys.Internal.EgammaTopoClusters)
+    kwargs.setdefault(
+        "egammaRecContainer",
+        flags.Egamma.Keys.Internal.EgammaRecs)
+    kwargs.setdefault(
+        "InputTopoClusterContainerName",
+        flags.Egamma.Keys.Internal.EgammaTopoClusters)
 
     egrecAlg = egammaRecBuilder(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py
index ddffe1437793..a338ede05e85 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 __doc__ = "Instantiate egammaSelectedTrackCopy with default configuration"
 
@@ -11,7 +11,10 @@ egammaCaloClusterSelector = CompFactory.egammaCaloClusterSelector
 egammaSelectedTrackCopy = CompFactory.egammaSelectedTrackCopy
 
 
-def egammaSelectedTrackCopyCfg(flags, name='egammaSelectedTrackCopy', **kwargs):
+def egammaSelectedTrackCopyCfg(
+        flags,
+        name='egammaSelectedTrackCopy',
+        **kwargs):
 
     mlog = logging.getLogger(name)
     mlog.info('Starting configuration')
@@ -19,24 +22,28 @@ def egammaSelectedTrackCopyCfg(flags, name='egammaSelectedTrackCopy', **kwargs):
     acc = ComponentAccumulator()
 
     if "egammaCaloClusterSelector" not in kwargs:
-        egammaCaloClusterGSFSelector = egammaCaloClusterSelector(name='caloClusterGSFSelector',
-                                                                 EMEtCut=2250.,
-                                                                 EMEtSplittingFraction = 0.7,
-                                                                 EMFCut=0.5
-                                                                 )
+        egammaCaloClusterGSFSelector = egammaCaloClusterSelector(
+            name='caloClusterGSFSelector',
+            EMEtCut=2250.,
+            EMEtSplittingFraction=0.7,
+            EMFCut=0.5
+        )
 
         kwargs["egammaCaloClusterSelector"] = egammaCaloClusterGSFSelector
-        kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool())
+        kwargs.setdefault("egammaCheckEnergyDepositTool",
+                          egammaCheckEnergyDepositTool())
 
     if "ExtrapolationTool" not in kwargs:
         extraptool = EMExtrapolationToolsCfg(flags)
         kwargs["ExtrapolationTool"] = extraptool.popPrivateTools()
         acc.merge(extraptool)
 
-    kwargs.setdefault("ClusterContainerName",
-                      flags.Egamma.Keys.Internal.EgammaTopoClusters)
-    kwargs.setdefault("TrackParticleContainerName",
-                      flags.Egamma.Keys.Input.TrackParticles)
+    kwargs.setdefault(
+        "ClusterContainerName",
+        flags.Egamma.Keys.Internal.EgammaTopoClusters)
+    kwargs.setdefault(
+        "TrackParticleContainerName",
+        flags.Egamma.Keys.Input.TrackParticles)
 
     egseltrkcpAlg = egammaSelectedTrackCopy(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py
index 0de10c4dee17..dd260c0b99f1 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 __doc__ = """ToolFactory to instantiate the
 two supercluster builders with default configuration"""
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py
index 0205a247ecdf..97b02ddf1677 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py
@@ -1,6 +1,7 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "Instantiate the two supercluster builders with default configuration"
+__doc__ = """Instantiate the two supercluster
+builders with default configuration"""
 
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
@@ -36,9 +37,15 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', **
         kwargs["ClusterCorrectionTool"] = egswtool.popPrivateTools()
         acc.merge(egswtool)
 
-    kwargs.setdefault("InputEgammaRecContainerName",    flags.Egamma.Keys.Internal.EgammaRecs)
-    kwargs.setdefault("SuperElectronRecCollectionName", flags.Egamma.Keys.Internal.ElectronSuperRecs)
-    kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool())
+    kwargs.setdefault(
+        "InputEgammaRecContainerName",
+        flags.Egamma.Keys.Internal.EgammaRecs)
+    kwargs.setdefault(
+        "SuperElectronRecCollectionName",
+        flags.Egamma.Keys.Internal.ElectronSuperRecs)
+    kwargs.setdefault(
+        "egammaCheckEnergyDepositTool",
+        egammaCheckEnergyDepositTool())
     kwargs.setdefault("EtThresholdCut", 1000)
 
     elscAlg = electronSuperClusterBuilder(name, **kwargs)
@@ -47,7 +54,10 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', **
     return acc
 
 
-def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', **kwargs):
+def photonSuperClusterBuilderCfg(
+        flags,
+        name='photonSuperClusterBuilder',
+        **kwargs):
 
     from egammaAlgs.egammaAlgsConf import photonSuperClusterBuilder
 
@@ -71,9 +81,15 @@ def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', **kwar
         kwargs["ClusterCorrectionTool"] = egswtool.popPrivateTools()
         acc.merge(egswtool)
 
-    kwargs.setdefault("InputEgammaRecContainerName",    flags.Egamma.Keys.Internal.EgammaRecs)
-    kwargs.setdefault("SuperPhotonRecCollectionName", flags.Egamma.Keys.Internal.PhotonSuperRecs)
-    kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool())
+    kwargs.setdefault(
+        "InputEgammaRecContainerName",
+        flags.Egamma.Keys.Internal.EgammaRecs)
+    kwargs.setdefault(
+        "SuperPhotonRecCollectionName",
+        flags.Egamma.Keys.Internal.PhotonSuperRecs)
+    kwargs.setdefault(
+        "egammaCheckEnergyDepositTool",
+        egammaCheckEnergyDepositTool())
 
     phscAlg = photonSuperClusterBuilder(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py
index 3b314af0653a..5451f8b0c09e 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py
@@ -1,7 +1,8 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 __doc__ = """
-ToolFactory to instantiate egammaTopoClusterCopier with default configuration"""
+          ToolFactory to instantiate egammaTopoClusterCopier
+          with default configuration"""
 __author__ = "Jovan Mitrevski"
 
 from egammaAlgs import egammaAlgsConf
@@ -11,8 +12,10 @@ from egammaRec.egammaRecFlags import jobproperties
 egammaTopoClusterCopier = AlgFactory(
     egammaAlgsConf.egammaTopoClusterCopier,
     name='egammaTopoClusterCopier',
-    InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(),
-    OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(),
+    InputTopoCollection=(
+        jobproperties.egammaRecFlags.inputTopoClusterCollection()),
+    OutputTopoCollection=(
+        jobproperties.egammaRecFlags.egammaTopoClusterCollection()),
     OutputTopoCollectionShallow="tmp_" +
     jobproperties.egammaRecFlags.egammaTopoClusterCollection()
 )
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py
index 2424f0eeb344..a6e107739360 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py
@@ -1,25 +1,34 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 __doc__ = "Instantiate egammaTopoClusterCopier with default configuration"
 
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-egammaTopoClusterCopier=CompFactory.egammaTopoClusterCopier
+egammaTopoClusterCopier = CompFactory.egammaTopoClusterCopier
 
 
-def egammaTopoClusterCopierCfg(flags, name='egammaTopoClusterCopier', **kwargs):
+def egammaTopoClusterCopierCfg(
+        flags,
+        name='egammaTopoClusterCopier',
+        **kwargs):
 
     mlog = logging.getLogger(name)
     mlog.info('Starting configuration')
 
     acc = ComponentAccumulator()
 
-    kwargs.setdefault("InputTopoCollection", flags.Egamma.Keys.Input.TopoClusters)
+    kwargs.setdefault(
+        "InputTopoCollection",
+        flags.Egamma.Keys.Input.TopoClusters)
 
     egtopocluster = flags.Egamma.Keys.Internal.EgammaTopoClusters
-    kwargs.setdefault("OutputTopoCollection", egtopocluster)
-    kwargs.setdefault("OutputTopoCollectionShallow", "tmp_"+egtopocluster)
+    kwargs.setdefault(
+        "OutputTopoCollection",
+        egtopocluster)
+    kwargs.setdefault(
+        "OutputTopoCollectionShallow",
+        "tmp_"+egtopocluster)
 
     egcopierAlg = egammaTopoClusterCopier(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py
index a7f3ed03db4b..0c3192d5bb4b 100755
--- a/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py
@@ -1,12 +1,15 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-egammaTrackSlimmer=CompFactory.egammaTrackSlimmer
+egammaTrackSlimmer = CompFactory.egammaTrackSlimmer
 
 
-def egammaTrackSlimmerCfg(flags, name='egammaTrackSlimmer', **kwargs):
+def egammaTrackSlimmerCfg(
+        flags,
+        name='egammaTrackSlimmer',
+        **kwargs):
 
     mlog = logging.getLogger(name)
     mlog.info('Starting configuration')
@@ -14,11 +17,16 @@ def egammaTrackSlimmerCfg(flags, name='egammaTrackSlimmer', **kwargs):
     acc = ComponentAccumulator()
 
     kwargs.setdefault("StreamName", 'StreamAOD')
-    kwargs.setdefault("InputElectronContainerName", flags.Egamma.Keys.Output.Electrons)
-    kwargs.setdefault("InputPhotonContainerName", flags.Egamma.Keys.Output.Photons)
-    kwargs.setdefault("TrackParticleContainerName", flags.Egamma.Keys.Output.GSFTrackParticles)
-    kwargs.setdefault("VertexContainerName", flags.Egamma.Keys.Output.ConversionVertices)
-    kwargs.setdefault("InDetTrackParticleContainerName", flags.Egamma.Keys.Input.TrackParticles)
+    kwargs.setdefault("InputElectronContainerName",
+                      flags.Egamma.Keys.Output.Electrons)
+    kwargs.setdefault("InputPhotonContainerName",
+                      flags.Egamma.Keys.Output.Photons)
+    kwargs.setdefault("TrackParticleContainerName",
+                      flags.Egamma.Keys.Output.GSFTrackParticles)
+    kwargs.setdefault("VertexContainerName",
+                      flags.Egamma.Keys.Output.ConversionVertices)
+    kwargs.setdefault("InDetTrackParticleContainerName",
+                      flags.Egamma.Keys.Input.TrackParticles)
 
     egtrkslimmerAlg = egammaTrackSlimmer(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py
index effa519afea4..bf82b915619f 100644
--- a/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py
@@ -1,12 +1,12 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
+from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCaloTruthMatchCfg
 __doc__ = "Configure egammaTruthAssociation"
 
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-egammaTruthAssociationAlg=CompFactory.egammaTruthAssociationAlg
-from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCaloTruthMatchCfg
+egammaTruthAssociationAlg = CompFactory.egammaTruthAssociationAlg
 
 
 def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs):
@@ -21,15 +21,32 @@ def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs):
         kwargs["MCTruthClassifier"] = mctruth.popPrivateTools()
         acc.merge(mctruth)
 
-    kwargs.setdefault("ClusterContainerName",       flags.Egamma.Keys.Output.CaloClusters)
-    kwargs.setdefault("ElectronContainerName",      flags.Egamma.Keys.Output.Electrons)
-    kwargs.setdefault("PhotonContainerName",        flags.Egamma.Keys.Output.Photons)
-    kwargs.setdefault("FwdElectronContainerName",   flags.Egamma.Keys.Output.ForwardElectrons)
-    kwargs.setdefault("TruthEventContainerName",    flags.Egamma.Keys.Input.TruthEvents)
-    kwargs.setdefault("TruthParticleContainerName", flags.Egamma.Keys.Input.TruthParticles)
-    kwargs.setdefault("EgammaTruthContainerName",   flags.Egamma.Keys.Output.TruthParticles)
-    kwargs.setdefault("MatchForwardElectrons",      flags.Egamma.doForwardSeeded)
-    kwargs.setdefault("SimBarcodeOffset",           flags.Sim.SimBarcodeOffset)
+    kwargs.setdefault(
+        "ClusterContainerName",
+        flags.Egamma.Keys.Output.CaloClusters)
+    kwargs.setdefault(
+        "ElectronContainerName",
+        flags.Egamma.Keys.Output.Electrons)
+    kwargs.setdefault(
+        "PhotonContainerName",
+        flags.Egamma.Keys.Output.Photons)
+    kwargs.setdefault(
+        "FwdElectronContainerName",
+        flags.Egamma.Keys.Output.ForwardElectrons)
+    kwargs.setdefault(
+        "TruthEventContainerName",
+        flags.Egamma.Keys.Input.TruthEvents)
+    kwargs.setdefault(
+        "TruthParticleContainerName",
+        flags.Egamma.Keys.Input.TruthParticles)
+    kwargs.setdefault(
+        "EgammaTruthContainerName",
+        flags.Egamma.Keys.Output.TruthParticles)
+    kwargs.setdefault(
+        "MatchForwardElectrons",
+        flags.Egamma.doForwardSeeded)
+    kwargs.setdefault("SimBarcodeOffset",
+                      flags.Sim.SimBarcodeOffset)
 
     egtruthAlg = egammaTruthAssociationAlg(name, **kwargs)
 
diff --git a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py
index 9d6f6725e5e6..33b14a49f348 100644
--- a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py
+++ b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py
@@ -1,12 +1,15 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
-__doc__ = "Instantiate the two supercluster builders with default configuration"
+__doc__ = """
+          Instantiate the two supercluster
+          builders with default configuration
+          """
 
 from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-topoEgammaBuilder=CompFactory.topoEgammaBuilder
-EGammaAmbiguityTool=CompFactory.EGammaAmbiguityTool
+topoEgammaBuilder = CompFactory.topoEgammaBuilder
+EGammaAmbiguityTool = CompFactory.EGammaAmbiguityTool
 
 
 def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs):
@@ -16,11 +19,21 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs):
 
     acc = ComponentAccumulator()
 
-    kwargs.setdefault("SuperElectronRecCollectionName", flags.Egamma.Keys.Internal.ElectronSuperRecs)
-    kwargs.setdefault("SuperPhotonRecCollectionName", flags.Egamma.Keys.Internal.PhotonSuperRecs)
-    kwargs.setdefault("ElectronOutputName", flags.Egamma.Keys.Output.Electrons)
-    kwargs.setdefault("PhotonOutputName", flags.Egamma.Keys.Output.Photons)
-    kwargs.setdefault("AmbiguityTool", EGammaAmbiguityTool())
+    kwargs.setdefault(
+        "SuperElectronRecCollectionName",
+        flags.Egamma.Keys.Internal.ElectronSuperRecs)
+    kwargs.setdefault(
+        "SuperPhotonRecCollectionName",
+        flags.Egamma.Keys.Internal.PhotonSuperRecs)
+    kwargs.setdefault(
+        "ElectronOutputName",
+        flags.Egamma.Keys.Output.Electrons)
+    kwargs.setdefault(
+        "PhotonOutputName",
+        flags.Egamma.Keys.Output.Photons)
+    kwargs.setdefault(
+        "AmbiguityTool",
+        EGammaAmbiguityTool())
 
     topoegAlg = topoEgammaBuilder(flags, **kwargs)
 
-- 
GitLab


From 2b6023142903eef72b37ac9e5f5a95aa2346fa2d Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <andrii.verbytskyi@cern.ch>
Date: Tue, 5 Jan 2021 04:29:32 +0000
Subject: [PATCH 273/308] A bit of cleanup in the InnerTracker, PhysicsAnalysis
 and Tracking

---
 .../McParticleTools/src/EtaPtFilterTool.cxx      | 16 ++--------------
 .../McParticleTools/src/GenAodValidationTool.cxx | 15 ---------------
 .../McParticleTools/src/PileupFilterTool.cxx     |  3 ---
 .../McParticleTools/src/TruthParticleCnvTool.cxx |  1 -
 .../McParticleTools/src/VtxBasedFilterTool.cxx   | 10 ----------
 .../McParticleUtils/src/McVtxFilter.cxx          |  2 --
 .../src/PRD_TruthTrajectoryBuilder.cxx           |  1 -
 7 files changed, 2 insertions(+), 46 deletions(-)

diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/EtaPtFilterTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/EtaPtFilterTool.cxx
index 37f031371e6e..b01090ce82aa 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/EtaPtFilterTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/EtaPtFilterTool.cxx
@@ -111,16 +111,8 @@ EtaPtFilterTool::~EtaPtFilterTool()
   ATH_MSG_DEBUG("Calling destructor");
 }
 
-/////////////////////////////////////////////////////////////////// 
-/// Const methods: 
-///////////////////////////////////////////////////////////////////
 
-/////////////////////////////////////////////////////////////////// 
-/// Non-const methods: 
-/////////////////////////////////////////////////////////////////// 
-
-StatusCode EtaPtFilterTool::buildMcAod( const McEventCollection* in,
-					McEventCollection* out )
+StatusCode EtaPtFilterTool::buildMcAod( const McEventCollection* in,McEventCollection* out )
 {
   if ( 0 == in || 0 == out ) {
     ATH_MSG_ERROR("Invalid pointer to McEventCollection !" << endmsg
@@ -169,16 +161,12 @@ StatusCode EtaPtFilterTool::buildMcAod( const McEventCollection* in,
   return StatusCode::SUCCESS;
 }
 
-/////////////////////////////////////////////////////////////////// 
-/// Protected methods: 
-/////////////////////////////////////////////////////////////////// 
 
 /////////////////////////////////////////////////////////////////// 
 /// Const methods: 
 ///////////////////////////////////////////////////////////////////
 
-StatusCode EtaPtFilterTool::buildGenEvent( const HepMC::GenEvent* in,
-					   HepMC::GenEvent* out )
+StatusCode EtaPtFilterTool::buildGenEvent( const HepMC::GenEvent* in, HepMC::GenEvent* out )
 {
   if ( 0 == in || 0 == out ) {
     ATH_MSG_ERROR("Invalid pointer to GenEvent !!" << endmsg
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/GenAodValidationTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/GenAodValidationTool.cxx
index 03c37d15f2b2..1be0b58a98a3 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/GenAodValidationTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/GenAodValidationTool.cxx
@@ -86,21 +86,6 @@ GenAodValidationTool::~GenAodValidationTool()
 
 }
 
-/////////////////////////////////////////////////////////////////// 
-/// Const methods: 
-///////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////// 
-/// Non-const methods: 
-/////////////////////////////////////////////////////////////////// 
-
-/////////////////////////////////////////////////////////////////// 
-/// Protected methods: 
-/////////////////////////////////////////////////////////////////// 
-
-/////////////////////////////////////////////////////////////////// 
-/// Const methods: 
-///////////////////////////////////////////////////////////////////
 
 /////////////////////////////////////////////////////////////////// 
 /// Non-const methods: 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx
index 1ae2edd6ddd2..0577d31c2acd 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/PileupFilterTool.cxx
@@ -220,11 +220,8 @@ StatusCode PileupFilterTool::selectSpclMcBarcodes()
      HepMC::GenEvent::particle_const_iterator partE = genEvent->particles_end();
      for ( ; part != partE; ++part ) {
         const int id      = (*part)->pdg_id();
-        //const int ida     = std::abs(id);
         const HepMC::FourVector hlv = (*part)->momentum();
         const double pt   = hlv.perp();
-        //const double eta  = hlv.pseudoRapidity();
-        //const double mass = hlv.m();
         const int barcode = (*part)->barcode();
         const HepMC::GenVertex * decayVtx = (*part)->end_vertex();
         const HepMC::GenVertex * prodVtx  = (*part)->production_vertex();
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
index 8a61a16fca4a..80740b4f461f 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx
@@ -285,7 +285,6 @@ TruthParticleCnvTool::convert( const McEventCollection * mcCollection,
       ATH_MSG_ERROR("TruthParticle is not wrapping the GenParticle : " 
 		    << HepMC::barcode(hepMcPart) << " !!");
     }
-    //bcToMcPart[ hepMcPart->barcode() ] = mcPart;
     HepMcParticleLink mcLink( HepMC::barcode(hepMcPart), genEventIndex, EBC_MAINEVCOLL, HepMcParticleLink::IS_POSITION, sg ); // FIXME assuming that we are using the hard-scatter McEventCollection - would need to pass this info as an argument to the convert function.
     bcToMcPart[ mcLink.compress() ] = mcPart;
 
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/VtxBasedFilterTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/VtxBasedFilterTool.cxx
index 3ba9430a9030..46e310db2fd1 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/VtxBasedFilterTool.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/VtxBasedFilterTool.cxx
@@ -57,9 +57,6 @@ VtxBasedFilterTool::~VtxBasedFilterTool()
   ATH_MSG_DEBUG("Calling destructor");
 }
 
-/////////////////////////////////////////////////////////////////// 
-/// Const methods: 
-///////////////////////////////////////////////////////////////////
 
 /////////////////////////////////////////////////////////////////// 
 /// Non-const methods: 
@@ -117,13 +114,6 @@ StatusCode VtxBasedFilterTool::buildMcAod( const McEventCollection* in,
   return StatusCode::SUCCESS;
 }
 
-/////////////////////////////////////////////////////////////////// 
-/// Protected methods: 
-/////////////////////////////////////////////////////////////////// 
-
-/////////////////////////////////////////////////////////////////// 
-/// Const methods: 
-///////////////////////////////////////////////////////////////////
 
 StatusCode VtxBasedFilterTool::buildGenEvent( const HepMC::GenEvent* in,
 					      HepMC::GenEvent* out )
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx b/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx
index d889a933d07f..119d24a1c28f 100755
--- a/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx
+++ b/PhysicsAnalysis/TruthParticleID/McParticleUtils/src/McVtxFilter.cxx
@@ -124,8 +124,6 @@ McVtxFilter & McVtxFilter::operator=(const McVtxFilter &rhs)
   return *this;
 }
 
-/// Destructor
-///////////////
 
 /////////////////////////////////////////////////////////////////// 
 /// Const methods: 
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
index 628c472caefa..8d25c6114c0f 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
@@ -11,7 +11,6 @@
 // Trk
 #include "TrkToolInterfaces/IPRD_Provider.h"
 #include "TrkTruthTrackInterfaces/IPRD_TruthTrajectoryManipulator.h"
-//#include "TrkEventPrimitives/GlobalPosition.h"
 #include "TrkEventUtils/PrepRawDataComparisonFunction.h"
 // DetectorDescription
 #include "AtlasDetDescr/AtlasDetectorID.h"
-- 
GitLab


From e312df2dc1c11d29d2613e96a8f392c207963a1a Mon Sep 17 00:00:00 2001
From: Soshi Tsuno <soshi.tsuno@cern.ch>
Date: Tue, 5 Jan 2021 10:28:58 +0100
Subject: [PATCH 274/308] change reference version for pileup test

---
 Tools/PROCTools/python/RunTier0TestsTools.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index 2db0dbd6979b..8ccd831bb2fa 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -31,7 +31,7 @@ ciRefFileMap = {
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
                 'overlay-d1498-22.0'   : 'v38',
-                'overlay-d1592-22.0'   : 'v3',
+                'overlay-d1592-22.0'   : 'v2',
                 'overlay-bkg-21.0'     : 'v1',
                 'overlay-bkg-22.0'     : 'v4',
                 'dataoverlay-d1590-22.0' : 'v5',
-- 
GitLab


From c11a37327fcc06669bf914b2c294967e48e9a330 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 11:20:21 +0100
Subject: [PATCH 275/308] Minor fixes in TEvent

---
 Control/xAODRootAccess/Root/TEvent.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Control/xAODRootAccess/Root/TEvent.cxx b/Control/xAODRootAccess/Root/TEvent.cxx
index 71b4b7090f09..2a4179466631 100644
--- a/Control/xAODRootAccess/Root/TEvent.cxx
+++ b/Control/xAODRootAccess/Root/TEvent.cxx
@@ -305,8 +305,8 @@ namespace xAOD {
          // Get the type:
          ::TClass* cl =
               ::TClass::GetClass( ef_itr->second.className().c_str() );
-         const std::type_info* ti = cl->GetTypeInfo();
-         if( ( ! cl->IsLoaded() ) || ( ! ti ) ) {
+         const std::type_info* ti = ( cl ? cl->GetTypeInfo() : nullptr );
+         if( ( ! cl ) || ( ! cl->IsLoaded() ) || ( ! ti ) ) {
             Warning( "xAOD::TEvent::dump",
                      "Unknown type (%s) found in the event format",
                      ef_itr->second.className().c_str() );
@@ -424,7 +424,7 @@ namespace xAOD {
       }
 
       // Check if the EventFormat branch is available:
-      static const std::string eventFormatBranchName =
+      const std::string eventFormatBranchName =
          Utils::getFirstBranchMatch( m_inMetaTree, "EventFormat");
       if( ! m_inMetaTree->GetBranch( eventFormatBranchName.c_str() ) ) {
          // This can happen when the file was produced by an Athena job that
-- 
GitLab


From 0db1086186dc2801e077bd08449774bdcbc4d23c Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 11:32:30 +0100
Subject: [PATCH 276/308] Update xAODRootAccess proxydict test

---
 .../xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx
index d4ef762974ab..a89c2e8801d1 100644
--- a/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx
+++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx
@@ -65,7 +65,7 @@ int main() {
    // The auxiliary variable to access later on. Tried to select something
    // that should be a dynamic variable in any type of input file.
    static const SG::auxid_t auxid =
-      SG::AuxTypeRegistry::instance().getAuxID< float >( "ptcone20" );
+      SG::AuxTypeRegistry::instance().getAuxID< float >( "ptvarcone20" );
    // The clid for the auxiliary stores.
    static const CLID auxClid = ClassID_traits< SG::IConstAuxStore >::ID();
 
-- 
GitLab


From ac9cb2b18315d30bbae825d4141fc1507a537703 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 10:52:46 +0100
Subject: [PATCH 277/308] Fix FileMetaData writing test outside Athena

---
 Control/AthenaConfiguration/python/AllConfigFlags.py       | 2 ++
 Event/xAOD/xAODMetaDataCnv/python/TestWriteFileMetaData.py | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py
index 5025f59995a8..8cbe2f60e718 100644
--- a/Control/AthenaConfiguration/python/AllConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AllConfigFlags.py
@@ -81,6 +81,8 @@ def _createCfgFlags():
             return "AthSimulation"
         if "AthGeneration_DIR" in os.environ:
             return "AthGeneration"
+        if "AthAnalysis_DIR" in os.environ:
+            return "AthAnalysis"
         #TODO expand this method.
         return "Athena"
     acf.addFlag('Common.Project', _checkProject())
diff --git a/Event/xAOD/xAODMetaDataCnv/python/TestWriteFileMetaData.py b/Event/xAOD/xAODMetaDataCnv/python/TestWriteFileMetaData.py
index a2e4c548764c..917276fa7582 100644
--- a/Event/xAOD/xAODMetaDataCnv/python/TestWriteFileMetaData.py
+++ b/Event/xAOD/xAODMetaDataCnv/python/TestWriteFileMetaData.py
@@ -23,7 +23,7 @@ def writeFileMetaData(flags):
 
     accumulator.merge(
         xAODEventInfoCnvConfig.EventInfoCnvAlgCfg(
-            flags=flags, inputKey="",
+            flags=flags, inputKey="", disableBeamSpot=flags.Common.Project!="Athena"
         )
     )
 
-- 
GitLab


From 47f80dd9af70326973b24de27749cf321adc02e3 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 12:43:47 +0100
Subject: [PATCH 278/308] Adapt TauTruthMatchingTool for DAOD_PHYS

---
 .../TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx    | 6 +++---
 .../TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx      | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx
index 8de567057700..f7a8c104d090 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx
@@ -75,11 +75,11 @@ TauTruthMatchingTool::getTruth(const xAOD::TauJet& xTau,
 
   // if matched to a truth tau return its pointer, else return a null pointer
   static SG::AuxElement::ConstAccessor<char> accIsTruthMatched("IsTruthMatched");
-  if ((bool)accIsTruthMatched(xTau))
+  static SG::AuxElement::ConstAccessor< ElementLink< xAOD::TruthParticleContainer >  > accTruthTau("truthParticleLink");
+  if ((accIsTruthMatched.isAvailable(xTau) && accIsTruthMatched(xTau)) || accTruthTau.isAvailable(xTau))
   {
     if (m_bWriteTruthTaus or m_bTruthTauAvailable)
     {
-      static SG::AuxElement::ConstAccessor< ElementLink< xAOD::TruthParticleContainer >  > accTruthTau("truthParticleLink");
       if (accTruthTau(xTau).isValid())
       {
         return *accTruthTau(xTau);
@@ -340,7 +340,7 @@ StatusCode TauTruthMatchingTool::findTruthTau(const xAOD::TauJet& xTau,
 {
   // check if decorations were already added to the first passed tau
   if (!m_bIsTruthMatchedAvailable.isValid()) {
-    bool avail = xTau.isAvailable<char>("IsTruthMatched");
+    bool avail = xTau.isAvailable<char>("IsTruthMatched") || xTau.isAvailable<ElementLink< xAOD::TruthParticleContainer >>("truthParticleLink");
     m_bIsTruthMatchedAvailable.set (avail);
   }
   if (*m_bIsTruthMatchedAvailable.ptr())
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
index a4f0a384c004..eb65cc8ee14b 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/test/ut_TauAnalysisTools_test.cxx
@@ -76,6 +76,7 @@ int main( int argc, char* argv[] )
   // ===========================================================================
   ToolHandle<TauAnalysisTools::ITauTruthMatchingTool> T2MT( "TauAnalysisTools::TauTruthMatchingTool/TauTruthMatchingTool");
   ANA_CHECK(AthAnalysisHelper::setProperty(T2MT, "WriteTruthTaus", true));
+  ANA_CHECK(AthAnalysisHelper::setProperty(T2MT, "TruthJetContainerName", "AntiKt4TruthDressedWZJets"));
   ANA_CHECK(T2MT.retrieve());
 
   // ===========================================================================
@@ -117,7 +118,8 @@ int main( int argc, char* argv[] )
                     << ", prong = " << int(xTau->nTracks())
                     << ", charge = " << int(xTau->charge()));
 
-      if ((bool)xTau->auxdata<char>("IsTruthMatched") && (xTruthTau != nullptr))
+      bool avail = xTau->isAvailable<char>("IsTruthMatched") || xTau->isAvailable<ElementLink< xAOD::TruthParticleContainer >>("truthParticleLink");
+      if (avail && (xTruthTau != nullptr))
       {
         if (xTruthTau->isTau())
         {
-- 
GitLab


From be07a6df679e459156995783ea68d6f13fdd3ea8 Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 13:10:42 +0100
Subject: [PATCH 279/308] Disable IOVDbSvc test in AthAnalysis

---
 Database/IOVDbSvc/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt
index d82a9365547c..622f884c1d7a 100644
--- a/Database/IOVDbSvc/CMakeLists.txt
+++ b/Database/IOVDbSvc/CMakeLists.txt
@@ -183,7 +183,7 @@ atlas_add_test( Base64Codec_test
    LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES}
    POST_EXEC_SCRIPT "nopost.sh" )
 
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
    atlas_add_test( IOVDbSvcCfgTest
       SCRIPT python -m IOVDbSvc.IOVDbSvcConfig
       POST_EXEC_SCRIPT "nopost.sh" )
-- 
GitLab


From 6abadfe7a539d0fc409e657d7755bd452c5ddc2a Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 13:25:41 +0100
Subject: [PATCH 280/308] Disable LumiBlockComps tests in AthAnalysis

---
 LumiBlock/LumiBlockComps/CMakeLists.txt | 32 ++++++++++++-------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/LumiBlock/LumiBlockComps/CMakeLists.txt b/LumiBlock/LumiBlockComps/CMakeLists.txt
index b28292f86322..0176ae6ca729 100644
--- a/LumiBlock/LumiBlockComps/CMakeLists.txt
+++ b/LumiBlock/LumiBlockComps/CMakeLists.txt
@@ -61,24 +61,24 @@ if( NOT XAOD_ANALYSIS )
    atlas_add_test( TrigLiveFractionCondAlg_test
       SOURCES test/TrigLiveFractionCondAlg_test.cxx
       LINK_LIBRARIES GaudiKernel LumiBlockData LumiBlockCompsLib TestTools )
-endif()
 
-atlas_add_test( LuminosityCondAlgConfig_test
-                SCRIPT python -m LumiBlockComps.LuminosityCondAlgConfig
-                LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
+   atlas_add_test( LuminosityCondAlgConfig_test
+                   SCRIPT python -m LumiBlockComps.LuminosityCondAlgConfig
+                   LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
 
-atlas_add_test( LBDurationCondAlgConfig_test
-                SCRIPT python -m LumiBlockComps.LBDurationCondAlgConfig
-                LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
+   atlas_add_test( LBDurationCondAlgConfig_test
+                   SCRIPT python -m LumiBlockComps.LBDurationCondAlgConfig
+                   LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
 
-atlas_add_test( TrigLiveFractionCondAlgConfig_test
-                SCRIPT python -m LumiBlockComps.TrigLiveFractionCondAlgConfig
-                LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
+   atlas_add_test( TrigLiveFractionCondAlgConfig_test
+                   SCRIPT python -m LumiBlockComps.TrigLiveFractionCondAlgConfig
+                   LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
 
-atlas_add_test( LumiBlockMuWriterConfig_test
-                SCRIPT python -m LumiBlockComps.LumiBlockMuWriterConfig
-                LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
+   atlas_add_test( LumiBlockMuWriterConfig_test
+                   SCRIPT python -m LumiBlockComps.LumiBlockMuWriterConfig
+                   LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
 
-atlas_add_test( BunchCrossingCondAlg
-                SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/BunchCrossingCondAlgTest.py
-                POST_EXEC_SCRIPT " /usr/bin/diff BCData.txt ${CMAKE_CURRENT_SOURCE_DIR}/share/BCData.txt.ref > BC_diff.log " )
+   atlas_add_test( BunchCrossingCondAlg
+                   SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/BunchCrossingCondAlgTest.py
+                   POST_EXEC_SCRIPT " /usr/bin/diff BCData.txt ${CMAKE_CURRENT_SOURCE_DIR}/share/BCData.txt.ref > BC_diff.log " )
+endif()
-- 
GitLab


From 6854fa4d992c26d49398857b68caf2b1b58a6f62 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Tue, 5 Jan 2021 13:43:49 +0100
Subject: [PATCH 281/308] Switch to use module, rather than detectorelement
 context for the NSW tables

The MM and sTGC tables were generated using the detector element context
for development, but the clients would prefer to have module context
tables.
---
 .../MuonDetDescr/MuonRegionSelector/src/MM_RegSelCondAlg.cxx  | 4 ++--
 .../MuonRegionSelector/src/sTGC_RegSelCondAlg.cxx             | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MM_RegSelCondAlg.cxx b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MM_RegSelCondAlg.cxx
index fb5a9645592f..67fc49c49ad8 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MM_RegSelCondAlg.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MM_RegSelCondAlg.cxx
@@ -87,10 +87,10 @@ std::unique_ptr<RegSelSiLUT> MM_RegSelCondAlg::createTable( const EventContext&
   std::vector<Identifier>::const_iterator  idlast =  helper->module_end();
  
   /// do we want the module context ...
-  ///  const IdContext ModuleContext = helper->module_context();
+  const IdContext ModuleContext = helper->module_context();
   
   /// or the detector element context ? Keep them both untill we are sure 
-  const IdContext ModuleContext = helper->detectorElement_context();
+  /// const IdContext ModuleContext = helper->detectorElement_context();
 
   ATH_MSG_DEBUG("createTable()");
   
diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/sTGC_RegSelCondAlg.cxx b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/sTGC_RegSelCondAlg.cxx
index 65195f931728..a35138ea4758 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/sTGC_RegSelCondAlg.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/sTGC_RegSelCondAlg.cxx
@@ -81,10 +81,10 @@ std::unique_ptr<RegSelSiLUT> sTGC_RegSelCondAlg::createTable( const EventContext
   std::vector<Identifier>::const_iterator  idlast =  helper->module_end();
  
   /// do we want the module context ...
-  ///  const IdContext ModuleContext = helper->module_context();
+  const IdContext ModuleContext = helper->module_context();
   
   /// or the detector element context ? Keep them both untill we are sure 
-  const IdContext ModuleContext = helper->detectorElement_context();
+  /// const IdContext ModuleContext = helper->detectorElement_context();
 
   ATH_MSG_DEBUG("createTable()");
   
-- 
GitLab


From d07343db5248979b4636c91da304b9120db7627b Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 13:42:41 +0100
Subject: [PATCH 282/308] Disable some e/gamma tests in AthAnalysis

---
 .../ElectronPhotonID/PhotonVertexSelection/CMakeLists.txt   | 6 ++++--
 .../ElectronPhotonID/egammaMVACalibAnalysis/CMakeLists.txt  | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonVertexSelection/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/PhotonVertexSelection/CMakeLists.txt
index 03a6d01115cc..9cd1a70bd5a8 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonVertexSelection/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonVertexSelection/CMakeLists.txt
@@ -28,5 +28,7 @@ atlas_add_dictionary( PhotonVertexSelectionDict
    LINK_LIBRARIES PhotonVertexSelectionLib )
 
 # Test(s) in the package:
-atlas_add_test( PhotonVertexSelection_test
-   SCRIPT test/testPhotonVertexSelection.py )
+if( NOT XAOD_ANALYSIS )
+   atlas_add_test( PhotonVertexSelection_test
+      SCRIPT test/testPhotonVertexSelection.py )
+endif()
diff --git a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/CMakeLists.txt
index 035ff8a01ef3..e613f35f2965 100644
--- a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/CMakeLists.txt
@@ -47,7 +47,7 @@ endif()
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
-if (NOT XAOD_STANDALONE)
+if (NOT XAOD_STANDALONE AND NOT XAOD_ANALYSIS)
   atlas_add_test( flake8_test
                   SCRIPT ${ATLAS_FLAKE8} ${CMAKE_CURRENT_SOURCE_DIR}/test
                   POST_EXEC_SCRIPT nopost.sh )
-- 
GitLab


From 29be65d0940cbd32bd8572f3684e5b9547f95e9d Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 13:43:02 +0100
Subject: [PATCH 283/308] Disable some jet tests in AthAnalysis

---
 Reconstruction/Jet/JetRec/CMakeLists.txt          | 2 +-
 Reconstruction/Jet/JetReclustering/CMakeLists.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Reconstruction/Jet/JetRec/CMakeLists.txt b/Reconstruction/Jet/JetRec/CMakeLists.txt
index c37361923ea8..c551d427310a 100644
--- a/Reconstruction/Jet/JetRec/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRec/CMakeLists.txt
@@ -87,7 +87,7 @@ atlas_add_test(JetClustererTest
     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GTEST_LIBRARIES} JetRecLib )
 
-if ( NOT GENERATIONBASE AND NOT XAOD_STANDALONE )
+if ( NOT GENERATIONBASE AND NOT XAOD_STANDALONE AND NOT XAOD_ANALYSIS )
    atlas_add_test(JetRecAlg_Test SCRIPT share/JetRecAlgTestCfg.py )
 endif()
 
diff --git a/Reconstruction/Jet/JetReclustering/CMakeLists.txt b/Reconstruction/Jet/JetReclustering/CMakeLists.txt
index 2290702cc364..2e8550ea5b07 100644
--- a/Reconstruction/Jet/JetReclustering/CMakeLists.txt
+++ b/Reconstruction/Jet/JetReclustering/CMakeLists.txt
@@ -34,7 +34,7 @@ atlas_add_dictionary( JetReclusteringDict
    LINK_LIBRARIES JetReclusteringLib )
 
 # Test(s) in the package:
-if( NOT XAOD_STANDALONE )
+if( NOT XAOD_STANDALONE AND NOT XAOD_ANALYSIS )
    atlas_add_test( ut_JetReclusteringTool_test
       SOURCES test/ut_JetReclusteringTool_test.cxx
       LINK_LIBRARIES xAODRootAccess AsgTools JetInterface xAODJet
-- 
GitLab


From 370b972931a1e82bafd4d289e85a429db6e07db4 Mon Sep 17 00:00:00 2001
From: Walter Lampl <Walter.Lampl@cern.ch>
Date: Tue, 5 Jan 2021 14:41:44 +0100
Subject: [PATCH 284/308] move code for LArFebHeader reading into separate
 function to avoid code-duplication

---
 .../LArByteStream/src/LArFebHeaderReader.cxx  | 54 +++++++++++++++++++
 .../LArByteStream/src/LArFebHeaderReader.h    | 27 ++++++++++
 .../src/LArRawCalibDataReadingAlg.cxx         | 42 ++-------------
 .../src/LArRawDataReadingAlg.cxx              | 43 ++-------------
 4 files changed, 88 insertions(+), 78 deletions(-)
 create mode 100644 LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.cxx
 create mode 100644 LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.h

diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.cxx b/LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.cxx
new file mode 100644
index 000000000000..6a7add13835f
--- /dev/null
+++ b/LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.cxx
@@ -0,0 +1,54 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRawEvent/LArFebHeader.h"
+#include "LArByteStream/LArRodBlockStructure.h"
+#include "LArFebHeaderReader.h"
+
+
+void LArFebHeaderReader::fillFebHeader(LArFebHeader* larFebHeader,           //output
+				       const LArRodBlockStructure* rodBlock, //input 
+				       const ROBFragment& rob) {             //input   
+  larFebHeader->SetFormatVersion(rob.rod_version());
+  larFebHeader->SetSourceId(rob.rod_source_id());
+  larFebHeader->SetRunNumber(rob.rod_run_no());
+  larFebHeader->SetELVL1Id(rob.rod_lvl1_id());
+  larFebHeader->SetBCId(rob.rod_bc_id());
+  larFebHeader->SetLVL1TigType(rob.rod_lvl1_trigger_type());
+  larFebHeader->SetDetEventType(rob.rod_detev_type());
+  
+  //set DSP data
+  const unsigned nsample=rodBlock->getNumberOfSamples();
+  larFebHeader->SetRodStatus(rodBlock->getStatus());
+  larFebHeader->SetDspCodeVersion(rodBlock->getDspCodeVersion()); 
+  larFebHeader->SetDspEventCounter(rodBlock->getDspEventCounter()); 
+  larFebHeader->SetRodResults1Size(rodBlock->getResults1Size()); 
+  larFebHeader->SetRodResults2Size(rodBlock->getResults2Size()); 
+  larFebHeader->SetRodRawDataSize(rodBlock->getRawDataSize()); 
+  larFebHeader->SetNbSweetCells1(rodBlock->getNbSweetCells1()); 
+  larFebHeader->SetNbSweetCells2(rodBlock->getNbSweetCells2()); 
+  larFebHeader->SetNbSamples(nsample); 
+  larFebHeader->SetOnlineChecksum(rodBlock->onlineCheckSum());
+  larFebHeader->SetOfflineChecksum(rodBlock->offlineCheckSum());
+
+  if(!rodBlock->hasControlWords()) {
+    larFebHeader->SetFebELVL1Id(rob.rod_lvl1_id());
+    larFebHeader->SetFebBCId(rob.rod_bc_id());
+  } else {
+    const uint16_t evtid = rodBlock->getCtrl1(0) & 0x1f;
+    const uint16_t bcid  = rodBlock->getCtrl2(0) & 0x1fff;
+    larFebHeader->SetFebELVL1Id(evtid);
+    larFebHeader->SetFebBCId(bcid);
+    for(int iadc=0;iadc<16;iadc++) {
+      larFebHeader->SetFebCtrl1(rodBlock->getCtrl1(iadc));
+      larFebHeader->SetFebCtrl2(rodBlock->getCtrl2(iadc));
+      larFebHeader->SetFebCtrl3(rodBlock->getCtrl3(iadc));
+    }
+    for(unsigned int i = 0; i<nsample; i++ ) {
+      larFebHeader->SetFebSCA(rodBlock->getRadd(0,i) & 0xff);
+    }
+  }//end else no control words
+
+  return;
+}
diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.h b/LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.h
new file mode 100644
index 000000000000..81315eace8fc
--- /dev/null
+++ b/LArCalorimeter/LArCnv/LArByteStream/src/LArFebHeaderReader.h
@@ -0,0 +1,27 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "ByteStreamData/RawEvent.h"
+
+class LArFebHeader;
+class LArRodBlockStructure;
+
+namespace LArFebHeaderReader{
+
+  using  OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+
+    /**
+   * @brief Fill info for one FEB Header
+   * @param lfh Pointer ot the FEB header obj to fill
+   * @param bl Pointer to the input RodBlockStructure
+   * @param robFrag Pointer to the input ROB Fragment
+   *
+   * Extracts a bunch of control words, etc from the  
+   * byte stream objects LArRodBlockStructure and 
+   * ROBFragment and stores them in a FebHeader object
+   *
+   */
+  void fillFebHeader(LArFebHeader* lfh, const LArRodBlockStructure* bl, const ROBFragment& robFrag);
+} //namespace
+
diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/LArRawCalibDataReadingAlg.cxx b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawCalibDataReadingAlg.cxx
index b46998e76533..9a5f8f256e23 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/src/LArRawCalibDataReadingAlg.cxx
+++ b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawCalibDataReadingAlg.cxx
@@ -17,6 +17,8 @@
 #include "LArByteStream/LArRodBlockCalibrationV3.h"
 #include "LArByteStream/LArRodBlockTransparentV0.h"
 
+#include "LArFebHeaderReader.h"
+
 LArRawCalibDataReadingAlg::LArRawCalibDataReadingAlg(const std::string& name, ISvcLocator* pSvcLocator) :  
   AthReentrantAlgorithm(name, pSvcLocator) {}
 
@@ -265,45 +267,7 @@ StatusCode LArRawCalibDataReadingAlg::execute(const EventContext& ctx) const {
       //Decode FebHeaders (if requested)
       if (m_doFebHeaders) {
 	std::unique_ptr<LArFebHeader> larFebHeader(new LArFebHeader(fId));
-	larFebHeader->SetFormatVersion(rob.rod_version());
-	larFebHeader->SetSourceId(rob.rod_source_id());
-	larFebHeader->SetRunNumber(rob.rod_run_no());
-	larFebHeader->SetELVL1Id(rob.rod_lvl1_id());
-	larFebHeader->SetBCId(rob.rod_bc_id());
-	larFebHeader->SetLVL1TigType(rob.rod_lvl1_trigger_type());
-	larFebHeader->SetDetEventType(rob.rod_detev_type());
-  
-	//set DSP data
-	const unsigned nsample=rodBlock->getNumberOfSamples();
-	larFebHeader->SetRodStatus(rodBlock->getStatus());
-	larFebHeader->SetDspCodeVersion(rodBlock->getDspCodeVersion()); 
-	larFebHeader->SetDspEventCounter(rodBlock->getDspEventCounter()); 
-	larFebHeader->SetRodResults1Size(rodBlock->getResults1Size()); 
-	larFebHeader->SetRodResults2Size(rodBlock->getResults2Size()); 
-	larFebHeader->SetRodRawDataSize(rodBlock->getRawDataSize()); 
-	larFebHeader->SetNbSweetCells1(rodBlock->getNbSweetCells1()); 
-	larFebHeader->SetNbSweetCells2(rodBlock->getNbSweetCells2()); 
-	larFebHeader->SetNbSamples(nsample); 
-	larFebHeader->SetOnlineChecksum(rodBlock->onlineCheckSum());
-	larFebHeader->SetOfflineChecksum(rodBlock->offlineCheckSum());
-
-	if(!rodBlock->hasControlWords()) {
-	  larFebHeader->SetFebELVL1Id(rob.rod_lvl1_id());
-	  larFebHeader->SetFebBCId(rob.rod_bc_id());
-	} else {
-	  const uint16_t evtid = rodBlock->getCtrl1(0) & 0x1f;
-	  const uint16_t bcid  = rodBlock->getCtrl2(0) & 0x1fff;
-	  larFebHeader->SetFebELVL1Id(evtid);
-	  larFebHeader->SetFebBCId(bcid);
-	  for(int iadc=0;iadc<16;iadc++) {
-	    larFebHeader->SetFebCtrl1(rodBlock->getCtrl1(iadc));
-	    larFebHeader->SetFebCtrl2(rodBlock->getCtrl2(iadc));
-	    larFebHeader->SetFebCtrl3(rodBlock->getCtrl3(iadc));
-	  }
-	  for(unsigned int i = 0; i<nsample; i++ ) {
-	    larFebHeader->SetFebSCA(rodBlock->getRadd(0,i) & 0xff);
-	  }
-	}//end else no control words
+	LArFebHeaderReader::fillFebHeader(larFebHeader.get(),rodBlock.get(),rob);
 	febHeaders->push_back(std::move(larFebHeader));
       }//end if m_doFebHeaders
 
diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx
index a2eb93e5d53b..7b93f2b3c1ac 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx
+++ b/LArCalorimeter/LArCnv/LArByteStream/src/LArRawDataReadingAlg.cxx
@@ -15,6 +15,9 @@
 #include "LArByteStream/LArRodBlockPhysicsV5.h"
 #include "LArByteStream/LArRodBlockPhysicsV6.h"
 
+#include "LArFebHeaderReader.h"
+
+
 LArRawDataReadingAlg::LArRawDataReadingAlg(const std::string& name, ISvcLocator* pSvcLocator) :  
   AthReentrantAlgorithm(name, pSvcLocator) {}
 
@@ -212,45 +215,7 @@ StatusCode LArRawDataReadingAlg::execute(const EventContext& ctx) const {
       //Decode FebHeaders (if requested)
       if (m_doFebHeaders) {
 	std::unique_ptr<LArFebHeader> larFebHeader(new LArFebHeader(fId));
-	larFebHeader->SetFormatVersion(rob.rod_version());
-	larFebHeader->SetSourceId(rob.rod_source_id());
-	larFebHeader->SetRunNumber(rob.rod_run_no());
-	larFebHeader->SetELVL1Id(rob.rod_lvl1_id());
-	larFebHeader->SetBCId(rob.rod_bc_id());
-	larFebHeader->SetLVL1TigType(rob.rod_lvl1_trigger_type());
-	larFebHeader->SetDetEventType(rob.rod_detev_type());
-  
-	//set DSP data
-	const unsigned nsample=rodBlock->getNumberOfSamples();
-	larFebHeader->SetRodStatus(rodBlock->getStatus());
-	larFebHeader->SetDspCodeVersion(rodBlock->getDspCodeVersion()); 
-	larFebHeader->SetDspEventCounter(rodBlock->getDspEventCounter()); 
-	larFebHeader->SetRodResults1Size(rodBlock->getResults1Size()); 
-	larFebHeader->SetRodResults2Size(rodBlock->getResults2Size()); 
-	larFebHeader->SetRodRawDataSize(rodBlock->getRawDataSize()); 
-	larFebHeader->SetNbSweetCells1(rodBlock->getNbSweetCells1()); 
-	larFebHeader->SetNbSweetCells2(rodBlock->getNbSweetCells2()); 
-	larFebHeader->SetNbSamples(nsample); 
-	larFebHeader->SetOnlineChecksum(rodBlock->onlineCheckSum());
-	larFebHeader->SetOfflineChecksum(rodBlock->offlineCheckSum());
-
-	if(!rodBlock->hasControlWords()) {
-	  larFebHeader->SetFebELVL1Id(rob.rod_lvl1_id());
-	  larFebHeader->SetFebBCId(rob.rod_bc_id());
-	} else {
-	  const uint16_t evtid = rodBlock->getCtrl1(0) & 0x1f;
-	  const uint16_t bcid  = rodBlock->getCtrl2(0) & 0x1fff;
-	  larFebHeader->SetFebELVL1Id(evtid);
-	  larFebHeader->SetFebBCId(bcid);
-	  for(int iadc=0;iadc<16;iadc++) {
-	    larFebHeader->SetFebCtrl1(rodBlock->getCtrl1(iadc));
-	    larFebHeader->SetFebCtrl2(rodBlock->getCtrl2(iadc));
-	    larFebHeader->SetFebCtrl3(rodBlock->getCtrl3(iadc));
-	  }
-	  for(unsigned int i = 0; i<nsample; i++ ) {
-	    larFebHeader->SetFebSCA(rodBlock->getRadd(0,i) & 0xff);
-	  }
-	}//end else no control words
+	LArFebHeaderReader::fillFebHeader(larFebHeader.get(),rodBlock.get(),rob);
 	febHeaders->push_back(std::move(larFebHeader));
       }//end if m_doFebHeaders
 
-- 
GitLab


From f3128e84ce6f3ccf91a2cc11e6b5ba5d66774816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20K=C3=B6hler?= <nicolas.koehler@cern.ch>
Date: Tue, 5 Jan 2021 15:00:40 +0100
Subject: [PATCH 285/308] manual sweep of 37073

---
 .../CscCalibAlgs/share/CscCalcPedMon.py       | 43 +++++--------------
 .../CscCalibAlgs/share/CscCalcSlopeMon.py     | 26 +++++------
 .../share/CscCalibCommonOptions.py            | 12 +++++-
 .../python/HLTMenuConfig/Muon/generateMuon.py | 17 ++++++++
 4 files changed, 48 insertions(+), 50 deletions(-)

diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py
index 19cbbfd44be6..897f84aaa4ad 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcPedMon.py
@@ -1,3 +1,5 @@
+#  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+
 #**************************************************************
 #
 #       Csc Pedestal Calibration
@@ -5,37 +7,7 @@
 #==============================================================
 
 runNumber = 2147483647
-#Input files:
-#prelimDir = "/raid01/lampen/testarea/Calib/August09CosmicRun/data/preliminaryData/"
 
-#AugustRunDir = "rfio:/castor/cern.ch/grid/atlas/DAQ/muon/csc/00124401/"
-#myInputFiles = [
-#    AugustRunDir + 'data_test.00124401.calibration_ped.daq.RAW._lb0000._CSC-EB._0001.data',
-#        AugustRunDir + 'data_test.00124401.calibration_ped.daq.RAW._lb0000._CSC-EB._0002.data',
-#    AugustRunDir + 'data_test.00124401.calibration_ped.daq.RAW._lb0000._CSC-EB._0003.data',
-#    ]
-
-#SeptRunDir = 'rfio:/castor/cern.ch/grid/atlas/DAQ/muon/csc/00129083/'
-#myInputFiles = [ 
-#    SeptRunDir + 'data_test.00129083.calibration_ped.daq.RAW._lb0000._CSC-EB._0001.data',
-#    SeptRunDir + 'data_test.00129083.calibration_ped.daq.RAW._lb0000._CSC-EB._0002.data',
-#    SeptRunDir + 'data_test.00129083.calibration_ped.daq.RAW._lb0000._CSC-EB._0003.data', 
-#    ]
-
-#OctRunDir = '/raid02/lampen/datasets/csc/pedRuns/oct/raw/'
-#OctRUn1
-#myInputFiles = [ 
-#    OctRunDir + 'data_test.00132435.calibration_ped.daq.RAW._lb0000._CSC-EB._0001.data',
-#    OctRunDir + 'data_test.00132435.calibration_ped.daq.RAW._lb0000._CSC-EB._0002.data',
-#    OctRunDir + 'data_test.00132435.calibration_ped.daq.RAW._lb0000._CSC-EB._0003.data'
-#    ]
-
-#OctRun2
-#myInputFiles = [ 
-#    OctRunDir + 'data_test.00133116.calibration_ped.daq.RAW._lb0000._CSC-EB._0001.data',
-#OctRunDir + 'data_test.00133116.calibration_ped.daq.RAW._lb0000._CSC-EB._0002.data',
-#OctRunDir + 'data_test.00133116.calibration_ped.daq.RAW._lb0000._CSC-EB._0003.data'
-#]
 NovRunDir="/raid02/lampen/datasets/csc/pedRuns/nov/raw/*.data"
 
 import glob
@@ -125,8 +97,15 @@ printfunc (MuonCscRawDataProviderTool)
 
 # --- RawData Provider
 from MuonByteStream.MuonByteStreamConf import Muon__CscRawDataProvider
-topSequence += Muon__CscRawDataProvider(name         = "MuonCscRawDataProvider",
-    ProviderTool = ToolSvc.MuonCscRawDataProviderTool)
+cscRawDataProvider = Muon__CscRawDataProvider(name    = "MuonCscRawDataProvider",
+                                              ProviderTool = ToolSvc.MuonCscRawDataProviderTool)
+
+
+from RegionSelector.RegSelToolConfig import makeRegSelTool_CSC
+cscRawDataProvider.RegionSelectionTool = makeRegSelTool_CSC()
+
+topSequence += cscRawDataProvider
+
 printfunc (topSequence.MuonCscRawDataProvider)
 
 # --- BS Converter 
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py
index d549f9c85cec..37061490c33c 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalcSlopeMon.py
@@ -1,3 +1,5 @@
+#  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+
 runNumber = 2147483647
 
 if('inputPat' not in dir()):
@@ -6,20 +8,6 @@ if('inputPat' not in dir()):
 import glob
 myInputFiles = glob.glob(inputPat)
 
-#Lots of pulses
-#defInputFile = "/afs/cern.ch/user/l/lampen/public/bytestreamTest/daq.cal.0079571.No.Streaming.LB0000.CSC-EB._0001.data"
-#myGeometryTag = 'ATLAS-GEO-01-00-00'
-#myIsCosmics = False
-#Old Cosmics
-#defInputFile = "rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001209_file01.data"
-#myGeometryTag = "MuonSpectrometer-CSC-CS-00"
-#myIsCosmics = True
-#Cosmics
-#defInputFile = "rfio:/castor/cern.ch/atlas/muon/CSC/daq_CSC-EB-RCD__0001853_file01.data"
-#myGeometryTag = "MuonSpectrometer-CSC-CS-00"
-#myIsCosmics = True
-############################
-
 #######################################################################
 #Input/Ouptut job settings. 
 #Command line options can give an input file as well as an output prefix
@@ -91,8 +79,14 @@ printfunc (MuonCscRawDataProviderTool)
 
 # --- RawData Provider
 from MuonByteStream.MuonByteStreamConf import Muon__CscRawDataProvider
-topSequence += Muon__CscRawDataProvider(name         = "MuonCscRawDataProvider",
-    ProviderTool = ToolSvc.MuonCscRawDataProviderTool)
+cscRawDataProvider = Muon__CscRawDataProvider(name         = "MuonCscRawDataProvider",
+                                              ProviderTool = ToolSvc.MuonCscRawDataProviderTool)
+
+from RegionSelector.RegSelToolConfig import makeRegSelTool_CSC
+cscRawDataProvider.RegionSelectionTool = makeRegSelTool_CSC()
+
+topSequence += cscRawDataProvider
+
 printfunc (topSequence.MuonCscRawDataProvider)
 
 # --- BS Converter 
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py
index 0e3953526aef..e92557f6881f 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibAlgs/share/CscCalibCommonOptions.py
@@ -1,3 +1,5 @@
+#  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+
 #**************************************************************
 #
 #       Read in ByteStream events, and Access CSC RDO
@@ -66,8 +68,14 @@ printfunc (MuonCscRawDataProviderTool)
 
 # load the CscRawDataProvider
 from MuonByteStream.MuonByteStreamConf import Muon__CscRawDataProvider
-topSequence += Muon__CscRawDataProvider(name         = "MuonCscRawDataProvider",
-                                    ProviderTool = ToolSvc.MuonCscRawDataProviderTool)
+cscDataProvider = Muon__CscRawDataProvider(name         = "MuonCscRawDataProvider",
+                                           ProviderTool = ToolSvc.MuonCscRawDataProviderTool)
+
+from RegionSelector.RegSelToolConfig import makeRegSelTool_CSC
+cscDataProvider.RegionSelectionTool = makeRegSelTool_CSC()
+
+topSequence += cscDataProvider
+
 printfunc (topSequence.MuonCscRawDataProvider)
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
index 747038c4ec9e..bf9e816007d7 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py
@@ -132,10 +132,24 @@ def MuonTrackParticleCnvCfg(flags, name = "MuonTrackParticleCnvAlg",**kwargs):
 
 def decodeCfg(flags, RoIs):
     acc = ComponentAccumulator()
+
+    from RegionSelector.RegSelToolConfig import regSelTool_RPC_Cfg
+    RegSelTool_RPC = acc.popToolsAndMerge(regSelTool_RPC_Cfg(flags))
+
+    from RegionSelector.RegSelToolConfig import regSelTool_TGC_Cfg
+    RegSelTool_TGC = acc.popToolsAndMerge(regSelTool_TGC_Cfg(flags))
+
+    from RegionSelector.RegSelToolConfig import regSelTool_MDT_Cfg
+    RegSelTool_MDT = acc.popToolsAndMerge(regSelTool_MDT_Cfg(flags))
+
+    from RegionSelector.RegSelToolConfig import regSelTool_CSC_Cfg
+    RegSelTool_CSC = acc.popToolsAndMerge(regSelTool_CSC_Cfg(flags))
+
     # Get RPC BS decoder
     from MuonConfig.MuonBytestreamDecodeConfig import RpcBytestreamDecodeCfg
     rpcAcc = RpcBytestreamDecodeCfg( flags, name = "RpcRawDataProvider_"+RoIs )
     rpcAcc.getEventAlgo("RpcRawDataProvider_"+RoIs).RoIs = RoIs
+    rpcAcc.getEventAlgo("RpcRawDataProvider_"+RoIs).RegionSelectionTool = RegSelTool_RPC
     acc.merge( rpcAcc )
 
     # Get RPC BS->RDO convertor
@@ -148,6 +162,7 @@ def decodeCfg(flags, RoIs):
     from MuonConfig.MuonBytestreamDecodeConfig import TgcBytestreamDecodeCfg
     tgcAcc = TgcBytestreamDecodeCfg( flags, name="TgcRawDataProvider_"+RoIs )
     tgcAcc.getEventAlgo("TgcRawDataProvider_"+RoIs).RoIs = RoIs
+    tgcAcc.getEventAlgo("TgcRawDataProvider_"+RoIs).RegionSelectionTool = RegSelTool_TGC
     acc.merge( tgcAcc )
 
     # Get TGC BS->RDO convertor
@@ -160,6 +175,7 @@ def decodeCfg(flags, RoIs):
     from MuonConfig.MuonBytestreamDecodeConfig import MdtBytestreamDecodeCfg
     mdtAcc = MdtBytestreamDecodeCfg( flags, name="MdtRawDataProvider_"+RoIs )
     mdtAcc.getEventAlgo("MdtRawDataProvider_"+RoIs).RoIs = RoIs
+    mdtAcc.getEventAlgo("MdtRawDataProvider_"+RoIs).RegionSelectionTool = RegSelTool_MDT
     acc.merge( mdtAcc )
 
     # Get MDT BS->RDO convertor
@@ -172,6 +188,7 @@ def decodeCfg(flags, RoIs):
     from MuonConfig.MuonBytestreamDecodeConfig import CscBytestreamDecodeCfg
     cscAcc = CscBytestreamDecodeCfg( flags, name="CscRawDataProvider_"+RoIs )
     cscAcc.getEventAlgo("CscRawDataProvider_"+RoIs).RoIs = RoIs
+    cscAcc.getEventAlgo("CscRawDataProvider_"+RoIs).RegionSelectionTool = RegSelTool_CSC
     acc.merge( cscAcc )
 
     # Get CSC BS->RDO convertor
-- 
GitLab


From 4cca56534299bf1baeb2fbf957388fcdcb80a7cc Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 5 Jan 2021 15:11:27 +0100
Subject: [PATCH 286/308] Egamma : Pass EventContext down the call chain (2nd
 pass)

---
 Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx      | 4 ++--
 Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx     | 4 ++--
 Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx       | 4 ++--
 Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx
index b0fdb0edc012..8d23ac6a8b5c 100644
--- a/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/EMVertexBuilder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -63,7 +63,7 @@ StatusCode EMVertexBuilder::execute(const EventContext& ctx) const
   }
 
   std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> verticesPair =
-    m_vertexFinderTool->findVertex(TPCol.cptr());
+    m_vertexFinderTool->findVertex(ctx,TPCol.cptr());
 
   if (!verticesPair.first || !verticesPair.second){
     ATH_MSG_ERROR("Null pointer to conversion container");
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx
index c9b19ab18a16..75011f7d99ce 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "egammaRecBuilder.h"
@@ -104,7 +104,7 @@ egammaRecBuilder::execute(const EventContext& ctx) const
   const size_t nTopo = topoclusters->size();
   egammaRecs->reserve(nTopo);
   for (size_t i(0); i < nTopo; i++) {
-    const ElementLink<xAOD::CaloClusterContainer> clusterLink(*topoclusters, i);
+    const ElementLink<xAOD::CaloClusterContainer> clusterLink(*topoclusters, i, ctx);
     const std::vector<ElementLink<xAOD::CaloClusterContainer>> ClusterLink{
       clusterLink
     };
diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
index d523fdb0e56b..8b0fdb2f16f4 100644
--- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "EMClusterTool.h"
@@ -192,7 +192,7 @@ EMClusterTool::setNewCluster(const EventContext& ctx,
   outputClusterContainer->push_back(cluster);
 
   // Set the link to the new cluster
-  ClusterLink_t clusterLink(cluster, *outputClusterContainer);
+  ClusterLink_t clusterLink(cluster, *outputClusterContainer, ctx);
   const std::vector<ClusterLink_t> clusterLinks{ clusterLink };
   eg->setCaloClusterLinks(clusterLinks);
 }
diff --git a/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
index 1b719045ede4..89a5c2360bde 100644
--- a/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMTrackMatchBuilder.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
  */
 
 // INCLUDE HEADER FILES:
@@ -137,7 +137,7 @@ EMTrackMatchBuilder::trackExecute(
     using EL = ElementLink<xAOD::TrackParticleContainer>;
     std::vector<EL> trackParticleLinks;
     trackParticleLinks.reserve(trkMatches.size());
-    const std::string key = EL(*trackPC, 0).dataID();
+    const std::string key = EL(*trackPC, 0, ctx).dataID();
     for (const TrackMatch& m : trkMatches) {
       ATH_MSG_DEBUG("Match  dR: " << m.dR << " second  dR: " << m.seconddR
                                   << " hasPix: " << m.hasPix
-- 
GitLab


From a1d082c72eb9f8a77ae9424d56cfd20009c7489c Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 15:39:08 +0100
Subject: [PATCH 287/308] Disable JobOptionsUnitTests in AthAnalysis

---
 Control/AthenaCommon/CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Control/AthenaCommon/CMakeLists.txt b/Control/AthenaCommon/CMakeLists.txt
index e0ffc081ed6b..78473d52f91b 100644
--- a/Control/AthenaCommon/CMakeLists.txt
+++ b/Control/AthenaCommon/CMakeLists.txt
@@ -29,8 +29,10 @@ atlas_add_test( AthAppMgrUnitTests SCRIPT test/test_AthAppMgrUnitTests.sh
 atlas_add_test( ConfigurableUnitTests SCRIPT test/test_ConfigurableUnitTests.sh
                 PROPERTIES TIMEOUT 300
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
-atlas_add_test( JobOptionsUnitTests SCRIPT test/test_JobOptionsUnitTests.sh
-                LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
+if (NOT XAOD_ANALYSIS)
+   atlas_add_test( JobOptionsUnitTests SCRIPT test/test_JobOptionsUnitTests.sh
+                   LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
+endif()
 atlas_add_test( JobPropertiesUnitTests SCRIPT test/test_JobPropertiesUnitTests.sh
                 LOG_IGNORE_PATTERN "Warning in <TFile::Init>: no StreamerInfo found|^Ran .* tests in" )
 atlas_add_test( KeyStoreUnitTests SCRIPT test/test_KeyStoreUnitTests.sh
-- 
GitLab


From fc07d1f4796d1627d236eb6f9b277fd14c02031d Mon Sep 17 00:00:00 2001
From: Tadej Novak <tadej.novak@cern.ch>
Date: Tue, 5 Jan 2021 13:57:07 +0100
Subject: [PATCH 288/308] Fix EventBookkeeperTools tests in AthAnalysis

---
 Event/EventBookkeeperTools/CMakeLists.txt              | 10 ++++++----
 Event/EventBookkeeperTools/python/CutFlowHelpers.py    |  8 ++++++--
 .../EventBookkeeperTools/share/TestCutFlowSvcOutput.py |  7 +++++--
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/Event/EventBookkeeperTools/CMakeLists.txt b/Event/EventBookkeeperTools/CMakeLists.txt
index 1ce5b56d3970..35d4ceee59b9 100644
--- a/Event/EventBookkeeperTools/CMakeLists.txt
+++ b/Event/EventBookkeeperTools/CMakeLists.txt
@@ -75,8 +75,10 @@ if( NOT XAOD_STANDALONE )
                    PROPERTIES TIMEOUT 300
                    POST_EXEC_SCRIPT nopost.sh )
 
-   atlas_add_test( CutFlowSvcOutputMP
-                   SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --nprocs=2
-                   PROPERTIES TIMEOUT 300
-                   POST_EXEC_SCRIPT nopost.sh )
+   if( NOT XAOD_ANALYSIS )
+      atlas_add_test( CutFlowSvcOutputMP
+                      SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --nprocs=2
+                      PROPERTIES TIMEOUT 300
+                      POST_EXEC_SCRIPT nopost.sh )
+   endif()
 endif()
diff --git a/Event/EventBookkeeperTools/python/CutFlowHelpers.py b/Event/EventBookkeeperTools/python/CutFlowHelpers.py
index deda3827fb64..2e6b78f02778 100644
--- a/Event/EventBookkeeperTools/python/CutFlowHelpers.py
+++ b/Event/EventBookkeeperTools/python/CutFlowHelpers.py
@@ -15,8 +15,12 @@ def GetCurrentStreamName( msg ):
         msg.info("Couldn't get input stream name from the RecFlags... trying AthFile directly.")
 
     from PyUtils.MetaReader import read_metadata
-    from AthenaCommon.AppMgr  import ServiceMgr as svcMgr
-    input_file = svcMgr.EventSelector.InputCollections[0]
+    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+    try:
+        input_file = svcMgr.EventSelector.InputCollections[0]
+    except AttributeError:
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        input_file = athenaCommonFlags.FilesInput()[0]
     metadata = read_metadata(input_file)
     metadata = metadata[input_file]  # promote all keys one level up
 
diff --git a/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py b/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py
index adf6506b2c8e..f595e41d00a6 100644
--- a/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py
+++ b/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py
@@ -43,8 +43,11 @@ from AthenaCommon.AppMgr import theApp
 import AthenaPoolCnvSvc.ReadAthenaPool  # noqa: F401
 
 # setup some configuration
-from RecExConfig.RecFlags import rec
-rec.mergingStreamName = 'Stream1'
+try:
+    from RecExConfig.RecFlags import rec
+    rec.mergingStreamName = 'Stream1'
+except ModuleNotFoundError:
+    pass
 
 # setup the CutFlowSvc and corresponding tools
 from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc
-- 
GitLab


From 8e3f0fca5f8d708568ed29e26a50aedf93952ba5 Mon Sep 17 00:00:00 2001
From: Dan Guest <dguest@cern.ch>
Date: Tue, 5 Jan 2021 17:54:41 +0100
Subject: [PATCH 289/308] Add some more variables that were migrated from
 double to float

---
 .../Root/xAODBTaggingAuxVariableInit.cxx      | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/Event/xAOD/xAODBTagging/Root/xAODBTaggingAuxVariableInit.cxx b/Event/xAOD/xAODBTagging/Root/xAODBTaggingAuxVariableInit.cxx
index 6b571ead0bad..059d36975016 100644
--- a/Event/xAOD/xAODBTagging/Root/xAODBTaggingAuxVariableInit.cxx
+++ b/Event/xAOD/xAODBTagging/Root/xAODBTaggingAuxVariableInit.cxx
@@ -30,3 +30,27 @@ AUX_VAR( MV2c20_discriminant );
 AUX_VAR( MV2c10mu_discriminant );
 AUX_VAR( MV2c10rnn_discriminant );
 AUX_VAR( SMT_discriminant );
+
+AUX_VAR( IP2D_pb );
+AUX_VAR( IP2D_pc );
+AUX_VAR( IP2D_pu );
+
+AUX_VAR( IP3D_pb );
+AUX_VAR( IP3D_pc );
+AUX_VAR( IP3D_pu );
+
+AUX_VAR( IP2D_cu );
+AUX_VAR( IP2D_bu );
+AUX_VAR( IP2D_bc );
+
+AUX_VAR( IP3D_cu );
+AUX_VAR( IP3D_bu );
+AUX_VAR( IP3D_bc );
+
+AUX_VAR( DL1rmu_pb );
+AUX_VAR( DL1rmu_pc );
+AUX_VAR( DL1rmu_pu );
+
+AUX_VAR( softMuon_pb );
+AUX_VAR( softMuon_pc );
+AUX_VAR( softMuon_pu );
-- 
GitLab


From 13bd59046f4d5cbf2201d685384ffcfe28eea4bb Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Tue, 5 Jan 2021 16:55:53 +0000
Subject: [PATCH 290/308] remove unused forward declarations

---
 .../MuonMDT_CnvTools/MuonMDT_CnvTools/IMDT_RDO_Decoder.h  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/IMDT_RDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/IMDT_RDO_Decoder.h
index fa6b0844af67..dd0a4f8f2f0a 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/IMDT_RDO_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/MuonMDT_CnvTools/IMDT_RDO_Decoder.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONMDT_CNVTOOLS_IMDT_RDO_DECODER_H
@@ -8,8 +8,6 @@
 #include "GaudiKernel/IAlgTool.h"
 
 class MdtDigit;
-class MdtIdHelper;
-class MuonMDT_CablingSvc;
 class MdtAmtHit;
 class Identifier;
 
@@ -24,9 +22,7 @@ namespace Muon {
     /** AlgTool InterfaceID
      */
     static const InterfaceID& interfaceID( );
-    
-    //    virtual void set(const MdtIdHelper * mdtIdHelper, const MDTcablingSvc* mdtCabling)=0;
-    
+  
     virtual MdtDigit * getDigit(const MdtAmtHit * amtHit, uint16_t& subdetId, 
 				uint16_t& mrodId, uint16_t& csmId) const = 0;
     
-- 
GitLab


From c37e4b9b70177147398e1f172ff8722570f9dcb6 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 5 Jan 2021 18:02:48 +0100
Subject: [PATCH 291/308] Refactor and clean up the method for adding cells
 from the satellites using constaints/boxing. This might be relevant depending
 on the outcome of the discussion on the PC on if we keep this or not.

---
 .../src/egammaSuperClusterBuilder.cxx         | 597 +++++++++---------
 .../src/egammaSuperClusterBuilder.h           |  24 +-
 2 files changed, 320 insertions(+), 301 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
index 78fc6765949b..b88d88c25000 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx
@@ -61,13 +61,15 @@ etaphi_range(const CaloDetDescrManager& dd_man,
   constexpr double eps = 0.001;
 
   // Now look in the negative eta direction.
-  const CaloDetDescrElement* elt_l = dd_man.get_element_raw(sampling, eta - elt->deta() - eps, phi);
+  const CaloDetDescrElement* elt_l =
+    dd_man.get_element_raw(sampling, eta - elt->deta() - eps, phi);
   double deta_l = 0; // Eta difference on the low (left) side.
   if (elt_l) {
     deta_l = std::abs(eta - elt_l->eta_raw()) + eps;
   }
   // Now look in the positive eta direction.
-  const CaloDetDescrElement* elt_r = dd_man.get_element_raw(sampling, eta + elt->deta() + eps, phi);
+  const CaloDetDescrElement* elt_r =
+    dd_man.get_element_raw(sampling, eta + elt->deta() + eps, phi);
   double deta_r = 0; // Eta difference on the high (right) side.
   if (elt_r) {
     deta_r = std::abs(eta - elt_r->eta_raw()) + eps;
@@ -80,16 +82,18 @@ etaphi_range(const CaloDetDescrManager& dd_man,
   // Thus we have to look again at the adjacent eta cells, and
   // take the largest variation.
   // Now look in the negative eta direction.
-  elt_l = dd_man.get_element_raw(
-    sampling, eta - elt->deta() - eps, CaloPhiRange::fix(phi - elt->dphi() - eps));
+  elt_l = dd_man.get_element_raw(sampling,
+                                 eta - elt->deta() - eps,
+                                 CaloPhiRange::fix(phi - elt->dphi() - eps));
 
   double dphi_l = 0; // Phi difference on the low-eta () side.
   if (elt_l) {
     dphi_l = std::abs(CaloPhiRange::fix(phi - elt_l->phi_raw())) + eps;
   }
   // Now look in the positive eta direction.
-  elt_r = dd_man.get_element_raw(
-    sampling, eta + elt->deta() + eps, CaloPhiRange::fix(phi - elt->dphi() - eps));
+  elt_r = dd_man.get_element_raw(sampling,
+                                 eta + elt->deta() + eps,
+                                 CaloPhiRange::fix(phi - elt->dphi() - eps));
   double dphi_r = 0; // Phi difference on the positive (down) side.
   if (elt_r) {
     dphi_r = std::abs(CaloPhiRange::fix(phi - elt_r->phi_raw())) + eps;
@@ -114,10 +118,14 @@ egammaSuperClusterBuilder::egammaSuperClusterBuilder(const std::string& name,
   m_searchWindowPhiEndcap = m_searchWindowPhiCellsEndcap * s_cellPhiSize * 0.5;
   m_searchWindowEtaEndcap = m_searchWindowEtaCellsEndcap * s_cellEtaSize * 0.5;
 
-  m_addCellsWindowPhiBarrel = m_addCellsWindowPhiCellsBarrel * s_cellPhiSize * 0.5;
-  m_addCellsWindowEtaBarrel = m_addCellsWindowEtaCellsBarrel * s_cellEtaSize * 0.5;
-  m_addCellsWindowPhiEndcap = m_addCellsWindowPhiCellsEndcap * s_cellPhiSize * 0.5;
-  m_addCellsWindowEtaEndcap = m_addCellsWindowEtaCellsEndcap * s_cellEtaSize * 0.5;
+  m_addCellsWindowPhiBarrel =
+    m_addCellsWindowPhiCellsBarrel * s_cellPhiSize * 0.5;
+  m_addCellsWindowEtaBarrel =
+    m_addCellsWindowEtaCellsBarrel * s_cellEtaSize * 0.5;
+  m_addCellsWindowPhiEndcap =
+    m_addCellsWindowPhiCellsEndcap * s_cellPhiSize * 0.5;
+  m_addCellsWindowEtaEndcap =
+    m_addCellsWindowEtaCellsEndcap * s_cellEtaSize * 0.5;
 
   // the +1 is to account for the offset in the centers of the clusters
   m_extraL0L1PhiSize = m_extraL0L1PhiSizeCells * s_cellPhiSize;
@@ -132,17 +140,24 @@ egammaSuperClusterBuilder::initialize()
   m_searchWindowPhiEndcap = m_searchWindowPhiCellsEndcap * s_cellPhiSize * 0.5;
   m_searchWindowEtaEndcap = m_searchWindowEtaCellsEndcap * s_cellEtaSize * 0.5;
 
-  m_addCellsWindowPhiBarrel = m_addCellsWindowPhiCellsBarrel * s_cellPhiSize * 0.5;
-  m_addCellsWindowEtaBarrel = m_addCellsWindowEtaCellsBarrel * s_cellEtaSize * 0.5;
-  m_addCellsWindowPhiEndcap = m_addCellsWindowPhiCellsEndcap * s_cellPhiSize * 0.5;
-  m_addCellsWindowEtaEndcap = m_addCellsWindowEtaCellsEndcap * s_cellEtaSize * 0.5;
+  m_addCellsWindowPhiBarrel =
+    m_addCellsWindowPhiCellsBarrel * s_cellPhiSize * 0.5;
+  m_addCellsWindowEtaBarrel =
+    m_addCellsWindowEtaCellsBarrel * s_cellEtaSize * 0.5;
+  m_addCellsWindowPhiEndcap =
+    m_addCellsWindowPhiCellsEndcap * s_cellPhiSize * 0.5;
+  m_addCellsWindowEtaEndcap =
+    m_addCellsWindowEtaCellsEndcap * s_cellEtaSize * 0.5;
 
   // the +1 is to account for the offset in the centers of the clusters
   m_extraL0L1PhiSize = m_extraL0L1PhiSizeCells * s_cellPhiSize;
 
-  if (m_addCellsWindowPhiCellsBarrel % 2 == 0 || m_addCellsWindowPhiCellsEndcap % 2 == 0 ||
-      m_addCellsWindowEtaCellsBarrel % 2 == 0 || m_addCellsWindowEtaCellsEndcap % 2 == 0) {
-    ATH_MSG_FATAL("For adding cells relative to the hottest cell to be symmetric, the AddCells "
+  if (m_addCellsWindowPhiCellsBarrel % 2 == 0 ||
+      m_addCellsWindowPhiCellsEndcap % 2 == 0 ||
+      m_addCellsWindowEtaCellsBarrel % 2 == 0 ||
+      m_addCellsWindowEtaCellsEndcap % 2 == 0) {
+    ATH_MSG_FATAL("For adding cells relative to the hottest cell to be "
+                  "symmetric, the AddCells "
                   "window size needs to be odd");
     return StatusCode::FAILURE;
   }
@@ -165,36 +180,43 @@ egammaSuperClusterBuilder::matchesInWindow(const xAOD::CaloCluster* ref,
 {
   // First the case where we are both endcap and barrel, i.e in the crack
   // Check around both measurements of the seed
-  if (ref->hasSampling(CaloSampling::EMB2) && ref->hasSampling(CaloSampling::EME2)) {
+  if (ref->hasSampling(CaloSampling::EMB2) &&
+      ref->hasSampling(CaloSampling::EME2)) {
     float dEta(fabs(ref->eta() - clus->eta()));
     float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi())));
     //
     float dEtaBarrel(fabs(ref->etaSample(CaloSampling::EMB2) - clus->eta()));
-    float dPhiBarrel(fabs(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EMB2), clus->phi())));
+    float dPhiBarrel(fabs(
+      P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EMB2), clus->phi())));
     //
     float dEtaEndcap(fabs(ref->etaSample(CaloSampling::EME2) - clus->eta()));
-    float dPhiEndcap(fabs(P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EME2), clus->phi())));
+    float dPhiEndcap(fabs(
+      P4Helpers::deltaPhi(ref->phiSample(CaloSampling::EME2), clus->phi())));
     // Matches any in case of split
-    return ((dEta < m_searchWindowEtaBarrel && dPhi < m_searchWindowPhiBarrel) ||
-            (dEta < m_searchWindowEtaEndcap && dPhi < m_searchWindowPhiEndcap) ||
-            (dEtaBarrel < m_searchWindowEtaBarrel && dPhiBarrel < m_searchWindowPhiBarrel) ||
-            (dEtaEndcap < m_searchWindowEtaEndcap && dPhiEndcap < m_searchWindowPhiEndcap));
-  } if (xAOD::EgammaHelpers::isBarrel(clus)) {
+    return (
+      (dEta < m_searchWindowEtaBarrel && dPhi < m_searchWindowPhiBarrel) ||
+      (dEta < m_searchWindowEtaEndcap && dPhi < m_searchWindowPhiEndcap) ||
+      (dEtaBarrel < m_searchWindowEtaBarrel &&
+       dPhiBarrel < m_searchWindowPhiBarrel) ||
+      (dEtaEndcap < m_searchWindowEtaEndcap &&
+       dPhiEndcap < m_searchWindowPhiEndcap));
+  }
+  if (xAOD::EgammaHelpers::isBarrel(clus)) {
     float dEta(fabs(ref->eta() - clus->eta()));
     float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi())));
     return (dEta < m_searchWindowEtaBarrel && dPhi < m_searchWindowPhiBarrel);
   }
-    float dEta(fabs(ref->eta() - clus->eta()));
-    float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi())));
-    return (dEta < m_searchWindowEtaEndcap && dPhi < m_searchWindowPhiEndcap);
-
+  float dEta(fabs(ref->eta() - clus->eta()));
+  float dPhi(fabs(P4Helpers::deltaPhi(ref->phi(), clus->phi())));
+  return (dEta < m_searchWindowEtaEndcap && dPhi < m_searchWindowPhiEndcap);
 }
 
 std::unique_ptr<xAOD::CaloCluster>
-egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
-                                            const std::vector<const xAOD::CaloCluster*>& clusters,
-                                            const CaloDetDescrManager& mgr,
-                                            xAOD::EgammaParameters::EgammaType egType) const
+egammaSuperClusterBuilder::createNewCluster(
+  const EventContext& ctx,
+  const std::vector<const xAOD::CaloCluster*>& clusters,
+  const CaloDetDescrManager& mgr,
+  xAOD::EgammaParameters::EgammaType egType) const
 {
 
   const auto acSize = clusters.size();
@@ -204,7 +226,9 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
   }
 
   std::unique_ptr<xAOD::CaloCluster> newCluster(
-    CaloClusterStoreHelper::makeCluster(clusters.at(0)->getCellLinks()->getCellContainer()));
+    CaloClusterStoreHelper::makeCluster(
+      clusters.at(0)->getCellLinks()->getCellContainer()));
+
   if (!newCluster) {
     ATH_MSG_ERROR("CaloClusterStoreHelper::makeCluster failed.");
     return nullptr;
@@ -214,13 +238,14 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
   // This will be used as the center for restricting the cluster size.
   // In the future can refine (or add sanity checks) to the selection
   CentralPosition cpRef = findCentralPosition(clusters);
-  // these are the same as the reference but in calo frame (after the processing below)
+  // these are the same as the reference but in calo frame (after the processing
+  // below)
   CentralPosition cp0 = cpRef;
-
   // Get the hotest in raw co-ordinates
   if (cp0.emaxB > 0) {
     CaloCell_ID::CaloSample xsample = CaloCell_ID::EMB2;
-    const CaloDetDescrElement* dde = mgr.get_element(xsample, cpRef.etaB, cpRef.phiB);
+    const CaloDetDescrElement* dde =
+      mgr.get_element(xsample, cpRef.etaB, cpRef.phiB);
     if (dde) {
       cp0.etaB = dde->eta_raw();
       cp0.phiB = dde->phi_raw();
@@ -231,7 +256,8 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
   }
   if (cp0.emaxEC > 0) {
     CaloCell_ID::CaloSample xsample = CaloCell_ID::EME2;
-    const CaloDetDescrElement* dde = mgr.get_element(xsample, cpRef.etaEC, cpRef.phiEC);
+    const CaloDetDescrElement* dde =
+      mgr.get_element(xsample, cpRef.etaEC, cpRef.phiEC);
     if (dde) {
       cp0.etaEC = dde->eta_raw();
       cp0.phiEC = dde->phi_raw();
@@ -240,7 +266,6 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
                       << cpRef.etaEC << ", phi = " << cpRef.phiEC);
     }
   }
-
   // Set the eta0/phi0 based on the references, but in raw coordinates
   if (cp0.emaxB >= cp0.emaxEC) {
     newCluster->setEta0(cp0.etaB);
@@ -250,51 +275,19 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
     newCluster->setPhi0(cp0.phiEC);
   }
 
-  // Need a vector of element Links to the constituent Cluster
-  std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
-  static const SG::AuxElement::Accessor<ElementLink<xAOD::CaloClusterContainer>> sisterCluster(
-    "SisterCluster");
-
-  // Now add the cluster cells (other than L1 and PS)
-  for (size_t i = 0; i < acSize; i++) {
-    // Add te EM cells of the accumulated to the cluster
-    if (addEMCellsToCluster(newCluster.get(), clusters[i], cp0).isFailure()) {
-      ATH_MSG_DEBUG("There was problem adding the topocluster cells to the the cluster:  "
-                    "potentially no L2 or L3 cells in cluster");
-      return nullptr;
-    }
-    // Set the element Link to the constitents
-    if (sisterCluster.isAvailable(*clusters[i])) {
-      constituentLinks.push_back(sisterCluster(*clusters[i]));
-    } else {
-      ATH_MSG_WARNING("No sister Link available");
-    }
-  }
-
-  // Now calculate the cluster size; use that for restricting the L1 cells
-  PhiSize phiSize = findPhiSize(cp0, newCluster.get());
-
-  // now add L1 cells
-  for (size_t i = 0; i < acSize; i++) {
-    // Add te EM cells of the accumulated to the cluster
-    if (addL0L1EMCellsToCluster(newCluster.get(), clusters[i], cp0, phiSize).isFailure()) {
-      ATH_MSG_WARNING(
-        "There was problem adding the topocluster PS and L1 cells to the the cluster");
-      return nullptr;
-    }
+  // Actually fill the cluster here
+  if (fillClusterConstrained(*newCluster, clusters, cp0).isFailure()) {
+    ATH_MSG_DEBUG(
+      "There was problem adding the topocluster cells to the the cluster:  "
+      "potentially no L2 or L3 cells in cluster");
+    return nullptr;
   }
-
   // Apply SW-style summation of TileGap3 cells (if necessary).
-  if (addTileGap3CellsinWindow(newCluster.get(), mgr).isFailure()) {
-    ATH_MSG_ERROR("Problem with the input cluster when running AddTileGap3CellsinWindow?");
+  if (addTileGap3CellsinWindow(*newCluster, mgr).isFailure()) {
+    ATH_MSG_ERROR(
+      "Problem with the input cluster when running AddTileGap3CellsinWindow?");
     return nullptr;
   }
-
-  // Set the link from the super cluster to the constituents (accumulated) clusters used.
-  static const SG::AuxElement::Accessor<std::vector<ElementLink<xAOD::CaloClusterContainer>>>
-    caloClusterLinks("constituentClusterLinks");
-  caloClusterLinks(*newCluster) = constituentLinks;
-
   /// Calculate the kinematics of the new cluster, after all cells are added
   CaloClusterKineHelper::calculateKine(newCluster.get(), true, true);
 
@@ -305,7 +298,8 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
 
   // Check to see if cluster pases basic requirements. If not, kill it.
   if (!m_egammaCheckEnergyDepositTool.empty() &&
-      !m_egammaCheckEnergyDepositTool->checkFractioninSamplingCluster(newCluster.get())) {
+      !m_egammaCheckEnergyDepositTool->checkFractioninSamplingCluster(
+        newCluster.get())) {
     ATH_MSG_DEBUG("Cluster failed sample check: dont make ROI");
     return nullptr;
   }
@@ -315,167 +309,227 @@ egammaSuperClusterBuilder::createNewCluster(const EventContext& ctx,
     ATH_MSG_WARNING("There was problem calibrating the object");
     return nullptr;
   }
+
+  // EDM vector to constituent clusters
+  std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
+  static const SG::AuxElement::Accessor<ElementLink<xAOD::CaloClusterContainer>>
+    sisterCluster("SisterCluster");
+  for (size_t i = 0; i < acSize; i++) {
+    // Set the element Link to the constitents
+    if (sisterCluster.isAvailable(*clusters[i])) {
+      constituentLinks.push_back(sisterCluster(*clusters[i]));
+    } else {
+      ATH_MSG_WARNING("No sister Link available");
+    }
+  }
+  // Set the link from the super cluster to the constituents (accumulated)
+  // clusters used.
+  static const SG::AuxElement::Accessor<
+    std::vector<ElementLink<xAOD::CaloClusterContainer>>>
+    caloClusterLinks("constituentClusterLinks");
+  caloClusterLinks(*newCluster) = constituentLinks;
+
   // return the new cluster
   return newCluster;
 }
 
 StatusCode
-egammaSuperClusterBuilder::addEMCellsToCluster(
-  xAOD::CaloCluster* newCluster,
-  const xAOD::CaloCluster* ref,
+egammaSuperClusterBuilder::fillClusterConstrained(
+  xAOD::CaloCluster& tofill,
+  const std::vector<const xAOD::CaloCluster*>& clusters,
   const egammaSuperClusterBuilder::CentralPosition& cp0) const
 {
-  if (!newCluster || !ref) {
-    ATH_MSG_ERROR("Invalid input in AddEMCellsToCluster");
-    return StatusCode::FAILURE;
-  }
-  //
-  xAOD::CaloCluster::const_cell_iterator cell_itr = ref->begin();
-  xAOD::CaloCluster::const_cell_iterator cell_end = ref->end();
-  // Loop over cells
-  for (; cell_itr != cell_end; ++cell_itr) {
-
-    // sanity check on the cell
-    const CaloCell* cell = *cell_itr;
-    if (!cell) {
-      continue;
-    }
+  /*
+   * Fill super cluster constraining its size
+   * in eta,phi around the overall hottest cell
+   * and the L2 size
+   */
+
+  // Loop for L2/L3
+  for (const xAOD::CaloCluster* tocheck : clusters) {
+    xAOD::CaloCluster::const_cell_iterator cell_itr = tocheck->begin();
+    xAOD::CaloCluster::const_cell_iterator cell_end = tocheck->end();
+    // Loop over cells
+    for (; cell_itr != cell_end; ++cell_itr) {
+      // sanity check on the cell
+      const CaloCell* cell = *cell_itr;
+      if (!cell) {
+        continue;
+      }
+      const CaloDetDescrElement* dde = cell->caloDDE();
+      if (!dde) {
+        continue;
+      }
 
-    bool addCell = false;
+      bool addCell = false;
 
-    // lets remove from consideration if outside the range
-    if (cp0.emaxB > 0) { // has cells in the barrel
-      if (fabs(cp0.etaB - cell->caloDDE()->eta_raw()) < m_addCellsWindowEtaBarrel &&
-          fabs(P4Helpers::deltaPhi(cp0.phiB, cell->caloDDE()->phi_raw())) <
-            m_addCellsWindowPhiBarrel) {
-        addCell = true;
+      // lets remove from consideration if outside the range
+      if (cp0.emaxB > 0) { // has cells in the barrel
+        if (fabs(cp0.etaB - dde->eta_raw()) < m_addCellsWindowEtaBarrel &&
+            fabs(P4Helpers::deltaPhi(cp0.phiB, dde->phi_raw())) <
+              m_addCellsWindowPhiBarrel) {
+          addCell = true;
+        }
       }
-    }
-    if (cp0.emaxEC > 0) { // has cells in the endcap
-      if (fabs(cp0.etaEC - cell->caloDDE()->eta_raw()) < m_addCellsWindowEtaEndcap &&
-          fabs(P4Helpers::deltaPhi(cp0.phiEC, cell->caloDDE()->phi_raw())) <
-            m_addCellsWindowPhiEndcap) {
-        addCell = true;
+      if (cp0.emaxEC > 0) { // has cells in the endcap
+        if (fabs(cp0.etaEC - dde->eta_raw()) < m_addCellsWindowEtaEndcap &&
+            fabs(P4Helpers::deltaPhi(cp0.phiEC, dde->phi_raw())) <
+              m_addCellsWindowPhiEndcap) {
+          addCell = true;
+        }
       }
-    }
-
-    if (!addCell)
-      continue;
 
-    const CaloDetDescrElement* dde = cell->caloDDE();
-    if (!dde) {
-      continue;
-    }
+      if (!addCell) {
+        continue;
+      }
 
-    auto sampling = dde->getSampling();
+      auto sampling = dde->getSampling();
 
-    // skip if sampling is L1 or presample, since that is a separate step
-    if (CaloCell_ID::EMB1 == sampling || CaloCell_ID::EME1 == sampling ||
-        CaloCell_ID::PreSamplerB == sampling || CaloCell_ID::PreSamplerE == sampling) {
-      continue;
-    }
+      // skip if sampling is L1 or presample, since that is a separate step
+      if (CaloCell_ID::EMB1 == sampling || CaloCell_ID::EME1 == sampling ||
+          CaloCell_ID::PreSamplerB == sampling ||
+          CaloCell_ID::PreSamplerE == sampling) {
+        continue;
+      }
 
-    // For the cells we have not skipped either because TileGap, bounds, or L1
-    if (dde->getSubCalo() == CaloCell_ID::LAREM) {
-      // Avoid summing inner wheel Endcap cells
-      if (!(dde->is_lar_em_endcap_inner())) {
-        newCluster->addCell(cell_itr.index(), cell_itr.weight());
+      // For the cells we have not skipped either because TileGap, bounds, or L1
+      if (dde->getSubCalo() == CaloCell_ID::LAREM) {
+        // Avoid summing inner wheel Endcap cells
+        if (!(dde->is_lar_em_endcap_inner())) {
+          tofill.addCell(cell_itr.index(), cell_itr.weight());
+        }
       }
-    }
-  } // Loop over cells
-  if (newCluster->size() == 0) {
-    return StatusCode::FAILURE;
-  }
-  return StatusCode::SUCCESS;
-}
+    } // Loop over cells for L2/L3
+  }   // Loop over clusters for L2/L3
 
-StatusCode
-egammaSuperClusterBuilder::addL0L1EMCellsToCluster(
-  xAOD::CaloCluster* newCluster,
-  const xAOD::CaloCluster* ref,
-  const egammaSuperClusterBuilder::CentralPosition& cp0,
-  const egammaSuperClusterBuilder::PhiSize& phiSize) const
-{
-  if (!newCluster || !ref) {
-    ATH_MSG_ERROR("Invalid input in addL0L1EMCellsToCluster");
+  // We should have a size here
+  if (tofill.size() == 0) {
     return StatusCode::FAILURE;
   }
-
+  // Now calculate the cluster size; use that for restricting the L1 cells
+  PhiSize phiSize = findPhiSize(cp0, tofill);
   float phiPlusB = cp0.phiB + phiSize.plusB + m_extraL0L1PhiSize;
   float phiMinusB = cp0.phiB - phiSize.minusB - m_extraL0L1PhiSize;
-
   ATH_MSG_DEBUG("barrel phi range = " << phiMinusB << " to " << phiPlusB);
-
   float phiPlusEC = cp0.phiEC + phiSize.plusEC + m_extraL0L1PhiSize;
   float phiMinusEC = cp0.phiEC - phiSize.minusEC - m_extraL0L1PhiSize;
-
   ATH_MSG_DEBUG("endcap phi range = " << phiMinusEC << " to " << phiPlusEC);
 
-  //
-  xAOD::CaloCluster::const_cell_iterator cell_itr = ref->begin();
-  xAOD::CaloCluster::const_cell_iterator cell_end = ref->end();
-  // Loop over cells
-  for (; cell_itr != cell_end; ++cell_itr) {
+  // Loop for L0/L1
+  for (const xAOD::CaloCluster* tocheck : clusters) {
+    xAOD::CaloCluster::const_cell_iterator cell_itr = tocheck->begin();
+    xAOD::CaloCluster::const_cell_iterator cell_end = tocheck->end();
+    // Loop over cells
+    for (; cell_itr != cell_end; ++cell_itr) {
+      // sanity check on the cell
+      const CaloCell* cell = *cell_itr;
+      if (!cell) {
+        continue;
+      }
+      const CaloDetDescrElement* dde = cell->caloDDE();
+      if (!dde) {
+        continue;
+      }
+      bool addCell = false;
+      // lets remove from consideration if outside the range
+      if (cp0.emaxB > 0) { // has cells in the barrel
+        if (fabs(cp0.etaB - dde->eta_raw()) < m_addCellsWindowEtaBarrel &&
+            fabs(P4Helpers::deltaPhi(cp0.phiB, cell->caloDDE()->phi_raw())) <
+              m_addCellsWindowPhiBarrel) {
+          addCell = true;
+        }
+      }
+      if (cp0.emaxEC > 0) { // has cells in the endcap
+        if (fabs(cp0.etaEC - dde->eta_raw()) < m_addCellsWindowEtaEndcap &&
+            fabs(P4Helpers::deltaPhi(cp0.phiEC, cell->caloDDE()->phi_raw())) <
+              m_addCellsWindowPhiEndcap) {
+          addCell = true;
+        }
+      }
+      if (!addCell) {
+        continue;
+      }
+      auto sampling = dde->getSampling();
+
+      // only deal with L1 or PS
+      if (CaloCell_ID::EMB1 == sampling ||
+          CaloCell_ID::PreSamplerB == sampling) {
+        double cell_phi = proxim(dde->phi_raw(), cp0.phiB);
+        bool inRange = cell_phi > phiMinusB && cell_phi < phiPlusB;
+        ATH_MSG_DEBUG("Found PS or L1 cell with phi = "
+                      << cell_phi << "; inRange = " << inRange);
+        if (inRange) {
+          tofill.addCell(cell_itr.index(), cell_itr.weight());
+        }
+      }
+      if (CaloCell_ID::EME1 == sampling ||
+          CaloCell_ID::PreSamplerE == sampling) {
+        double cell_phi = proxim(dde->phi_raw(), cp0.phiEC);
+        bool inRange = cell_phi > phiMinusEC && cell_phi < phiPlusEC;
+        ATH_MSG_DEBUG("Found PS or L1 cell with phi = "
+                      << cell_phi << "; inRange = " << inRange);
+        if (inRange) {
+          tofill.addCell(cell_itr.index(), cell_itr.weight());
+        }
+      }
+    } // Cell Loop for L0/L1
+  }   // Cluster loop for L0/L1
+  return StatusCode::SUCCESS;
+}
 
-    // sanity check on the cell
-    const CaloCell* cell = *cell_itr;
-    if (!cell) {
-      continue;
-    }
+StatusCode
+egammaSuperClusterBuilder::addTileGap3CellsinWindow(
+  xAOD::CaloCluster& tofill,
+  const CaloDetDescrManager& mgr) const
+{
 
-    bool addCell = false;
+  constexpr double searchWindowEta = 0.2;
+  constexpr double searchWindowPhi = 2 * M_PI / 64.0 + M_PI / 64; // ~ 0.15 rad
+  std::vector<const CaloCell*> cells;
+  cells.reserve(16);
+  const CaloCellContainer* inputcells =
+    tofill.getCellLinks()->getCellContainer();
 
-    // lets remove from consideration if outside the range
-    if (cp0.emaxB > 0) { // has cells in the barrel
-      if (fabs(cp0.etaB - cell->caloDDE()->eta_raw()) < m_addCellsWindowEtaBarrel &&
-          fabs(P4Helpers::deltaPhi(cp0.phiB, cell->caloDDE()->phi_raw())) <
-            m_addCellsWindowPhiBarrel) {
-        addCell = true;
-      }
-    }
-    if (cp0.emaxEC > 0) { // has cells in the endcap
-      if (fabs(cp0.etaEC - cell->caloDDE()->eta_raw()) < m_addCellsWindowEtaEndcap &&
-          fabs(P4Helpers::deltaPhi(cp0.phiEC, cell->caloDDE()->phi_raw())) <
-            m_addCellsWindowPhiEndcap) {
-        addCell = true;
-      }
-    }
+  if (!inputcells) {
+    ATH_MSG_ERROR("No cell container in addRemainingCellsToCluster?");
+    return StatusCode::FAILURE;
+  }
 
-    if (!addCell)
-      continue;
-    const CaloDetDescrElement* dde = cell->caloDDE();
-    if (!dde) {
-      continue;
-    }
+  CaloCellList myList(inputcells);
 
-    auto sampling = dde->getSampling();
+  const std::vector<CaloSampling::CaloSample> samples = {
+    CaloSampling::TileGap3
+  };
+  for (auto samp : samples) {
+    myList.select(mgr,
+                  tofill.eta0(),
+                  tofill.phi0(),
+                  searchWindowEta,
+                  searchWindowPhi,
+                  samp);
+    cells.insert(cells.end(), myList.begin(), myList.end());
+  }
 
-    // only deal with L1 or PS
-    if (CaloCell_ID::EMB1 == sampling || CaloCell_ID::PreSamplerB == sampling) {
-      double cell_phi = proxim(cell->caloDDE()->phi_raw(), cp0.phiB);
-      bool inRange = cell_phi > phiMinusB && cell_phi < phiPlusB;
-      ATH_MSG_DEBUG("Found PS or L1 cell with phi = " << cell_phi << "; inRange = " << inRange);
-      if (inRange) {
-        newCluster->addCell(cell_itr.index(), cell_itr.weight());
-      }
+  for (const auto* cell : cells) {
+    if (!cell || !cell->caloDDE()) {
+      continue;
     }
-    if (CaloCell_ID::EME1 == sampling || CaloCell_ID::PreSamplerE == sampling) {
-      double cell_phi = proxim(cell->caloDDE()->phi_raw(), cp0.phiEC);
-      bool inRange = cell_phi > phiMinusEC && cell_phi < phiPlusEC;
-      ATH_MSG_DEBUG("Found PS or L1 cell with phi = " << cell_phi << "; inRange = " << inRange);
-      if (inRange) {
-        newCluster->addCell(cell_itr.index(), cell_itr.weight());
-      }
+    if ((CaloCell_ID::TileGap3 == cell->caloDDE()->getSampling()) &&
+        (std::abs(cell->caloDDE()->eta_raw()) > 1.4 &&
+         std::abs(cell->caloDDE()->eta_raw()) < 1.6)) {
+      int index = inputcells->findIndex(cell->caloDDE()->calo_hash());
+      tofill.addCell(index, 1.);
     }
   }
   return StatusCode::SUCCESS;
 }
 
 StatusCode
-egammaSuperClusterBuilder::calibrateCluster(const EventContext& ctx,
-                                            xAOD::CaloCluster* newCluster,
-                                            const CaloDetDescrManager& mgr,
-                                            const xAOD::EgammaParameters::EgammaType egType) const
+egammaSuperClusterBuilder::calibrateCluster(
+  const EventContext& ctx,
+  xAOD::CaloCluster* newCluster,
+  const CaloDetDescrManager& mgr,
+  const xAOD::EgammaParameters::EgammaType egType) const
 {
 
   ATH_CHECK(refineEta1Position(newCluster, mgr));
@@ -491,33 +545,35 @@ egammaSuperClusterBuilder::calibrateCluster(const EventContext& ctx,
   newCluster->setRawPhi(newCluster->phi());
   //
   ATH_CHECK(fillPositionsInCalo(newCluster, mgr));
-  // At this point we do not have the final tracks vertices attached on the cluster/ new egamma Rec
-  // Object. So We will need at the end to do the final update in the EMClusterTool For now apply
-  // just cluster info only calibration.
   ATH_CHECK(m_MVACalibSvc->execute(*newCluster, egType));
 
   return StatusCode::SUCCESS;
 }
-// ==========================================================================
+
 StatusCode
-egammaSuperClusterBuilder::fillPositionsInCalo(xAOD::CaloCluster* cluster,
-                                               const CaloDetDescrManager& mgr) const
+egammaSuperClusterBuilder::fillPositionsInCalo(
+  xAOD::CaloCluster* cluster,
+  const CaloDetDescrManager& mgr) const
 {
   const bool isBarrel = xAOD::EgammaHelpers::isBarrel(cluster);
-  CaloCell_ID::CaloSample sample = isBarrel ? CaloCell_ID::EMB2 : CaloCell_ID::EME2;
+  CaloCell_ID::CaloSample sample =
+    isBarrel ? CaloCell_ID::EMB2 : CaloCell_ID::EME2;
   // eta and phi of the cluster in the calorimeter frame
   double eta;
   double phi;
-  m_caloCellDetPos.getDetPosition(mgr, sample, cluster->eta(), cluster->phi(), eta, phi);
+  m_caloCellDetPos.getDetPosition(
+    mgr, sample, cluster->eta(), cluster->phi(), eta, phi);
   cluster->insertMoment(xAOD::CaloCluster::ETACALOFRAME, eta);
   cluster->insertMoment(xAOD::CaloCluster::PHICALOFRAME, phi);
   //  eta in the second sampling
-  m_caloCellDetPos.getDetPosition(mgr, sample, cluster->etaBE(2), cluster->phiBE(2), eta, phi);
+  m_caloCellDetPos.getDetPosition(
+    mgr, sample, cluster->etaBE(2), cluster->phiBE(2), eta, phi);
   cluster->insertMoment(xAOD::CaloCluster::ETA2CALOFRAME, eta);
   cluster->insertMoment(xAOD::CaloCluster::PHI2CALOFRAME, phi);
   //  eta in the first sampling
   sample = isBarrel ? CaloCell_ID::EMB1 : CaloCell_ID::EME1;
-  m_caloCellDetPos.getDetPosition(mgr, sample, cluster->etaBE(1), cluster->phiBE(1), eta, phi);
+  m_caloCellDetPos.getDetPosition(
+    mgr, sample, cluster->etaBE(1), cluster->phiBE(1), eta, phi);
   cluster->insertMoment(xAOD::CaloCluster::ETA1CALOFRAME, eta);
   cluster->insertMoment(xAOD::CaloCluster::PHI1CALOFRAME, phi);
 
@@ -525,12 +581,14 @@ egammaSuperClusterBuilder::fillPositionsInCalo(xAOD::CaloCluster* cluster,
 }
 
 StatusCode
-egammaSuperClusterBuilder::refineEta1Position(xAOD::CaloCluster* cluster,
-                                              const CaloDetDescrManager& mgr) const
+egammaSuperClusterBuilder::refineEta1Position(
+  xAOD::CaloCluster* cluster,
+  const CaloDetDescrManager& mgr) const
 {
 
   // This only makes sense if we have cells there
-  if (!cluster->hasSampling(CaloSampling::EMB1) && !cluster->hasSampling(CaloSampling::EME1)) {
+  if (!cluster->hasSampling(CaloSampling::EMB1) &&
+      !cluster->hasSampling(CaloSampling::EME1)) {
     ATH_MSG_DEBUG("No  layer sampling - skipping refine eta ");
     return StatusCode::SUCCESS;
   }
@@ -546,18 +604,21 @@ egammaSuperClusterBuilder::refineEta1Position(xAOD::CaloCluster* cluster,
 }
 
 StatusCode
-egammaSuperClusterBuilder::makeCorrection1(xAOD::CaloCluster* cluster,
-                                           const CaloDetDescrManager& mgr,
-                                           const CaloSampling::CaloSample sample) const
+egammaSuperClusterBuilder::makeCorrection1(
+  xAOD::CaloCluster* cluster,
+  const CaloDetDescrManager& mgr,
+  const CaloSampling::CaloSample sample) const
 {
 
   // Protections.
   ATH_MSG_DEBUG("Hottest cell in layer 1 ATLAS co-ordinates (eta,phi): ("
-                << cluster->etamax(sample) << " , " << cluster->phimax(sample) << ")");
+                << cluster->etamax(sample) << " , " << cluster->phimax(sample)
+                << ")");
   if (cluster->etamax(sample) == -999. || cluster->phimax(sample) == -999.) {
     return StatusCode::SUCCESS;
   }
-  if (fabs(cluster->etamax(sample)) < 1E-6 && fabs(cluster->phimax(sample)) < 1E-6) {
+  if (fabs(cluster->etamax(sample)) < 1E-6 &&
+      fabs(cluster->phimax(sample)) < 1E-6) {
     return StatusCode::SUCCESS;
   }
   // Get the hotest in raw co-ordinates
@@ -569,16 +630,17 @@ egammaSuperClusterBuilder::makeCorrection1(xAOD::CaloCluster* cluster,
   const CaloDetDescrElement* dde =
     mgr.get_element(xsample, cluster->etamax(sample), cluster->phimax(sample));
   if (!dde) {
-    ATH_MSG_WARNING("Couldn't get CaloDetDescrElement from mgr for: cluster->etamax(sample): "
-                    << cluster->etamax(sample) << " cluster->phimax(sample): "
-                    << cluster->phimax(sample) << " will not refine the position in layer1");
+    ATH_MSG_WARNING(
+      "Couldn't get CaloDetDescrElement from mgr for: cluster->etamax(sample): "
+      << cluster->etamax(sample) << " cluster->phimax(sample): "
+      << cluster->phimax(sample) << " will not refine the position in layer1");
     return StatusCode::SUCCESS;
   }
   //
   double etamax = dde->eta_raw();
   double phimax = dde->phi_raw();
-  ATH_MSG_DEBUG("Hottest cell in layer 1 Calo co-ordinates (eta,phi): (" << etamax << " , "
-                                                                         << phimax << ")");
+  ATH_MSG_DEBUG("Hottest cell in layer 1 Calo co-ordinates (eta,phi): ("
+                << etamax << " , " << phimax << ")");
   //
   // now Locate the +-1 range
   double detastr(-999);
@@ -589,8 +651,14 @@ egammaSuperClusterBuilder::makeCorrection1(xAOD::CaloCluster* cluster,
   // Given the range refine the position employing the smaller window
   if (detastr > 0 && dphistr > 0) {
     CaloLayerCalculator helper;
-    const auto *const cellLink = cluster->getCellLinks();
-    helper.fill(cellLink->begin(), cellLink->end(), etamax, phimax, detastr, dphistr, sample);
+    const auto* const cellLink = cluster->getCellLinks();
+    helper.fill(cellLink->begin(),
+                cellLink->end(),
+                etamax,
+                phimax,
+                detastr,
+                dphistr,
+                sample);
 
     // Here is where we (re-)fill the eta in the 1st sampling
     if (helper.etam() != -999.) {
@@ -602,57 +670,13 @@ egammaSuperClusterBuilder::makeCorrection1(xAOD::CaloCluster* cluster,
   return StatusCode::SUCCESS;
 }
 
-StatusCode
-egammaSuperClusterBuilder::addTileGap3CellsinWindow(xAOD::CaloCluster* myCluster,
-                                                    const CaloDetDescrManager& mgr) const
-{
-
-  if (!myCluster) {
-    ATH_MSG_ERROR("Invalid input in addRemainingCellsToCluster");
-    return StatusCode::FAILURE;
-  }
-
-  static const double searchWindowEta = 0.2;
-  static const double searchWindowPhi = 2 * M_PI / 64.0 + M_PI / 64; // ~ 0.15 rad
-  std::vector<const CaloCell*> cells;
-  cells.reserve(16);
-  const CaloCellContainer* inputcells = myCluster->getCellLinks()->getCellContainer();
-
-  if (!inputcells) {
-    ATH_MSG_ERROR("No cell container in addRemainingCellsToCluster?");
-    return StatusCode::FAILURE;
-  }
-
-  CaloCellList myList(inputcells);
-
-  const std::vector<CaloSampling::CaloSample> samples = { CaloSampling::TileGap3 };
-  for (auto samp : samples) {
-    myList.select(
-      mgr, myCluster->eta0(), myCluster->phi0(), searchWindowEta, searchWindowPhi, samp);
-    cells.insert(cells.end(), myList.begin(), myList.end());
-  }
-
-  for (const auto *cell : cells) {
-    if (!cell || !cell->caloDDE()) {
-      continue;
-    }
-    if ((CaloCell_ID::TileGap3 == cell->caloDDE()->getSampling()) &&
-        (std::abs(cell->caloDDE()->eta_raw()) > 1.4 &&
-         std::abs(cell->caloDDE()->eta_raw()) < 1.6)) {
-      int index = inputcells->findIndex(cell->caloDDE()->calo_hash());
-      myCluster->addCell(index, 1.);
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
 egammaSuperClusterBuilder::CentralPosition
 egammaSuperClusterBuilder::findCentralPosition(
   const std::vector<const xAOD::CaloCluster*>& clusters) const
 {
 
   CentralPosition cp;
-  for (const auto *cluster : clusters) {
+  for (const auto* cluster : clusters) {
     if (cluster->hasSampling(CaloSampling::EMB2)) {
       float thisEmax = cluster->energy_max(CaloSampling::EMB2);
       if (thisEmax > cp.emaxB) {
@@ -674,15 +698,14 @@ egammaSuperClusterBuilder::findCentralPosition(
 }
 
 egammaSuperClusterBuilder::PhiSize
-egammaSuperClusterBuilder::findPhiSize(const egammaSuperClusterBuilder::CentralPosition& cp0,
-                                       const xAOD::CaloCluster* cluster) const
+egammaSuperClusterBuilder::findPhiSize(
+  const egammaSuperClusterBuilder::CentralPosition& cp0,
+  const xAOD::CaloCluster& cluster) const
 {
 
   PhiSize phiSize;
-
-  auto cell_itr = cluster->cell_cbegin();
-  auto cell_end = cluster->cell_cend();
-
+  auto cell_itr = cluster.cell_cbegin();
+  auto cell_end = cluster.cell_cend();
   for (; cell_itr != cell_end; ++cell_itr) {
     const CaloCell* cell = *cell_itr;
     if (!cell) {
@@ -696,7 +719,7 @@ egammaSuperClusterBuilder::findPhiSize(const egammaSuperClusterBuilder::CentralP
 
     if (CaloCell_ID::EMB2 == dde->getSampling()) {
       const float phi0 = cp0.phiB;
-      double cell_phi = proxim(cell->caloDDE()->phi_raw(), phi0);
+      double cell_phi = proxim(dde->phi_raw(), phi0);
       if (cell_phi > phi0) {
         auto diff = cell_phi - phi0;
         if (diff > phiSize.plusB) {
@@ -710,7 +733,7 @@ egammaSuperClusterBuilder::findPhiSize(const egammaSuperClusterBuilder::CentralP
       }
     } else if (CaloCell_ID::EME2 == dde->getSampling()) {
       const float phi0 = cp0.phiEC;
-      double cell_phi = proxim(cell->caloDDE()->phi_raw(), phi0);
+      double cell_phi = proxim(dde->phi_raw(), phi0);
       if (cell_phi > phi0) {
         auto diff = cell_phi - phi0;
         if (diff > phiSize.plusEC) {
@@ -726,19 +749,23 @@ egammaSuperClusterBuilder::findPhiSize(const egammaSuperClusterBuilder::CentralP
   }
   // some safety checks
   if (phiSize.plusB > 1.0) {
-    ATH_MSG_WARNING("phiSizePlusB is large: " << phiSize.plusB << ", capping at 1.0");
+    ATH_MSG_WARNING("phiSizePlusB is large: " << phiSize.plusB
+                                              << ", capping at 1.0");
     phiSize.plusB = 1.0;
   }
   if (phiSize.plusEC > 1.0) {
-    ATH_MSG_WARNING("phiSizePlusEC is large: " << phiSize.plusEC << ", capping at 1.0");
+    ATH_MSG_WARNING("phiSizePlusEC is large: " << phiSize.plusEC
+                                               << ", capping at 1.0");
     phiSize.plusEC = 1.0;
   }
   if (phiSize.minusB > 1.0) {
-    ATH_MSG_WARNING("phiSizeMinusB is large: " << phiSize.minusB << ", capping at 1.0");
+    ATH_MSG_WARNING("phiSizeMinusB is large: " << phiSize.minusB
+                                               << ", capping at 1.0");
     phiSize.minusB = 1.0;
   }
   if (phiSize.minusEC > 1.0) {
-    ATH_MSG_WARNING("phiSizeMinusEC is large: " << phiSize.minusEC << ", capping at 1.0");
+    ATH_MSG_WARNING("phiSizeMinusEC is large: " << phiSize.minusEC
+                                                << ", capping at 1.0");
     phiSize.minusEC = 1.0;
   }
   return phiSize;
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h
index f925bbd605fd..820faf2c26d3 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h
@@ -103,24 +103,16 @@ private:
 
   /** Find the size of the cluster */
   PhiSize findPhiSize(const CentralPosition& cp0,
-                      const xAOD::CaloCluster* cluster) const;
-
-  /** Add the EM cells from reference cluster to self; eta and phi are the ones
-     to use for limiting size. This excludes L1 (which is done as a separate
-     step). note, use raw eta and phi! */
-  StatusCode addEMCellsToCluster(xAOD::CaloCluster* newCluster,
-                                 const xAOD::CaloCluster* ref,
-                                 const CentralPosition& cp0) const;
-
-  /** Add the preshower and L1 EM cells from reference cluster to self; note,
-   * use raw eta and phi! */
-  StatusCode addL0L1EMCellsToCluster(xAOD::CaloCluster* newCluster,
-                                     const xAOD::CaloCluster* ref,
-                                     const CentralPosition& cp0,
-                                     const PhiSize& phiSize) const;
+                      const xAOD::CaloCluster& cluster) const;
+
+  /** fill Super Clusterlimiting its size.*/
+  StatusCode fillClusterConstrained(
+    xAOD::CaloCluster& tofill,
+    const std::vector<const xAOD::CaloCluster*>& clusters,
+    const CentralPosition& cp0) const;
 
   /** functions to add all tile Gap 3 cells in a window*/
-  StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster* myCluster,
+  StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster& tofill,
                                       const CaloDetDescrManager& mgr) const;
 
   /** function to calibrate the new clusters energy */
-- 
GitLab


From 17f4da1afd69fead2e1905f8091f667b221f8eb8 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Tue, 5 Jan 2021 18:26:20 +0100
Subject: [PATCH 292/308] Updated all projects to atlasexternals-2.0.94.

---
 Projects/AnalysisBase/externals.txt   | 2 +-
 Projects/AthAnalysis/externals.txt    | 2 +-
 Projects/AthDataQuality/externals.txt | 2 +-
 Projects/AthGeneration/externals.txt  | 2 +-
 Projects/AthSimulation/externals.txt  | 2 +-
 Projects/Athena/externals.txt         | 2 +-
 Projects/VP1Light/externals.txt       | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index 5194df2180d4..6f29fd3eb990 100644
--- a/Projects/AnalysisBase/externals.txt
+++ b/Projects/AnalysisBase/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AnalysisBaseExternalsVersion = 2.0.93
+AnalysisBaseExternalsVersion = 2.0.94
diff --git a/Projects/AthAnalysis/externals.txt b/Projects/AthAnalysis/externals.txt
index daedfe45cd05..9443bd3f4f3d 100644
--- a/Projects/AthAnalysis/externals.txt
+++ b/Projects/AthAnalysis/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthAnalysisExternalsVersion = 2.0.93
+AthAnalysisExternalsVersion = 2.0.94
diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt
index 878d0bf1cf52..03b2a975de18 100644
--- a/Projects/AthDataQuality/externals.txt
+++ b/Projects/AthDataQuality/externals.txt
@@ -5,4 +5,4 @@
 # an "origin/" prefix before it. For tags however this is explicitly
 # forbidden.
 
-AtlasExternalsVersion = 2.0.93
+AtlasExternalsVersion = 2.0.94
diff --git a/Projects/AthGeneration/externals.txt b/Projects/AthGeneration/externals.txt
index d18f36322222..a736ffea2ce4 100644
--- a/Projects/AthGeneration/externals.txt
+++ b/Projects/AthGeneration/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthGenerationExternalsVersion = 2.0.93
+AthGenerationExternalsVersion = 2.0.94
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 900556adffda..6615a651a02d 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthSimulationExternalsVersion = 2.0.93
+AthSimulationExternalsVersion = 2.0.94
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 5e279150d955..71e844821dde 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthenaExternalsVersion = 2.0.93
+AthenaExternalsVersion = 2.0.94
diff --git a/Projects/VP1Light/externals.txt b/Projects/VP1Light/externals.txt
index 488dcf5ae416..09ca4fcf0c51 100644
--- a/Projects/VP1Light/externals.txt
+++ b/Projects/VP1Light/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-VP1LightExternalsVersion = 2.0.93
+VP1LightExternalsVersion = 2.0.94
-- 
GitLab


From ccf02e128758be0a981dec5c3c920b01c71ee1e6 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Tue, 5 Jan 2021 18:16:59 +0000
Subject: [PATCH 293/308] Add a method to modify CondAttrListCollection

Allow changing the channel number where a given AttributeList may be
found.
---
 .../CondAttrListCollection.h                  | 22 +++++++
 Generators/EvgenProdTools/CMakeLists.txt      |  4 +-
 .../EvgenProdTools/CountHepMC.h               |  2 +
 Generators/EvgenProdTools/src/CountHepMC.cxx  | 64 +++++++++++++++++++
 4 files changed, 90 insertions(+), 2 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h
index aee61872909d..7c31a9aa3473 100644
--- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h
@@ -114,6 +114,8 @@ public:
 
     /// channel number for index: (index = 0 to size-1)
     ChanNum              chanNum(unsigned int index) const;
+
+    bool                 fixChanNum(ChanNum oldChan, ChanNum newChan);
     
     /// attribute list for a given channel number
     const AttributeList& attributeList(ChanNum chanNum) const;
@@ -674,6 +676,26 @@ CondAttrListCollection::isSameButMinRange ( const CondAttrListCollection& rhs,
 }
 
     
+inline bool
+    CondAttrListCollection::fixChanNum(const ChanNum oldChan,
+                                       const ChanNum newChan) {
+      auto attrRet = m_attrMap.emplace(newChan, m_attrMap[oldChan]);
+      // if a new element was inserted, erase the old one
+      if (attrRet.second) m_attrMap.erase(oldChan);
+
+      auto iovRet = m_iovMap.emplace(newChan, m_iovMap[oldChan]);
+      // if a new element was inserted, erase the old one
+      if (iovRet.second) m_iovMap.erase(oldChan);
+
+      auto nameRet = m_nameMap.emplace(newChan, m_nameMap[oldChan]);
+      // if a new element was inserted, erase the old one
+      if (nameRet.second) m_nameMap.erase(oldChan);
+
+      return attrRet.first->first == newChan
+          && iovRet.first->first == newChan
+          && nameRet.first->first == newChan;
+    }
+    
     
 
 #endif // DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H
diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt
index a15920cd613c..6ff81b8bc62b 100644
--- a/Generators/EvgenProdTools/CMakeLists.txt
+++ b/Generators/EvgenProdTools/CMakeLists.txt
@@ -12,11 +12,11 @@ atlas_add_library( EvgenProdToolsLib
                    PUBLIC_HEADERS EvgenProdTools
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
                    LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AtlasHepMCsearchLib AthenaBaseComps TruthHelper GeneratorModulesLib GenInterfacesLib
-                   PRIVATE_LINK_LIBRARIES AthenaKernel EventInfo GaudiKernel TruthUtils )
+                   PRIVATE_LINK_LIBRARIES AthenaKernel EventInfo GaudiKernel TruthUtils IOVDbDataModel AthenaPoolUtilities )
 
 atlas_add_component( EvgenProdTools
                      src/components/*.cxx
-                     LINK_LIBRARIES EvgenProdToolsLib )
+                     LINK_LIBRARIES EvgenProdToolsLib IOVDbDataModel AthenaPoolUtilities )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h b/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h
index 1e4e196cfd59..16bab10dfbdc 100644
--- a/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h
+++ b/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h
@@ -28,6 +28,8 @@ public:
 
 private:
 
+  ServiceHandle< StoreGateSvc > m_metaDataStore{
+    "StoreGateSvc/MetaDataStore", name()};
   int m_nPass;
   int m_nCount;
 
diff --git a/Generators/EvgenProdTools/src/CountHepMC.cxx b/Generators/EvgenProdTools/src/CountHepMC.cxx
index 4f9d5a38afba..c0f8d0ff2660 100644
--- a/Generators/EvgenProdTools/src/CountHepMC.cxx
+++ b/Generators/EvgenProdTools/src/CountHepMC.cxx
@@ -15,6 +15,9 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 #include "EventInfo/EventType.h"
+#include "IOVDbDataModel/IOVMetaDataContainer.h"
+#include "IOVDbDataModel/IOVPayloadContainer.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include <cmath>
 #include <cassert>
 
@@ -100,10 +103,12 @@ else{
     // Change the EventID in the eventinfo header
     const EventInfo* pInputEvt(0);
     ATH_MSG_INFO("Set new run number called !!" << m_newRunNumber);
+    unsigned int oldRunNumber = 0;
     if (evtStore()->retrieve(pInputEvt).isSuccess()) {
       assert(pInputEvt);
       EventID* eventID = const_cast<EventID*>(pInputEvt->event_ID());
       ATH_MSG_INFO("git eventid !! " );
+      oldRunNumber = eventID->run_number();
       eventID->set_run_number(m_newRunNumber);
       ATH_MSG_INFO("Set new run number" << m_newRunNumber);
       ATH_MSG_DEBUG("Set new run number in event_ID");
@@ -118,6 +123,65 @@ else{
       ATH_MSG_ERROR("No EventInfo object found");
       return StatusCode::SUCCESS;
     }
+
+    {
+      // change the channel number where /Generation/Parameters are found
+      auto newChannelNumber =
+          static_cast< const CondAttrListCollection::ChanNum >(m_newRunNumber);
+      auto oldChannelNumber = 
+          static_cast< const CondAttrListCollection::ChanNum >(oldRunNumber);
+
+      const char* key = "/Generation/Parameters";
+      const IOVMetaDataContainer * iovContainer = nullptr;
+      if (m_metaDataStore->retrieve(iovContainer, key).isSuccess()
+          && iovContainer) {
+        // get a hold of the payload
+        const IOVPayloadContainer * payloadContainer =
+            iovContainer->payloadContainer();
+
+        // Grab the attribute list
+        for (CondAttrListCollection* collection : *payloadContainer) {
+          for(unsigned int index = 0; index < collection->size(); ++index) {
+            if (collection->chanNum(index) != oldChannelNumber) {
+              ATH_MSG_INFO("Not updating \"" << key << "\" on channel number "
+                           << collection->chanNum(index));
+              continue;
+            }
+
+            if (collection->fixChanNum(oldChannelNumber, newChannelNumber))
+              ATH_MSG_INFO("Updated \"" << key << "\" channel number from "
+                           << oldChannelNumber << " to " << newChannelNumber);
+            else
+              ATH_MSG_ERROR("Channel number update from " << oldChannelNumber
+                            << " to " << newChannelNumber << " on \"" << key
+                            << "\" FAILED");
+          }
+        }
+
+        {
+          // Update the MC channel number in the "/TagInfo"
+          const char* key = "/TagInfo";
+          const IOVMetaDataContainer * iovContainer = nullptr;
+          if (m_metaDataStore->retrieve(iovContainer, key).isSuccess()
+              && iovContainer) {
+            // get a hold of the payload
+            const IOVPayloadContainer * payloadContainer =
+              iovContainer->payloadContainer();
+
+            // Grab the attribute list
+            for (CondAttrListCollection* collection : *payloadContainer) {
+              for (auto pair : *collection) {
+                // pair is a pair of Channel number and AttributeList
+                if (pair.second.exists("mc_channel_number"))
+                  pair.second["mc_channel_number"].setValue(m_newRunNumber);
+              }
+            }
+          }
+        }
+      } else {
+        ATH_MSG_INFO("Could not retrieve \"" << key << "\" from MetaDataStore");
+      }
+    }
   }
 
 
-- 
GitLab


From 69063a07bd0e1693c67cca25ff53e724ded59704 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 5 Jan 2021 17:00:06 +0100
Subject: [PATCH 294/308] MuonPhysValMonitoring: Fix clang warnings.

Spurious copies in range for loops.
---
 .../MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx | 6 +++---
 .../MuonPhysValMonitoring/src/MuonValidationPlots.cxx       | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
index e706b0081e11..f5c85b5079a9 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 // MuonPhysValMonitoringTool.cxx 
@@ -204,7 +204,7 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
   if (m_slowMuonsName!="") separateSAFMuons = false; // no such muons in case of SlowMuon reco
   
   std::string muonContainerName = m_muonsName.name();
-  for (const auto category : m_selectMuonCategoriesStr) {
+  for (const auto& category : m_selectMuonCategoriesStr) {
     std::string categoryPath = m_muonsName+"/"+category+"/";
     m_muonValidationPlots.push_back( new MuonValidationPlots(0, categoryPath,
               m_selectMuonWPs, m_selectMuonAuthors, m_isData,
@@ -826,7 +826,7 @@ StatusCode MuonPhysValMonitoringTool::fillHistograms()
         }//m_vRecoMuons_EffDen
       }//m_muonItems
 //@@@@@ L1 items efficiency @@@@@
-      for (const auto L1MuonItem : m_L1MuonItems) { 
+      for (const auto& L1MuonItem : m_L1MuonItems) { 
         m_vRecoMuons_EffDen=m_vRecoMuons_EffDen_CB; m_SelectedAuthor=1;
         float treshold=0.;
         if(L1MuonItem=="L1_MU4") treshold=4000;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonValidationPlots.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonValidationPlots.cxx
index e41c54b36f2d..9dd0383c843b 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonValidationPlots.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonValidationPlots.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonValidationPlots.h"
@@ -16,7 +16,7 @@ MuonValidationPlots::MuonValidationPlots(PlotBase* pParent, std::string sDir,std
     m_truthSelections[1] = "MSAcceptance"; //truth muons in MS acceptance (at least 4 associated hits in the MS)
     
     //histogram classes for all muons
-    for(const auto truthSelection : m_truthSelections) {
+    for(const auto& truthSelection : m_truthSelections) {
       m_oTruthMuonPlots.push_back(new Muon::TruthMuonPlotOrganizer(this,"truth/"+truthSelection));
     }
     m_oTruthRelatedMuonPlots = new Muon::TruthRelatedMuonPlotOrganizer(this, "matched/AllMuons", doBinnedResolutionPlots);//, doMuonTree);
@@ -248,7 +248,7 @@ bool MuonValidationPlots::isGoodTruthTrack(const xAOD::TruthParticle& truthMu) {
   int nPrecHits=0;
   bool hasEnoughPrecHits=false;
 
-  for (const auto hitTypeItr : hitTypes) {
+  for (const auto& hitTypeItr : hitTypes) {
     if (truthMu.isAvailable<uint8_t>(hitTypeItr)) {
       nPrecHits+=truthMu.auxdata<uint8_t>(hitTypeItr);
       if (nPrecHits>=minPrecHits) {
-- 
GitLab


From f3c130420e3421f05f8233b9d201465784d5691b Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 5 Jan 2021 17:02:14 +0100
Subject: [PATCH 295/308] PMGTools: Fix clang warnings.

Spurious copies in range for loops.
---
 .../AnalysisCommon/PMGTools/Root/PMGCrossSectionTool.cxx      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGCrossSectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGCrossSectionTool.cxx
index aaa346dbd3c2..fd2014c2f3e1 100644
--- a/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGCrossSectionTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGCrossSectionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: PMGCrossSectionTool.cxx 764400 2016-07-26 17:47:39Z tripiana $
@@ -208,7 +208,7 @@ double PMGCrossSectionTool::getSampleXsection(const int dsid) const
 std::vector<int> PMGCrossSectionTool::getLoadedDSIDs() const {
   std::vector<int> dsids;
   dsids.reserve(m_fStoreSampleInfo.size());
-  for (const std::pair<unsigned, AllSampleInfo>& key_info : m_fStoreSampleInfo) {
+  for (const std::pair<const unsigned, AllSampleInfo>& key_info : m_fStoreSampleInfo) {
     dsids.push_back(key_info.second.dsid);
   }
   return dsids;
-- 
GitLab


From 6a7702cab35fd24a5eaa85f3700c859768437fa7 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 5 Jan 2021 17:03:40 +0100
Subject: [PATCH 296/308] Pythia8_i: Fix clang warnings.

Spurious copies in range for loops.
---
 Generators/Pythia8_i/src/Pythia8_i.cxx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Generators/Pythia8_i/src/Pythia8_i.cxx b/Generators/Pythia8_i/src/Pythia8_i.cxx
index 3ab4d5e2134f..a45a52a3bbd8 100644
--- a/Generators/Pythia8_i/src/Pythia8_i.cxx
+++ b/Generators/Pythia8_i/src/Pythia8_i.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 #include "Pythia8_i/Pythia8_i.h"
 #include "Pythia8_i/UserProcessFactory.h"
@@ -175,19 +175,19 @@ StatusCode Pythia8_i::genInitialize() {
     }
   }
 
-  for(const std::pair<std::string, double> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<double>()){
+  for(const std::pair<const std::string, double> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<double>()){
     m_pythia->settings.addParm(param.first, param.second, false, false, 0., 0.);
   }
 
-  for(const std::pair<std::string, int> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<int>()){
+  for(const std::pair<const std::string, int> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<int>()){
     m_pythia->settings.addMode(param.first, param.second, false, false, 0., 0.);
   }
 
-  for(const std::pair<std::string, int> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<bool>()){
+  for(const std::pair<const std::string, bool> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<bool>()){
     m_pythia->settings.addFlag(param.first, param.second);
   }
 
-  for(const std::pair<std::string, std::string> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<std::string>()){
+  for(const std::pair<const std::string, std::string> &param : Pythia8_UserHooks::UserHooksFactory::userSettings<std::string>()){
     m_pythia->settings.addWord(param.first, param.second);
   }
 
-- 
GitLab


From 062b8da332335400f284bc93ce63490855135277 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 5 Jan 2021 17:01:20 +0100
Subject: [PATCH 297/308] MuonPRDTest: Fix clang warnings.

If a dtor is final, the class itself should also be final.
---
 .../MuonValidation/MuonPRDTest/src/sTGCRDOVariables.h         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCRDOVariables.h b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCRDOVariables.h
index 3d7065337d5a..649a20199595 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCRDOVariables.h
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/src/sTGCRDOVariables.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STGCRDOVARIABLES_H
@@ -10,7 +10,7 @@
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include <vector>
 
-class sTGCRDOVariables : public ValAlgVariables
+class sTGCRDOVariables final : public ValAlgVariables
 {
  public:
  sTGCRDOVariables(StoreGateSvc* evtStore,
-- 
GitLab


From a0bb997b5175b24d187256524d7354aecb0445e9 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 5 Jan 2021 17:04:53 +0100
Subject: [PATCH 298/308] SiSpacePointsSeedTool_xk: Fix clang warnings.

Missing override keywords.
Unused private data members.
---
 .../SiSpacePointsSeedMaker_ATLxk.h                     | 10 +++-------
 .../SiSpacePointsSeedMaker_BeamGas.h                   |  6 +++---
 .../SiSpacePointsSeedMaker_Cosmic.h                    |  6 +++---
 .../SiSpacePointsSeedMaker_HeavyIon.h                  |  6 +++---
 .../SiSpacePointsSeedMaker_ITK.h                       |  6 +++---
 .../SiSpacePointsSeedMaker_LowMomentum.h               |  6 +++---
 .../SiSpacePointsSeedMaker_Trigger.h                   |  6 +++---
 7 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
index 1fa659963e5f..352c6c2f28ed 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ATLxk.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -128,9 +128,9 @@ namespace InDet {
     * and 1->Pixel. givesTrack is determined by whether or not the given seed forms atleast 
     * one track candidate. 0->No track candidate 1->At least one track Candidate
     **/  
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
@@ -495,7 +495,6 @@ namespace InDet {
 
     ITHistSvc* m_thistSvc;
 
-    TFile* m_outputFile;
     TTree* m_outputTree;
 
     mutable std::mutex m_mutex;
@@ -521,12 +520,9 @@ namespace InDet {
     mutable double                 m_r3                   ATLAS_THREAD_SAFE;
     mutable float                  m_quality              ATLAS_THREAD_SAFE;
     mutable int                    m_type                 ATLAS_THREAD_SAFE;
-    mutable int                    m_status               ATLAS_THREAD_SAFE;
     mutable double                 m_dzdr_t               ATLAS_THREAD_SAFE;
     mutable double                 m_dzdr_b               ATLAS_THREAD_SAFE;
     mutable bool                   m_givesTrack           ATLAS_THREAD_SAFE;
-    mutable float                  m_trackD0              ATLAS_THREAD_SAFE;
-    mutable float                  m_trackZ0              ATLAS_THREAD_SAFE;
     mutable float                  m_trackPt              ATLAS_THREAD_SAFE;
     mutable float                  m_trackEta             ATLAS_THREAD_SAFE;
     mutable long                   m_eventNumber          ATLAS_THREAD_SAFE;
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
index 5ec5f5ba0e18..1b187b0e0a54 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_BeamGas.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -111,9 +111,9 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long EventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long EventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
index a72164353de5..0e9fe2f3726f 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Cosmic.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -108,9 +108,9 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
index 19e54527894c..279de03a795f 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_HeavyIon.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -109,9 +109,9 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
index b922f7a3866b..2028e8920ce9 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_ITK.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -111,9 +111,9 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
index 153db9d6f5b3..ac72a3bc6a15 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_LowMomentum.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -109,9 +109,9 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
index 6ffa79a5ee93..9eb2eb2bd14f 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/SiSpacePointsSeedMaker_Trigger.h
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -107,9 +107,9 @@ namespace InDet {
     virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
     //@}
 
-    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const;
+    virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
 
-    virtual bool getWriteNtupleBoolProperty() const;
+    virtual bool getWriteNtupleBoolProperty() const override;
 
     ///////////////////////////////////////////////////////////////////
     /// @name Print internal tool parameters and status
-- 
GitLab


From 45fbf57c874cb6aea04c467ad3776d0f03748a93 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 5 Jan 2021 04:54:58 +0100
Subject: [PATCH 299/308] InDetRecExample: Fix PixelHitDiscCnfgAlg
 configuration.

Don't add PixelHitDiscCnfgAlg if we don't have a HitDiscCnfg folder.
Fixes failure in q222.
---
 .../InDetExample/InDetRecExample/share/InDetRecCabling.py   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py
index 2d4a13664345..f795da2578d4 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCabling.py
@@ -82,9 +82,9 @@ if DetFlags.detdescr.pixel_on() and not 'PixelCabling' in dir():
   if (conddb.dbdata=="CONDBR2" or (conddb.dbmc=="OFLP200" and geoFlags.isIBL()==True)) and not conddb.folderRequested("/PIXEL/HitDiscCnfg"):
     conddb.addFolderSplitMC("PIXEL","/PIXEL/HitDiscCnfg","/PIXEL/HitDiscCnfg", className="AthenaAttributeList")
 
-  if not hasattr(condSeq, 'PixelHitDiscCnfgAlg'):
-    from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelHitDiscCnfgAlg
-    condSeq += PixelHitDiscCnfgAlg(name="PixelHitDiscCnfgAlg")
+    if not hasattr(condSeq, 'PixelHitDiscCnfgAlg'):
+      from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelHitDiscCnfgAlg
+      condSeq += PixelHitDiscCnfgAlg(name="PixelHitDiscCnfgAlg")
 
   if not conddb.folderRequested("/PIXEL/ReadoutSpeed"):
     if not (globalflags.DataSource() == 'geant4'):
-- 
GitLab


From ca155fe8cf292f2b06676f7f8c2f8f322a87eed5 Mon Sep 17 00:00:00 2001
From: Patrick Scholer <patrick.scholer@cern.ch>
Date: Tue, 5 Jan 2021 18:55:30 +0000
Subject: [PATCH 300/308] Merge branch 'correctionOfShiftInDigi_21.3' into
 '21.3'

Introducing a z corection into MM digi to fix residuals

See merge request atlas/athena!39375
---
 .../MM_Digitization/MM_Digitization/MM_DigitizationTool.h     | 4 +++-
 .../MM_Digitization/src/MM_DigitizationTool.cxx               | 1 +
 .../MMClusterization/src/UTPCMMClusterBuilderTool.cxx         | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h
index b63adb39d108..351d5f3f9e95 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h
@@ -153,7 +153,7 @@ class MM_DigitizationTool : public PileUpToolBase {
 		//Three gas mixture mode,	Ar/CO2=93/7, Ar/CO2=80/20, Ar/CO2/Iso=93/5/2
 		//each mode have different transverseDiffusionSigma/longitudinalDiffusionSigma/driftVelocity/avalancheGain/interactionDensityMean/interactionDensitySigma/lorentzAngle
 		Gaudi::Property<float> m_qThreshold{this,"qThreshold",0.001,"Charge Threshold"};
-		Gaudi::Property<float> m_driftGapWidth{this,"DriftGapWidth",5.168,"Drift Gap Width of 5.04 mm + 0.128 mm (the amplification gap)"};
+		Gaudi::Property<float> m_driftGapWidth{this,"DriftGapWidth",5.04,"Drift Gap Width of 5.04 mm"};
 		Gaudi::Property<float> m_crossTalk1{this,"crossTalk1",0.2,"Strip Cross Talk with Nearest Neighbor"};
 		Gaudi::Property<float> m_crossTalk2{this,"crossTalk2",0.04,"Strip Cross Talk with 2nd Nearest Neighbor"};
 
@@ -173,6 +173,8 @@ class MM_DigitizationTool : public PileUpToolBase {
 		// Temporary until moving away from TRandom
 		Gaudi::Property<unsigned long int> m_randomSeed{this, "RandomSeed", 42, ""};
 
+		Gaudi::Property<double> m_correctShift{this,"correctShift",-0.244,"purely empirical shift to fix the z positions of clusters"}; //  12/20  pscholer
+
 		TFile *m_file{};
 		TTree *m_ntuple{};
 
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
index b950d26cebf1..b0fb4147fae8 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx
@@ -726,6 +726,7 @@ StatusCode MM_DigitizationTool::doDigitization(const EventContext& ctx) {
       /// move the initial track point to the readout plane
       int gasGap = m_idHelperSvc->mmIdHelper().gasGap(layerID);
       double shift = 0.5*detectorReadoutElement->getDesign(layerID)->thickness;
+      shift += m_correctShift;
       double scale = 0.0;
       if ( gasGap==1 || gasGap == 3) {
 	scale = -(stripLayerPosition.z() + shift)/localDirection.z();
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
index c87d3499a545..50be640b99e7 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
@@ -405,7 +405,7 @@ StatusCode Muon::UTPCMMClusterBuilderTool::finalFit(const std::vector<Muon::MMPr
     double cov = (s->GetCovarianceMatrix())(0,1);
     ATH_MSG_DEBUG("covariance is: "<<cov);
     double fitSlope = ffit->GetParameter(1);
-    double dHalfGap = 2.5;  // half the thickness of the gas gap
+    double dHalfGap = 2.52;  // half the thickness of the gas gap
     double interceptCorr = dHalfGap - ffit->GetParameter(0);
     x0 = interceptCorr/fitSlope;
     sigmaX0 = pow(m_scaleClusterError,2)*(pow(ffit->GetParError(0)/interceptCorr,2)+pow(ffit->GetParError(1)/fitSlope,2) - 2./(fitSlope*interceptCorr)*cov)*pow(x0,2);
-- 
GitLab


From 9dd2259458403f6b3a5be7ac247ca185a5ded374 Mon Sep 17 00:00:00 2001
From: Ruggero Turra <ruggero.turra@cern.ch>
Date: Tue, 5 Jan 2021 19:22:58 +0000
Subject: [PATCH 301/308] Python3 + flake8 ElectronPhotonFourMomentumCorrection

---
 .../CMakeLists.txt                            |    2 +-
 .../python/merge_scale_histograms.py          |    2 +-
 .../python/plot.py                            | 1701 +++++++++++------
 ...OD_ElectronPhotonFourMomentumCorrection.py |    9 +-
 4 files changed, 1108 insertions(+), 606 deletions(-)

diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/CMakeLists.txt
index 76dad01ad304..2c2d90c58d5e 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/CMakeLists.txt
@@ -66,5 +66,5 @@ if( XAOD_STANDALONE )
 endif()
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) 
 atlas_install_joboptions( share/*.py )
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py
index 0e461885105a..3e6510d4fa3f 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/merge_scale_histograms.py
@@ -51,7 +51,7 @@ def merge_histograms(old, new, merge_error=True):
             new_values.append(old.GetBinContent(iold))
             new_errors.append(old.GetBinError(iold))
             if ir_new == OVERFLOW:
-                remainer = iold
+                remainer = iold  # noqa: F841
             print("breaking")
             break
     last_old = iold
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/plot.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/plot.py
index ad16fedfaff2..8a8a5c221739 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/plot.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/plot.py
@@ -2,68 +2,78 @@
 
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-import numpy as np
+""" Produce plots about egamma calibration systematics and corrections """
+
 import logging
 import os
-from itertools import tee, izip, cycle, chain, product
-import matplotlib as mpl
-mpl.use('Agg')
-import matplotlib.pyplot as plt
-import matplotlib.patches as patches
-from matplotlib.ticker import MaxNLocator
-import matplotlib.lines as mlines
-import tqdm
-import colorlog
-import seaborn as sns
-from functools import wraps
 import time
 from fnmatch import fnmatch
+from functools import wraps
+from itertools import chain, cycle, product, tee
+
+import colorlog
+import matplotlib as mpl
+mpl.use("Agg")
+
+import matplotlib.lines as mlines
+import matplotlib.patches as patches
+import matplotlib.pyplot as plt
+import numpy as np
 import ROOT
+import seaborn as sns
+import tqdm
+from matplotlib.ticker import MaxNLocator
+from matplotlib import rcParams
+
+
 ROOT.PyConfig.IgnoreCommandLineOptions = True
 
-plt.rcParams['image.cmap'] = 'coolwarm'  # RdBu_r
+plt.rcParams["image.cmap"] = "coolwarm"  # RdBu_r
 
-from matplotlib import rcParams
-rcParams['font.family'] = 'sans-serif'
-rcParams['mathtext.fontset'] = 'stixsans'
-rcParams['mathtext.default'] = 'rm'
-rcParams['font.sans-serif'] = 'helvetica, Helvetica, Nimbus Sans L, Mukti Narrow, FreeSans'
+rcParams["font.family"] = "sans-serif"
+rcParams["mathtext.fontset"] = "stixsans"
+rcParams["mathtext.default"] = "rm"
+rcParams["font.sans-serif"] = "helvetica, Helvetica, Nimbus Sans L, Mukti Narrow, FreeSans"
 
 # axes
-rcParams['axes.labelsize'] = 20
-rcParams['xtick.minor.visible'] = True
-rcParams['ytick.minor.visible'] = True
-rcParams['xtick.direction'] = 'in'
-rcParams['ytick.direction'] = 'in'
-rcParams['xtick.labelsize'] = 19
-rcParams['xtick.major.size'] = 12
-rcParams['xtick.minor.size'] = 6
-rcParams['ytick.labelsize'] = 19
-rcParams['ytick.major.size'] = 14
-rcParams['ytick.minor.size'] = 7
-rcParams['lines.markersize'] = 8
-rcParams['ytick.right'] = True
-rcParams['xtick.top'] = True
+rcParams["axes.labelsize"] = 20
+rcParams["xtick.minor.visible"] = True
+rcParams["ytick.minor.visible"] = True
+rcParams["xtick.direction"] = "in"
+rcParams["ytick.direction"] = "in"
+rcParams["xtick.labelsize"] = 19
+rcParams["xtick.major.size"] = 12
+rcParams["xtick.minor.size"] = 6
+rcParams["ytick.labelsize"] = 19
+rcParams["ytick.major.size"] = 14
+rcParams["ytick.minor.size"] = 7
+rcParams["lines.markersize"] = 8
+rcParams["ytick.right"] = True
+rcParams["xtick.top"] = True
 # rcParams['lines.markeredgewidth'] = 0. # not working, it changes other stuff
 
 # legend
-rcParams['legend.numpoints'] = 1
-rcParams['legend.fontsize'] = 19
-rcParams['legend.labelspacing'] = 0.3
-#rcParams['legend.frameon'] = False
+rcParams["legend.numpoints"] = 1
+rcParams["legend.fontsize"] = 19
+rcParams["legend.labelspacing"] = 0.3
+# rcParams['legend.frameon'] = False
 
-extensions = 'pdf', 'png'
+extensions = "pdf", "png"
 
 
 def check_status_code(func):
     def wrapper(self, *args):
         status = func(self, *args)
         if not status.isSuccess():
-            raise ValueError('status is not success')
+            raise ValueError("status is not success")
         return status
+
     return wrapper
 
-ROOT.CP.EgammaCalibrationAndSmearingTool.initialize = check_status_code(ROOT.CP.EgammaCalibrationAndSmearingTool.initialize)
+
+ROOT.CP.EgammaCalibrationAndSmearingTool.initialize = check_status_code(
+    ROOT.CP.EgammaCalibrationAndSmearingTool.initialize
+)
 
 
 def timed(method):
@@ -73,29 +83,37 @@ def timed(method):
         result = method(*args, **kw)
         te = time.time()
 
-        log.info("function %s run in  %d second", method.__name__, te-ts)
+        log.info("function %s run in  %d second", method.__name__, te - ts)
         return result
+
     return timed
 
-def plot_ATLAS(fig, x, y, label='Internal', fontsize=20):
-    l = fig.text(x, y, 'ATLAS', fontsize=fontsize, fontstyle='italic', fontweight='bold')
+
+def plot_ATLAS(fig, x, y, label="Internal", fontsize=20):
+    label = fig.text(x, y, "ATLAS", fontsize=fontsize, fontstyle="italic", fontweight="bold")
+
     def on_draw(event):
-        x_right = l.get_window_extent().inverse_transformed(fig.transFigure).max[0]
+        x_right = label.get_window_extent().transformed(fig.transFigure.inverted()).max[0]
         fig.text(x_right, y, " " + label, fontsize=fontsize)
         fig.canvas.mpl_disconnect(cid)
         return False
-    cid = fig.canvas.mpl_connect('draw_event', on_draw)
+
+    cid = fig.canvas.mpl_connect("draw_event", on_draw)
     fig.canvas.draw()
 
-fout = ROOT.TFile('output_plot.root', 'recreate')
+
+fout = ROOT.TFile("output_plot.root", "recreate")
+
 
 def pairwise(iterable):
     "s -> (s0,s1), (s1,s2), (s2, s3), ..."
     a, b = tee(iterable)
     next(b, None)
-    return izip(a, b)
+    return zip(a, b)
+
 
 def divide_square(n, horizontal=True):
+    """ divide a figure into a square number of subplots in an optimized way """
     if horizontal:
         x = np.ceil(np.sqrt(n))
         y = np.floor(np.sqrt(n))
@@ -109,13 +127,12 @@ def divide_square(n, horizontal=True):
     return int(x), int(y)
 
 
-
 def histo2data(histo):
     xs = []
     ys = []
     exs = []
     eys = []
-    for ibin in xrange(1, histo.GetNbinsX() + 1):
+    for ibin in range(1, histo.GetNbinsX() + 1):
         xs.append(histo.GetBinCenter(ibin))
         ys.append(histo.GetBinContent(ibin))
         eys.append(histo.GetBinError(ibin))
@@ -124,14 +141,15 @@ def histo2data(histo):
 
 
 def systematics_from_tool(tool, only_scale=True, only_resolution=False, only_up=True):
+    """ return name of the systematics """
     _ = tool.recommendedSystematics()
     for sys in _:
         sys_name = sys.name()
-        if only_scale and 'RESOLUTION' in sys_name:
+        if only_scale and "RESOLUTION" in sys_name:
             continue
-        if only_resolution and 'SCALE' in sys_name:
+        if only_resolution and "SCALE" in sys_name:
             continue
-        if only_up and '1down' in sys_name:
+        if only_up and "1down" in sys_name:
             continue
         yield sys
 
@@ -153,13 +171,13 @@ def generator_photon(self):
 
     factory = ROOT.EgammaFactory(store)
     for eta in np.arange(-2.5, 2.5, 0.05):
-        for e in np.arange(1E3, 1000E3, 100E3):
+        for e in np.arange(1e3, 1000e3, 100e3):
             photon = factory.create_photon(eta, 0.1, e, 0)
             yield photon
     store.clear()
 
 
-def calibrate_eta_pt(tool, etas, pts, simulation=True, particle='unconverted'):
+def calibrate_eta_pt(tool, etas, pts, simulation=True, particle="unconverted"):
     log.debug("creating TEvent and EgammaFactory")
     event = ROOT.xAOD.TEvent()
     factory = ROOT.EgammaFactory()
@@ -169,33 +187,33 @@ def calibrate_eta_pt(tool, etas, pts, simulation=True, particle='unconverted'):
     log.debug("looping")
     for ieta, eta in enumerate(etas):
         for ipt, pt in enumerate(pts):
-            if particle == 'unconverted':
+            if particle == "unconverted":
                 p = factory.create_photon(eta, 0.1, pt * np.cosh(eta), 0)
-            elif particle == 'converted':
+            elif particle == "converted":
                 p = factory.create_photon(eta, 0.1, pt * np.cosh(eta), 100)
-            elif particle == 'electron':
+            elif particle == "electron":
                 p = factory.create_electron(eta, 0.1, pt * np.cosh(eta))
             else:
                 raise ValueError()
             result[ipt, ieta] = tool.getEnergy(p, ei)
     log.debug("deleting event")
     del event
-    log.debug("returning result %s" % result)
+    log.debug("returning result %s", result)
     return result
 
 
-def eval_sys_eta_phi(tool, etas, phis, pt, simulation, particle='unconverted'):
+def eval_sys_eta_phi(tool, etas, phis, pt, simulation, particle="unconverted"):
     event = ROOT.xAOD.TEvent()
     factory = ROOT.EgammaFactory()
     result = np.ones((len(etas), len(phis)))
     ei = factory.create_eventinfo(simulation, 100000)
     for ieta, eta in enumerate(etas):
         for iphi, phi in enumerate(phis):
-            if particle == 'unconverted':
+            if particle == "unconverted":
                 p = factory.create_photon(eta, phi, pt * np.cosh(eta), 0)
-            elif particle == 'converted':
+            elif particle == "converted":
                 p = factory.create_photon(eta, phi, pt * np.cosh(eta), 100)
-            elif particle == 'electron':
+            elif particle == "electron":
                 p = factory.create_electron(eta, phi, pt * np.cosh(eta))
             else:
                 raise ValueError()
@@ -213,12 +231,12 @@ def eval_eta_slice(tool, etas, pts, ptype, only_material=False, only_up=True):
     results = {}
     for sys in all_syst:
         sys_name = sys.name()
-        if 'RESOLUTION' in sys_name:
+        if "RESOLUTION" in sys_name:
             continue
-        if '1down' in sys_name and only_up:
+        if "1down" in sys_name and only_up:
             continue
         if only_material:
-            if 'MAT' not in sys_name:
+            if "MAT" not in sys_name:
                 continue
         log.info("computing sys %s, %d eta samplings", sys_name, len(etas))
         sys_set = ROOT.CP.SystematicSet()
@@ -235,51 +253,75 @@ def eval_eta_slice(tool, etas, pts, ptype, only_material=False, only_up=True):
 
 
 def beautify_sysname(sysname):
-    d = {"EG_SCALE_PEDESTAL": "Pedestal",
-         "EG_SCALE_L2GAIN": "L2 gain",
-         "EG_SCALE_L1GAIN": "L1 gain",
-         "EG_SCALE_PS": r"$\alpha_{PS}$",
-         "EG_SCALE_S12": r"$\alpha_{1/2}$",
-         "EG_SCALE_S12EXTRALASTETABINRUN2": r"$\alpha_{1/2}$ [2.4-2.5]",
-         "EG_SCALE_ZEESYST": r"$Z\to ee$ cal. (sys)",
-         "EG_SCALE_ZEESTAT": r"$Z\to ee$ cal. (stat)",
-         "PH_SCALE_LEAKAGEUNCONV": "Leakage unconverted",
-         "EG_SCALE_MATID": "ID material",
-         "EG_SCALE_MATCRYO": "Cryo material",
-         "EG_SCALE_MATPP0": "PP0 material",
-         "EG_SCALE_WTOTS1": "$w_{tots1}$ non-lin.",
-         "EG_SCALE_CONVEFFICIENCY": "Conversion efficiency",
-         "EG_SCALE_MATCALO": "Calo material",
-         "EG_SCALE_ZEE_STAT": r"$Z\to ee$ (stat)",
-         "EG_SCALE_G4": "Geant4",
-         "PH_SCALE_LEAKAGECONV": "Leakage converted",
-         "PH_SCALE_CONVRADIUS": "Conv. radius",
-         "PH_SCALE_CONVFAKERATE": "Conv. fake rate",
-         "PH_SCALE_CONVEFFICIENCY": "Conv. efficiency",
-         "EG_SCALE_LARCALIB": r"$\alpha_{1/2}$ $\mu\to e$ extrap.",
-         "EG_SCALE_E4SCINTILLATOR": "Scintillators",
-         "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE": r"Temp. 2015 $\to$ 2016",
-         "EG_SCALE_LARCALIB_EXTRA2015PRE": r"$\alpha_{1/2}$ Run 1 $\to$ Run 2",
-         }
+    d = {
+        "EG_SCALE_PEDESTAL": "Pedestal",
+        "EG_SCALE_L2GAIN": "L2 gain",
+        "EG_SCALE_L1GAIN": "L1 gain",
+        "EG_SCALE_PS": r"$\alpha_{PS}$",
+        "EG_SCALE_S12": r"$\alpha_{1/2}$",
+        "EG_SCALE_S12EXTRALASTETABINRUN2": r"$\alpha_{1/2}$ [2.4-2.5]",
+        "EG_SCALE_ZEESYST": r"$Z\to ee$ cal. (sys)",
+        "EG_SCALE_ZEESTAT": r"$Z\to ee$ cal. (stat)",
+        "PH_SCALE_LEAKAGEUNCONV": "Leakage unconverted",
+        "EG_SCALE_MATID": "ID material",
+        "EG_SCALE_MATCRYO": "Cryo material",
+        "EG_SCALE_MATPP0": "PP0 material",
+        "EG_SCALE_WTOTS1": "$w_{tots1}$ non-lin.",
+        "EG_SCALE_CONVEFFICIENCY": "Conversion efficiency",
+        "EG_SCALE_MATCALO": "Calo material",
+        "EG_SCALE_ZEE_STAT": r"$Z\to ee$ (stat)",
+        "EG_SCALE_G4": "Geant4",
+        "PH_SCALE_LEAKAGECONV": "Leakage converted",
+        "PH_SCALE_CONVRADIUS": "Conv. radius",
+        "PH_SCALE_CONVFAKERATE": "Conv. fake rate",
+        "PH_SCALE_CONVEFFICIENCY": "Conv. efficiency",
+        "EG_SCALE_LARCALIB": r"$\alpha_{1/2}$ $\mu\to e$ extrap.",
+        "EG_SCALE_E4SCINTILLATOR": "Scintillators",
+        "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE": r"Temp. 2015 $\to$ 2016",
+        "EG_SCALE_LARCALIB_EXTRA2015PRE": r"$\alpha_{1/2}$ Run 1 $\to$ Run 2",
+    }
     return d.get(sysname, sysname)
 
+
 def beautify_particle(particle):
-    d = {'electron': 'Electrons',
-         'converted': 'Converted photons',
-         'unconverted': 'Unconverted photons'}
+    d = {
+        "electron": "Electrons",
+        "converted": "Converted photons",
+        "unconverted": "Unconverted photons",
+    }
     return d.get(particle, particle).capitalize()
 
-def plot_all_syst_eta_slice(etabins, supersampling_eta=3, esmodel='es2012c', decorrelation='FULL_v1', ptype='unconverted', pts=np.logspace(np.log10(5E3), 6, 100),
-                            basedir='plot', only_material=False, beautify_sysnames=False,
-                            sys_order=None, superimpose_all=False, skip_null_sys=False, min_sys=-0.02, max_sys=0.02,
-                            only_up=True, debug=False, legend_outside=False, symmetrize_labels=False, log_x=False,
-                            plot_qsum=False, abs_sys=False, atlas_label='Internal'):
+
+def plot_all_syst_eta_slice(
+    etabins,
+    supersampling_eta=3,
+    esmodel="es2012c",
+    decorrelation="FULL_v1",
+    ptype="unconverted",
+    pts=np.logspace(np.log10(5e3), 6, 100),
+    basedir="plot",
+    only_material=False,
+    beautify_sysnames=False,
+    sys_order=None,
+    superimpose_all=False,
+    skip_null_sys=False,
+    min_sys=-0.02,
+    max_sys=0.02,
+    only_up=True,
+    debug=False,
+    legend_outside=False,
+    symmetrize_labels=False,
+    log_x=False,
+    plot_qsum=False,
+    abs_sys=False,
+    atlas_label="Internal",
+):
     tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
     tool.setProperty("ESModel", esmodel)
     tool.setProperty("decorrelationModel", decorrelation)
-    tool.setProperty("int")("doSmearing", 0)
-    log.warning('setting randomRunNumber to 297730')
-    tool.setProperty("int")("randomRunNumber", 297730)
+    tool.setProperty[bool]("doSmearing", 0)
+    log.warning("setting randomRunNumber to 297730")
+    tool.setProperty[int]("randomRunNumber", 297730)
     if debug:
         tool.msg().setLevel(0)
 
@@ -289,32 +331,82 @@ def plot_all_syst_eta_slice(etabins, supersampling_eta=3, esmodel='es2012c', dec
         tool_all = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_all")
         tool_all.setProperty("ESModel", esmodel)
         tool_all.setProperty("decorrelationModel", "1NP_v1")
-        tool_all.setProperty("int")("doSmearing", 0)
-        log.warning('setting randomRunNumber to 297730')
-        tool_all.setProperty("int")("randomRunNumber", 297730)
+        tool_all.setProperty[bool]("doSmearing", 0)
+        log.warning("setting randomRunNumber to 297730")
+        tool_all.setProperty[int]("randomRunNumber", 297730)
         tool_all.initialize()
 
-
-
     # compute the eta-inclusive one, just to sort
-    log.info('compute sys inclusively, just to sort sys by importance')
-    results = eval_eta_slice(tool, np.linspace(-2.5, 2.5, 20),
-                             np.linspace(10E3, 200E3, 10),       # use this range to mimic the range in the paper
-                             ptype, only_material)
+    log.info("compute sys inclusively, just to sort sys by importance")
+    results = eval_eta_slice(
+        tool,
+        np.linspace(-2.5, 2.5, 20),
+        np.linspace(10e3, 200e3, 10),  # use this range to mimic the range in the paper
+        ptype,
+        only_material,
+    )
     sorted_sys_name = sorted(list(results), key=lambda k: -np.max(np.abs(results[k])))
     if skip_null_sys:
-        sorted_sys_name = [sys_name for sys_name in sorted_sys_name if np.sum(results[sys_name]) != 0]
-    if sys_order:
-        if sys_order == 'paper_run1':
-            partitions = [["EG_SCALE_PS__1up", "EG_SCALE_S12__1up", "EG_SCALE_LARCALIB__1up", "EG_SCALE_L2GAIN__1up"],
-                          ["EG_SCALE_MATID__1up", "EG_SCALE_MATCRYO__1up", "EG_SCALE_MATCALO__1up", "EG_SCALE_ZEESYST__1up"]]
+        sorted_sys_name = [
+            sys_name for sys_name in sorted_sys_name if np.sum(results[sys_name]) != 0
+        ]
+    if sys_order is not None:
+        if sys_order == "paper_run1":
+            partitions = [
+                [
+                    "EG_SCALE_PS__1up",
+                    "EG_SCALE_S12__1up",
+                    "EG_SCALE_LARCALIB__1up",
+                    "EG_SCALE_L2GAIN__1up",
+                ],
+                [
+                    "EG_SCALE_MATID__1up",
+                    "EG_SCALE_MATCRYO__1up",
+                    "EG_SCALE_MATCALO__1up",
+                    "EG_SCALE_ZEESYST__1up",
+                ],
+            ]
             if esmodel == "es2016PRE":
-                partitions += [["EG_SCALE_PEDESTAL__1up", "EG_SCALE_LARCALIB_EXTRA2015PRE__1up", "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__1up", "EG_SCALE_E4SCINTILLATOR__1up"]]
-        elif sys_order == 'paper_run2':
-            partitions = [["EG_SCALE_PS__1up", "EG_SCALE_S12__1up", "EG_SCALE_LARCALIB__1up", "EG_SCALE_LARCALIB_EXTRA2015PRE__1up", "EG_SCALE_S12EXTRALASTETABINRUN2"],
-                          ["EG_SCALE_MATID__1up", "EG_SCALE_MATCRYO__1up", "EG_SCALE_MATCALO__1up", "EG_SCALE_MATPP0__1up", "EG_SCALE_ZEESYST__1up"],
-                          ["EG_SCALE_L2GAIN__1up", "EG_SCALE_WTOTS1__1up", "EG_SCALE_PEDESTAL__1up", "EG_SCALE_E4SCINTILLATOR__1up"],
-                          ["PH_SCALE_CONVEFFICIENCY__1up", "PH_SCALE_CONVFAKERATE__1up", "PH_SCALE_CONVRADIUS__1up", "PH_SCALE_LEAKAGECONV__1up", "PH_SCALE_LEAKAGEUNCONV__1up"]]
+                partitions += [
+                    [
+                        "EG_SCALE_PEDESTAL__1up",
+                        "EG_SCALE_LARCALIB_EXTRA2015PRE__1up",
+                        "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__1up",
+                        "EG_SCALE_E4SCINTILLATOR__1up",
+                    ]
+                ]
+        elif sys_order == "paper_run2":
+            partitions = [
+                [
+                    "EG_SCALE_PS__1up",
+                    "EG_SCALE_S12__1up",
+                    "EG_SCALE_LARCALIB__1up",
+                    "EG_SCALE_LARCALIB_EXTRA2015PRE__1up",
+                    "EG_SCALE_S12EXTRALASTETABINRUN2",
+                ],
+                [
+                    "EG_SCALE_MATID__1up",
+                    "EG_SCALE_MATCRYO__1up",
+                    "EG_SCALE_MATCALO__1up",
+                    "EG_SCALE_MATPP0__1up",
+                    "EG_SCALE_ZEESYST__1up",
+                ],
+                [
+                    "EG_SCALE_L2GAIN__1up",
+                    "EG_SCALE_WTOTS1__1up",
+                    "EG_SCALE_PEDESTAL__1up",
+                    "EG_SCALE_E4SCINTILLATOR__1up",
+                ],
+                [
+                    "PH_SCALE_CONVEFFICIENCY__1up",
+                    "PH_SCALE_CONVFAKERATE__1up",
+                    "PH_SCALE_CONVRADIUS__1up",
+                    "PH_SCALE_LEAKAGECONV__1up",
+                    "PH_SCALE_LEAKAGEUNCONV__1up",
+                ],
+            ]
+        else:
+            raise ValueError("cannot understand sys_order = %s" % sys_order)
         flat_list = [item for sublist in partitions for item in sublist]
         remainers = [item for item in sorted_sys_name if item not in flat_list]
         partitions = chain(partitions, partition(remainers, 4))
@@ -323,75 +415,104 @@ def plot_all_syst_eta_slice(etabins, supersampling_eta=3, esmodel='es2012c', dec
     partitions = list(partitions)
 
     for etamin, etamax in tqdm.tqdm(etabins):
-        log.info('plotting eta range %.2f %.2f', etamin, etamax)
+        log.info("plotting eta range %.2f %.2f", etamin, etamax)
         etas = np.linspace(etamin, etamax, supersampling_eta + 2)[1:-1]
         results = eval_eta_slice(tool, etas, pts, ptype, only_material, only_up=only_up)
-        qsum = np.sqrt((np.array(results.values()) ** 2).sum(axis=0))
+        result_values = np.array(list(results.values()))
+        qsum = np.sqrt((result_values ** 2).sum(axis=0))
 
         if superimpose_all:
             results_all = eval_eta_slice(tool_all, etas, pts, ptype, only_up=False)
 
         for ip, p in enumerate(partitions):
-            log.info('plotting %d/%d', ip + 1, len(partitions))
+            log.info("plotting %d/%d", ip + 1, len(partitions))
 
             f, ax = plt.subplots()
             if superimpose_all:
-                #max_up_down = np.max(np.abs([results_all["EG_SCALE_ALL__1down"],
-                                             #results_all["EG_SCALE_ALL__1up"]]), axis=0)
-                #ax.fill_between(pts / 1E3, -max_up_down * 100., max_up_down * 100,
-                                #color='0.8', label='total')
-                #ax.plot(pts/1E3, np.sqrt(np.sum([r ** 2 for r in results.values()], axis=0)) * 100., 'r:')
+                # max_up_down = np.max(np.abs([results_all["EG_SCALE_ALL__1down"],
+                # results_all["EG_SCALE_ALL__1up"]]), axis=0)
+                # ax.fill_between(pts / 1E3, -max_up_down * 100., max_up_down * 100,
+                # color='0.8', label='total')
+                # ax.plot(pts/1E3, np.sqrt(np.sum([r ** 2 for r in results.values()], axis=0)) * 100., 'r:')
                 if only_up:
                     if abs_sys:
-                        ax.fill_between(pts / 1E3, 0, results_all["EG_SCALE_ALL__1up"] * 100,
-                                    color='0.8', label='Total')
+                        ax.fill_between(
+                            pts / 1e3,
+                            0,
+                            results_all["EG_SCALE_ALL__1up"] * 100,
+                            color="0.8",
+                            label="Total",
+                        )
                     else:
-                        ax.fill_between(pts / 1E3, -results_all["EG_SCALE_ALL__1up"] * 100., results_all["EG_SCALE_ALL__1up"] * 100,
-                                    color='0.8', label='Total')
+                        ax.fill_between(
+                            pts / 1e3,
+                            -results_all["EG_SCALE_ALL__1up"] * 100.0,
+                            results_all["EG_SCALE_ALL__1up"] * 100,
+                            color="0.8",
+                            label="Total",
+                        )
                 else:
-                    ax.fill_between(pts / 1E3, results_all["EG_SCALE_ALL__1down"] * 100., results_all["EG_SCALE_ALL__1up"] * 100,
-                                    color='0.8', label='Total')
+                    ax.fill_between(
+                        pts / 1e3,
+                        results_all["EG_SCALE_ALL__1down"] * 100.0,
+                        results_all["EG_SCALE_ALL__1up"] * 100,
+                        color="0.8",
+                        label="Total",
+                    )
             for isys, sys_name in enumerate(p):
-                color = 'C%d' % isys  # TODO: fix, use cycle
+                color = "C%d" % isys  # TODO: fix, use cycle
                 if sys_name not in results:
-                    continue  ## TODO: FIXME
+                    continue  # TODO: FIXME
                 r = results[sys_name]
                 r[np.isnan(r)] = 0
-                sys_label = beautify_sysname(sys_name.replace('__1up', '')) if beautify_sysnames else sys_name
+                sys_label = (
+                    beautify_sysname(sys_name.replace("__1up", ""))
+                    if beautify_sysnames
+                    else sys_name
+                )
                 if not only_up:
                     sys_label += " UP"
                 if abs_sys:
                     mask_positive = r >= 0
                     r = np.abs(r)
-                    ax.plot(pts[mask_positive] / 1E3, r[mask_positive] * 100., label=sys_label, color=color)
-                    ax.plot(pts[~mask_positive] / 1E3, r[~mask_positive] * 100., "--", color=color)
+                    ax.plot(
+                        pts[mask_positive] / 1e3,
+                        r[mask_positive] * 100.0,
+                        label=sys_label,
+                        color=color,
+                    )
+                    ax.plot(pts[~mask_positive] / 1e3, r[~mask_positive] * 100.0, "--", color=color)
                 else:
-                    ax.plot(pts / 1E3, r * 100., label=sys_label, color=color)
+                    ax.plot(pts / 1e3, r * 100.0, label=sys_label, color=color)
 
             if not only_up:
                 ax.set_prop_cycle(None)
                 for sys_name in p:
-                    sys_name = sys_name.replace('up', 'down')
+                    sys_name = sys_name.replace("up", "down")
                     if sys_name not in results:
-                        continue  ## TODO: FIXME
+                        continue  # TODO: FIXME
                     r = results[sys_name]
                     r[np.isnan(r)] = 0
-                    sys_label = beautify_sysname(sys_name.replace('__1down', '')) if beautify_sysnames else sys_name
-                    sys_label += ' DOWN'
-                    ax.plot(pts / 1E3, r * 100., label=sys_label, linestyle='--')
+                    sys_label = (
+                        beautify_sysname(sys_name.replace("__1down", ""))
+                        if beautify_sysnames
+                        else sys_name
+                    )
+                    sys_label += " DOWN"
+                    ax.plot(pts / 1e3, r * 100.0, label=sys_label, linestyle="--")
 
             if plot_qsum:
-                ax.plot(pts / 1E3, qsum * 100, label='quadrature sum', linestyle=':')
+                ax.plot(pts / 1e3, qsum * 100, label="quadrature sum", linestyle=":")
 
-            ax.set_xlabel('$E_T$ [GeV]', ha='right', x=1., fontsize=19)
+            ax.set_xlabel("$E_T$ [GeV]", ha="right", x=1.0, fontsize=19)
             if abs_sys:
-                ax.set_ylabel('Uncertainty [%]', ha='right', y=1., fontsize=19)
+                ax.set_ylabel("Uncertainty [%]", ha="right", y=1.0, fontsize=19)
             else:
-                ax.set_ylabel('Signed uncertainty [%]', ha='right', y=1., fontsize=19)
+                ax.set_ylabel("Signed uncertainty [%]", ha="right", y=1.0, fontsize=19)
 
-            ax.tick_params(axis='both', which='major', labelsize=17)
+            ax.tick_params(axis="both", which="major", labelsize=17)
 
-            ax.axis('tight')
+            ax.axis("tight")
 
             if max_sys is None and min_sys is None:
                 max_sys = max(2, np.max(np.abs(ax.get_ylim())))
@@ -400,108 +521,149 @@ def plot_all_syst_eta_slice(etabins, supersampling_eta=3, esmodel='es2012c', dec
             ax.set_ylim(min_sys * 100, max_sys * 100)
 
             if legend_outside:
-                ax.legend(bbox_to_anchor=(0., 1., 1, 0.2), mode='expand', borderaxespad=0.,
-                          loc=3, frameon=True, fontsize=17 if only_up else 14, borderpad=1, ncol=1 if only_up else 2)
+                ax.legend(
+                    bbox_to_anchor=(0.0, 1.0, 1, 0.2),
+                    mode="expand",
+                    borderaxespad=0.0,
+                    loc=3,
+                    frameon=True,
+                    fontsize=17 if only_up else 14,
+                    borderpad=1,
+                    ncol=1 if only_up else 2,
+                )
                 f.subplots_adjust(top=0.65)
                 plot_ATLAS(f, 0.2, 0.58, label=atlas_label)
                 f.text(0.2, 0.2, beautify_particle(ptype), transform=ax.transAxes, fontsize=16)
-                f.text(0.2, 0.25, r'$%.2f < \eta < %.2f$' % (etamin, etamax), transform=ax.transAxes, fontsize=16)
+                f.text(
+                    0.2,
+                    0.25,
+                    r"$%.2f < \eta < %.2f$" % (etamin, etamax),
+                    transform=ax.transAxes,
+                    fontsize=16,
+                )
             else:
-                ax.legend(loc=1, frameon=False, fontsize=13 if only_up else 9, borderpad=1, ncol=1 if only_up else 2)
+                ax.legend(
+                    loc=1,
+                    frameon=False,
+                    fontsize=13 if only_up else 9,
+                    borderpad=1,
+                    ncol=1 if only_up else 2,
+                )
 
                 plot_ATLAS(f, 0.16, 0.80, label=atlas_label, fontsize=19)
                 f.text(0.16, 0.74, beautify_particle(ptype), transform=ax.transAxes, fontsize=16)
-                f.text(0.16, 0.68, r'$%.2f < \eta < %.2f$' % (etamin, etamax), transform=ax.transAxes, fontsize=16)
+                f.text(
+                    0.16,
+                    0.68,
+                    r"$%.2f < \eta < %.2f$" % (etamin, etamax),
+                    transform=ax.transAxes,
+                    fontsize=16,
+                )
 
             if log_x:
-                ax.set_xscale('log')
+                ax.set_xscale("log")
 
             for extension in extensions:
-                f.savefig(os.path.join(basedir, "%s_%s_%s_%.2f_%.2f_%d.%s" % (ptype, esmodel, decorrelation, etamin, etamax, ip, extension)), bbox_inches='tight')
+                f.savefig(
+                    os.path.join(
+                        basedir,
+                        "%s_%s_%s_%.2f_%.2f_%d.%s"
+                        % (ptype, esmodel, decorrelation, etamin, etamax, ip, extension),
+                    ),
+                    bbox_inches="tight",
+                )
             plt.close(f)
 
 
 def values2histo(name, title, x, y):
     histo = ROOT.TH1F(name, title, len(x) - 1, x)
-    for ibin, yy, in enumerate(y, 1):
+    for (
+        ibin,
+        yy,
+    ) in enumerate(y, 1):
         histo.SetBinContent(ibin, yy)
     return histo
 
 
-def plot_all_Zee_syst(etas, pt=100E3, basedir='plots'):
+def plot_all_Zee_syst(etas, pt=100e3, basedir="plots"):
 
     tool_es2012c = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2012c")
     tool_es2012c.setProperty("ESModel", "es2012c")
-    tool_es2012c.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool_es2012c.setProperty("int")("doSmearing", 0)
+    tool_es2012c.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool_es2012c.setProperty[int]("doSmearing", 0)
     tool_es2012c.initialize()
 
     tool_es2015PRE = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE")
     tool_es2015PRE.setProperty("ESModel", "es2015PRE")
-    tool_es2015PRE.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool_es2015PRE.setProperty("int")("doSmearing", 0)
+    tool_es2015PRE.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool_es2015PRE.setProperty[bool]("doSmearing", 0)
     tool_es2015PRE.initialize()
 
     tool_es2015PRE_notemp = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE_notemp")
     tool_es2015PRE_notemp.setProperty("ESModel", "es2015PRE")
-    tool_es2015PRE_notemp.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool_es2015PRE_notemp.setProperty("int")("doSmearing", 0)
-    tool_es2015PRE_notemp.setProperty("int")("use_temp_correction201215", 0)
+    tool_es2015PRE_notemp.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool_es2015PRE_notemp.setProperty[bool]("doSmearing", 0)
+    tool_es2015PRE_notemp.setProperty[int]("use_temp_correction201215", 0)
     tool_es2015PRE_notemp.initialize()
 
     tools = [tool_es2012c, tool_es2015PRE_notemp, tool_es2015PRE]
 
-    nominal_es2012c = calibrate_eta_pt(tool_es2012c, etas, [pt], particle='electron')[0]
-    nominal_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle='electron')[0]
-    nominal_es2015PRE_notemp = calibrate_eta_pt(tool_es2015PRE_notemp, etas, [pt], particle='electron')[0]
+    nominal_es2012c = calibrate_eta_pt(tool_es2012c, etas, [pt], particle="electron")[0]
+    nominal_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle="electron")[0]
+    nominal_es2015PRE_notemp = calibrate_eta_pt(
+        tool_es2015PRE_notemp, etas, [pt], particle="electron"
+    )[0]
 
     # up variations
-    sys = ROOT.CP.SystematicVariation('EG_SCALE_ZEESYST', 1)
+    sys = ROOT.CP.SystematicVariation("EG_SCALE_ZEESYST", 1)
     sys_set = ROOT.CP.SystematicSet()
     sys_set.insert(sys)
 
     for tool in tools:
         tool.applySystematicVariation(sys_set)
 
-    sys_up_es2012c = calibrate_eta_pt(tool_es2012c, etas, [pt], particle='electron')[0]
-    sys_up_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle='electron')[0]
-    sys_up_es2015PRE_notemp = calibrate_eta_pt(tool_es2015PRE_notemp, etas, [pt], particle='electron')[0]
+    sys_up_es2012c = calibrate_eta_pt(tool_es2012c, etas, [pt], particle="electron")[0]
+    sys_up_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle="electron")[0]
+    sys_up_es2015PRE_notemp = calibrate_eta_pt(
+        tool_es2015PRE_notemp, etas, [pt], particle="electron"
+    )[0]
 
     ratio_sys_up_es2012c = sys_up_es2012c / nominal_es2012c - 1
     ratio_sys_up_es2015PRE = sys_up_es2015PRE / nominal_es2015PRE - 1
     ratio_sys_up_es2015PRE_notemp = sys_up_es2015PRE_notemp / nominal_es2015PRE_notemp - 1
 
     # down variations
-    sys = ROOT.CP.SystematicVariation('EG_SCALE_ZEESYST', -1)
+    sys = ROOT.CP.SystematicVariation("EG_SCALE_ZEESYST", -1)
     sys_set = ROOT.CP.SystematicSet()
     sys_set.insert(sys)
 
     for tool in tools:
         tool.applySystematicVariation(sys_set)
 
-    sys_down_es2012c = calibrate_eta_pt(tool_es2012c, etas, [pt], particle='electron')[0]
-    sys_down_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle='electron')[0]
-    sys_down_es2015PRE_notemp = calibrate_eta_pt(tool_es2015PRE_notemp, etas, [pt], particle='electron')[0]
+    sys_down_es2012c = calibrate_eta_pt(tool_es2012c, etas, [pt], particle="electron")[0]
+    sys_down_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle="electron")[0]
+    sys_down_es2015PRE_notemp = calibrate_eta_pt(
+        tool_es2015PRE_notemp, etas, [pt], particle="electron"
+    )[0]
 
     ratio_sys_down_es2012c = sys_down_es2012c / nominal_es2012c - 1
     ratio_sys_down_es2015PRE = sys_down_es2015PRE / nominal_es2015PRE - 1
     ratio_sys_down_es2015PRE_notemp = sys_down_es2015PRE_notemp / nominal_es2015PRE_notemp - 1
 
     # up stat
-    sys = ROOT.CP.SystematicVariation('EG_SCALE_ZEESTAT', 1)
+    sys = ROOT.CP.SystematicVariation("EG_SCALE_ZEESTAT", 1)
     sys_set = ROOT.CP.SystematicSet()
     sys_set.insert(sys)
     tool_es2015PRE.applySystematicVariation(sys_set)
-    stat_up_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle='electron')[0]
+    stat_up_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle="electron")[0]
     ratio_stat_up = stat_up_es2015PRE / nominal_es2015PRE - 1
 
-
     # down stat
-    sys = ROOT.CP.SystematicVariation('EG_SCALE_ZEESTAT', -1)
+    sys = ROOT.CP.SystematicVariation("EG_SCALE_ZEESTAT", -1)
     sys_set = ROOT.CP.SystematicSet()
     sys_set.insert(sys)
     tool_es2015PRE.applySystematicVariation(sys_set)
-    stat_down_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle='electron')[0]
+    stat_down_es2015PRE = calibrate_eta_pt(tool_es2015PRE, etas, [pt], particle="electron")[0]
     ratio_stat_down = stat_down_es2015PRE / nominal_es2015PRE - 1
 
     ratio_full_down = -np.sqrt(ratio_stat_down ** 2 + ratio_sys_down_es2015PRE ** 2)
@@ -509,49 +671,91 @@ def plot_all_Zee_syst(etas, pt=100E3, basedir='plots'):
 
     fig, ax = plt.subplots()
 
-    ax.fill_between(etas, ratio_full_down, ratio_full_up, color='#d69e8f', interpolate=False, label='$\cdots\oplus$ stat = 2015PRE (stat $\oplus$ sys)', alpha=0.6)
-    ax.fill_between(etas, ratio_sys_down_es2015PRE, ratio_sys_up_es2015PRE, color='#d7d790', interpolate=False, label='$\cdots\oplus$ temp = 2015PRE sys', alpha=0.6)
-    ax.fill_between(etas, ratio_sys_down_es2015PRE_notemp, ratio_sys_up_es2015PRE_notemp, color='#91da95', label='$\cdots\oplus$ 7/8 TeV diff $\oplus$ 34/68 bins diff', alpha=0.6)
-    ax.fill_between(etas, ratio_sys_down_es2012c, ratio_sys_up_es2012c, color='#93dcd1', interpolate=False, label='2012c', alpha=0.6)
+    ax.fill_between(
+        etas,
+        ratio_full_down,
+        ratio_full_up,
+        color="#d69e8f",
+        interpolate=False,
+        label=r"$\cdots\oplus$ stat = 2015PRE (stat $\oplus$ sys)",
+        alpha=0.6,
+    )
+    ax.fill_between(
+        etas,
+        ratio_sys_down_es2015PRE,
+        ratio_sys_up_es2015PRE,
+        color="#d7d790",
+        interpolate=False,
+        label=r"$\cdots\oplus$ temp = 2015PRE sys",
+        alpha=0.6,
+    )
+    ax.fill_between(
+        etas,
+        ratio_sys_down_es2015PRE_notemp,
+        ratio_sys_up_es2015PRE_notemp,
+        color="#91da95",
+        label=r"$\cdots\oplus$ 7/8 TeV diff $\oplus$ 34/68 bins diff",
+        alpha=0.6,
+    )
+    ax.fill_between(
+        etas,
+        ratio_sys_down_es2012c,
+        ratio_sys_up_es2012c,
+        color="#93dcd1",
+        interpolate=False,
+        label="2012c",
+        alpha=0.6,
+    )
 
     p1 = patches.Rectangle((0, 0), 1, 1, color="#d69e8f")
     p2 = patches.Rectangle((0, 0), 1, 1, color="#d7d790")
     p3 = patches.Rectangle((0, 0), 1, 1, color="#91da95")
     p4 = patches.Rectangle((0, 0), 1, 1, color="#93dcd1")
 
-    legend1 = ax.legend([p4, p3, p2, p1], ['2012c',
-                                           '$\cdots\oplus$ 7/8 TeV diff $\oplus$ 34/68 bins diff',
-                                           '$\cdots\oplus$ temp = 2015PRE sys',
-                                           '$\cdots\oplus$ stat = 2015PRE (stat $\oplus$ sys)',
-                                           ], loc='upper right', numpoints=1, title='errors')
+    legend1 = ax.legend(
+        [p4, p3, p2, p1],
+        [
+            "2012c",
+            r"$\cdots\oplus$ 7/8 TeV diff $\oplus$ 34/68 bins diff",
+            r"$\cdots\oplus$ temp = 2015PRE sys",
+            r"$\cdots\oplus$ stat = 2015PRE (stat $\oplus$ sys)",
+        ],
+        loc="upper right",
+        numpoints=1,
+        title="errors",
+    )
 
     f = ROOT.TFile("~/Data6_scaledData.root")
     histo_scale = f.Get("alpha")
     x, ex, y, ey = histo2data(histo_scale)
 
-    h1 = ax.errorbar(x, y, yerr=ey, xerr=ex, fmt='o', zorder=11)
+    h1 = ax.errorbar(x, y, yerr=ey, xerr=ex, fmt="o", zorder=11)
 
     f2 = ROOT.TFile("~/uA2MeV.root")
     histo_uA2MeV = f2.Get("histo_uA2MeV_week12")
     x, ex, y, ey = histo2data(histo_uA2MeV)
-    line_uA2MeV, = ax.plot(x, y - 1, 'k-', zorder=10, label='expected deviation')
-    ax.plot(-x, y - 1, 'k-', zorder=10)
+    (line_uA2MeV,) = ax.plot(x, y - 1, "k-", zorder=10, label="expected deviation")
+    ax.plot(-x, y - 1, "k-", zorder=10)
 
-    ax.set_xlabel('$\eta$')
+    ax.set_xlabel(r"$\eta$")
     ax.set_ylim(-0.08, 0.08)
 
-
-    ax.legend([h1, line_uA2MeV], ['scales 13 TeV|es2015 PRE', 'expected deviation'], loc='lower right', numpoints=1)
+    ax.legend(
+        [h1, line_uA2MeV],
+        ["scales 13 TeV|es2015 PRE", "expected deviation"],
+        loc="lower right",
+        numpoints=1,
+    )
     ax.add_artist(legend1)
 
     ax.grid()
 
-    fig.savefig('Zee_sys.png')
-    fig.savefig('Zee_sys.svg')
-    fig.savefig('Zee_sys.pdf')
+    fig.savefig("Zee_sys.png")
+    fig.savefig("Zee_sys.svg")
+    fig.savefig("Zee_sys.pdf")
 
 
-def plot_all_syst_fixed_pt(tools, names, labels, pt=100E3, ptype='unconverted', basedir='plots'):
+def plot_all_syst_fixed_pt(tools, names, labels, pt=100e3, ptype="unconverted", basedir="plots"):
     for tool in tools:
         empty_set = ROOT.CP.SystematicSet()
         tool.applySystematicVariation(empty_set)
@@ -577,21 +781,15 @@ def plot_all_syst_fixed_pt(tools, names, labels, pt=100E3, ptype='unconverted',
 
         ax.grid()
         ax.legend()
-        ax.set_ylabel('effect [%]')
-        ax.set_title(ptype + " " + sys_name + " at $p_{T}$ = %.2f GeV" % (pt / 1E3))
-        ax.set_xlabel('$\eta$')
+        ax.set_ylabel("effect [%]")
+        ax.set_title(ptype + " " + sys_name + " at $p_{T}$ = %.2f GeV" % (pt / 1e3))
+        ax.set_xlabel(r"$\eta$")
         for extension in extensions:
-            f.savefig(os.path.join(basedir, "%s_%s_pt_%.2f.%s" % (ptype, sys_name, pt / 1E3, extension)))
+            f.savefig(
+                os.path.join(basedir, "%s_%s_pt_%.2f.%s" % (ptype, sys_name, pt / 1e3, extension))
+            )
         plt.close(f)
 
-def get_property_from_tool(tool, property_name):
-    # really?
-    result = ROOT.std.string()
-    status = tool.getPropertyMgr().getProperty(property_name).getString(result)
-    if not status.isSuccess():
-        raise ValueError("cannot find property %s in tool %s" % (property_name, tool))
-    return str(ss)[1:-1]
-
 
 def compute_or_read_sys(tool, ptypes, eta_edges, pt_edges):
     empty_set = ROOT.CP.SystematicSet()
@@ -613,7 +811,12 @@ def compute_or_read_sys(tool, ptypes, eta_edges, pt_edges):
         for iptype, ptype in enumerate(ptypes):
             log.debug("computing for particle=%s", ptype)
             tool.applySystematicVariation(empty_set)
-            log.debug("computing nominal energies for eta=%s, pt=%s, particle=%s", eta_midpoints, pt_midpoints, ptype)
+            log.debug(
+                "computing nominal energies for eta=%s, pt=%s, particle=%s",
+                eta_midpoints,
+                pt_midpoints,
+                ptype,
+            )
 
             values_nominal = calibrate_eta_pt(tool, eta_midpoints, pt_midpoints, particle=ptype)
             pbar.update(1)
@@ -631,10 +834,22 @@ def compute_or_read_sys(tool, ptypes, eta_edges, pt_edges):
 
     return results
 
+
 @timed
-def compare_sys(esmodels=None, ptypes=None, decorrelation='FULL_ETACORRELATED_v1', eta_edges=None, pt_edges=None, basedir='plots', smearing=False, only_up=True, abs_sys=False, log_x=False):
-    esmodels = esmodels or ['es2012c']
-    ptypes = ptypes or ['electron']
+def compare_sys(
+    esmodels=None,
+    ptypes=None,
+    decorrelation="FULL_ETACORRELATED_v1",
+    eta_edges=None,
+    pt_edges=None,
+    basedir="plots",
+    smearing=False,
+    only_up=True,
+    abs_sys=False,
+    log_x=False,
+):
+    esmodels = esmodels or ["es2012c"]
+    ptypes = ptypes or ["electron"]
     if pt_edges is None:
         pt_edges = np.linspace(0, 100, 5)
     if eta_edges is None:
@@ -643,21 +858,24 @@ def compare_sys(esmodels=None, ptypes=None, decorrelation='FULL_ETACORRELATED_v1
     eta_edges = np.asarray(eta_edges)
 
     pt_midpoints = 0.5 * (pt_edges[1:] + pt_edges[:-1])
-    eta_midpoints = 0.5 * (eta_edges[1:] + eta_edges[:-1])
-    log.info('comparing systematics for esmodels=%s, ptypes=%s, #pt-bins=%d, #eta-bins=%d' % (esmodels, ptypes, len(pt_edges) - 1, len(eta_edges) - 1))
+
+    log.info(
+        "comparing systematics for esmodels=%s, ptypes=%s, #pt-bins=%d, #eta-bins=%d",
+        (esmodels, ptypes, len(pt_edges) - 1, len(eta_edges) - 1)
+    )
 
     effects = {}
     for esmodel in esmodels:
-        log.info("creating tool for %s" % esmodel)
+        log.info("creating tool for %s", esmodel)
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
         tool.setProperty("ESModel", esmodel)
         tool.setProperty("decorrelationModel", decorrelation)
-        tool.setProperty("int")("randomRunNumber", 297730)
+        tool.setProperty[int]("randomRunNumber", 297730)
         if not smearing:
-            tool.setProperty("int")("doSmearing", 0)
+            tool.setProperty[bool]("doSmearing", 0)
         tool.initialize()
 
-        log.info('computing systematics for %s' % esmodel)
+        log.info("computing systematics for %s", esmodel)
 
         sys_values = compute_or_read_sys(tool, ptypes, eta_edges, pt_edges)
         effects[esmodel] = sys_values
@@ -666,8 +884,11 @@ def compare_sys(esmodels=None, ptypes=None, decorrelation='FULL_ETACORRELATED_v1
         del tool
 
     def sorting_function(sys):
-        return max(np.abs(effects[esmodel][ptype].get(sys, np.zeros(1))).max() for esmodel in esmodels for ptype in ptypes)
-
+        return max(
+            np.abs(effects[esmodel][ptype].get(sys, np.zeros(1))).max()
+            for esmodel in esmodels
+            for ptype in ptypes
+        )
 
     all_sys = set()
     for effects_esmodel in effects.values():
@@ -675,16 +896,21 @@ def compare_sys(esmodels=None, ptypes=None, decorrelation='FULL_ETACORRELATED_v1
             all_sys |= set(effects_particle.keys())
 
     if only_up:
-        all_sys = set(s for s in all_sys if '__1up' in s)
-    all_sys = set(s for s in all_sys if 'RESOLUTION' not in s)
+        all_sys = set(s for s in all_sys if "__1up" in s)
+    all_sys = set(s for s in all_sys if "RESOLUTION" not in s)
     sorted_sys = sorted(all_sys, key=sorting_function, reverse=True)
 
     log.info("plot")
-    log.info("sorted sys: %s" % sorted_sys)
+    log.info("sorted sys: %s", sorted_sys)
     colors = sns.color_palette("Set2", len(esmodels))
-    line_styles = '--', ':', '-'
-
-    for ptype, (ieta, (eta1, eta2)) in tqdm.tqdm(product(ptypes, enumerate(pairwise(eta_edges))), total=len(ptypes) * (len(eta_edges) - 1), desc='plotting', leave=False):
+    line_styles = "--", ":", "-"
+
+    for ptype, (ieta, (eta1, eta2)) in tqdm.tqdm(
+        product(ptypes, enumerate(pairwise(eta_edges))),
+        total=len(ptypes) * (len(eta_edges) - 1),
+        desc="plotting",
+        leave=False,
+    ):
         nsub_x, nsub_y = divide_square(len(sorted_sys))
         fig, axs = plt.subplots(nsub_x, nsub_y, figsize=(14, 8), sharex=True)
         if hasattr(axs, "flat"):
@@ -699,9 +925,13 @@ def compare_sys(esmodels=None, ptypes=None, decorrelation='FULL_ETACORRELATED_v1
                         values = np.abs(values)
                 else:
                     values = np.zeros_like(pt_midpoints)
-                ax.plot(pt_midpoints / 1E3, values * 100, label=esmodel,
-                        ls=line_styles[iesmodel],
-                        color=colors[iesmodel])
+                ax.plot(
+                    pt_midpoints / 1e3,
+                    values * 100,
+                    label=esmodel,
+                    ls=line_styles[iesmodel],
+                    color=colors[iesmodel],
+                )
 
             ylimits = [0.01, 0.3, 0.7, 2.1, 5]  # possible y-axis maxima
             for ylimit in ylimits:
@@ -712,48 +942,64 @@ def compare_sys(esmodels=None, ptypes=None, decorrelation='FULL_ETACORRELATED_v1
                         ax.set_ylim(-ylimit, ylimit)
                     break
 
-            title = sys.replace('EG_SCALE_', '').replace('PH_SCALE_', '').replace('__1up', '')
+            title = sys.replace("EG_SCALE_", "").replace("PH_SCALE_", "").replace("__1up", "")
             if len(title) > 17:
                 title = title[:17] + "..."
             ax.set_title(title, fontsize=9)
-            ax.yaxis.set_major_locator(MaxNLocator(6, prune='both'))
+            ax.yaxis.set_major_locator(MaxNLocator(6, prune="both"))
             ax.xaxis.set_major_locator(MaxNLocator(4))
-            ax.tick_params(axis='both', which='major', labelsize=8)
-            ax.tick_params(axis='y', which='minor', left='off', right='off')
+            ax.tick_params(axis="both", which="major", labelsize=8)
+            ax.tick_params(axis="y", which="minor", left="off", right="off")
 
             if log_x:
-                ax.set_xscale('log')
-            ax.set_ylabel('')
+                ax.set_xscale("log")
+            ax.set_ylabel("")
 
         for ax in axs:
             if ax.is_last_row():
-                ax.set_xlabel('$p_{T}$ [GeV]', fontsize=11)
+                ax.set_xlabel("$p_{T}$ [GeV]", fontsize=11)
             if ax.is_first_col():
                 ax.set_ylabel("effect [%]", fontsize=11)
         fig.subplots_adjust(wspace=0.4, hspace=0.27, bottom=0.15)
 
-        handles = [mlines.Line2D([], [], color=colors[i], ls=line_styles[i]) for i in range(len(esmodels))]
+        handles = [
+            mlines.Line2D([], [], color=colors[i], ls=line_styles[i]) for i in range(len(esmodels))
+        ]
         labels = esmodels
-        fig.legend(handles,
-                   labels,
-                   ncol=len(esmodels), loc='upper center',
-                   bbox_to_anchor=(0.1, -0.14, 0.7, 0.2),
-                   mode='expand',
-                   borderaxespad=0.
+        fig.legend(
+            handles,
+            labels,
+            ncol=len(esmodels),
+            loc="upper center",
+            bbox_to_anchor=(0.1, -0.14, 0.7, 0.2),
+            mode="expand",
+            borderaxespad=0.0,
         )
 
-        fig.suptitle(r'%s $|\eta|\in [%.2f, %.2f]$' % (ptype, eta1, eta2), fontsize=14)
+        fig.suptitle(r"%s $|\eta|\in [%.2f, %.2f]$" % (ptype, eta1, eta2), fontsize=14)
 
-        figname = 'compare_sys_%s_eta_%.2f_%.2f_vs_pT' % (ptype, eta1, eta2)
-        log.info("saving %s" % figname)
+        figname = "compare_sys_%s_eta_%.2f_%.2f_vs_pT" % (ptype, eta1, eta2)
+        log.info("saving %s", figname)
         for extension in extensions:
             fig.savefig(os.path.join(basedir, "%s.%s" % (figname, extension)))
         plt.close(fig)
 
 
 @timed
-def plot_all_syst_eta_pt(esmodel='es2012c', decorrelation='FULL_v1', ptype='unconverted',
-                         basedir='plots', eta_range=None, pt_range=None, log_pt=False, abs_sys=False, only_up=False, sys_filters=None, min_value=None, max_value=None):
+def plot_all_syst_eta_pt(
+    esmodel="es2012c",
+    decorrelation="FULL_v1",
+    ptype="unconverted",
+    basedir="plots",
+    eta_range=None,
+    pt_range=None,
+    log_pt=False,
+    abs_sys=False,
+    only_up=False,
+    sys_filters=None,
+    min_value=None,
+    max_value=None,
+):
     """
     Plot a 2D map (eta, pT) of the value of the systematic in %
     """
@@ -761,9 +1007,9 @@ def plot_all_syst_eta_pt(esmodel='es2012c', decorrelation='FULL_v1', ptype='unco
     tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
     tool.setProperty("ESModel", esmodel)
     tool.setProperty("decorrelationModel", decorrelation)
-    tool.setProperty("int")("doSmearing", 0)
-    log.warning('setting randomRunNumber to 297730')
-    tool.setProperty("int")("randomRunNumber", 297730)
+    tool.setProperty[int]("doSmearing", 0)
+    log.warning("setting randomRunNumber to 297730")
+    tool.setProperty[int]("randomRunNumber", 297730)
     tool.initialize()
 
     etas = eta_range if eta_range is not None else np.arange(-3, 3, 0.1)
@@ -778,14 +1024,14 @@ def plot_all_syst_eta_pt(esmodel='es2012c', decorrelation='FULL_v1', ptype='unco
     for sys in tqdm.tqdm(all_syst):
         sys_name = sys.name()
         if "RESOLUTION" in sys_name:
-            log.debug('skipping %s', sys_name)
+            log.debug("skipping %s", sys_name)
             continue
         if only_up and "1up" not in sys_name:
-            log.debug('skipping %s', sys_name)
+            log.debug("skipping %s", sys_name)
             continue
         if sys_filters is not None:
             if not any(fnmatch(sys_name, sys_filter) for sys_filter in sys_filters):
-                log.debug('skipping %s', sys_name)
+                log.debug("skipping %s", sys_name)
                 continue
         nplotted += 1
         log.info("computing sys %s", sys_name)
@@ -802,36 +1048,41 @@ def plot_all_syst_eta_pt(esmodel='es2012c', decorrelation='FULL_v1', ptype='unco
         ratio[np.isnan(ratio)] = 1
         ratio = ratio - 1
         vmax = max_value or np.percentile(np.abs(ratio), 95)
-        vmin = min_value or -vmax
         if abs_sys:
             ratio = np.abs(ratio)
 
         f, ax = plt.subplots()
-        p = ax.pcolormesh(etas, pts / 1E3, ratio * 100., vmin=-vmax * 100, vmax=vmax * 100)
-        ax.set_title("%s\n%s\n%s" % (ptype, esmodel, sys_name), loc='left')
-        ax.set_xlabel('$\eta$', x=1., ha='right')
-        ax.set_ylabel('$p_T$ [GeV]', y=1., ha='right')
+        p = ax.pcolormesh(etas, pts / 1e3, ratio * 100.0, vmin=-vmax * 100, vmax=vmax * 100)
+        ax.set_title("%s\n%s\n%s" % (ptype, esmodel, sys_name), loc="left")
+        ax.set_xlabel(r"$\eta$", x=1.0, ha="right")
+        ax.set_ylabel(r"$p_T$ [GeV]", y=1.0, ha="right")
         if log_pt:
-            ax.set_yscale('log')
+            ax.set_yscale("log")
         cb = f.colorbar(p)
-        cb.ax.set_ylabel('systematic effect [%]')
+        cb.ax.set_ylabel("systematic effect [%]")
         for extension in extensions:
-            f.savefig(os.path.join(basedir, "%s_%s_%s_%s.%s" % (ptype, esmodel, decorrelation, sys_name, extension)))
+            f.savefig(
+                os.path.join(
+                    basedir, "%s_%s_%s_%s.%s" % (ptype, esmodel, decorrelation, sys_name, extension)
+                )
+            )
         plt.close(f)
 
     if nplotted == 0:
-        log.warning('no systematic plotted')
+        log.warning("no systematic plotted")
     else:
-        log.info('%d systematic plotted' % nplotted)
+        log.info("%d systematic plotted", nplotted)
 
 
 @timed
-def plot_all_scales(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.01), add_patch=False, debug=False):
-    log.info("comparing scale factors %s" % esmodels)
+def plot_all_scales(
+    esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.01), add_patch=False, debug=False
+):
+    log.info("comparing scale factors %s", esmodels)
     log.warning("<mu> fixed")
     labels = labels or esmodels
     scales = {}
-    to_legend = []
+
     for esmodel, label in zip(esmodels, labels):
         energy_with = []
         energy_without = []
@@ -853,23 +1104,23 @@ def plot_all_scales(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.
             if debug:
                 tool.msg().setLevel(0)
             tool.setProperty("ESModel", esmodel)
-            tool.setProperty("int")("doSmearing", 0)
+            tool.setProperty[bool]("doSmearing", 0)
             for k, v, t in zip(key_properties, value_properties, type_properties):
-                tool.setProperty(t)(k, v)
+                tool.setProperty[t](k, v)
 
-        tool_with.setProperty("int")("doScaleCorrection", 1)
-        tool_without.setProperty("int")("doScaleCorrection", 0)
+        tool_with.setProperty[bool]("doScaleCorrection", 1)
+        tool_without.setProperty[bool]("doScaleCorrection", 0)
 
         tool_with.initialize()
         tool_without.initialize()
 
-        event = ROOT.xAOD.TEvent()
+        event = ROOT.xAOD.TEvent()  # noqa: F841
         factory = ROOT.EgammaFactory()
         log.warning("using eveninfo 266904")
         ei = factory.create_eventinfo(False, 266904)
 
         for eta in etas:
-            el = factory.create_electron(eta, 0.1, 40E3)
+            el = factory.create_electron(eta, 0.1, 40e3)
             en_with = tool_with.getEnergy(el, ei)
             en_without = tool_without.getEnergy(el, ei)
             energy_with.append(en_with)
@@ -877,19 +1128,53 @@ def plot_all_scales(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.
         scales[label] = np.array(energy_without) / np.array(energy_with) - 1
 
     f, ax = plt.subplots()
-    for k, v in scales.iteritems():
+    for k, v in scales.items():
         ax.plot(etas, v * 100, label=k)
-    ax.set_xlabel("$\eta$", fontsize=15, x=1, ha='right')
+    ax.set_xlabel(r"$\eta$", fontsize=15, x=1, ha="right")
     ax.set_ylabel("energy without scale factors / energy with scale factors - 1 [%]", fontsize=10)
     ax.grid()
 
     if add_patch:
-        ax.add_patch(patches.Rectangle((-2.47, -0.013 * 100 - 0.0168 * 100), +2.47-1.55, 2 * 0.0168 * 100, alpha=0.4, label='13 TeV scales 3 bins', color='k'))
-        #ax.add_patch(patches.Rectangle((-1.55, 0.00419 * 100 - 0.001 * 100), +1.55 - 1.37, 2 * 0.001 * 100, alpha=0.4, color='k'))
-        ax.add_patch(patches.Rectangle((-1.37, -0.0121 * 100 - 0.0052 * 100), 2 * +1.37, 2 * 0.0052 * 100, alpha=0.4, color='k'))
-        ax.add_patch(patches.Rectangle((1.55, -0.013 * 100 - 0.0168 * 100), +2.47-1.55, 2 * 0.0168 * 100, alpha=0.4, color='k'))
+        ax.add_patch(
+            patches.Rectangle(
+                (-2.47, -0.013 * 100 - 0.0168 * 100),
+                +2.47 - 1.55,
+                2 * 0.0168 * 100,
+                alpha=0.4,
+                label="13 TeV scales 3 bins",
+                color="k",
+            )
+        )
+        # ax.add_patch(patches.Rectangle((-1.55, 0.00419 * 100 - 0.001 * 100), +1.55 - 1.37, 2 * 0.001 * 100, alpha=0.4, color='k'))
+        ax.add_patch(
+            patches.Rectangle(
+                (-1.37, -0.0121 * 100 - 0.0052 * 100),
+                2 * +1.37,
+                2 * 0.0052 * 100,
+                alpha=0.4,
+                color="k",
+            )
+        )
+        ax.add_patch(
+            patches.Rectangle(
+                (1.55, -0.013 * 100 - 0.0168 * 100),
+                +2.47 - 1.55,
+                2 * 0.0168 * 100,
+                alpha=0.4,
+                color="k",
+            )
+        )
 
-        ax.add_patch(patches.Rectangle((-2.47, -0.00649344*100 - 0.00465043*100), +2.47 * 2, 2 * 0.00465043 * 100, alpha=0.5, label='13 TeV scales 1 bin', color='orange'))
+        ax.add_patch(
+            patches.Rectangle(
+                (-2.47, -0.00649344 * 100 - 0.00465043 * 100),
+                +2.47 * 2,
+                2 * 0.00465043 * 100,
+                alpha=0.5,
+                label="13 TeV scales 1 bin",
+                color="orange",
+            )
+        )
 
     ax.legend()
 
@@ -901,9 +1186,9 @@ def plot_all_scales(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.
     reference = labels[0]
     ratio = {label: scales[label] - scales[reference] for label in labels}
     f, ax = plt.subplots()
-    for k, v in ratio.iteritems():
+    for k, v in ratio.items():
         ax.plot(etas, v, label=k)
-    ax.set_xlabel("$\eta$", fontsize=15, x=1, ha='right')
+    ax.set_xlabel(r"$\eta$", fontsize=15, x=1, ha="right")
     ax.set_ylabel("scales - scales (%s)" % reference, fontsize=10)
     ax.grid()
     ax.legend()
@@ -914,7 +1199,6 @@ def plot_all_scales(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.
     plt.close(f)
 
 
-
 def plot_all_cterms(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.01)):
     labels = labels or esmodels
     cterms_all_models = {}
@@ -922,41 +1206,53 @@ def plot_all_cterms(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.
 
         tool_with = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_with")
         tool_with.setProperty("ESModel", esmodel)
-        tool_with.setProperty("int")("doSmearing", 1)
+        tool_with.setProperty[bool]("doSmearing", 1)
         tool_with.initialize()
 
         tool_without = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_without")
         tool_without.setProperty("ESModel", esmodel)
-        tool_without.setProperty("int")("doSmearing", 0)
+        tool_without.setProperty[bool]("doSmearing", 0)
         tool_without.initialize()
 
-        event = ROOT.xAOD.TEvent()
+        event = ROOT.xAOD.TEvent()  # noqa: F841
         factory = ROOT.EgammaFactory()
         ei = factory.create_eventinfo(True, 100000)
 
         cterms = []
         for eta in etas:
-            el = factory.create_electron(eta, 0.1, 40E3)
+            el = factory.create_electron(eta, 0.1, 40e3)
             en_without = tool_without.getEnergy(el, ei)
             ratios = np.zeros(1000)
-            for repetition in xrange(1000):
+            for repetition in range(1000):
                 en_with = tool_with.getEnergy(el, ei)
                 ratios[repetition] = en_with / en_without
             cterms.append(np.std(ratios))
         cterms_all_models[label] = cterms
 
     f, ax = plt.subplots()
-    for k, v in cterms_all_models.iteritems():
+    for k, v in cterms_all_models.items():
         ax.plot(etas, v, label=k)
-    ax.set_xlabel("$\eta$")
+    ax.set_xlabel(r"$\eta$")
     ax.set_ylabel("std (energy with additional cterm / energy without)")
 
-    ax.add_patch(patches.Rectangle((-2.47, 0.028 - 0.027), +2.47-1.55, 2 * 0.027, alpha=0.4, label='13 TeV cterm 3 bins', color='k'))
-    ax.add_patch(patches.Rectangle((-1.37, -0.003 - 0.014), +1.37 * 2, 2 * 0.014, alpha=0.4, color='k'))
-    ax.add_patch(patches.Rectangle((1.55, 0.028 - 0.027), +2.47-1.55, 2 * 0.027, alpha=0.4, color='k'))
+    ax.add_patch(
+        patches.Rectangle(
+            (-2.47, 0.028 - 0.027),
+            +2.47 - 1.55,
+            2 * 0.027,
+            alpha=0.4,
+            label="13 TeV cterm 3 bins",
+            color="k",
+        )
+    )
+    ax.add_patch(
+        patches.Rectangle((-1.37, -0.003 - 0.014), +1.37 * 2, 2 * 0.014, alpha=0.4, color="k")
+    )
+    ax.add_patch(
+        patches.Rectangle((1.55, 0.028 - 0.027), +2.47 - 1.55, 2 * 0.027, alpha=0.4, color="k")
+    )
     ax.set_ylim(-0.03, 0.06)
 
-
     ax.grid()
     ax.legend()
     for extension in extensions:
@@ -964,7 +1260,9 @@ def plot_all_cterms(esmodels, basedir, labels=None, etas=np.arange(-4.5, 4.5, 0.
     plt.close(f)
 
 
-def compare_two_tools_eta(tool1, tool2, pt, simulation, name, basedir, title, particle='unconverted'):
+def compare_two_tools_eta(
+    tool1, tool2, pt, simulation, name, basedir, title, particle="unconverted"
+):
     etas = np.arange(-4.5, 4.5, 0.01)
     r1 = calibrate_eta_pt(tool1, etas, [pt], simulation, particle)
     r2 = calibrate_eta_pt(tool2, etas, [pt], simulation, particle)
@@ -974,17 +1272,19 @@ def compare_two_tools_eta(tool1, tool2, pt, simulation, name, basedir, title, pa
     f, ax = plt.subplots()
     r = np.nan_to_num(r)
     ax.plot(etas, r * 100)
-    ax.set_xlabel('$\eta$')
-    ax.set_ylabel('effect [%]')
+    ax.set_xlabel(r"$\eta$")
+    ax.set_ylabel("effect [%]")
     ax.set_title(title)
-    ax.axis('tight')
+    ax.axis("tight")
     ax.grid()
     for extension in extensions:
         f.savefig(os.path.join(basedir, name + "." + extension))
     plt.close(f)
 
 
-def compare_two_tools_eta_phi(tool1, tool2, pt, simulation, name, basedir, title, particle='unconverted'):
+def compare_two_tools_eta_phi(
+    tool1, tool2, pt, simulation, name, basedir, title, particle="unconverted"
+):
     etas = np.arange(-4.5, 4.5, 0.1)
     phis = np.arange(-np.pi, np.pi, 0.1)
     r1 = eval_sys_eta_phi(tool1, etas, phis, pt, simulation, particle)
@@ -993,18 +1293,20 @@ def compare_two_tools_eta_phi(tool1, tool2, pt, simulation, name, basedir, title
     f, ax = plt.subplots()
     m = np.max(np.abs(r))
     p = ax.pcolormesh(phis, etas, r * 100, vmin=-m * 100, vmax=m * 100)
-    ax.set_xlabel('$\phi$')
-    ax.set_ylabel('$\eta$')
+    ax.set_xlabel(r"$\phi$")
+    ax.set_ylabel(r"$\eta$")
     ax.set_title(title)
-    ax.axis('tight')
+    ax.axis("tight")
     cb = f.colorbar(p)
-    cb.ax.set_ylabel('ratio to nominal [%]')
+    cb.ax.set_ylabel("ratio to nominal [%]")
     for extension in extensions:
         f.savefig(os.path.join(basedir, name + "." + extension))
     plt.close(f)
 
 
-def compare_two_tools_eta_pt(tool1, tool2, simulation, name, basedir, title, particle='unconverted'):
+def compare_two_tools_eta_pt(
+    tool1, tool2, simulation, name, basedir, title, particle="unconverted"
+):
     etas = np.arange(-4.5, 4.5, 0.05)
     pts = np.logspace(3.2, 6, 50)
     r1 = calibrate_eta_pt(tool1, etas, pts, simulation, particle)
@@ -1013,15 +1315,15 @@ def compare_two_tools_eta_pt(tool1, tool2, simulation, name, basedir, title, par
     f, ax = plt.subplots()
     r = np.nan_to_num(r)
     m = np.max(np.abs(r))
-    p = ax.pcolormesh(etas, pts / 1E3, r * 100, vmin=-m * 100, vmax=m * 100)
-    ax.set_yscale('log')
-    ax.set_ylabel('$p_T$ [GeV]')
-    ax.set_xlabel('$\eta$')
+    p = ax.pcolormesh(etas, pts / 1e3, r * 100, vmin=-m * 100, vmax=m * 100)
+    ax.set_yscale("log")
+    ax.set_ylabel("$p_T$ [GeV]")
+    ax.set_xlabel(r"$\eta$")
     ax.set_title(title)
-    ax.axis('tight')
+    ax.axis("tight")
 
     cb = f.colorbar(p)
-    cb.ax.set_ylabel('ratio to nominal [%]')
+    cb.ax.set_ylabel("ratio to nominal [%]")
     for extension in extensions:
         f.savefig(os.path.join(basedir, name + "." + extension))
     plt.close(f)
@@ -1030,71 +1332,91 @@ def compare_two_tools_eta_pt(tool1, tool2, simulation, name, basedir, title, par
 def check_gain(basedir, esmodel):
     tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
     tool.setProperty("ESModel", esmodel)
-    tool.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool.setProperty("int")("doSmearing", 0)
+    tool.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool.setProperty[bool]("doSmearing", 0)
     tool.initialize()
 
     tool_no_gain = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
     tool_no_gain.setProperty("ESModel", esmodel)
-    tool_no_gain.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool_no_gain.setProperty("int")("doSmearing", 0)
-    tool_no_gain.setProperty("int")("useGainCorrection", 0)
+    tool_no_gain.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool_no_gain.setProperty[bool]("doSmearing", 0)
+    tool_no_gain.setProperty[bool]("useGainCorrection", 0)
     tool_no_gain.initialize()
 
-    for ptype in 'electron', 'unconverted', 'converted':
-        compare_two_tools_eta_pt(tool_no_gain, tool,
-                                 simulation=False,
-                                 name='gain_%s_%s' % (esmodel, ptype),
-                                 basedir=basedir, particle=ptype,
-                                 title='gain correction effect - %s - %s' % (esmodel, ptype))
+    for ptype in "electron", "unconverted", "converted":
+        compare_two_tools_eta_pt(
+            tool_no_gain,
+            tool,
+            simulation=False,
+            name="gain_%s_%s" % (esmodel, ptype),
+            basedir=basedir,
+            particle=ptype,
+            title="gain correction effect - %s - %s" % (esmodel, ptype),
+        )
+
+    compare_two_tools_eta(
+        tool_no_gain,
+        tool,
+        40e3,
+        simulation=False,
+        name="gain_%s_%s_40GeV" % (esmodel, "electron"),
+        basedir=basedir,
+        title="gain correction effect - %s 40 GeV electron" % esmodel,
+        particle="electron",
+    )
 
-    compare_two_tools_eta(tool_no_gain, tool, 40E3,
-                          simulation=False,
-                          name='gain_%s_%s_40GeV' % (esmodel, 'electron'),
-                          basedir=basedir, title='gain correction effect - %s 40 GeV electron' % esmodel,
-                          particle='electron')
 
 def check_fast(basedir, esmodel):
     tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
     tool.setProperty("ESModel", esmodel)
-    tool.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool.setProperty("int")("doSmearing", 0)
+    tool.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool.setProperty[bool]("doSmearing", 0)
     tool.initialize()
 
     tool_fast = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
     tool_fast.setProperty("ESModel", esmodel)
-    tool_fast.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool_fast.setProperty("int")("doSmearing", 0)
-    tool_fast.setProperty("bool")("useAFII", True)
+    tool_fast.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool_fast.setProperty[bool]("doSmearing", 0)
+    tool_fast.setProperty[bool]("useAFII", True)
     tool_fast.initialize()
 
-    for ptype in 'electron', 'converted', 'unconverted':
-        compare_two_tools_eta(tool_fast, tool,
-                              pt=100E3, simulation=True,
-                              name='fast_%s_%s' % (esmodel, ptype),
-                              basedir=basedir, particle=ptype,
-                              title='fast correction effect %s %s 100 GeV' % (esmodel, ptype))
+    for ptype in "electron", "converted", "unconverted":
+        compare_two_tools_eta(
+            tool_fast,
+            tool,
+            pt=100e3,
+            simulation=True,
+            name="fast_%s_%s" % (esmodel, ptype),
+            basedir=basedir,
+            particle=ptype,
+            title="fast correction effect %s %s 100 GeV" % (esmodel, ptype),
+        )
 
 
 def check_uniformity(basedir, esmodel):
     tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
     tool.setProperty("ESModel", esmodel)
-    tool.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool.setProperty("int")("doSmearing", 0)
+    tool.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool.setProperty[bool]("doSmearing", 0)
     tool.initialize()
 
     tool_no_uniformity = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
     tool_no_uniformity.setProperty("ESModel", esmodel)
-    tool_no_uniformity.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-    tool_no_uniformity.setProperty("int")("doSmearing", 0)
-    tool_no_uniformity.setProperty("int")("usePhiUniformCorrection", 0)
+    tool_no_uniformity.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+    tool_no_uniformity.setProperty[bool]("doSmearing", 0)
+    tool_no_uniformity.setProperty[bool]("usePhiUniformCorrection", 0)
     tool_no_uniformity.initialize()
 
-    compare_two_tools_eta_phi(tool_no_uniformity, tool,
-                              pt=100E3, simulation=False,
-                              name='uniformity_%s' % esmodel,
-                              basedir=basedir, particle='unconverted',
-                              title='uniformity correction effect - %s - unconverted 100 GeV' % esmodel)
+    compare_two_tools_eta_phi(
+        tool_no_uniformity,
+        tool,
+        pt=100e3,
+        simulation=False,
+        name="uniformity_%s" % esmodel,
+        basedir=basedir,
+        particle="unconverted",
+        title="uniformity correction effect - %s - unconverted 100 GeV" % esmodel,
+    )
 
 
 def compare_all_syst_fixed_pt(basedir, esmodels, names=None, labels=None):
@@ -1105,8 +1427,8 @@ def compare_all_syst_fixed_pt(basedir, esmodels, names=None, labels=None):
         if type(esmodel) is str:
             tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_%s" % esmodel)
             tool.setProperty("ESModel", esmodel)
-            tool.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-            tool.setProperty("int")("doSmearing", 0)
+            tool.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+            tool.setProperty[bool]("doSmearing", 0)
             tool.initialize()
             tools.append(tool)
         else:
@@ -1115,7 +1437,7 @@ def compare_all_syst_fixed_pt(basedir, esmodels, names=None, labels=None):
 
 
 def plot_resolution_eta_pt(basedir, tool, pts, etas, ptype, title):
-    event = ROOT.xAOD.TEvent()
+    event = ROOT.xAOD.TEvent()  # noqa: F841
     factory = ROOT.EgammaFactory()
     result = np.ones((len(pts), len(etas)))
     eta_centers = 0.5 * (etas[1:] + etas[:-1])
@@ -1139,35 +1461,43 @@ def plot_resolution_eta_pt(basedir, tool, pts, etas, ptype, title):
 
     fig, ax = plt.subplots()
     vmin, vmax = np.percentile(result, (2, 98))
-    p = ax.pcolormesh(pts / 1E3, etas, result, vmin=vmin, vmax=vmax)
+    p = ax.pcolormesh(pts / 1e3, etas, result, vmin=vmin, vmax=vmax)
     ax.set_title(title)
-    ax.axis('tight')
-    ax.set_xlabel('$p_T$ [GeV]')
-    ax.set_ylabel('$\eta$')
-    ax.set_xscale('log')
+    ax.axis("tight")
+    ax.set_xlabel(r"$p_T$ [GeV]")
+    ax.set_ylabel(r"$\eta$")
+    ax.set_xscale("log")
     cb = fig.colorbar(p)
-    cb.ax.set_ylabel('resolution')
+    cb.ax.set_ylabel("resolution")
     for extension in extensions:
-        fig.savefig(os.path.join(basedir, 'resolution_%s.%s' % (ptype, extension)))
+        fig.savefig(os.path.join(basedir, "resolution_%s.%s" % (ptype, extension)))
 
 
 def plot_resolution_error(basedir, **kwargs):
-    esmodels = kwargs["esmodels"] or ('es2012c', 'es2015PRE', 'es2015PRE_res_improved', 'es2016PRE', 'es2017')
+    esmodels = kwargs["esmodels"] or (
+        "es2012c",
+        "es2015PRE",
+        "es2015PRE_res_improved",
+        "es2016PRE",
+        "es2017",
+    )
     if kwargs["eta_bins"] is not None:
         eta_bins = pairwise(kwargs["eta_bins"])
     else:
         eta_bins = (0, 0.4), (0.4, 0.6), (0.6, 1.37), (1.52, 1.8), (1.8, 2.37)
     for esmodel in esmodels:
-        log.debug("plotting resolution error for %s" % esmodel)
+        log.debug("plotting resolution error for %s", esmodel)
         tool = ROOT.AtlasRoot.egammaEnergyCorrectionTool()
-        if kwargs['debug']:
+        if kwargs["debug"]:
             tool.msg().setLevel(0)
         tool.setESModel(getattr(ROOT.egEnergyCorr, esmodel))
         tool.initialize()
-        for particle in ('electron', 'converted', 'unconverted'):
-            log.info('plotting resolution %s', particle)
+        for particle in ("electron", "converted", "unconverted"):
+            log.info("plotting resolution %s", particle)
             for eta_min, eta_max in tqdm.tqdm(eta_bins):
-                plot_resolution_error_bin(eta_min, eta_max, particle, esmodel, basedir, tool=tool, **kwargs)
+                plot_resolution_error_bin(
+                    eta_min, eta_max, particle, esmodel, basedir, tool=tool, **kwargs
+                )
 
 
 def plot_resolution_error_bin(eta_min, eta_max, particle, esmodel, basedir, tool=None, **kwargs):
@@ -1176,145 +1506,184 @@ def plot_resolution_error_bin(eta_min, eta_max, particle, esmodel, basedir, tool
         tool.setESModel(getattr(ROOT.egEnergyCorr, esmodel))
         tool.initialize()
 
-    ptype = {"electron": ROOT.PATCore.ParticleType.Electron,
-             "unconverted": ROOT.PATCore.ParticleType.UnconvertedPhoton,
-             "converted": ROOT.PATCore.ParticleType.ConvertedPhoton
-             }[particle]
-
-    variations_name_up = {"Zsmearing up": ROOT.egEnergyCorr.Resolution.ZSmearingUp,
-                          "sampling up": ROOT.egEnergyCorr.Resolution.SamplingTermUp,
-                          "material ID up": ROOT.egEnergyCorr.Resolution.MaterialIDUp,
-                          "material calo up": ROOT.egEnergyCorr.Resolution.MaterialCaloUp,
-                          "material gap up": ROOT.egEnergyCorr.Resolution.MaterialGapUp,
-                          "material cryo up": ROOT.egEnergyCorr.Resolution.MaterialCryoUp,
-                          "pileup up": ROOT.egEnergyCorr.Resolution.PileUpUp,
-                          "material ibl up": ROOT.egEnergyCorr.Resolution.MaterialIBLUp,
-                          "material pp0 up": ROOT.egEnergyCorr.Resolution.MaterialPP0Up,
-                          "all up": ROOT.egEnergyCorr.Resolution.AllUp}
-    variations_name_down = {"Zsmearing down": ROOT.egEnergyCorr.Resolution.ZSmearingDown,
-                            "sampling down": ROOT.egEnergyCorr.Resolution.SamplingTermDown,
-                            "material ID down": ROOT.egEnergyCorr.Resolution.MaterialIDDown,
-                            "material calo down": ROOT.egEnergyCorr.Resolution.MaterialCaloDown,
-                            "material gap down": ROOT.egEnergyCorr.Resolution.MaterialGapDown,
-                            "material cryo down": ROOT.egEnergyCorr.Resolution.MaterialCryoDown,
-                            "pileup down": ROOT.egEnergyCorr.Resolution.PileUpDown,
-                            "material ibl down": ROOT.egEnergyCorr.Resolution.MaterialIBLDown,
-                            "material pp0 down": ROOT.egEnergyCorr.Resolution.MaterialPP0Down,
-
-                            "all down": ROOT.egEnergyCorr.Resolution.AllDown}
-#                 ^    ^
+    ptype = {
+        "electron": ROOT.PATCore.ParticleType.Electron,
+        "unconverted": ROOT.PATCore.ParticleType.UnconvertedPhoton,
+        "converted": ROOT.PATCore.ParticleType.ConvertedPhoton,
+    }[particle]
+
+    variations_name_up = {
+        "Zsmearing up": ROOT.egEnergyCorr.Resolution.ZSmearingUp,
+        "sampling up": ROOT.egEnergyCorr.Resolution.SamplingTermUp,
+        "material ID up": ROOT.egEnergyCorr.Resolution.MaterialIDUp,
+        "material calo up": ROOT.egEnergyCorr.Resolution.MaterialCaloUp,
+        "material gap up": ROOT.egEnergyCorr.Resolution.MaterialGapUp,
+        "material cryo up": ROOT.egEnergyCorr.Resolution.MaterialCryoUp,
+        "pileup up": ROOT.egEnergyCorr.Resolution.PileUpUp,
+        "material ibl up": ROOT.egEnergyCorr.Resolution.MaterialIBLUp,
+        "material pp0 up": ROOT.egEnergyCorr.Resolution.MaterialPP0Up,
+        "all up": ROOT.egEnergyCorr.Resolution.AllUp,
+    }
+    variations_name_down = {
+        "Zsmearing down": ROOT.egEnergyCorr.Resolution.ZSmearingDown,
+        "sampling down": ROOT.egEnergyCorr.Resolution.SamplingTermDown,
+        "material ID down": ROOT.egEnergyCorr.Resolution.MaterialIDDown,
+        "material calo down": ROOT.egEnergyCorr.Resolution.MaterialCaloDown,
+        "material gap down": ROOT.egEnergyCorr.Resolution.MaterialGapDown,
+        "material cryo down": ROOT.egEnergyCorr.Resolution.MaterialCryoDown,
+        "pileup down": ROOT.egEnergyCorr.Resolution.PileUpDown,
+        "material ibl down": ROOT.egEnergyCorr.Resolution.MaterialIBLDown,
+        "material pp0 down": ROOT.egEnergyCorr.Resolution.MaterialPP0Down,
+        "all down": ROOT.egEnergyCorr.Resolution.AllDown,
+    }
+    #                 ^    ^
     all_errors = [{}, {}]  # up and down
-#                  ,--,
+    #                  ,--,
 
-    pt_range = kwargs.get('pt_bins')
+    pt_range = kwargs.get("pt_bins")
     if pt_range is None:
-        pr_range = np.linspace(10E3, 2000E3, 100)
+        pt_range = np.linspace(10e3, 2000e3, 100)
 
-    nsamples_eta = kwargs['super_sampling_eta'] or 5
+    nsamples_eta = kwargs["super_sampling_eta"] or 5
     eta_range = np.linspace(eta_min, eta_max, nsamples_eta + 2)[1:-1]
 
-
     only_up = True
 
-    for side, errors, variations_name in zip(("up", "down"), all_errors, (variations_name_up, variations_name_down)):
-        if only_up and side == 'down':
+    for side, errors, variations_name in zip(
+        ("up", "down"), all_errors, (variations_name_up, variations_name_down)
+    ):
+        if only_up and side == "down":
             continue
-        quadrature_sum = np.zeros((len(pt_range), len(eta_range)))
-        for variation_name, variation_id in variations_name.iteritems():
+
+        for variation_name, variation_id in variations_name.items():
             errors_var_pt_eta = np.zeros((len(pt_range), len(eta_range)))
             for ipt, pt in enumerate(pt_range):
                 for ieta, eta in enumerate(eta_range):
                     energy = pt * np.cosh(eta)
-                    log.debug("evaluating systematics %s in eta=%.2f pt=%.2f on resolution" % (variation_name, eta, pt))
-                    errors_var_pt_eta[ipt, ieta] = tool.getResolutionError(energy, eta, eta, ptype, variation_id)
-            errors[variation_name] = errors_var_pt_eta.mean(axis=1)  # average over different eta points inside the eta-bin
-            if kwargs['abs_sys']:
+                    log.debug(
+                        "evaluating systematics %s in eta=%.2f pt=%.2f on resolution",
+                        (variation_name, eta, pt)
+                    )
+                    errors_var_pt_eta[ipt, ieta] = tool.getResolutionError(
+                        ROOT.PATCore.ParticleDataType.Full, energy, eta, eta, ptype, variation_id
+                    )
+            errors[variation_name] = errors_var_pt_eta.mean(
+                axis=1
+            )  # average over different eta points inside the eta-bin
+            if kwargs["abs_sys"]:
                 errors[variation_name] = np.abs(errors[variation_name])
 
-    sorted_keys_up = sorted(variations_name_up.keys(), key=lambda x: np.abs(all_errors[0][x].mean()))
-    totals = [np.sqrt(np.sum(e ** 2 for k, e in errors.iteritems() if "all " not in k)) for errors in all_errors]
+#    sorted_keys_up = sorted(
+#        variations_name_up.keys(), key=lambda x: np.abs(all_errors[0][x].mean())
+#    )
+    totals = [
+        np.sqrt(np.sum([e ** 2 for k, e in errors.items() if "all " not in k]))
+        for errors in all_errors
+    ]
 
     fig, ax = plt.subplots()
     if only_up:
-        ax.fill_between(pt_range / 1E3, 0, all_errors[0]['all up'], color='0.8')
+        ax.fill_between(pt_range / 1e3, 0, all_errors[0]["all up"], color="0.8")
     else:
-        ax.fill_between(pt_range / 1E3, all_errors[0]['all up'], all_errors[1]['all down'], color='0.8')
-#    ax.fill_between(pt_range / 1E3, totals[0], -totals[-1], color='0.8')
-#    totals[1] *= -1
+        ax.fill_between(
+            pt_range / 1e3, all_errors[0]["all up"], all_errors[1]["all down"], color="0.8"
+        )
+    #    ax.fill_between(pt_range / 1E3, totals[0], -totals[-1], color='0.8')
+    #    totals[1] *= -1
 
-    colors = ['b', 'g', 'r', 'c', 'm', 'y', 'violet', 'pink', 'orange']
-    props = mpl.rcParams["axes.prop_cycle"]
+    colors = ["b", "g", "r", "c", "m", "y", "violet", "pink", "orange"]
+    props = mpl.rcParams["axes.prop_cycle"] # noqa: F841
 
-    for side, errors, total in zip(('up', 'down'), all_errors, totals):
-        if only_up and side == 'down':
+    for side, errors, total in zip(("up", "down"), all_errors, totals):
+        if only_up and side == "down":
             continue
-        #ax.plot(pt_range / 1E3, total, label='sum %s' % side, color='k')
-        ax.plot(pt_range / 1E3, errors['all %s' % side], 'k', label='all %s' % side)
+        # ax.plot(pt_range / 1E3, total, label='sum %s' % side, color='k')
+        ax.plot(pt_range / 1e3, errors["all %s" % side], "k", label="all %s" % side)
         colors_iter = cycle(colors)
         for k in sorted(errors.keys()):
-            if 'all' in k:
+            if "all" in k:
                 continue
             v = errors[k]
             linestyle = "-"
             if "down" in k:
-                linestyle = '--'
+                linestyle = "--"
             if "all" in k:
                 linestyle = ":"
-            ax.plot(pt_range / 1E3, v, linestyle, label=k, color=next(colors_iter))
+            ax.plot(pt_range / 1e3, v, linestyle, label=k, color=next(colors_iter))
 
     fig.text(0.16, 0.73, beautify_particle(particle), transform=ax.transAxes, fontsize=15)
-    fig.text(0.16, 0.67, r'$%.2f < \eta < %.2f$' % (eta_min, eta_max), transform=ax.transAxes, fontsize=15)
+    fig.text(
+        0.16,
+        0.67,
+        r"$%.2f < \eta < %.2f$" % (eta_min, eta_max),
+        transform=ax.transAxes,
+        fontsize=15,
+    )
 
     ax.set_title("%s" % esmodel)
-    ax.set_ylabel('relative resolution error [%]', ha='right', y=1., fontsize=19)
-    ax.set_xlabel('$E_T$ [GeV]', ha='right', x=1., fontsize=19)
-    if kwargs['abs_sys']:
+    ax.set_ylabel("relative resolution error [%]", ha="right", y=1.0, fontsize=19)
+    ax.set_xlabel("$E_T$ [GeV]", ha="right", x=1.0, fontsize=19)
+    if kwargs["abs_sys"]:
         ax.set_ylim(0, 0.6)
     else:
-        ax_set_ylim(-1.7, 1.7)
-    ax.set_xlim(np.min(pt_range) / 1E3, np.max(pt_range) / 1E3)
+        ax.set_ylim(-1.7, 1.7)
+    ax.set_xlim(np.min(pt_range) / 1e3, np.max(pt_range) / 1e3)
 
     fig.subplots_adjust(bottom=0.35)
 
-    ax.legend(loc=3, bbox_to_anchor=(0., -0.5, 1, 0.2), mode="expand",
-              ncol=4, borderaxespad=0., fontsize=10)
+    ax.legend(
+        loc=3,
+        bbox_to_anchor=(0.0, -0.5, 1, 0.2),
+        mode="expand",
+        ncol=4,
+        borderaxespad=0.0,
+        fontsize=10,
+    )
 
-    plot_ATLAS(fig, 0.16, 0.8, 'Internal', fontsize=19)
+    plot_ATLAS(fig, 0.16, 0.8, "Internal", fontsize=19)
 
-    if kwargs['grid']:
+    if kwargs["grid"]:
         ax.grid()
-    filename = os.path.join(basedir, 'error_relresolution_%s_%s_eta%.2f-%.2f' % (esmodel, particle, eta_min, eta_max))
-    for ext in 'png', 'pdf':
-        fig.savefig(filename + "." + ext, bbox_inches='tight')
+    filename = os.path.join(
+        basedir, "error_relresolution_%s_%s_eta%.2f-%.2f" % (esmodel, particle, eta_min, eta_max)
+    )
+    for ext in "png", "pdf":
+        fig.savefig(filename + "." + ext, bbox_inches="tight")
     plt.close(fig)
 
-def list_systematics(esmodels, decorrelation='FULL_ETACORRELATED_v1'):
+
+def list_systematics(esmodels, decorrelation="FULL_ETACORRELATED_v1"):
     if type(esmodels) is str:
         esmodels = [esmodels]
     elif esmodels is None:
-        log.warning('no esmodel specified, using es2012c')
-        esmodels = ['es2012c']
+        log.warning("no esmodel specified, using es2012c")
+        esmodels = ["es2012c"]
     syslist_esmodel = {}
     for esmodel in esmodels:
-        log.debug("creating tool for %s" % esmodel)
+        log.debug("creating tool for %s", esmodel)
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
         tool.setProperty("ESModel", esmodel)
         tool.setProperty("decorrelationModel", decorrelation)
         tool.initialize()
         syslist_esmodel[esmodel] = [s.name() for s in systematics_from_tool(tool, only_scale=False)]
 
-    for esmodel, sys_list in syslist_esmodel.iteritems():
+    for esmodel, sys_list in syslist_esmodel.items():
         print("esmodel: %s %s UP variations" % (esmodel, len(sys_list)))
         for sysname in sys_list:
             print("   {:10s}".format(sysname))
 
     if len(esmodels) > 1:
-        log.info('comparing the %s esmodels' % len(esmodels))
+        log.info("comparing the %s esmodels", len(esmodels))
         all_sys = set([item for sublist in syslist_esmodel.values() for item in sublist])
-        print(' ' * 40 + ''.join(' [%d] ' % i for i in range(len(esmodels))))
+        print(" " * 40 + "".join(" [%d] " % i for i in range(len(esmodels))))
         for sysname in sorted(all_sys):
-            cross = ''.join(['  x  ' if sysname in syslist_esmodel[esmodel] else '     ' for esmodel in esmodels])
-            print(('{:40s}'.format(sysname) + cross))
+            cross = "".join(
+                [
+                    "  x  " if sysname in syslist_esmodel[esmodel] else "     "
+                    for esmodel in esmodels
+                ]
+            )
+            print(("{:40s}".format(sysname) + cross))
         for iesmodel, esmodel in enumerate(esmodels):
             print("[%d] = %s" % (iesmodel, esmodel))
 
@@ -1322,8 +1691,10 @@ def list_systematics(esmodels, decorrelation='FULL_ETACORRELATED_v1'):
 @timed
 def main():
     from argparse import ArgumentParser, RawDescriptionHelpFormatter
-    parser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter,
-                            epilog="""
+
+    parser = ArgumentParser(
+        formatter_class=RawDescriptionHelpFormatter,
+        epilog="""
 to produce paper plots for systematics:
     python plot.py sys_eta_slices --beautify-sysnames --sys-order paper_run1 --superimpose-all --skip-null-sys --esmodels es2016PRE --min-sys-value -0.01 --max-sys-value 0.02 --symmetrize-labels  --pt-bins-logspace 5E3 1E6 100
 
@@ -1332,7 +1703,6 @@ to produce paper plots for systematics:
 to produce paper plot for resolution (the name of the esmodels here are the ones used by the internal class)
    python plot.py resolution-err --esmodels es2017 --abs-sys --pt-bins-linspace 5E3 200E3 200
 
-
 to compare systematics between tools vs pT:
     python plot.py compare_sys --particles electron converted unconverted --esmodels es2016data_mc15c_summer_improved es2016data_mc15c_summer --eta-bins 0 0.6 1.0 1.37 1.55 1.82 2.47 --pt-bins-logspace 5E3 1500E3 50 --abs-sys --log-x
 
@@ -1344,40 +1714,90 @@ to produce scale factor correction (doScaleCorrection on/off):
 
 to list the systematics:
     python plot.py list-systematics --esmodels es2012c es2016data_mc15c_summer es2016data_mc15c_summer_improved es2017_R21_PRE
-""")
-    parser.add_argument('action', choices=['compare_sys', 'compute_sys', 'uA2MeV',
-                                           'zee', 'material', 'scale', 'cterm',
-                                           'all', 'gain', 'uniformity',
-                                           'sys_fixed_pt', 'sys_eta_slices',
-                                           'all_sys', 'resolution', 'fast', 'resolution-err', 'list-systematics'],
-                        default='all', help='what to do')
-    parser.add_argument('--esmodels', nargs='*', help='esmodel to consider')
-    parser.add_argument('--decorrelation', default='FULL_ETACORRELATED_v1')
-    parser.add_argument('--particles', nargs='*', help='the particle (electron/converted/unconverted)', default=['electron'])
-    parser.add_argument('--beautify-sysnames', action='store_true')
-    parser.add_argument('--eta-bins', nargs='*', type=float, help='edges of the eta-bins')
-    parser.add_argument('--eta-bins-linspace', nargs=3, type=float, help='edge of the eta-bins as min max nbins')
-    parser.add_argument('--pt-bins', nargs='*', type=float, help='edges of the pt-bins')
-    parser.add_argument('--pt-bins-linspace', nargs=3, type=float, help='edge of the eta-bins as min max nbins')
-    parser.add_argument('--pt-bins-logspace', nargs=3, type=float, help='edge of the eta-bins as min max nbins')
-    parser.add_argument('--super-sampling-eta', type=int, default=5, help='how many point to average inside a bin')
-    parser.add_argument('--sys-order', choices=['paper_run1', 'paper_run2'], default='how to order systematics, options: paper_run1, paper_run2')
-    parser.add_argument('--debug', action='store_true')
-    parser.add_argument('--superimpose-all', action='store_true', help='superimpose sum of systematics')
-    parser.add_argument('--skip-null-sys', action='store_true', help='do not plot null systematics')
-    parser.add_argument('--yrange', nargs=2, type=float)
-    parser.add_argument('--add-down', action='store_true', help='plot also the down systematics')
-    parser.add_argument('--legend-outside', action='store_true', help='draw the legend outside the plot')
-    parser.add_argument('--symmetrize-labels', action='store_true')
-    parser.add_argument('--abs-sys', action='store_true', help='consider the abs value of the systeamatics')
-    parser.add_argument('--log-x', action='store_true', help='use log scale')
-    parser.add_argument('--log-pt', action='store_true', help='use log scale for pT')
-    parser.add_argument('--sys-filters', nargs='*', help='list of wildcard to filter systematic names')
-    parser.add_argument('--min-sys-value', type=float, help='min value for the systematic axis')
-    parser.add_argument('--max-sys-value', type=float, help='max value for the systematic axis')
-    parser.add_argument('--grid', action='store_true', help='show grid')
-    parser.add_argument('--plot-qsum', action='store_true', help='plot the quadrature sum of the systematics for debug (should be equal to 1NP up)')
-    parser.add_argument('--atlas-label', help='Internal, Preliminary, ..., use "" for papers')
+""",
+    )
+    parser.add_argument(
+        "action",
+        choices=[
+            "compare_sys",
+            "compute_sys",
+            "uA2MeV",
+            "zee",
+            "material",
+            "scale",
+            "cterm",
+            "all",
+            "gain",
+            "uniformity",
+            "sys_fixed_pt",
+            "sys_eta_slices",
+            "all_sys",
+            "resolution",
+            "fast",
+            "resolution-err",
+            "list-systematics",
+        ],
+        default="all",
+        help="what to do",
+    )
+    parser.add_argument("--esmodels", nargs="*", help="esmodel to consider")
+    parser.add_argument("--decorrelation", default="FULL_ETACORRELATED_v1")
+    parser.add_argument(
+        "--particles",
+        nargs="*",
+        help="the particle (electron/converted/unconverted)",
+        default=["electron"],
+    )
+    parser.add_argument("--beautify-sysnames", action="store_true")
+    parser.add_argument("--eta-bins", nargs="*", type=float, help="edges of the eta-bins")
+    parser.add_argument(
+        "--eta-bins-linspace", nargs=3, type=float, help="edge of the eta-bins as min max nbins"
+    )
+    parser.add_argument("--pt-bins", nargs="*", type=float, help="edges of the pt-bins")
+    parser.add_argument(
+        "--pt-bins-linspace", nargs=3, type=float, help="edge of the eta-bins as min max nbins"
+    )
+    parser.add_argument(
+        "--pt-bins-logspace", nargs=3, type=float, help="edge of the eta-bins as min max nbins"
+    )
+    parser.add_argument(
+        "--super-sampling-eta", type=int, default=5, help="how many point to average inside a bin"
+    )
+    parser.add_argument(
+        "--sys-order",
+        choices=["paper_run1", "paper_run2"],
+        help="how to order systematics, options: paper_run1, paper_run2",
+    )
+    parser.add_argument("--debug", action="store_true")
+    parser.add_argument(
+        "--superimpose-all", action="store_true", help="superimpose sum of systematics"
+    )
+    parser.add_argument("--skip-null-sys", action="store_true", help="do not plot null systematics")
+    parser.add_argument("--yrange", nargs=2, type=float)
+    parser.add_argument("--add-down", action="store_true", help="plot also the down systematics")
+    parser.add_argument(
+        "--legend-outside", action="store_true", help="draw the legend outside the plot"
+    )
+    parser.add_argument("--symmetrize-labels", action="store_true")
+    parser.add_argument(
+        "--abs-sys", action="store_true", help="consider the abs value of the systeamatics"
+    )
+    parser.add_argument("--log-x", action="store_true", help="use log scale")
+    parser.add_argument("--log-pt", action="store_true", help="use log scale for pT")
+    parser.add_argument(
+        "--sys-filters", nargs="*", help="list of wildcard to filter systematic names"
+    )
+    parser.add_argument("--min-sys-value", type=float, help="min value for the systematic axis")
+    parser.add_argument("--max-sys-value", type=float, help="max value for the systematic axis")
+    parser.add_argument("--grid", action="store_true", help="show grid")
+    parser.add_argument(
+        "--plot-qsum",
+        action="store_true",
+        help="plot the quadrature sum of the systematics for debug (should be equal to 1NP up)",
+    )
+    parser.add_argument(
+        "--atlas-label", default="Internal", help='Internal, Preliminary, ..., use "" for papers'
+    )
     args = parser.parse_args()
 
     if args.debug:
@@ -1385,184 +1805,267 @@ to list the systematics:
         log.debug("DEBUG activated")
 
     if args.eta_bins_linspace:
-        args.eta_bins = np.linspace(args.eta_bins_linspace[0], args.eta_bins_linspace[1], args.eta_bins_linspace[2] + 1)
+        args.eta_bins = np.linspace(
+            args.eta_bins_linspace[0], args.eta_bins_linspace[1], int(args.eta_bins_linspace[2] + 1)
+        )
     if args.pt_bins_linspace:
-        args.pt_bins = np.linspace(args.pt_bins_linspace[0], args.pt_bins_linspace[1], args.pt_bins_linspace[2] + 1)
+        args.pt_bins = np.linspace(
+            args.pt_bins_linspace[0], args.pt_bins_linspace[1], int(args.pt_bins_linspace[2] + 1)
+        )
     if args.pt_bins_logspace:
-        args.pt_bins = np.logspace(np.log10(args.pt_bins_logspace[0]), np.log10(args.pt_bins_logspace[1]), args.pt_bins_logspace[2] + 1)
+        args.pt_bins = np.logspace(
+            np.log10(args.pt_bins_logspace[0]),
+            np.log10(args.pt_bins_logspace[1]),
+            int(args.pt_bins_logspace[2] + 1),
+        )
 
-    basedir = 'plots'
+    basedir = "plots"
     if not os.path.exists(basedir):
         os.makedirs(basedir)
 
-    if args.action == 'list-systematics':
+    if args.action == "list-systematics":
         list_systematics(args.esmodels, args.decorrelation)
 
-    if args.action == 'compute_sys':
-        log.info('computing systematics')
-        for esmodel in args.esmodels or ['es2012c']:
+    if args.action == "compute_sys":
+        log.info("computing systematics")
+        for esmodel in args.esmodels or ["es2012c"]:
             tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
             tool.setProperty("ESModel", esmodel)
-            tool.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-            tool.setProperty("int")("doSmearing", 0)
+            tool.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+            tool.setProperty[bool]("doSmearing", 0)
             tool.initialize()
-            result = compute_or_read_sys(tool, ['electron'], args.eta_bins, args.pt_bins)
+            result = compute_or_read_sys(tool, ["electron"], args.eta_bins, args.pt_bins)
             print(result)
 
-    if args.action == 'compare_sys':
+    if args.action == "compare_sys":
         log.info("comparing systematics")
-        compare_sys(args.esmodels, ptypes=args.particles, decorrelation=args.decorrelation,
-                    eta_edges=args.eta_bins, pt_edges=args.pt_bins, abs_sys=args.abs_sys, log_x=args.log_x)
+        compare_sys(
+            args.esmodels,
+            ptypes=args.particles,
+            decorrelation=args.decorrelation,
+            eta_edges=args.eta_bins,
+            pt_edges=args.pt_bins,
+            abs_sys=args.abs_sys,
+            log_x=args.log_x,
+        )
 
-    if args.action == 'resolution-err':
+    if args.action == "resolution-err":
         log.info("plotting resolution error")
-        plot_resolution_error(basedir='plots', **vars(args))
+        plot_resolution_error(basedir="plots", **vars(args))
 
-    if args.action == 'zee' or args.action == 'all':
+    if args.action == "zee" or args.action == "all":
         log.info("plotting scale systematics")
-        plot_all_Zee_syst(etas=np.arange(-2.5, 2.5, 0.01), pt=100E3, basedir='plots')
+        plot_all_Zee_syst(etas=np.arange(-2.5, 2.5, 0.01), pt=100e3, basedir="plots")
 
-    if args.action == 'all' or args.action == 'uA2MeV':
+    if args.action == "all" or args.action == "uA2MeV":
         log.info("plotting uA2MeV")
-        tool_es2015PRE_nouA2MeV = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE_nouA2MeV")
+        tool_es2015PRE_nouA2MeV = ROOT.CP.EgammaCalibrationAndSmearingTool(
+            "tool_es2015PRE_nouA2MeV"
+        )
         tool_es2015PRE_nouA2MeV.setProperty("ESModel", "es2015PRE")
-        tool_es2015PRE_nouA2MeV.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-        tool_es2015PRE_nouA2MeV.setProperty("int")("doSmearing", 0)
-        tool_es2015PRE_nouA2MeV.setProperty("int")("use_uA2MeV_2015_first2weeks_correction", 0)
+        tool_es2015PRE_nouA2MeV.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+        tool_es2015PRE_nouA2MeV.setProperty[bool]("doSmearing", 0)
+        tool_es2015PRE_nouA2MeV.setProperty[bool]("use_uA2MeV_2015_first2weeks_correction", 0)
         tool_es2015PRE_nouA2MeV.initialize()
 
         tool_es2015PRE = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE")
         tool_es2015PRE.setProperty("ESModel", "es2015PRE")
-        tool_es2015PRE.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-        tool_es2015PRE.setProperty("int")("doSmearing", 0)
+        tool_es2015PRE.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+        tool_es2015PRE.setProperty[bool]("doSmearing", 0)
         tool_es2015PRE.initialize()
 
-        compare_two_tools_eta(tool_es2015PRE, tool_es2015PRE_nouA2MeV,
-                              100E3, simulation=False,
-                              name="uA2MeV", basedir=basedir,
-                              title="with uA2MeV correction / without",
-                              particle='electron')
+        compare_two_tools_eta(
+            tool_es2015PRE,
+            tool_es2015PRE_nouA2MeV,
+            100e3,
+            simulation=False,
+            name="uA2MeV",
+            basedir=basedir,
+            title="with uA2MeV correction / without",
+            particle="electron",
+        )
 
         del tool_es2015PRE_nouA2MeV
         del tool_es2015PRE
 
-    if args.action == 'all' or args.action == 'scale':
+    if args.action == "all" or args.action == "scale":
         log.info("plotting scales")
-        plot_all_scales(esmodels=args.esmodels,
-                        labels=args.esmodels,
-                        basedir=basedir, etas=np.arange(-2.5, 2.5, 0.01),
-                        add_patch=False, debug=args.debug)
-    if args.action == 'all' or args.action == 'fast':
+        plot_all_scales(
+            esmodels=args.esmodels,
+            labels=args.esmodels,
+            basedir=basedir,
+            etas=np.arange(-2.5, 2.5, 0.01),
+            add_patch=False,
+            debug=args.debug,
+        )
+    if args.action == "all" or args.action == "fast":
         log.info("plotting full / fast scale")
         check_fast(basedir, "es2015PRE")
-        plot_all_scales(esmodels=("es2015PRE", ("es2015PRE", ("useAFII",), (True,), (bool,))),
-                        labels=("2015PRE", "2015PRE FAST"),
-                        basedir=basedir, etas=np.arange(-2.5, 2.5, 0.01))
-    if args.action == 'all' or args.action == 'cterm':
+        plot_all_scales(
+            esmodels=("es2015PRE", ("es2015PRE", ("useAFII",), (True,), (bool,))),
+            labels=("2015PRE", "2015PRE FAST"),
+            basedir=basedir,
+            etas=np.arange(-2.5, 2.5, 0.01),
+        )
+    if args.action == "all" or args.action == "cterm":
         log.info("plotting smearings")
-        plot_all_cterms(esmodels=("es2012c", "es2012XX", "es2015PRE"), labels=("2012", "new", "new + temp"), basedir=basedir, etas=np.arange(-2.5, 2.5, 0.01))
+        plot_all_cterms(
+            esmodels=("es2012c", "es2012XX", "es2015PRE"),
+            labels=("2012", "new", "new + temp"),
+            basedir=basedir,
+            etas=np.arange(-2.5, 2.5, 0.01),
+        )
 
-    if args.action == 'gain' or args.action == "all":
-        check_gain(basedir, 'es2015PRE')
+    if args.action == "gain" or args.action == "all":
+        check_gain(basedir, "es2015PRE")
 
-    if args.action == 'uniformity' or args.action == 'all':
-        check_uniformity(basedir, 'es2012c')
-        check_uniformity(basedir, 'es2015PRE')
+    if args.action == "uniformity" or args.action == "all":
+        check_uniformity(basedir, "es2012c")
+        check_uniformity(basedir, "es2015PRE")
 
-    if args.action == 'sys_fixed_pt' or args.action == 'all':
+    if args.action == "sys_fixed_pt" or args.action == "all":
         tool_es2015PRE_notemp = ROOT.CP.EgammaCalibrationAndSmearingTool("tool_es2015PRE_notemp")
         tool_es2015PRE_notemp.setProperty("ESModel", "es2015PRE")
-        tool_es2015PRE_notemp.setProperty("decorrelationModel", 'FULL_ETACORRELATED_v1')
-        tool_es2015PRE_notemp.setProperty("int")("doSmearing", 0)
-        tool_es2015PRE_notemp.setProperty("int")("use_temp_correction201215", 0)
+        tool_es2015PRE_notemp.setProperty("decorrelationModel", "FULL_ETACORRELATED_v1")
+        tool_es2015PRE_notemp.setProperty[bool]("doSmearing", 0)
+        tool_es2015PRE_notemp.setProperty[bool]("use_temp_correction201215", 0)
         tool_es2015PRE_notemp.initialize()
 
-        compare_all_syst_fixed_pt(basedir, ('es2012c', tool_es2015PRE_notemp, 'es2015PRE'),
-                                  names=('es2012c', 'es2015_no_temp', 'es2015PRE'),
-                                  labels=('es2012c', '$\oplus$ 7/8 diff $\oplus$ 34/68 diff', '$\oplus$ LAr temperature'))
+        compare_all_syst_fixed_pt(
+            basedir,
+            ("es2012c", tool_es2015PRE_notemp, "es2015PRE"),
+            names=("es2012c", "es2015_no_temp", "es2015PRE"),
+            labels=("es2012c", r"$\oplus$ 7/8 diff $\oplus$ 34/68 diff", r"$\oplus$ LAr temperature"),
+        )
 
-    if args.action == 'sys_eta_slices' or args.action == 'all':
+    if args.action == "sys_eta_slices" or args.action == "all":
         if not args.eta_bins:
-            eta_bins = ((0., 0.6), (0.6, 1.45), (1.52, 1.7), (1.7, 1.9), (1.9, 2.5), (1.4, 1.6))
-            log.warning('no eta-binning specified using %s', eta_bins)
+            eta_bins = ((0.0, 0.6), (0.6, 1.45), (1.52, 1.7), (1.7, 1.9), (1.9, 2.5), (1.4, 1.6))
+            log.warning("no eta-binning specified using %s", eta_bins)
         else:
             eta_bins = list(pairwise(args.eta_bins))
-            log.info('eta-bin: %s', eta_bins)
-        for ptype in 'electron', 'unconverted', 'converted':
-            log.debug("plot all sys FULL_ETACORRELATED_v1 eta slice %s" % ptype)
-            plot_all_syst_eta_slice(eta_bins, supersampling_eta=args.super_sampling_eta, esmodel=args.esmodels[0],
-                                    decorrelation='FULL_ETACORRELATED_v1', ptype=ptype, basedir=basedir,
-                                    beautify_sysnames=args.beautify_sysnames, sys_order=args.sys_order,
-                                    superimpose_all=args.superimpose_all, skip_null_sys=args.skip_null_sys,
-                                    max_sys=args.max_sys_value, min_sys=args.min_sys_value,
-                                    debug=args.debug,
-                                    only_up=not args.add_down, symmetrize_labels=args.symmetrize_labels,
-                                    legend_outside=args.legend_outside, pts=args.pt_bins, log_x=args.log_x, plot_qsum=args.plot_qsum, abs_sys=args.abs_sys, atlas_label=args.atlas_label)
-
-    if args.action == 'material' or args.action == 'all':
-        if not os.path.exists('material'):
-            os.makedirs('material')
-        etabins = ((0., 0.6), (0.6, 1.45), (1.52, 1.7), (1.7, 1.9), (1.9, 2.5))
-        for ptype in 'electron', 'unconverted', 'converted':
-            plot_all_syst_eta_slice(etabins, supersampling_eta=args.super_sampling_eta, esmodel=args.esmodels[0],
-                                    decorrelation='FULL_ETACORRELATED_v1', ptype=ptype, basedir="material",
-                                    only_material=True, beautify_sysnames=args.beautify_sysnames,
-                                    sys_order=args.sys_order,
-                                    skip_null_sys=args.skip_null_sys,
-                                    max_sys=args.max_sys_value, min_sys=args.min_sys_value,
-                                    debug=args.debug, only_up=not args.add_down,
-                                    legend_outside=args.legend_outside, symmetrize_labels=args.symmetrize_labels, log_x=args.log_x, plot_qsum=args.plot_qsum, abs_sys=args.abs_sys, atlas_label=args.atlas_label)
-
-    if args.action == 'all_sys' or args.action == 'all':
+            log.info("eta-bin: %s", eta_bins)
+        for ptype in "electron", "unconverted", "converted":
+            log.debug("plot all sys FULL_ETACORRELATED_v1 eta slice %s", ptype)
+            plot_all_syst_eta_slice(
+                eta_bins,
+                supersampling_eta=args.super_sampling_eta,
+                esmodel=args.esmodels[0],
+                decorrelation="FULL_ETACORRELATED_v1",
+                ptype=ptype,
+                basedir=basedir,
+                beautify_sysnames=args.beautify_sysnames,
+                sys_order=args.sys_order,
+                superimpose_all=args.superimpose_all,
+                skip_null_sys=args.skip_null_sys,
+                max_sys=args.max_sys_value,
+                min_sys=args.min_sys_value,
+                debug=args.debug,
+                only_up=not args.add_down,
+                symmetrize_labels=args.symmetrize_labels,
+                legend_outside=args.legend_outside,
+                pts=args.pt_bins,
+                log_x=args.log_x,
+                plot_qsum=args.plot_qsum,
+                abs_sys=args.abs_sys,
+                atlas_label=args.atlas_label,
+            )
+
+    if args.action == "material" or args.action == "all":
+        if not os.path.exists("material"):
+            os.makedirs("material")
+        etabins = ((0.0, 0.6), (0.6, 1.45), (1.52, 1.7), (1.7, 1.9), (1.9, 2.5))
+        for ptype in "electron", "unconverted", "converted":
+            plot_all_syst_eta_slice(
+                etabins,
+                supersampling_eta=args.super_sampling_eta,
+                esmodel=args.esmodels[0],
+                decorrelation="FULL_ETACORRELATED_v1",
+                ptype=ptype,
+                basedir="material",
+                only_material=True,
+                beautify_sysnames=args.beautify_sysnames,
+                sys_order=args.sys_order,
+                skip_null_sys=args.skip_null_sys,
+                max_sys=args.max_sys_value,
+                min_sys=args.min_sys_value,
+                debug=args.debug,
+                only_up=not args.add_down,
+                legend_outside=args.legend_outside,
+                symmetrize_labels=args.symmetrize_labels,
+                log_x=args.log_x,
+                plot_qsum=args.plot_qsum,
+                abs_sys=args.abs_sys,
+                atlas_label=args.atlas_label,
+            )
+
+    if args.action == "all_sys" or args.action == "all":
         for esmodel in args.esmodels:
             for ptype in args.particles:
-                log.info("plotting sys for %s %s" % (ptype, esmodel))
-                plot_all_syst_eta_pt(esmodel=esmodel, decorrelation=args.decorrelation,
-                                     ptype=ptype, basedir=basedir,
-                                     eta_range=args.eta_bins, pt_range=args.pt_bins, log_pt=args.log_pt,
-                                     abs_sys=args.abs_sys, sys_filters=args.sys_filters,
-                                     min_value=args.min_sys_value, max_value=args.max_sys_value)
-
-
-    if args.action == "resolution" or args.action == 'all':
+                log.info("plotting sys for %s %s", ptype, esmodel)
+                plot_all_syst_eta_pt(
+                    esmodel=esmodel,
+                    decorrelation=args.decorrelation,
+                    ptype=ptype,
+                    basedir=basedir,
+                    eta_range=args.eta_bins,
+                    pt_range=args.pt_bins,
+                    log_pt=args.log_pt,
+                    abs_sys=args.abs_sys,
+                    sys_filters=args.sys_filters,
+                    min_value=args.min_sys_value,
+                    max_value=args.max_sys_value,
+                )
+
+    if args.action == "resolution" or args.action == "all":
         tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
-        tool.setProperty("ESModel", 'es2015PRE')
+        tool.setProperty("ESModel", "es2015PRE")
         tool.initialize()
         pts = np.logspace(3.2, 6, 50)
         etas = np.linspace(-2.49, 2.49, 100)
-        plot_resolution_eta_pt(basedir, tool, pts, etas, 'electron', title="resolution electron es2015PRE")
-        plot_resolution_eta_pt(basedir, tool, pts, etas, 'converted', title="resolution converted es2015PRE")
-        plot_resolution_eta_pt(basedir, tool, pts, etas, 'unconverted', title="resolution unconverted es2015PRE")
+        plot_resolution_eta_pt(
+            basedir, tool, pts, etas, "electron", title="resolution electron es2015PRE"
+        )
+        plot_resolution_eta_pt(
+            basedir, tool, pts, etas, "converted", title="resolution converted es2015PRE"
+        )
+        plot_resolution_eta_pt(
+            basedir, tool, pts, etas, "unconverted", title="resolution unconverted es2015PRE"
+        )
+
+
+if __name__ == "__main__":
 
-if __name__ == '__main__':
     class TqdmLoggingHandler(logging.Handler):
-        def __init__ (self, level = logging.NOTSET):
-            super (self.__class__, self).__init__ (level)
+        def __init__(self, level=logging.NOTSET):
+            super(self.__class__, self).__init__(level)
 
-        def emit (self, record):
+        def emit(self, record):
             try:
-                msg = self.format (record)
-                tqdm.tqdm.write (msg)
-                self.flush ()
+                msg = self.format(record)
+                tqdm.tqdm.write(msg)
+                self.flush()
             except (KeyboardInterrupt, SystemExit):
                 raise
-            except:
+            except Exception:
                 self.handleError(record)
 
-
     log = logging.getLogger(__name__)
     log.setLevel(logging.INFO)
     handler = TqdmLoggingHandler()
-    handler.setFormatter(colorlog.ColoredFormatter('%(log_color)s %(name)-23s %(levelname)-7s %(message)s',
-                                                   log_colors={
-                                                       'DEBUG': 'cyan',
-                                                       'INFO': 'blue',
-                                                       'SUCCESS:': 'green',
-                                                       'WARNING': 'yellow',
-                                                       'ERROR': 'red',
-                                                       'CRITICAL': 'red,bg_white'},))
+    handler.setFormatter(
+        colorlog.ColoredFormatter(
+            "%(log_color)s %(name)-23s %(levelname)-7s %(message)s",
+            log_colors={
+                "DEBUG": "cyan",
+                "INFO": "blue",
+                "SUCCESS:": "green",
+                "WARNING": "yellow",
+                "ERROR": "red",
+                "CRITICAL": "red,bg_white",
+            },
+        )
+    )
     log.addHandler(handler)
 
-    log.info("importing framework packages")
-    ROOT.gROOT.ProcessLine(".x $ROOTCOREDIR/scripts/load_packages.C")
     main()
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/run_xAOD_ElectronPhotonFourMomentumCorrection.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/run_xAOD_ElectronPhotonFourMomentumCorrection.py
index 6a847f6627a5..b8ec3bc45f38 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/run_xAOD_ElectronPhotonFourMomentumCorrection.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/python/run_xAOD_ElectronPhotonFourMomentumCorrection.py
@@ -37,12 +37,12 @@ def xAOD_particle_generator(tree, collection_getter, newevent_function=None, end
     elif type(event_numbers) is int:
         event_numbers = [event_numbers]
 
-    for ievent in xrange(tree.GetEntries()):
+    for ievent in range(tree.GetEntries()):
         tree.GetEntry(ievent)
         ei = tree.EventInfo
         event_number = ei.eventNumber()
         if event_numbers:
-            if not event_number in event_numbers:
+            if event_number not in event_numbers:
                 continue
         logging.debug("=== event number %d ievent = %d", event_number, ievent)
         if newevent_function is not None:
@@ -50,7 +50,7 @@ def xAOD_particle_generator(tree, collection_getter, newevent_function=None, end
 
         collection = collection_getter(tree)
 
-        for i in xrange(collection.size()):
+        for i in range(collection.size()):
             p = collection.at(i)
             if min_pt is not None and p.pt() < min_pt:
                 continue
@@ -93,7 +93,7 @@ def main(filename, **args):
         f.Print()
         return
 
-    logging.info("input has %d entries" % tree.GetEntries())
+    logging.info("input has %d entries", tree.GetEntries())
 
     logging.debug("initializing tool")
     tool = ROOT.CP.EgammaCalibrationAndSmearingTool("tool")
@@ -168,7 +168,6 @@ def main(filename, **args):
     fout.Close()
 
 if __name__ == '__main__':
-    ROOT.gROOT.ProcessLine(".x $ROOTCOREDIR/scripts/load_packages.C")
     import argparse
 
     parser = argparse.ArgumentParser(description='Run on xAOD and dump calibrated energy for electron and photons',
-- 
GitLab


From 14511df7a5ec09cf4a0a7a39e7ee97468b56b9f2 Mon Sep 17 00:00:00 2001
From: Bertrand Martin <martindl@cern.ch>
Date: Tue, 5 Jan 2021 20:44:18 +0100
Subject: [PATCH 302/308] xAODTau: protection against tau track thinning

Hello,

This MR is mostly importing !26767 from 21.2 to master, with the original MR description pasted below.

A protection is added against invalid TauTrack links when retrieving the tau tracks or the number of tau tracks.
This is required to support tau track thinning, used e.g. in DAOD_PHYS.
Now, only the tau tracks that have a valid link are considered in the TauJets interface class.
In particular, the behaviour of nAllTracks() had to be changed to be consistent with allTracks().size().
If one only keeps e.g. classifiedCharged tau tracks by thinning away the other tracks, nAllTracks() will now return the number of classifiedCharged tracks.

Something new compared to the R21 MR: to keep track of the total number of tracks associated with the tau in the reconstruction, a new Aux variable is introduced (mapped to xAOD::TauJetParameters::nAllTracks). So the user is now able to tell if tracks were thinned in the AOD->DAOD step, by comparing tau->nAllTracks() to tau->detail(xAOD::TauJetParameters::nAllTracks, nTracksTot).

Cheers,
Bertrand
---
 .../xAOD/xAODTau/Root/TauJetAccessors_v3.icc  |  7 +-
 .../xAODTau/Root/TauJetAuxContainer_v3.cxx    |  5 +-
 Event/xAOD/xAODTau/Root/TauJet_v3.cxx         | 72 +++++++------------
 Event/xAOD/xAODTau/xAODTau/TauDefs.h          |  4 +-
 .../xAODTau/versions/TauJetAuxContainer_v3.h  |  3 +-
 .../tauRecTools/src/TauTrackFinder.cxx        | 12 ++--
 6 files changed, 40 insertions(+), 63 deletions(-)

diff --git a/Event/xAOD/xAODTau/Root/TauJetAccessors_v3.icc b/Event/xAOD/xAODTau/Root/TauJetAccessors_v3.icc
index 34c935fffec3..519d09dd71ba 100644
--- a/Event/xAOD/xAODTau/Root/TauJetAccessors_v3.icc
+++ b/Event/xAOD/xAODTau/Root/TauJetAccessors_v3.icc
@@ -1,11 +1,9 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: TauJetAccessors_v2.icc 638520 2015-01-09 13:21:05Z janus $
-
 #ifndef XAODTAU_TAUACCESSORS_V3_ICC
 #define XAODTAU_TAUACCESSORS_V3_ICC
 
@@ -226,6 +224,7 @@ break;
       DEFINE_TAUJETPARAMETER_ACCESSOR( int, nChargedTracks );
       DEFINE_TAUJETPARAMETER_ACCESSOR( int, nIsolatedTracks );
       DEFINE_TAUJETPARAMETER_ACCESSOR( int, nModifiedIsolationTracks ); 
+      DEFINE_TAUJETPARAMETER_ACCESSOR( int, nAllTracks );
 
     default:
       std::cerr << "xAOD::TauJetParameters ERROR Unknown integer detail ("
@@ -267,5 +266,3 @@ break;
 #endif //TAUTRACK_V1_ACCESSORS  to aid with link issues
 
 #endif // XAODTAU_TAUJETACCESSORS_V3_ICC
-
-//  LocalWords:  EMPOverTrkSysPCorrected
diff --git a/Event/xAOD/xAODTau/Root/TauJetAuxContainer_v3.cxx b/Event/xAOD/xAODTau/Root/TauJetAuxContainer_v3.cxx
index 32dc32e9af27..3569d9073728 100644
--- a/Event/xAOD/xAODTau/Root/TauJetAuxContainer_v3.cxx
+++ b/Event/xAOD/xAODTau/Root/TauJetAuxContainer_v3.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: TauJetAuxContainer_v3.cxx 725228 2016-02-19 22:59:42Z griffith $
@@ -270,7 +270,8 @@ namespace xAOD {
     //RNN tau eVeto
     AUX_VARIABLE( RNNEleScore );
     AUX_VARIABLE( RNNEleScoreSigTrans ); 
-    
+
+    AUX_VARIABLE( nAllTracks );
   }
   
 } // namespace xAOD
diff --git a/Event/xAOD/xAODTau/Root/TauJet_v3.cxx b/Event/xAOD/xAODTau/Root/TauJet_v3.cxx
index ec71140fae76..f95105c8a988 100644
--- a/Event/xAOD/xAODTau/Root/TauJet_v3.cxx
+++ b/Event/xAOD/xAODTau/Root/TauJet_v3.cxx
@@ -1,10 +1,7 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: TauJet_v3.cxx 725228 2016-02-19 22:59:42Z griffith $
-
-
 // System include(s):
 #include <cstdint>
 #include <bitset>
@@ -27,19 +24,19 @@ namespace xAOD {
   }
   
 
+  //primitive setters and getters for default 4-vector
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, pt)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, eta)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phi)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, m)
 
-
-  //primitive setters and getters for jetseed 4-vector
+  //primitive setters and getters for JetSeed 4-vector
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptJetSeed)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaJetSeed)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiJetSeed)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, mJetSeed)
 
-  //primitive setters and getters for jetseed 4-vector
+  //primitive setters and getters for DetectorAxis 4-vector
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptDetectorAxis)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaDetectorAxis)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiDetectorAxis)
@@ -56,38 +53,32 @@ namespace xAOD {
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaTauEnergyScale)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiTauEnergyScale)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, mTauEnergyScale)
-  // double TauJet_v3::etaTauEnergyScale() const { return etaIntermediateAxis(); }
-  // double TauJet_v3::phiTauEnergyScale() const { return phiIntermediateAxis(); }
-  // double TauJet_v3::mTauEnergyScale() const { return 0; }
 
-
-  //primitive setters and getters for jetseed 4-vector
+  //primitive setters and getters for ptTauEtaCalib 4-vector - deprecated in R22
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptTauEtaCalib)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaTauEtaCalib)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiTauEtaCalib)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, mTauEtaCalib)
-  // double TauJet_v3::phiTauEtaCalib() const { return phiIntermediateAxis(); }
-  // double TauJet_v3::mTauEtaCalib() const { return 0; }
 
-  //primitive setters and getters for jetseed 4-vector
+  //primitive setters and getters for PanTauCellBasedProto 4-vector - deprecated in R22
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptPanTauCellBasedProto)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaPanTauCellBasedProto)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiPanTauCellBasedProto)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, mPanTauCellBasedProto)
 
-  //primitive setters and getters for jetseed 4-vector
+  //primitive setters and getters for PanTauCellBased 4-vector
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptPanTauCellBased)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaPanTauCellBased)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiPanTauCellBased)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, mPanTauCellBased)
 
-  //primitive setters and getters for HLT 4-vector
+  //primitive setters and getters for TrigCaloOnly 4-vector
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptTrigCaloOnly)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaTrigCaloOnly)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiTrigCaloOnly)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, mTrigCaloOnly)
 
-  //primitive setters and getters for HLT 4-vector
+  //primitive setters and getters for FinalCalib 4-vector
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, ptFinalCalib)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, etaFinalCalib)
   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( TauJet_v3, float, double, phiFinalCalib)
@@ -280,16 +271,14 @@ namespace xAOD {
     //-------------------------------------------------------------------------
     // Accept
     //-------------------------------------------------------------------------
-    bool TauJet_v3::isTau(
-            TauJetParameters::IsTauFlag flag ) const
+    bool TauJet_v3::isTau( TauJetParameters::IsTauFlag flag ) const
     {
       static const Accessor< uint32_t > acc( "isTauFlags" );
       std::bitset<32> isTauFlags( acc( *this ) );
       return isTauFlags[flag];
     }
 
-    void TauJet_v3::setIsTau(
-            TauJetParameters::IsTauFlag flag, bool value )
+    void TauJet_v3::setIsTau( TauJetParameters::IsTauFlag flag, bool value )
     {
       static const Accessor< uint32_t > acc( "isTauFlags" );
       std::bitset<32> isTauFlags( acc( *this ) );
@@ -297,28 +286,6 @@ namespace xAOD {
       acc( *this ) = isTauFlags.to_ulong();
     }
 
-  //r21 cleanup
-    // //-------------------------------------------------------------------------
-    // // Veto flags accessors
-    // //-------------------------------------------------------------------------
-    // void TauJet_v3::setFlag(
-    //         TauJetParameters::VetoFlags flag, bool value )
-    // {
-    //   static const Accessor< uint32_t > acc( "vetoFlags" );
-    //   std::bitset<32> vetoFlags( acc( *this ) );
-    //   vetoFlags[flag] = value;
-    //   acc( *this ) = vetoFlags.to_ulong();
-    // }
-
-    // bool TauJet_v3::flag(
-    //         TauJetParameters::VetoFlags flag ) const
-    // {
-    //   static const Accessor< uint32_t > acc( "vetoFlags" );
-    //   std::bitset<32> vetoFlags( acc( *this ) );
-    //   return vetoFlags[flag];
-    // }
-
-
 
   //-------------------------------------------------------------------------
   // Get int detail via enum
@@ -468,6 +435,8 @@ namespace xAOD {
   const TauJet_v3::TauTrackLinks_t TauJet_v3::tauTrackLinksWithMask(unsigned int mask) const{
     TauJet_v3::TauTrackLinks_t links;
     for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){
+      // protection against tau track thinning
+      if(!link.isValid()) continue;
       if( (*link)->flagWithMask(mask))
 	links.push_back(link);
     }
@@ -488,6 +457,8 @@ namespace xAOD {
     uint tracks_pass_mask=0;
 
     for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){
+      // protection against tau track thinning
+      if(!link.isValid()) continue;
       const TauTrack* trk = *link;
       if(trk->flagWithMask(mask)){
 	if(tracks_pass_mask==i) {
@@ -526,9 +497,11 @@ namespace xAOD {
   }
 
   /// Get the v<const pointer> to a given tauTrack collection associated with this tau
-  std::vector<const TauTrack*> TauJet_v3::tracksWithMask(unsigned int mask )const {
+  std::vector<const TauTrack*> TauJet_v3::tracksWithMask( unsigned int mask ) const {
   std::vector<const TauTrack*> trks;
     for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){
+      // protection against tau track thinning
+      if(!link.isValid()) continue;
       const TauTrack* trk = *link;
       if(trk->flagWithMask(mask)){
 	trks.push_back(trk);
@@ -585,6 +558,8 @@ namespace xAOD {
   size_t TauJet_v3::nTracksWithMask(unsigned int flags) const{
     size_t n(0);
     for(const ElementLink< xAOD::TauTrackContainer >& link : tauTrackAcc(*this) ){
+      // protection against tau track thinning
+      if(!link.isValid()) continue;
       const TauTrack* trk = *link;
       if(trk->flagWithMask(flags)) n++;
     }    
@@ -593,7 +568,11 @@ namespace xAOD {
 
   //all tracks regardless of classification or lack thereof
   size_t TauJet_v3::nAllTracks() const{
-    return tauTrackAcc( *this ).size();
+    // unsafe w.r.t. tau track thinning
+    //return tauTrackAcc( *this ).size();
+    // return the number of tracks with valid element link
+    TauTrack::TrackFlagType mask=0;
+    return nTracksWithMask( mask );
   }
 
   /// add a TauTrack to the tau
@@ -1021,4 +1000,3 @@ namespace xAOD {
   
 } // namespace xAOD
 
-//  LocalWords:  panTauDetail mJetSeed
diff --git a/Event/xAOD/xAODTau/xAODTau/TauDefs.h b/Event/xAOD/xAODTau/xAODTau/TauDefs.h
index 67715716a56e..141d50ddce86 100644
--- a/Event/xAOD/xAODTau/xAODTau/TauDefs.h
+++ b/Event/xAOD/xAODTau/xAODTau/TauDefs.h
@@ -1,10 +1,9 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: TauDefs.h 796092 2017-02-08 00:14:16Z griffith $
 #ifndef XAODTAU_TAUDEFS_H
 #define XAODTAU_TAUDEFS_H
 
@@ -327,6 +326,7 @@ namespace TauJetParameters
       nChargedTracks=109,
       nIsolatedTracks=110,
       nModifiedIsolationTracks=111,//no static variable for now
+      nAllTracks=112,
 
       //Tau/Ele BDTVars
 
diff --git a/Event/xAOD/xAODTau/xAODTau/versions/TauJetAuxContainer_v3.h b/Event/xAOD/xAODTau/xAODTau/versions/TauJetAuxContainer_v3.h
index 58fa1316fe76..e8821912be52 100644
--- a/Event/xAOD/xAODTau/xAODTau/versions/TauJetAuxContainer_v3.h
+++ b/Event/xAOD/xAODTau/xAODTau/versions/TauJetAuxContainer_v3.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAODTAU_VERSIONS_TAUJETAUXCONTAINER_V3_H
@@ -117,6 +117,7 @@ namespace xAOD {
     //after the first pass of TauTrackFinder
     std::vector< int > nChargedTracks;
     std::vector< int > nIsolatedTracks;
+    std::vector< int > nAllTracks;
 
     typedef std::vector< ElementLink< IParticleContainer > > IParticleLink_t;
     std::vector< IParticleLink_t > clusterLinks;//actually xAOD::CaloClusters
diff --git a/Reconstruction/tauRecTools/src/TauTrackFinder.cxx b/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
index 18dac06cc775..cfbd16fc26e3 100644
--- a/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
+++ b/Reconstruction/tauRecTools/src/TauTrackFinder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef XAOD_ANALYSIS
@@ -7,7 +7,6 @@
 #include "TrkParametersIdentificationHelpers/TrackParametersIdHelper.h"
 
 #include "xAODTau/TauJet.h"
-#include "xAODTau/TauJetContainer.h"
 #include "xAODTau/TauTrackContainer.h"
 
 #include "TauTrackFinder.h"
@@ -208,6 +207,8 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrack
   //These are set again in TauTrackClassifier                                                                                                                  
   pTau.setDetail(xAOD::TauJetParameters::nChargedTracks, (int) pTau.nTracks());
   pTau.setDetail(xAOD::TauJetParameters::nIsolatedTracks, (int) pTau.nTracks(xAOD::TauJetParameters::classifiedIsolation));
+  // keep track of total number of associated tracks, in case of tau track thinning
+  pTau.setDetail(xAOD::TauJetParameters::nAllTracks, (int) pTau.nAllTracks());
 
   for (unsigned int i = 0; i < otherTracks.size(); ++i) {
     const xAOD::TrackParticle* trackParticle = otherTracks.at(i);
@@ -295,8 +296,7 @@ StatusCode TauTrackFinder::executeTrackFinder(xAOD::TauJet& pTau, xAOD::TauTrack
   // store information only in ExtraDetailsContainer
   if(!m_bypassExtrapolator)
     {
-      StatusCode sc;
-      sc = extrapolateToCaloSurface(pTau);
+      StatusCode sc = extrapolateToCaloSurface(pTau);
       if (sc.isFailure() && !sc.isRecoverable()) {
 	ATH_MSG_ERROR("couldn't extrapolate tracks to calo surface");
 	return StatusCode::FAILURE;
@@ -530,7 +530,7 @@ float TauTrackFinder::getZ0(const xAOD::TrackParticle* track, const xAOD::Vertex
 
     if (!track) return MAX;
 
-    const Trk::Perigee* perigee = 0;
+    const Trk::Perigee* perigee = nullptr;
     if (vertex) perigee = m_trackToVertexTool->perigeeAtVertex(*track, vertex->position());
     else        perigee = m_trackToVertexTool->perigeeAtVertex(*track); //will use beamspot or 0,0,0 instead
 
@@ -553,7 +553,7 @@ bool TauTrackFinder::isLargeD0Track(const xAOD::TrackParticle* track) const
     ATH_MSG_DEBUG("LargeD0Track found");
     return true;
   }
-  return false;
 
+  return false;
 }
 #endif
-- 
GitLab


From bb3e2245316cdb96739cf83473fdf6daef2f02e9 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Wed, 6 Jan 2021 01:20:57 +0100
Subject: [PATCH 303/308] ATLASRECTS-5840 :  Make egammaTruthAssociationAlg
 re-entrant

---
 .../src/egammaTruthAssociationAlg.cxx         | 159 ++++++++++++------
 .../src/egammaTruthAssociationAlg.h           |  26 ++-
 2 files changed, 114 insertions(+), 71 deletions(-)

diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx
index c02b7197cd35..643c7e50af63 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "egammaTruthAssociationAlg.h"
@@ -19,7 +19,7 @@ using PhotonLink_t = ElementLink<xAOD::PhotonContainer>;
 
 egammaTruthAssociationAlg::egammaTruthAssociationAlg(const std::string& name,
                                                      ISvcLocator* pSvcLocator)
-  : AthAlgorithm(name, pSvcLocator)
+  : AthReentrantAlgorithm(name, pSvcLocator)
 {}
 
 egammaTruthAssociationAlg::~egammaTruthAssociationAlg() {}
@@ -32,7 +32,8 @@ egammaTruthAssociationAlg::initialize()
 
   // initialize the data handles
   ATH_CHECK(m_truthEventContainerKey.initialize(m_doEgammaTruthContainer));
-  ATH_CHECK(m_egammaTruthParticleContainerKey.initialize(m_doEgammaTruthContainer));
+  ATH_CHECK(
+    m_egammaTruthParticleContainerKey.initialize(m_doEgammaTruthContainer));
   ATH_CHECK(m_truthParticleContainerKey.initialize());
 
   // Now the standard decoration handles
@@ -73,77 +74,105 @@ egammaTruthAssociationAlg::finalize()
 }
 
 StatusCode
-egammaTruthAssociationAlg::execute_r(const EventContext& ctx) const
+egammaTruthAssociationAlg::execute(const EventContext& ctx) const
 {
 
   SG::WriteHandle<xAOD::TruthParticleContainer> egammaTruthContainer;
 
   if (m_doEgammaTruthContainer) {
 
-    egammaTruthContainer =
-      SG::WriteHandle<xAOD::TruthParticleContainer>(m_egammaTruthParticleContainerKey, ctx);
-    ATH_CHECK(egammaTruthContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),
-                                          std::make_unique<xAOD::TruthParticleAuxContainer>()));
+    egammaTruthContainer = SG::WriteHandle<xAOD::TruthParticleContainer>(
+      m_egammaTruthParticleContainerKey, ctx);
+    ATH_CHECK(egammaTruthContainer.record(
+      std::make_unique<xAOD::TruthParticleContainer>(),
+      std::make_unique<xAOD::TruthParticleAuxContainer>()));
 
     // Add a copy of electrons and photons to the truth egamma container
-    SG::ReadHandle<xAOD::TruthEventContainer> truthEvtContainer(m_truthEventContainerKey, ctx);
+    SG::ReadHandle<xAOD::TruthEventContainer> truthEvtContainer(
+      m_truthEventContainerKey, ctx);
 
     // only for serial running. Can remove check later
     if (!truthEvtContainer.isValid() || truthEvtContainer->empty()) {
-      ATH_MSG_WARNING("Could not retrieve " << m_truthEventContainerKey.key()
-                                            << " or container empty, returning");
+      ATH_MSG_WARNING("Could not retrieve "
+                      << m_truthEventContainerKey.key()
+                      << " or container empty, returning");
       return StatusCode::SUCCESS;
     }
 
-    for (const auto& truthParticleLink : truthEvtContainer->front()->truthParticleLinks()) {
+    for (const auto& truthParticleLink :
+         truthEvtContainer->front()->truthParticleLinks()) {
       if (!truthParticleLink.isValid())
         continue;
       const xAOD::TruthParticle* truthParticle = *truthParticleLink;
       if (!isPromptEgammaParticle(truthParticle))
         continue;
-      getNewTruthParticle(*egammaTruthContainer, truthParticle, truthParticleLink.getDataPtr());
+      getNewTruthParticle(
+        *egammaTruthContainer, truthParticle, truthParticleLink.getDataPtr());
     }
   }
   // Decorate containers with truth info, including links to truth particles
   // Decorate the truth particles with links to the reco ones
 
-  // note that in multithreading this must be valid; can't just fail with success.
-  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticles(m_truthParticleContainerKey, ctx);
+  // note that in multithreading this must be valid; can't just fail with
+  // success.
+  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticles(
+    m_truthParticleContainerKey, ctx);
 
   // accessors
-  static const SG::AuxElement::Accessor<ClusterLink_t> accClusLink("recoClusterLink");
-  static const SG::AuxElement::Accessor<ElectronLink_t> accElLink("recoElectronLink");
-  static const SG::AuxElement::Accessor<PhotonLink_t> accPhLink("recoPhotonLink");
+  static const SG::AuxElement::Accessor<ClusterLink_t> accClusLink(
+    "recoClusterLink");
+  static const SG::AuxElement::Accessor<ElectronLink_t> accElLink(
+    "recoElectronLink");
+  static const SG::AuxElement::Accessor<PhotonLink_t> accPhLink(
+    "recoPhotonLink");
 
   if (m_matchElectrons) {
     ATH_MSG_DEBUG("About to match electrons");
-    ATH_CHECK(match(*truthParticles, m_electronDecKeys, accElLink, egammaTruthContainer.ptr()));
+    ATH_CHECK(match(ctx,
+                    *truthParticles,
+                    m_electronDecKeys,
+                    accElLink,
+                    egammaTruthContainer.ptr()));
   }
 
   if (m_matchPhotons) {
     ATH_MSG_DEBUG("About to match photons");
-    ATH_CHECK(match(*truthParticles, m_photonDecKeys, accPhLink, egammaTruthContainer.ptr()));
+    ATH_CHECK(match(ctx,
+                    *truthParticles,
+                    m_photonDecKeys,
+                    accPhLink,
+                    egammaTruthContainer.ptr()));
   }
 
   if (m_matchClusters) {
     ATH_MSG_DEBUG("About to match clusters");
-    ATH_CHECK(match(*truthParticles, m_clusterDecKeys, accClusLink, egammaTruthContainer.ptr()));
+    ATH_CHECK(match(ctx,
+                    *truthParticles,
+                    m_clusterDecKeys,
+                    accClusLink,
+                    egammaTruthContainer.ptr()));
   }
 
   if (m_matchForwardElectrons) {
     ATH_MSG_DEBUG("About to match fwd electrons");
-    ATH_CHECK(match(*truthParticles, m_fwdElectronDecKeys, accElLink, egammaTruthContainer.ptr()));
+    ATH_CHECK(match(ctx,
+                    *truthParticles,
+                    m_fwdElectronDecKeys,
+                    accElLink,
+                    egammaTruthContainer.ptr()));
   }
 
   return StatusCode::SUCCESS;
 }
 
 bool
-egammaTruthAssociationAlg::isPromptEgammaParticle(const xAOD::TruthParticle* truth) const
+egammaTruthAssociationAlg::isPromptEgammaParticle(
+  const xAOD::TruthParticle* truth) const
 {
 
-  if ((truth->pdgId() != 22 && abs(truth->pdgId()) != 11) || truth->status() == 2 ||
-      truth->status() == 3 || truth->barcode() > m_barcodeOffset || truth->pt() < m_minPt){
+  if ((truth->pdgId() != 22 && abs(truth->pdgId()) != 11) ||
+      truth->status() == 2 || truth->status() == 3 ||
+      truth->barcode() > m_barcodeOffset || truth->pt() < m_minPt) {
     return false;
   }
 
@@ -185,10 +214,14 @@ egammaTruthAssociationAlg::getNewTruthParticle(
   truthParticle->setProdVtxLink(truth->prodVtxLink());
   truthParticle->setDecayVtxLink(truth->decayVtxLink());
 
-  static const SG::AuxElement::Accessor<ClusterLink_t> accClusLink("recoClusterLink");
-  static const SG::AuxElement::Accessor<ElectronLink_t> accElLink("recoElectronLink");
-  static const SG::AuxElement::Accessor<PhotonLink_t> accPhLink("recoPhotonLink");
-  static const SG::AuxElement::Accessor<TruthLink_t> accTruthLink("truthParticleLink");
+  static const SG::AuxElement::Accessor<ClusterLink_t> accClusLink(
+    "recoClusterLink");
+  static const SG::AuxElement::Accessor<ElectronLink_t> accElLink(
+    "recoElectronLink");
+  static const SG::AuxElement::Accessor<PhotonLink_t> accPhLink(
+    "recoPhotonLink");
+  static const SG::AuxElement::Accessor<TruthLink_t> accTruthLink(
+    "truthParticleLink");
   static const SG::AuxElement::Accessor<int> accType("truthType");
   static const SG::AuxElement::Accessor<int> accOrigin("truthOrigin");
 
@@ -213,7 +246,7 @@ egammaTruthAssociationAlg::getEgammaTruthParticle(
   const xAOD::TruthParticle* truth,
   xAOD::TruthParticleContainer& egammaTruthContainer) const
 {
-  if (!truth){
+  if (!truth) {
     return nullptr;
   }
   // Find the original truth particle for electrons from conversions
@@ -226,7 +259,7 @@ egammaTruthAssociationAlg::getEgammaTruthParticle(
   }
 
   // In case truth became null in the above loop
-  if (!truth){
+  if (!truth) {
     return nullptr;
   }
   for (auto egammaTruth : egammaTruthContainer) {
@@ -240,8 +273,9 @@ egammaTruthAssociationAlg::getEgammaTruthParticle(
 //// The templated functions
 template<class T>
 StatusCode
-egammaTruthAssociationAlg::initializeDecorKeys(SG::WriteDecorHandleKeyArray<T>& keys,
-                                               const std::string& name)
+egammaTruthAssociationAlg::initializeDecorKeys(
+  SG::WriteDecorHandleKeyArray<T>& keys,
+  const std::string& name)
 {
   if (!keys.empty()) {
     ATH_MSG_FATAL("The WriteDecorHandle should not be configured directly.");
@@ -258,16 +292,17 @@ egammaTruthAssociationAlg::initializeDecorKeys(SG::WriteDecorHandleKeyArray<T>&
 // constructor
 template<class T>
 egammaTruthAssociationAlg::writeDecorHandles<T>::writeDecorHandles(
-  const SG::WriteDecorHandleKeyArray<T>& hkeys)
-  : el(hkeys.at(0))
-  , type(hkeys.at(1))
-  , origin(hkeys.at(2))
+  const SG::WriteDecorHandleKeyArray<T>& hkeys,const EventContext& ctx)
+  : el(hkeys.at(0),ctx)
+  , type(hkeys.at(1),ctx)
+  , origin(hkeys.at(2),ctx)
 {}
 
 template<class T>
 egammaTruthAssociationAlg::MCTruthInfo_t
-egammaTruthAssociationAlg::particleTruthClassifier(const T* particle,
-                                                   Cache* extrapolationCache) const
+egammaTruthAssociationAlg::particleTruthClassifier(
+  const T* particle,
+  Cache* extrapolationCache) const
 {
   MCTruthInfo_t info;
   IMCTruthClassifier::Info mcinfo;
@@ -283,17 +318,20 @@ egammaTruthAssociationAlg::particleTruthClassifier(const T* particle,
  * second pass based on the cluster to find true photons **/
 template<>
 egammaTruthAssociationAlg::MCTruthInfo_t
-egammaTruthAssociationAlg::particleTruthClassifier<xAOD::Electron>(const xAOD::Electron* electron,
-                                                                   Cache* extrapolationCache) const
+egammaTruthAssociationAlg::particleTruthClassifier<xAOD::Electron>(
+  const xAOD::Electron* electron,
+  Cache* extrapolationCache) const
 {
   MCTruthInfo_t info;
   IMCTruthClassifier::Info mcinfo;
   mcinfo.extrapolationCache = extrapolationCache;
   auto ret = m_mcTruthClassifier->particleTruthClassifier(electron, &mcinfo);
   if (ret.first == MCTruthPartClassifier::Unknown &&
-      !xAOD::EgammaHelpers::isFwdElectron(electron) && electron->caloCluster()) {
+      !xAOD::EgammaHelpers::isFwdElectron(electron) &&
+      electron->caloCluster()) {
     ATH_MSG_DEBUG("Trying cluster-based truth classification for electron");
-    ret = m_mcTruthClassifier->particleTruthClassifier(electron->caloCluster(), &mcinfo);
+    ret = m_mcTruthClassifier->particleTruthClassifier(electron->caloCluster(),
+                                                       &mcinfo);
   }
   info.genPart = mcinfo.genPart;
   info.first = ret.first;
@@ -303,13 +341,15 @@ egammaTruthAssociationAlg::particleTruthClassifier<xAOD::Electron>(const xAOD::E
 
 template<class T, class L>
 StatusCode
-egammaTruthAssociationAlg::match(const xAOD::TruthParticleContainer& truthParticles,
-                                 const SG::WriteDecorHandleKeyArray<T>& hkeys,
-                                 const SG::AuxElement::Accessor<L>& linkAccess,
-                                 xAOD::TruthParticleContainer* egammaTruthContainer) const
+egammaTruthAssociationAlg::match(
+  const EventContext& ctx,
+  const xAOD::TruthParticleContainer& truthParticles,
+  const SG::WriteDecorHandleKeyArray<T>& hkeys,
+  const SG::AuxElement::Accessor<L>& linkAccess,
+  xAOD::TruthParticleContainer* egammaTruthContainer) const
 {
 
-  writeDecorHandles<T> decoHandles(hkeys);
+  writeDecorHandles<T> decoHandles(hkeys,ctx);
 
   // Extrapolation Cache
   Cache extrapolationCache{};
@@ -320,14 +360,17 @@ egammaTruthAssociationAlg::match(const xAOD::TruthParticleContainer& truthPartic
 
     const xAOD::TruthParticle* truthParticle = info.genPart;
     if (truthParticle) {
-      ElementLink<xAOD::TruthParticleContainer> link(truthParticle, truthParticles);
-      ATH_MSG_DEBUG("Decorating object with link to truth, index = " << link.index());
+      ElementLink<xAOD::TruthParticleContainer> link(
+        truthParticle, truthParticles, ctx);
+      ATH_MSG_DEBUG(
+        "Decorating object with link to truth, index = " << link.index());
       decoHandles.el(*particle) = link;
     } else {
       decoHandles.el(*particle) = ElementLink<xAOD::TruthParticleContainer>();
     }
     decoHandles.el(*particle).toPersistent();
-    ATH_MSG_DEBUG("truthType = " << info.first << " truthOrigin = " << info.second);
+    ATH_MSG_DEBUG("truthType = " << info.first
+                                 << " truthOrigin = " << info.second);
     decoHandles.type(*particle) = static_cast<int>(info.first);
     decoHandles.origin(*particle) = static_cast<int>(info.second);
 
@@ -337,11 +380,14 @@ egammaTruthAssociationAlg::match(const xAOD::TruthParticleContainer& truthPartic
         ATH_MSG_ERROR("The egammaTruthContainer needs to be valid");
         return StatusCode::FAILURE;
       }
-      const xAOD::TruthParticle* truth = xAOD::TruthHelpers::getTruthParticle(*particle);
+      const xAOD::TruthParticle* truth =
+        xAOD::TruthHelpers::getTruthParticle(*particle);
       if (truth) {
-        xAOD::TruthParticle* truthEgamma = getEgammaTruthParticle(truth, *egammaTruthContainer);
+        xAOD::TruthParticle* truthEgamma =
+          getEgammaTruthParticle(truth, *egammaTruthContainer);
         if (truthEgamma) {
-          // we found a truthEgamma object we should annotate if this is the best link
+          // we found a truthEgamma object we should annotate if this is the
+          // best link
           bool annotateLink = true;                   // by default we annotate
           const auto link = linkAccess(*truthEgamma); // what already exists
           if (link.isValid()) {
@@ -351,13 +397,14 @@ egammaTruthAssociationAlg::match(const xAOD::TruthParticleContainer& truthPartic
                   std::abs(particle->e() / truthEgamma->e() - 1)) {
               ATH_MSG_DEBUG(truthEgamma
                             << ": "
-                            << " already set to a better matched particle: " << particle);
+                            << " already set to a better matched particle: "
+                            << particle);
               annotateLink = false;
             }
           }
 
           if (annotateLink) {
-            L link(particle, *decoHandles.readHandle());
+            L link(particle, *decoHandles.readHandle(), ctx);
             linkAccess(*truthEgamma) = link;
             linkAccess(*truthEgamma).toPersistent();
           }
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h
index f695fba988b8..363cb365e7b3 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaTruthAssociationAlg.h
@@ -5,7 +5,7 @@
 #ifndef EGAMMAALGS_EGAMMATRUTHASSOCIATIONALG_H
 #define EGAMMAALGS_EGAMMATRUTHASSOCIATIONALG_H
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "MCTruthClassifier/IMCTruthClassifier.h"
@@ -38,7 +38,7 @@
    @author B. Lenzi J. Mitrevski C. Anastopoulos
 */
 
-class egammaTruthAssociationAlg : public AthAlgorithm
+class egammaTruthAssociationAlg : public AthReentrantAlgorithm
 {
 
 public:
@@ -56,13 +56,7 @@ public:
   virtual StatusCode finalize() override final;
 
   /** @brief execute on container */
-  virtual StatusCode execute() override final
-  {
-    return execute_r(Algorithm::getContext());
-  }
-  // This will become the normal execute when
-  // inheriting from AthReentrantAlgorithm
-  StatusCode execute_r(const EventContext& ctx) const;
+  virtual StatusCode execute(const EventContext& ctx) const override final;
 
 private:
   struct MCTruthInfo_t
@@ -82,8 +76,8 @@ private:
   template<class T>
   struct writeDecorHandles
   {
-    writeDecorHandles(
-      const SG::WriteDecorHandleKeyArray<T>& keys); // constructor
+    writeDecorHandles(const SG::WriteDecorHandleKeyArray<T>& keys,
+                      const EventContext& ctx); // constructor
 
     SG::WriteDecorHandle<T, ElementLink<xAOD::TruthParticleContainer>> el;
     SG::WriteDecorHandle<T, int> type;
@@ -97,7 +91,8 @@ private:
    * info and decorate the truth particles with links to the reco ones
    * (reco<typeName>Link) **/
   template<class T, class L>
-  StatusCode match(const xAOD::TruthParticleContainer& truthParticles,
+  StatusCode match(const EventContext& ctx,
+                   const xAOD::TruthParticleContainer& truthParticles,
                    const SG::WriteDecorHandleKeyArray<T>& hkeys,
                    const SG::AuxElement::Accessor<L>& linkAccess,
                    xAOD::TruthParticleContainer* egammaTruthContainer) const;
@@ -110,9 +105,10 @@ private:
 
   /** @brief Create a copy a truth particle, add it to the new container and
    * decorate it with a link to the original particle **/
-  void getNewTruthParticle(xAOD::TruthParticleContainer& egammaTruthContainer,
-                           const xAOD::TruthParticle* truth,
-                           const xAOD::TruthParticleContainer* oldContainer) const;
+  void getNewTruthParticle(
+    xAOD::TruthParticleContainer& egammaTruthContainer,
+    const xAOD::TruthParticle* truth,
+    const xAOD::TruthParticleContainer* oldContainer) const;
 
   /** @brief Return true if the truth particle is a prompt electron or photon
    * **/
-- 
GitLab


From d3b6d3824473fe6d21b052695b790bfda6191a00 Mon Sep 17 00:00:00 2001
From: Nils Erik Krumnack <nils.erik.krumnack@cern.ch>
Date: Tue, 5 Jan 2021 14:02:01 +0000
Subject: [PATCH 304/308] Merge branch 'el/prun' into '21.2'

Minor EventLoop submission improvements

See merge request atlas/athena!39451

(cherry picked from commit 041207a9b7c469138d43b25b427090f2b1a751e7)

e501dd09 EL: Remove some obsolete grid options
6a2444e8 EL: Do not set ROOT version in PrunDriver as it is not used
---
 PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h        | 3 ---
 PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx           | 3 ---
 .../D3PDTools/EventLoopGrid/Root/PrunDriver.cxx            | 1 -
 PhysicsAnalysis/D3PDTools/EventLoopGrid/data/ELG_prun.py   | 7 ++-----
 4 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h
index 8f37ca3c0839..53a654bdaa2f 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Job.h
@@ -395,7 +395,6 @@ namespace EL
   public:
     static const std::string optGridDestSE;
     static const std::string optGridSite;
-    static const std::string optGridCloud;
     static const std::string optGridExcludedSite;
     static const std::string optGridNGBPerJob;
     static const std::string optGridMemory;
@@ -405,11 +404,9 @@ namespace EL
     static const std::string optGridNJobs;
     static const std::string optGridMaxFileSize;
     static const std::string optGridMaxNFilesPerJob;
-    static const std::string optGridUseChirpServer;
     static const std::string optGridExpress;
     static const std::string optGridNoSubmit;
     static const std::string optGridMergeOutput;
-    static const std::string optGridUseContElementBoundary;
     static const std::string optGridAddNthFieldOfInDSToLFN;
     static const std::string optGridWorkingGroup;
     static const std::string optGridShowCmd;
diff --git a/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx b/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx
index 62bb1063d0c0..92295c21fad2 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoop/Root/Job.cxx
@@ -68,7 +68,6 @@ namespace EL
   const std::string Job::optOutputSampleName = "nc_outputSampleName";
   const std::string Job::optGridDestSE = "nc_destSE";
   const std::string Job::optGridSite = "nc_site";
-  const std::string Job::optGridCloud = "nc_cloud";
   const std::string Job::optGridExcludedSite = "nc_excludedSite";
   const std::string Job::optGridNGBPerJob = "nc_nGBPerJob";
   const std::string Job::optGridMemory = "nc_memory";
@@ -78,11 +77,9 @@ namespace EL
   const std::string Job::optGridNJobs = "nc_nJobs";
   const std::string Job::optGridMaxFileSize = "nc_maxFileSize";
   const std::string Job::optGridMaxNFilesPerJob = "nc_maxNFilesPerJob";
-  const std::string Job::optGridUseChirpServer = "nc_useChirpServer";
   const std::string Job::optGridExpress = "nc_express";
   const std::string Job::optGridNoSubmit = "nc_noSubmit";
   const std::string Job::optGridMergeOutput = "nc_mergeOutput";
-  const std::string Job::optGridUseContElementBoundary = "nc_useContElementBoundary";
   const std::string Job::optGridAddNthFieldOfInDSToLFN = "nc_addNthFieldOfInDSToLFN";
   const std::string Job::optGridWorkingGroup = "nc_workingGroup";
   const std::string Job::optGridShowCmd = "nc_showCmd";
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopGrid/Root/PrunDriver.cxx b/PhysicsAnalysis/D3PDTools/EventLoopGrid/Root/PrunDriver.cxx
index 24ee3132d3a6..e9487cc7e488 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopGrid/Root/PrunDriver.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopGrid/Root/PrunDriver.cxx
@@ -135,7 +135,6 @@ static SH::MetaObject defaultOpts()
   SH::MetaObject o;
   o.setString("nc_nGBPerJob", "MAX");
   o.setString("nc_mergeOutput", "true");
-  o.setString("nc_rootVer", gROOT->GetVersion());
   o.setString("nc_cmtConfig", gSystem->ExpandPathName("$AnalysisBase_PLATFORM"));
   o.setString("nc_useAthenaPackages", "true");
   const std::string mergestr = "elg_merge jobdef.root %OUT %IN";
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopGrid/data/ELG_prun.py b/PhysicsAnalysis/D3PDTools/EventLoopGrid/data/ELG_prun.py
index c82a27b240b4..f2785c05681a 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopGrid/data/ELG_prun.py
+++ b/PhysicsAnalysis/D3PDTools/EventLoopGrid/data/ELG_prun.py
@@ -21,7 +21,6 @@ def ELG_prun(sample) :
     #These are options that can be set by the user
     opts = ['destSE',
             'site',
-            'cloud',
             'rootVer',
             'cmtConfig',
             'excludedSite',
@@ -41,8 +40,7 @@ def ELG_prun(sample) :
             'tmpDir']
 
     #These are options that can be set by the user
-    switches = ['useChirpServer',
-                'express',
+    switches = ['express',
                 'noSubmit',
                 'skipScout',
                 'disableAutoRetry',
@@ -50,8 +48,7 @@ def ELG_prun(sample) :
                 'official',
                 'mergeOutput',
                 'useRootCore',
-                'useAthenaPackages',
-                'useContElementBoundary']
+                'useAthenaPackages']
 
     for opt in opts :
         arg = sample.getMetaDouble('nc_' + opt, -1)        
-- 
GitLab


From 4bae90379939dbc7b3f9f695f179b9043f258b9e Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Wed, 6 Jan 2021 09:31:47 +0100
Subject: [PATCH 305/308] Remove const classifier in static_cast

The qualifier present in the type for the static_cast generates a
compiler warning. Remove the const classifier as it is troublesome and
unnecessary.
---
 Generators/EvgenProdTools/src/CountHepMC.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Generators/EvgenProdTools/src/CountHepMC.cxx b/Generators/EvgenProdTools/src/CountHepMC.cxx
index c0f8d0ff2660..c8d7dafda5ee 100644
--- a/Generators/EvgenProdTools/src/CountHepMC.cxx
+++ b/Generators/EvgenProdTools/src/CountHepMC.cxx
@@ -127,9 +127,9 @@ else{
     {
       // change the channel number where /Generation/Parameters are found
       auto newChannelNumber =
-          static_cast< const CondAttrListCollection::ChanNum >(m_newRunNumber);
+          static_cast< CondAttrListCollection::ChanNum >(m_newRunNumber);
       auto oldChannelNumber = 
-          static_cast< const CondAttrListCollection::ChanNum >(oldRunNumber);
+          static_cast< CondAttrListCollection::ChanNum >(oldRunNumber);
 
       const char* key = "/Generation/Parameters";
       const IOVMetaDataContainer * iovContainer = nullptr;
-- 
GitLab


From 78cc4205c17fd477ac36cb6630e8ae840068ef77 Mon Sep 17 00:00:00 2001
From: Bertrand Martin <martindl@cern.ch>
Date: Wed, 6 Jan 2021 10:15:57 +0100
Subject: [PATCH 306/308] tauRec: add tau thinning algorithm

Hello,

This MR adds a new tauRec thinning algorithm that will remove all entries from tau-related containers for tau candidates below a minimum tau pt threshold.
The motivation is explained in detail in https://indico.cern.ch/event/986226/contributions/4152506/attachments/2164807/3653366/TauCP_Seeds_LRT_17Dec20.pdf (slide 10).
In R22, we will have to relax the seed jet pt cut (15 GeV) currently applied by default in the reconstruction, as it causes tau reconstruction inefficiency.
Instead, we will have to run the tau reconstruction on all seed jets, and at the end, remove tau candidates below a pt threshold (~10 GeV), in order to keep the tau disk size comparable to what it is now.

The algorithm is added to tauRec but not yet deployed in RecExCommon_topOptions, on purpose. This will be done once we converge on the pt threshold, and the seed jet pt cut will have to be dropped at the same time.

Relevant JIRA ticket: ATLASRECTS-5684

Cheers,
Bertrand
---
 Reconstruction/tauRec/src/TauThinningAlg.cxx  | 135 ++++++++++++++++++
 Reconstruction/tauRec/src/TauThinningAlg.h    |  98 +++++++++++++
 .../tauRec/src/components/tauRec_entries.cxx  |   2 +
 3 files changed, 235 insertions(+)
 create mode 100644 Reconstruction/tauRec/src/TauThinningAlg.cxx
 create mode 100644 Reconstruction/tauRec/src/TauThinningAlg.h

diff --git a/Reconstruction/tauRec/src/TauThinningAlg.cxx b/Reconstruction/tauRec/src/TauThinningAlg.cxx
new file mode 100644
index 000000000000..cc7bb45e6382
--- /dev/null
+++ b/Reconstruction/tauRec/src/TauThinningAlg.cxx
@@ -0,0 +1,135 @@
+/*
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
+*/
+
+#include "TauThinningAlg.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/ThinningHandle.h"
+#include "tauRecTools/HelperFunctions.h"
+
+/**
+ * @brief Gaudi initialize method.
+ */
+StatusCode TauThinningAlg::initialize()
+{
+  ATH_CHECK( m_taus.initialize(m_streamName) );
+  ATH_CHECK( m_tauTracks.initialize(m_streamName) );
+  ATH_CHECK( m_neutralPFOs.initialize(m_streamName) );
+  ATH_CHECK( m_pi0clusters.initialize(m_streamName) );
+  ATH_CHECK( m_pi0CellLinks.initialize(m_streamName) );
+  ATH_CHECK( m_finalPi0s.initialize(m_streamName) );
+  ATH_CHECK( m_shotPFOs.initialize(m_streamName) );
+  ATH_CHECK( m_shotclusters.initialize(m_streamName) );
+  ATH_CHECK( m_shotCellLinks.initialize(m_streamName) );
+  ATH_CHECK( m_hadronicPFOs.initialize(m_streamName) );
+  ATH_CHECK( m_secondaryVertices.initialize(m_streamName) );
+
+  return StatusCode::SUCCESS;
+}
+
+/**
+ * @brief Execute the algorithm.
+ * @param ctx Current event context.
+ */
+StatusCode TauThinningAlg::execute (const EventContext& ctx) const
+{
+  SG::ThinningHandle<xAOD::TauJetContainer> taus (m_taus, ctx);
+  taus.thinAll();
+
+  SG::ThinningHandle<xAOD::TauTrackContainer> tauTracks (m_tauTracks, ctx);
+  tauTracks.thinAll();
+
+  SG::ThinningHandle<xAOD::PFOContainer> neutralPFOs (m_neutralPFOs, ctx);
+  neutralPFOs.thinAll();
+
+  SG::ThinningHandle<xAOD::CaloClusterContainer> pi0clusters (m_pi0clusters, ctx);
+  pi0clusters.thinAll();
+
+  SG::ThinningHandle<CaloClusterCellLinkContainer> pi0CellLinks (m_pi0CellLinks, ctx);
+  pi0CellLinks.thinAll();
+
+  SG::ThinningHandle<xAOD::ParticleContainer> finalPi0s (m_finalPi0s, ctx);
+  finalPi0s.thinAll();
+
+  SG::ThinningHandle<xAOD::PFOContainer> shotPFOs (m_shotPFOs, ctx);
+  shotPFOs.thinAll();
+
+  SG::ThinningHandle<xAOD::CaloClusterContainer> shotclusters (m_shotclusters, ctx);
+  shotclusters.thinAll();
+
+  SG::ThinningHandle<CaloClusterCellLinkContainer> shotCellLinks (m_shotCellLinks, ctx);
+  shotCellLinks.thinAll();
+
+  SG::ThinningHandle<xAOD::PFOContainer> hadronicPFOs (m_hadronicPFOs, ctx);
+  hadronicPFOs.thinAll();
+
+  SG::ThinningHandle<xAOD::VertexContainer> secondaryVertices (m_secondaryVertices, ctx);
+  secondaryVertices.thinAll();
+
+  for (const xAOD::TauJet* tau : *taus) {
+
+    if(tau->pt() < m_minTauPt) continue;
+
+    // keep tau
+    taus.keep(tau->index());
+    
+    // keep tau tracks
+    for(const xAOD::TauTrack* track : tau->allTracks()) {
+      tauTracks.keep(track->index());
+    }
+    
+    // keep neutral PFOs, pi0 clusters and cell links
+    for(size_t i=0; i<tau->nNeutralPFOs(); i++) {
+      neutralPFOs.keep(tau->neutralPFO(i)->index());
+
+      const xAOD::CaloCluster* cluster = tau->neutralPFO(i)->cluster(0);
+      pi0clusters.keep(cluster->index());
+  
+      const CaloClusterCellLink* cellLinks = cluster->getCellLinks();
+      CaloClusterCellLinkContainer::const_iterator cellLinks_it = std::find(pi0CellLinks->begin(), pi0CellLinks->end(), cellLinks);
+      if(cellLinks_it != pi0CellLinks->end()) {
+	size_t link_index = std::distance(pi0CellLinks->begin(), cellLinks_it);
+	pi0CellLinks.keep(link_index);
+      }
+      else {
+	ATH_MSG_WARNING( "Could not find cluster cell link in " << m_pi0CellLinks.key() << ", won't be saved in xAOD." );
+      }
+    }
+
+    // keep final pi0s
+    for(size_t i=0; i<tau->nPi0s(); i++) {
+      finalPi0s.keep(tau->pi0(i)->index());
+    }
+
+    // keep shot PFOs, clusters and cell links
+    for(size_t i=0; i<tau->nShotPFOs(); i++) {
+      shotPFOs.keep(tau->shotPFO(i)->index());
+
+      const xAOD::CaloCluster* cluster = tau->shotPFO(i)->cluster(0);
+      shotclusters.keep(cluster->index());
+
+      const CaloClusterCellLink* cellLinks = cluster->getCellLinks();
+      CaloClusterCellLinkContainer::const_iterator cellLinks_it = std::find(shotCellLinks->begin(), shotCellLinks->end(), cellLinks);
+      if(cellLinks_it != shotCellLinks->end()) {
+	size_t link_index = std::distance(shotCellLinks->begin(), cellLinks_it);
+	shotCellLinks.keep(link_index);
+      }
+      else {
+	ATH_MSG_WARNING( "Could not find cluster cell link in " << m_shotCellLinks.key() << ", won't be saved in xAOD." );
+      }
+    }
+
+    // keep hadronic PFOs
+    for(size_t i=0; i<tau->nHadronicPFOs(); i++) {
+      hadronicPFOs.keep(tau->hadronicPFO(i)->index());
+    }
+    
+    // keep secondary vertex when present
+    static const SG::AuxElement::ConstAccessor< ElementLink< xAOD::VertexContainer > > secondaryVertexAcc( "secondaryVertexLink" );
+    if(secondaryVertexAcc(*tau)) {
+      secondaryVertices.keep(tau->secondaryVertex()->index());
+    }        
+  }
+
+  return StatusCode::SUCCESS;
+}
diff --git a/Reconstruction/tauRec/src/TauThinningAlg.h b/Reconstruction/tauRec/src/TauThinningAlg.h
new file mode 100644
index 000000000000..7636fa474c95
--- /dev/null
+++ b/Reconstruction/tauRec/src/TauThinningAlg.h
@@ -0,0 +1,98 @@
+/*
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
+*/
+
+#ifndef TAUREC_TAUTHINNING_H
+#define TAUREC_TAUTHINNING_H
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "xAODTau/TauJetContainer.h"
+#include "xAODTau/TauTrackContainer.h"
+#include "xAODPFlow/PFOContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "CaloEvent/CaloClusterCellLinkContainer.h"
+#include "xAODTracking/VertexContainer.h"
+#include "xAODParticleEvent/ParticleContainer.h"
+#include "StoreGate/ThinningHandleKey.h"
+#include "GaudiKernel/SystemOfUnits.h"
+
+/**
+ * @brief Thin taus below a minimum pt threshold
+ *
+ * Thinning algorithm that removes entries from all tau-related containers for tau candidates below a minimum pt threshold
+ */
+class TauThinningAlg : public AthReentrantAlgorithm
+{
+  using AthReentrantAlgorithm::AthReentrantAlgorithm;
+
+ public:
+
+  /**
+   * @brief Gaudi initialize method.
+   */
+  virtual StatusCode initialize() override;
+
+  /**
+   * @brief Execute the algorithm.
+   * @param ctx Current event context.
+   */
+  virtual StatusCode execute(const EventContext& ctx) const override;
+
+
+ private:
+
+  // tau pt threshold (pt = ptFinalCalib as TauThinning is run after tau reconstruction)
+  Gaudi::Property<double> m_minTauPt 
+    { this, "MinTauPt", 0.* Gaudi::Units::GeV, "Minimum tau pt" };
+
+  // Name of the stream being thinned
+  StringProperty m_streamName
+    { this, "StreamName", "StreamAOD", "Name of the stream being thinned" };
+
+  // Tau container to thin
+  SG::ThinningHandleKey<xAOD::TauJetContainer> m_taus
+    { this, "Taus", "TauJets", "Tau container to thin" };
+
+  // Tau track container to thin
+  SG::ThinningHandleKey<xAOD::TauTrackContainer> m_tauTracks
+    { this, "TauTracks", "TauTracks", "Tau track container to thin" };
+
+  // Tau neutral PFO container to thin
+  SG::ThinningHandleKey<xAOD::PFOContainer> m_neutralPFOs
+    { this, "TauNeutralPFOs", "TauNeutralParticleFlowObjects", "Tau neutral PFO container to thin" };
+
+  // Tau pi0 cluster container to thin
+  SG::ThinningHandleKey<xAOD::CaloClusterContainer> m_pi0clusters
+    { this, "TauPi0Clusters", "TauPi0Clusters", "Tau pi0 cluster container to thin" };
+
+  // Tau pi0 cluster cell link container to thin
+  SG::ThinningHandleKey<CaloClusterCellLinkContainer> m_pi0CellLinks
+    { this, "Pi0CellLinks", "TauPi0Clusters_links", "Tau pi0 cluster cell link container to thin" };
+
+  // Tau final pi0 container to thin
+  SG::ThinningHandleKey<xAOD::ParticleContainer> m_finalPi0s
+    { this, "TauFinalPi0s", "TauFinalPi0s", "Tau final pi0 container to thin" };
+
+  // Tau shot PFO container to thin
+  SG::ThinningHandleKey<xAOD::PFOContainer> m_shotPFOs
+    { this, "TauShotPFOs", "TauShotParticleFlowObjects", "Tau shot PFO container to thin" };
+
+  // Tau shot cluster container to thin
+  SG::ThinningHandleKey<xAOD::CaloClusterContainer> m_shotclusters
+    { this, "TauShotClusters", "TauShotClusters", "Tau shot cluster container to thin" };
+
+  // Tau shot cluster cell link container to thin
+  SG::ThinningHandleKey<CaloClusterCellLinkContainer> m_shotCellLinks
+    { this, "ShotCellLinks", "TauShotClusters_links", "Tau shot cluster cell link container to thin" };
+
+  // Tau hadronic PFO container to thin
+  SG::ThinningHandleKey<xAOD::PFOContainer> m_hadronicPFOs
+    { this, "TauHadronicPFOs", "TauHadronicParticleFlowObjects", "Tau hadronic PFO container to thin" };
+  
+  // Tau secondary vertex container to thin
+  SG::ThinningHandleKey<xAOD::VertexContainer> m_secondaryVertices
+    { this, "TauSecondaryVertices", "TauSecondaryVertices", "Tau secondary vertex container to thin" };
+
+};
+
+#endif // not TAUREC_TAUTHINNING_H
diff --git a/Reconstruction/tauRec/src/components/tauRec_entries.cxx b/Reconstruction/tauRec/src/components/tauRec_entries.cxx
index b95afa30f2c1..65c3f697d17e 100644
--- a/Reconstruction/tauRec/src/components/tauRec_entries.cxx
+++ b/Reconstruction/tauRec/src/components/tauRec_entries.cxx
@@ -2,8 +2,10 @@
 #include "../TauRunnerAlg.h"
 #include "../TauCellThinningAlg.h"
 #include "../ClusterCellRelinkAlg.h"
+#include "../TauThinningAlg.h"
 
 DECLARE_COMPONENT( TauProcessorAlg )
 DECLARE_COMPONENT( TauRunnerAlg )
 DECLARE_COMPONENT( TauCellThinningAlg )
 DECLARE_COMPONENT( ClusterCellRelinkAlg )
+DECLARE_COMPONENT( TauThinningAlg )
-- 
GitLab


From 05d1a84be72308a3404a783163330cc541996180 Mon Sep 17 00:00:00 2001
From: Peter Onyisi <ponyisi@utexas.edu>
Date: Wed, 6 Jan 2021 19:07:01 +0000
Subject: [PATCH 307/308] Comprehensive TrigDecTool protection in DQ
 (ATLASRECTS-5869)

---
 .../CaloMonitoring/python/LArCellMonAlg.py    | 26 +++++++++----------
 .../CaloMonitoring/src/LArCellMonAlg.cxx      |  2 +-
 .../share/Run3DQTestingDriver.py              | 11 ++++----
 .../python/SCTHitsNoiseMonAlg.py              |  2 +-
 .../SCT_Monitoring/src/SCTHitsNoiseMonAlg.cxx |  2 +-
 .../python/LArCollisionTimeConfig.py          |  5 ++++
 .../LArMonitoring/src/LArFEBMonAlg.cxx        | 12 +++++----
 .../src/LArNoiseCorrelationMonAlg.cxx         |  2 +-
 .../LArMonitoring/src/LArRODMonAlg.cxx        |  6 ++---
 .../LArMonitoring/src/LArRODMonAlg.h          |  2 ++
 .../python/TgcRawDataMonitorAlgorithm.py      |  7 +++++
 .../src/JetTagMonitorAlgorithm.cxx            |  3 ++-
 .../src/METMonitorAlgorithm.cxx               |  3 ++-
 .../tauMonitoring/src/tauMonitorAlgorithm.cxx |  3 ++-
 14 files changed, 52 insertions(+), 34 deletions(-)

diff --git a/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py b/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
index f0e1d87ec017..4a30d038f549 100644
--- a/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
+++ b/Calorimeter/CaloMonitoring/python/LArCellMonAlg.py
@@ -30,12 +30,12 @@ def LArCellMonConfigOld(inputFlags):
     from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
     CaloNoiseCondAlg()
 
-    LArCellMonConfigCore(helper, LArCellMonAlg,inputFlags,isCosmics, isMC)
+    algo = LArCellMonConfigCore(helper, LArCellMonAlg,inputFlags,isCosmics, isMC)
 
     from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool
-    helper.monSeq.LArCellMonAlg.ReadyFilterTool = GetAtlasReadyFilterTool()
+    algo.ReadyFilterTool = GetAtlasReadyFilterTool()
     from AthenaMonitoring.BadLBFilterTool import GetLArBadLBFilterTool
-    helper.monSeq.LArCellMonAlg.BadLBTool = GetLArBadLBFilterTool()
+    algo.BadLBTool = GetLArBadLBFilterTool()
 
     return helper.result()
 
@@ -46,15 +46,15 @@ def LArCellMonConfig(inputFlags):
     from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelper
     helper = AthMonitorCfgHelper(inputFlags,'LArCellMonAlgCfg')
 
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    cfg=ComponentAccumulator()
+
     if not inputFlags.DQ.enableLumiAccess:
        mlog.warning('This algo needs Lumi access, returning empty config')
-       from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-       cfg=ComponentAccumulator()
-       cfg.merge(helper.result())
        return cfg
 
     from LArGeoAlgsNV.LArGMConfig import LArGMCfg
-    cfg = LArGMCfg(inputFlags)
+    cfg.merge(LArGMCfg(inputFlags))
     from TileGeoModel.TileGMConfig import TileGMCfg
     cfg.merge(TileGMCfg(inputFlags))
 
@@ -81,18 +81,17 @@ def LArCellMonConfig(inputFlags):
         algname=algname+'Cosmics'
 
     isCosmics = ( inputFlags.Beam.Type == 'cosmics' )
-    LArCellMonConfigCore(helper, lArCellMonAlg,inputFlags, isCosmics, inputFlags.Input.isMC, algname)
-
-    acc=helper.result()
+    algo = LArCellMonConfigCore(helper, lArCellMonAlg,inputFlags, isCosmics, inputFlags.Input.isMC, algname)
+    algo.useTrigger = inputFlags.DQ.useTrigger
 
     from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
-    acc.getEventAlgo(algname).ReadyFilterTool = cfg.popToolsAndMerge(AtlasReadyFilterCfg(inputFlags))
+    algo.ReadyFilterTool = cfg.popToolsAndMerge(AtlasReadyFilterCfg(inputFlags))
 
     if not inputFlags.Input.isMC:
        from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
-       acc.getEventAlgo(algname).BadLBTool=cfg.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))
+       algo.BadLBTool=cfg.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))
 
-    cfg.merge(acc)
+    cfg.merge(helper.result())
 
     return cfg
 
@@ -494,6 +493,7 @@ def LArCellMonConfigCore(helper, algclass, inputFlags, isCosmics=False, isMC=Fal
         cellMonGroup.defineTree('sporadicCellE,sporadicCellTime,sporadicCellQuality,sporadicCellID,lumiBlock,adoptedEThreshold;SporadicNoisyCellsTree', path=sporadic_hist_path,
                                 treedef='sporadicCellE/F:sporadicCellTime/F:sporadicCellQuality/s:sporadicCellID/l:lumiBlock/i')
 
+    return LArCellMonAlg
 
 
 if __name__=='__main__':
diff --git a/Calorimeter/CaloMonitoring/src/LArCellMonAlg.cxx b/Calorimeter/CaloMonitoring/src/LArCellMonAlg.cxx
index 044e8c6295af..a01294498e33 100644
--- a/Calorimeter/CaloMonitoring/src/LArCellMonAlg.cxx
+++ b/Calorimeter/CaloMonitoring/src/LArCellMonAlg.cxx
@@ -121,7 +121,7 @@ StatusCode LArCellMonAlg::initialize() {
   }
 
   //retrieve trigger decision tool and chain groups
-  if( m_useTrigger) {
+  if( m_useTrigger && !getTrigDecisionTool().empty() ) {
     const ToolHandle<Trig::TrigDecisionTool> trigTool=getTrigDecisionTool();
     ATH_MSG_INFO("TrigDecisionTool retrieved");
     for (size_t i=0;i<NOTA;++i) {
diff --git a/Control/AthenaMonitoring/share/Run3DQTestingDriver.py b/Control/AthenaMonitoring/share/Run3DQTestingDriver.py
index 30f6de92cb2d..e8c450953d93 100755
--- a/Control/AthenaMonitoring/share/Run3DQTestingDriver.py
+++ b/Control/AthenaMonitoring/share/Run3DQTestingDriver.py
@@ -92,12 +92,11 @@ if __name__=='__main__':
                ((ConfigFlags.DQ.Steering.InDet, "doGlobalMon") and ConfigFlags.DQ.Steering.InDet.doGlobalMon) or \
                ((ConfigFlags.DQ.Steering.InDet, "doPerfMon") and ConfigFlags.DQ.Steering.InDet.doPerfMon):
                 ConfigFlags.Detector.GeometryID = True
-        if hasattr(ConfigFlags.DQ.Steering, "doPixelMon") and ConfigFlags.DQ.Steering.doPixelMon:
-            ConfigFlags.Detector.GeometryPixel = True
-        if hasattr(ConfigFlags.DQ.Steering, "doSCTMon") and ConfigFlags.DQ.Steering.doSCTMon:
-            ConfigFlags.Detector.GeometrySCT = True
-        if hasattr(ConfigFlags.DQ.Steering, "doTRTMon") and ConfigFlags.DQ.Steering.doTRTMon:
-            ConfigFlags.Detector.GeometryTRT = True
+
+    # Just assume we want the full ID geometry, if we are reading in geometry
+    ConfigFlags.Detector.GeometryPixel = True
+    ConfigFlags.Detector.GeometrySCT = True
+    ConfigFlags.Detector.GeometryTRT = True
             
     log.info('FINAL CONFIG FLAGS SETTINGS FOLLOW')
     ConfigFlags.dump()
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
index 21db3f66f768..8471afdb6e40 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
@@ -31,7 +31,7 @@ def SCTHitsNoiseMonAlgConfig(inputFlags):
     myMonAlg.TriggerChain = ""
 
     # Trigger histogram will be made only for data.
-    myMonAlg.doTrigger = (not inputFlags.Input.isMC)
+    myMonAlg.doTrigger = (not inputFlags.Input.isMC and inputFlags.DQ.useTrigger)
 
     from ROOT import SCT_Monitoring as sctMon #import SCT_MonitoringNumbers.h
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonAlg.cxx
index f178fe5aad04..cbcdea075d62 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonAlg.cxx
@@ -130,7 +130,7 @@ StatusCode SCTHitsNoiseMonAlg::generalHistsandNoise(const std::array<std::unorde
 
   bool isSelectedTrigger{false};
   // EDAVIES - have now changed back to using L1_RD0_EMPTY
-  if (m_doTrigger) {
+  if (m_doTrigger and !m_trigDecTool.empty()) {
     if (AthMonitorAlgorithm::dataType() != AthMonitorAlgorithm::DataType_t::cosmics) {
       if (m_trigDecTool->isPassed(m_NOTriggerItem)) {
         isSelectedTrigger = true;
diff --git a/LArCalorimeter/LArCellRec/python/LArCollisionTimeConfig.py b/LArCalorimeter/LArCellRec/python/LArCollisionTimeConfig.py
index b78b5eb870c7..75b9be3ebd21 100644
--- a/LArCalorimeter/LArCellRec/python/LArCollisionTimeConfig.py
+++ b/LArCalorimeter/LArCellRec/python/LArCollisionTimeConfig.py
@@ -9,6 +9,11 @@ def LArCollisionTimeCfg(configFlags, cutIteration=False):
 
    result=ComponentAccumulator()
 
+   from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
+   result.merge(BunchCrossingCondAlgCfg(configFlags))
+   from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
+   result.merge(CaloNoiseCondAlgCfg(configFlags,"totalNoise"))
+
    LArCollisionTimeAlg=CompFactory.LArCollisionTimeAlg
    result.addEventAlgo(LArCollisionTimeAlg("LArCollisionTimeAlg", 
                        isMC=configFlags.Input.isMC,
diff --git a/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx
index dc9494549db0..7b49c6b80bfc 100755
--- a/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx
+++ b/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx
@@ -133,7 +133,7 @@ StatusCode LArFEBMonAlg::fillHistograms(const EventContext& ctx) const {
     const ToolHandle<Trig::TrigDecisionTool> trigTool=getTrigDecisionTool();
     //const Trig::TrigDecisionTool *trigTool = dynamic_cast<const Trig::TrigDecisionTool * > (&*trigHdl);
     std::vector<std::string> l1triggers;
-    if(trigTool) {   
+    if(!trigTool.empty()) {   
        const Trig::ChainGroup* allL1 = trigTool->getChainGroup("L1_.*");
        l1triggers = allL1->getListOfTriggers();
        ATH_MSG_DEBUG( "lvl1 item names: [" );
@@ -382,13 +382,15 @@ StatusCode LArFEBMonAlg::fillHistograms(const EventContext& ctx) const {
  
     auto streambin=Monitored::Scalar<float>("streamBin",-1);
       
-    unsigned ie;
+    unsigned ie(0);
     for(unsigned int str=0; str<streamsThisEvent.size(); ++str) {
       if(streamsThisEvent[str] > m_streams.size()) break;
       if(trigok && streamsThisEvent[str] < m_streams.size() && (m_streams[streamsThisEvent[str]].find("CosmicCalo") != std::string::npos)) { // test excluding events
-	for(ie=0; ie<m_excoscalo.size(); ++ie) {
-	  if(getTrigDecisionTool()->isPassed(m_excoscalo[ie])) break;
-	}
+      if (!getTrigDecisionTool().empty()) {
+        for(ie=0; ie<m_excoscalo.size(); ++ie) {
+      	  if(getTrigDecisionTool()->isPassed(m_excoscalo[ie])) break;
+	      }
+      }
 	if(ie<m_excoscalo.size()) {
 	  ATH_MSG_INFO("Skipping "<<m_excoscalo[ie]<<" for CosmicCalo ");
 	  continue; // we should skip this trigger
diff --git a/LArCalorimeter/LArMonitoring/src/LArNoiseCorrelationMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArNoiseCorrelationMonAlg.cxx
index bce34abd1dde..ad22286bf609 100644
--- a/LArCalorimeter/LArMonitoring/src/LArNoiseCorrelationMonAlg.cxx
+++ b/LArCalorimeter/LArMonitoring/src/LArNoiseCorrelationMonAlg.cxx
@@ -136,7 +136,7 @@ LArNoiseCorrelationMonAlg::fillHistograms(const EventContext& ctx) const
     const ToolHandle<Trig::TrigDecisionTool> trigTool=getTrigDecisionTool();
 
      bool passBCID;
-     if(trigTool) {
+     if(!trigTool.empty()) {
        // BCIDs of the abort gap
        const int ABORT_GAP_START = 3446;
        const int ABORT_GAP_END   = 3563;
diff --git a/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx
index 0d6634bb15ad..0c306669a5f9 100755
--- a/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx
+++ b/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.cxx
@@ -77,6 +77,7 @@ LArRODMonAlg::initialize() {
   ATH_CHECK(m_channelKey_fromDigits.initialize());
   ATH_CHECK(m_channelKey_fromBytestream.initialize());
   ATH_CHECK(m_digitContainerKey.initialize());
+  ATH_CHECK(m_headerContainerKey.initialize());
 
   ATH_CHECK(m_keyOFC.initialize());
   ATH_CHECK(m_keyShape.initialize());
@@ -220,9 +221,8 @@ StatusCode LArRODMonAlg::fillHistograms(const EventContext& ctx) const {
   std::set<HWIdentifier> ignoreFEBs;
 
   if (m_doCheckSum || m_doRodStatus) {
-     const LArFebHeaderContainer* febCont=NULL;
-     StatusCode sc = evtStore()->retrieve(febCont);
-     if (sc.isFailure() || !febCont) {
+     const LArFebHeaderContainer* febCont = SG::get(m_headerContainerKey, ctx);
+     if (!febCont) {
        ATH_MSG_WARNING( "No LArFEB container found in TDS" ); 
      } else {
        LArFebHeaderContainer::const_iterator itFEB = febCont->begin(); 
diff --git a/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.h b/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.h
index c4b0b017c55e..055398044d9b 100644
--- a/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.h
+++ b/LArCalorimeter/LArMonitoring/src/LArRODMonAlg.h
@@ -26,6 +26,7 @@ class HWIdentifier;
 class LArOnOffIdMapping;
 class LArRawChannelContainer;
 class LArDigitContainer;
+class LArFebHeaderContainer;
 
 #include <atomic>
 #include <fstream>
@@ -134,6 +135,7 @@ private:
   SG::ReadHandleKey<LArRawChannelContainer> m_channelKey_fromDigits{this,"LArRawChannelKey_fromDigits","LArRawChannels_FromDigits","SG key of LArRawChannels produced offline"};
 
   SG::ReadHandleKey<LArDigitContainer> m_digitContainerKey{this,"LArDigitContainerKey","FREE","SG key of LArDigitContainer read from Bytestream"};
+  SG::ReadHandleKey<LArFebHeaderContainer> m_headerContainerKey{this,"LArFebHeaderKey","LArFebHeader","SG key of LArFebHeader"};
 
 
   SG::ReadCondHandleKey<ILArOFC>         m_keyOFC{this,"KeyOFC","LArOFC","SG key of LArOFC CDO"};
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
index 6fbcd4d033bb..ad59d8343526 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
@@ -14,6 +14,13 @@ def TgcRawDataMonitoringConfig(inputFlags):
     from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
     result = ComponentAccumulator()
 
+    from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
+    from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg
+    from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
+    result.merge(MagneticFieldSvcCfg(inputFlags))
+    result.merge(AtlasGeometryCfg(inputFlags))
+    result.merge(TrackingGeometrySvcCfg(inputFlags))
+
     from AthenaMonitoring import AthMonitorCfgHelper
     helper = AthMonitorCfgHelper(inputFlags,'TgcRawDataMonitorCfg')
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx
index cb9c2ad8fb43..052149243d10 100755
--- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitorAlgorithm.cxx
@@ -213,7 +213,8 @@ StatusCode JetTagMonitorAlgorithm::fillHistograms( const EventContext& ctx ) con
   //////////////////////
   
   bool useTriggerDecisionTool = true;
-  const auto& trigDecTool = getTrigDecisionTool();
+  const auto* trigDecTool = (getTrigDecisionTool().empty() ?
+                             nullptr : getTrigDecisionTool().operator->());
 
   // only apply trigger selection if bool is true (false for express stream) and trigDecTool is ok
   if (useTriggerDecisionTool && trigDecTool != 0) {
diff --git a/Reconstruction/MissingETMonitoring/src/METMonitorAlgorithm.cxx b/Reconstruction/MissingETMonitoring/src/METMonitorAlgorithm.cxx
index 93b116c46f91..3cf835bb6001 100644
--- a/Reconstruction/MissingETMonitoring/src/METMonitorAlgorithm.cxx
+++ b/Reconstruction/MissingETMonitoring/src/METMonitorAlgorithm.cxx
@@ -94,7 +94,8 @@ StatusCode METMonitoringAlg::fillHistograms( const EventContext& ctx ) const {
     ATH_MSG_ERROR("evtStore() does not contain METAKt4EMTopo Collection with name "<< m_metAKt4EMTopoContainerKey);
     return StatusCode::FAILURE;
   }
-  const auto& trigDecTool = getTrigDecisionTool();
+  const auto* trigDecTool = (getTrigDecisionTool().empty() ?
+                             nullptr : getTrigDecisionTool().operator->());
   bool isMETtopocalo = false;
   for (const auto& key : m_metKeys) {
     if (key == "MET_Topo") isMETtopocalo = true;    
diff --git a/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx b/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
index 6110d4162921..a40df5ef72c4 100644
--- a/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
+++ b/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
@@ -252,7 +252,8 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
         int panModeDummy = -1 ;
         int panModeSubstructureDummy = -1 ;
 
-        const auto& trigDecTool = getTrigDecisionTool();
+        const auto* trigDecTool = (getTrigDecisionTool().empty() ?
+                                   nullptr : getTrigDecisionTool().operator->());
 
         if (m_etaMin < std::abs(tauEta) && std::abs(tauEta) < m_etaMax){
             nTauCandidates +=1;
-- 
GitLab


From ee76a47aff4e99bb5ebfc60481f23d41aad37513 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Wed, 6 Jan 2021 19:28:07 +0000
Subject: [PATCH 308/308] Prepare usage of RpcCondData in RpcPadContainerCnv

---
 .../share/RpcPadContainerCnv_p2_test.ref      |  1 -
 .../src/RpcPadContainerCnv_p1.cxx             | 94 ++++++++-----------
 .../src/RpcPadContainerCnv_p1.h               | 13 +--
 .../src/RpcPadContainerCnv_p2.cxx             | 59 +++++-------
 .../src/RpcPadContainerCnv_p2.h               | 14 +--
 5 files changed, 78 insertions(+), 103 deletions(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref
index a246a707f206..d56b817d62cf 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/share/RpcPadContainerCnv_p2_test.ref
@@ -14,4 +14,3 @@ RpcIdHelper          INFO The element hash max is 600
 RpcIdHelper          INFO The detector element hash max is 1122
 RpcIdHelper          INFO Initializing RPC hash indices for finding neighbors ... 
 test1
-test                 INFO  RPCcablingSvc obtained - hashmax  = 3
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx
index a47da9759f8b..f8ae45611c34 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx
@@ -1,42 +1,39 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "RpcPadContainerCnv_p1.h"
+
 #include "MuonRDO/RpcPad.h"
 #include "MuonRDO/RpcPadContainer.h"
 #include "MuonEventAthenaPool/RpcPad_p1.h"
 #include "MuonEventAthenaPool/RpcPadContainer_p1.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
 #include "RpcPadCnv_p1.h"
-#include "RpcPadContainerCnv_p1.h"
-
-// Gaudi
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/MsgStream.h"
-
-// Athena
 #include "StoreGate/StoreGateSvc.h"
-
 #include "AthAllocators/DataPool.h"
 
-#include "RPCcablingInterface/IRPCcablingServerSvc.h"
-#include "RPCcablingInterface/RpcPadIdHash.h"
-#include "RPCcablingInterface/IRPCcablingSvc.h"
+#include "RPCcablingInterface/IRPCcablingServerSvc.h" // to be removed
+#include "RPCcablingInterface/RpcPadIdHash.h" // to be removed
+#include "RPCcablingInterface/IRPCcablingSvc.h" // to be removed
 
+RpcPadContainerCnv_p1::RpcPadContainerCnv_p1() :
+  m_rpcCabling(nullptr), // to be removed
+  m_isInitialized(false),
+  m_rpcCondData(nullptr) {   
+}
 
 
-StatusCode RpcPadContainerCnv_p1::initialize(MsgStream &log,
-                                             IRPCcablingSvc* cabling /*= nullptr*/) {
-   // Do not initialize again:
-    m_isInitialized=true;
+StatusCode RpcPadContainerCnv_p1::initialize(MsgStream &log, IRPCcablingSvc* cabling) {
 
-   // Get Storegate, ID helpers, and so on
+    // Get Storegate, ID helpers, and so on
     ISvcLocator* svcLocator = Gaudi::svcLocator();
 
-
+    // to be removed
     if (cabling)
       m_rpcCabling = cabling;
     else {
@@ -52,7 +49,7 @@ StatusCode RpcPadContainerCnv_p1::initialize(MsgStream &log,
       sc = RpcCabGet->giveCabling(m_rpcCabling);
       if (sc.isFailure()) {
         log << MSG::FATAL << "Could not get RPCcablingSvc from the Server !" << endmsg;
-        m_rpcCabling = 0;
+        m_rpcCabling = nullptr;
         return StatusCode::FAILURE;
       }
       else {
@@ -61,6 +58,8 @@ StatusCode RpcPadContainerCnv_p1::initialize(MsgStream &log,
     }
 
     log << MSG::DEBUG << "Converter initialized." << endmsg;
+
+    m_isInitialized=true;
     return StatusCode::SUCCESS;
 }
 
@@ -79,7 +78,6 @@ void RpcPadContainerCnv_p1::transToPers(const RpcPadContainer* transCont,  RpcPa
 
     for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++)  {
         // Add in new collection
-        //log << MSG::DEBUG  << " New collection" << endmsg;
         RpcPad_p1* pcoll = &( (*persCont)[collIndex] );
         cnv.transToPers( &(**it_Coll), pcoll , log);
     }
@@ -95,37 +93,21 @@ void  RpcPadContainerCnv_p1::persToTrans(const RpcPadContainer_p1* persCont, Rpc
     log << MSG::DEBUG  << " Reading " << persCont->size() << "Collections" << endmsg;
     for (unsigned int icoll = 0; icoll < persCont->size(); ++icoll) {
 
-        // Identifier collID(Identifier(pcoll.m_id));
-        // IdentifierHash collIDHash(IdentifierHash(persCont[icoll].m_hashId));
         RpcPad* coll = new RpcPad;
         cnv.persToTrans( &( (*persCont)[icoll]), coll, log);
-         // register the rdo collection in IDC with hash - faster addCollection
-// log<<MSG::INFO<<"coll has size "<<coll->size()<<endmsg;
-// log << MSG::INFO<<" coll has hash: "<<static_cast<unsigned int>(coll->identifyHash())<<endmsg;
-// log << MSG::INFO<<" coll has id: "<<static_cast<unsigned int>(coll->identify())<<endmsg;
-
-// hack to fix bug#56429 - always use identifier to get hash
-
-        // sanity check
-//        if (coll->identifyHash() > static_cast<unsigned int>(m_rpcCabling->padHashFunction()->max() ) ) {
-//            m_errorCount++;
-
-//            if (m_errorCount<m_maxNumberOfErrors) 
-//               log<<MSG::WARNING<< "The persistent RDO had an IdentifierHash of "<<coll->identifyHash()
-//                <<" which is larger than the hash max of "<<m_rpcCabling->padHashFunction()->max()
-//                <<". Will attempt to correct from Identifier. This is message "<<m_errorCount<<" of "
-//                <<m_maxNumberOfErrors<<" maximum."<<endmsg;
-//            if (m_errorCount==m_maxNumberOfErrors) log<<MSG::WARNING<<"Exceeding max errors. Further WARNINGs will be suppressed!"<<endmsg;
+
+        int temp=-1;
+        if (m_rpcCondData) temp = m_rpcCondData->operator()(coll->identify());
+        else {
             const RpcPadIdHash* pdHashFn = m_rpcCabling->padHashFunction();
-            int temp = (*pdHashFn)(coll->identify());
-            if (temp==-1) {
-                coll->m_idHash = IdentifierHash(); 
-                log<<MSG::WARNING<<"get_hash failed - nothing else we can try!"<<endmsg;
-            } else{
-                coll->m_idHash = temp; 
-//                if (m_errorCount<m_maxNumberOfErrors) log<<MSG::WARNING<<"New hash is: "<<coll->identifyHash()<<endmsg;
-            }
-//        }
+            temp = (*pdHashFn)(coll->identify());
+        }
+        if (temp==-1) {
+            coll->m_idHash = IdentifierHash(); 
+            log<<MSG::WARNING<<"get_hash failed - nothing else we can try!"<<endmsg;
+        } else{
+            coll->m_idHash = temp; 
+        }
         
         // another check - see if already added
         auto ptr = transCont->indexFindPtr(coll->identifyHash());
@@ -136,15 +118,16 @@ void  RpcPadContainerCnv_p1::persToTrans(const RpcPadContainer_p1* persCont, Rpc
         } else {
             StatusCode sc = transCont->addCollection(coll, coll->identifyHash());
             if (sc.isFailure()) {
-                log << MSG::WARNING<<"Could not add collection with hash="<<coll->identifyHash()
+                if (m_rpcCondData) {
+                    log << MSG::WARNING<<"Could not add collection with hash="<<coll->identifyHash()
+                    <<" to IDC which has hash max of "<<transCont->size()<<" (PadHashFunction gives "<<m_rpcCondData->max()<<")"<<endmsg;
+                } else {
+                    log << MSG::WARNING<<"Could not add collection with hash="<<coll->identifyHash()
                     <<" to IDC which has hash max of "<<transCont->size()<<" (PadHashFunction gives "<<m_rpcCabling->padHashFunction()->max()<<")"<<endmsg;
+                }
                 throw std::runtime_error("Failed to add collection to ID Container. Hash = "+std::to_string(coll->identifyHash()));
             }
         }
-        // if (log.level() <= MSG::DEBUG) {
-        //     log << MSG::DEBUG << "AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = " << (int) collIDHash << " / " << 
-        //         persCont[icoll].m_id << ", added to Identifiable container." << endmsg;
-        // }
     }
 
     log << MSG::DEBUG  << " ***  Reading RpcPadContainer" << endmsg;
@@ -161,9 +144,10 @@ RpcPadContainer* RpcPadContainerCnv_p1::createTransient(const RpcPadContainer_p1
             return 0;
         } 
     }
-    // log<<MSG::INFO<<"creating new pad container with hashmax= "<<m_RpcId->module_hash_max()<<endmsg;
-    
-    std::unique_ptr<RpcPadContainer> trans(new RpcPadContainer(m_rpcCabling->padHashFunction()->max() ));
+    int hashMax=-1;
+    if (m_rpcCondData) hashMax = m_rpcCondData->max();
+    else hashMax = m_rpcCabling->padHashFunction()->max();
+    std::unique_ptr<RpcPadContainer> trans(new RpcPadContainer(hashMax));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h
index 219833cdf048..626d7b7df231 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef RPCPADCONTAINERCNV_P1
@@ -15,8 +15,9 @@
 
 #include "MuonRDO/RpcPadContainer.h"
 #include "MuonEventAthenaPool/RpcPadContainer_p1.h"
+#include "RPC_CondCabling/RpcCablingCondData.h"
 
-class IRPCcablingSvc;
+class IRPCcablingSvc; // to be removed
 class MsgStream;
 
 class RpcPadContainerCnv_p1 : public T_AthenaPoolTPCnvBase< RpcPadContainer, RpcPadContainer_p1 >
@@ -25,17 +26,17 @@ class RpcPadContainerCnv_p1 : public T_AthenaPoolTPCnvBase< RpcPadContainer, Rpc
 public:
     typedef RpcPadContainer_p1 PERS;  
     typedef RpcPadContainer TRANS;
-    RpcPadContainerCnv_p1(): m_rpcCabling(0), m_isInitialized(false)/*, m_errorCount(0), m_maxNumberOfErrors(10)*/ {}
+    RpcPadContainerCnv_p1();
     virtual void persToTrans(const PERS* persCont, TRANS* transCont, MsgStream &log) override; 
     virtual void transToPers(const TRANS* transCont, PERS* persCont, MsgStream &log) override;
     virtual RpcPadContainer* createTransient(const RpcPadContainer_p1* persObj, MsgStream& log) override;
     StatusCode initialize(MsgStream &log, IRPCcablingSvc* cabling = nullptr);
+    void setRpcCablingCondData(const RpcCablingCondData* rpc){m_rpcCondData=rpc;}
 private:
 
-    const IRPCcablingSvc *m_rpcCabling;
+    const IRPCcablingSvc *m_rpcCabling; // to be removed
     bool m_isInitialized;
-    //unsigned int m_errorCount;
-    //unsigned int m_maxNumberOfErrors;
+    const RpcCablingCondData* m_rpcCondData;
 };
 
 #endif 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx
index 53e3029b72f6..30594ccb0a1c 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx
@@ -1,34 +1,34 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "RpcPadContainerCnv_p2.h"
+
 #include "MuonRDO/RpcPad.h"
 #include "MuonRDO/RpcPadContainer.h"
 #include "MuonEventAthenaPool/RpcPad_p1.h"
 #include "MuonEventAthenaPool/RpcPadContainer_p2.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
 #include "RpcPadCnv_p1.h"
-#include "RpcPadContainerCnv_p2.h"
-
-// Gaudi
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/MsgStream.h"
-
-// Athena
 #include "StoreGate/StoreGateSvc.h"
-
 #include "AthAllocators/DataPool.h"
 
-#include "RPCcablingInterface/IRPCcablingServerSvc.h"
-#include "RPCcablingInterface/RpcPadIdHash.h"
-#include "RPCcablingInterface/IRPCcablingSvc.h"
+#include "RPCcablingInterface/IRPCcablingServerSvc.h" // to be removed
+#include "RPCcablingInterface/RpcPadIdHash.h" // to be removed
+#include "RPCcablingInterface/IRPCcablingSvc.h" // to be removed
+
+RpcPadContainerCnv_p2::RpcPadContainerCnv_p2() :
+  m_rpcCabling(nullptr),
+  m_isInitialized(false),
+  m_rpcCondData(nullptr) {
+}
 
 
-StatusCode RpcPadContainerCnv_p2::initialize(MsgStream &log,
-                                             IRPCcablingSvc* cabling /*= nullptr*/) {
+StatusCode RpcPadContainerCnv_p2::initialize(MsgStream &log, IRPCcablingSvc* cabling) {
                                              
    // Do not initialize again:
     m_isInitialized=true;
@@ -51,22 +51,11 @@ StatusCode RpcPadContainerCnv_p2::initialize(MsgStream &log,
       sc = RpcCabGet->giveCabling(m_rpcCabling);
       if (sc.isFailure()) {
         log << MSG::FATAL << "Could not get RPCcablingSvc from the Server !" << endmsg;
-        m_rpcCabling = 0;
+        m_rpcCabling = nullptr;
         return StatusCode::FAILURE;
       }
     }
 
-    {
-      if (!m_rpcCabling->padHashFunction())
-	{
-	  m_padhashmax = 1000;
-	  log<<MSG::INFO << "... hoewever it doesn't look like been already init; container size set by hand to "<< m_padhashmax << endmsg;
-	}
-      else m_padhashmax = m_rpcCabling->padHashFunction()->max();
-      if (log.level() <= MSG::INFO)    log <<MSG::INFO    << " RPCcablingSvc obtained - hashmax  = "<<m_padhashmax << endmsg;
-      //      if (log.level() <= MSG::VERBOSE) log <<MSG::VERBOSE << " RPCcablingSvc obtained " << endmsg;
-    }
-
     if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converter initialized." << endmsg;
     return StatusCode::SUCCESS;
 }
@@ -85,8 +74,6 @@ void RpcPadContainerCnv_p2::transToPers(const RpcPadContainer* transCont,  RpcPa
     persCont->m_pads.resize(numColl);    log << MSG::DEBUG  << " Preparing " << persCont->m_pads.size() << "Collections" << endmsg;
 
     for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++)  {
-        // Add in new collection
-        //log << MSG::DEBUG  << " New collection" << endmsg;
         RpcPad_p1* pcoll = &( persCont->m_pads[collIndex] );
         cnv.transToPers( &(**it_Coll), pcoll , log);
     }
@@ -111,8 +98,13 @@ void  RpcPadContainerCnv_p2::persToTrans(const RpcPadContainer_p2* persCont, Rpc
         } else {
             StatusCode sc = transCont->addCollection(coll, coll->identifyHash());
             if (sc.isFailure()) {
-                log << MSG::WARNING<<"Could not add collection with hash="<<coll->identifyHash()
+                if (m_rpcCondData) {
+                    log << MSG::WARNING<<"Could not add collection with hash="<<coll->identifyHash()
+                    <<" to IDC which has hash max of "<<transCont->size()<<" (PadHashFunction gives "<<m_rpcCondData->max()<<")"<<endmsg;
+                } else {
+                    log << MSG::WARNING<<"Could not add collection with hash="<<coll->identifyHash()
                     <<" to IDC which has hash max of "<<transCont->size()<<" (PadHashFunction gives "<<m_rpcCabling->padHashFunction()->max()<<")"<<endmsg;
+                }
                 throw std::runtime_error("Failed to add collection to ID Container. Hash = "+std::to_string(coll->identifyHash()));
             }
         }
@@ -130,13 +122,12 @@ RpcPadContainer* RpcPadContainerCnv_p2::createTransient(const RpcPadContainer_p2
         if (this->initialize(log) != StatusCode::SUCCESS) {
             log << MSG::FATAL << "Could not initialize RpcPadContainerCnv_p2 " << endmsg;
             return 0;
-        } 
+        }
     }
-    // log<<MSG::INFO<<"creating new pad container with hashmax= "<<m_rpcCabling->padHashFunction()->max()<<endmsg;
-    
-    // std::unique_ptr<RpcPadContainer> trans(new RpcPadContainer(m_rpcCabling->padHashFunction()->max() ));
-    // std::unique_ptr<RpcPadContainer> trans(new RpcPadContainer(404 ))  ; // hardcoded number from above. FIXME!
-    std::unique_ptr<RpcPadContainer> trans(new RpcPadContainer(m_padhashmax))  ; // hardcoded number from above. FIXME!
+    int hashMax=-1;
+    if (m_rpcCondData) hashMax = m_rpcCondData->max();
+    else hashMax = m_rpcCabling->padHashFunction()->max();
+    std::unique_ptr<RpcPadContainer> trans(new RpcPadContainer(hashMax));
     
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.h
index 72f605be839e..86019240cc9c 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONEVENTATHENAPOOL_RPCPADCONTAINERCNV_P2
@@ -15,8 +15,9 @@
 
 #include "MuonRDO/RpcPadContainer.h"
 #include "MuonEventAthenaPool/RpcPadContainer_p2.h"
+#include "RPC_CondCabling/RpcCablingCondData.h"
 
-class IRPCcablingSvc;
+class IRPCcablingSvc; // to be removed
 class MsgStream;
 
 class RpcPadContainerCnv_p2 : public T_AthenaPoolTPCnvBase< RpcPadContainer, RpcPadContainer_p2 >
@@ -25,18 +26,17 @@ class RpcPadContainerCnv_p2 : public T_AthenaPoolTPCnvBase< RpcPadContainer, Rpc
 public:
     typedef RpcPadContainer_p2 PERS;  
     typedef RpcPadContainer TRANS;
-    RpcPadContainerCnv_p2(): m_rpcCabling(0), m_isInitialized(false), m_padhashmax(0)/*, m_errorCount(0), m_maxNumberOfErrors(10)*/ {}
+    RpcPadContainerCnv_p2();
     virtual void persToTrans(const PERS* persCont, TRANS* transCont, MsgStream &log); 
     virtual void transToPers(const TRANS* transCont, PERS* persCont, MsgStream &log);
     virtual RpcPadContainer* createTransient(const RpcPadContainer_p2* persObj, MsgStream& log);
     StatusCode initialize(MsgStream &log, IRPCcablingSvc* cabling = nullptr);
+    void setRpcCablingCondData(const RpcCablingCondData* rpc){m_rpcCondData=rpc;}
 private:
 
-    const IRPCcablingSvc *m_rpcCabling;
+    const IRPCcablingSvc *m_rpcCabling;  // to be removed
     bool m_isInitialized;
-    unsigned int m_padhashmax;
-    //unsigned int m_errorCount;
-    //unsigned int m_maxNumberOfErrors;
+    const RpcCablingCondData* m_rpcCondData;
 };
 
 #endif 
-- 
GitLab