From ee336e775f9e075c227b64862ff2b68ce2a67496 Mon Sep 17 00:00:00 2001
From: John Derek Chapman <chapman@hep.phy.cam.ac.uk>
Date: Wed, 13 Jul 2016 11:02:08 +0200
Subject: [PATCH] python/ISF_SimulationSelectorsConfig.py,
 python/ISF_SimulationSelectorsConfigDb.py - syntax clean-up. src/*.cxx,
 src/*.h - whitespace clean-up. Tag as ISF_SimulationSelectors-00-05-01
 (ISF_SimulationSelectors-00-05-01)

	* python/ISF_SimulationSelectorsConfig.py,
	python/ISF_SimulationSelectorsConfigDb.py - syntax clean-up.
	* src/*.cxx, src/*.h - whitespace clean-up.
	* Tag as ISF_SimulationSelectors-00-05-01

2016-07-05  Elmar Ritsch <Elmar.Ritsch@cern.ch>
	* PileupSimSelector now gets BCID directly from
	ISFParticle rather than through extra-barcode.
	Extra-barcodes were dropped from ISFParticle in
	the cleanup as part of the new ISF input
	processing implementation. ATLASSIM-2928
	* Tag as ISF_SimulationSelectors-00-05-00

2016-06-01  Elmar Ritsch  <Elmar.Ritsch@cern.ch>
	* Add FastCaloSimV2 Simulation Selector. ATLASSIM-2883
	* Tag as ISF_SimulationSelectors-00-04-02


Former-commit-id: aec0839c8b04bfbe59c58213a73d084cbd5d9dc5
---
 .../python/ISF_SimulationSelectorsConfig.py   | 258 +++++++--------
 .../python/ISF_SimulationSelectorsConfigDb.py |  11 +-
 .../src/ConeSimSelector.cxx                   | 312 +++++++++---------
 .../src/ConeSimSelector.h                     |  94 +++---
 .../src/DefaultSimSelector.cxx                |   4 +-
 .../src/DefaultSimSelector.h                  |  46 +--
 .../src/HistorySimSelector.cxx                |  43 +--
 .../src/HistorySimSelector.h                  |  52 +--
 .../src/KinematicSimSelector.cxx              |   9 +-
 .../src/KinematicSimSelector.h                |  44 +--
 .../src/PileupSimSelector.cxx                 |  38 +--
 .../src/PileupSimSelector.h                   |  48 +--
 .../src/RandomSimSelector.cxx                 |  23 +-
 .../src/RandomSimSelector.h                   |  42 +--
 .../src/TruthAssocSimSelector.cxx             |  65 ++--
 .../src/TruthAssocSimSelector.h               |  70 ++--
 16 files changed, 582 insertions(+), 577 deletions(-)

diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py
index 325b4bc092f..16cdc9eb33c 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py
+++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfig.py
@@ -5,206 +5,176 @@ ISF_SimulationSelectors configurations for ISF
 Elmar Ritsch, 04/02/2013
 """
 
-from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\
-        getService,getServiceClone,getAlgorithm,getAlgorithmClone
+from AthenaCommon import CfgMgr
 
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
 from AthenaCommon.SystemOfUnits import *
-from AthenaCommon.DetFlags import DetFlags
 
-from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be set before tools are retrieved
+### DefaultSimSelector configurations
 
-#
-# the default SimSelectors
-#
 def getDefaultSimSelector(name="ISF_DefaultSimSelector", **kwargs):
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__DefaultSimSelector
-    return ISF__DefaultSimSelector(name, **kwargs )
-
-def getPileupSimSelector(name="ISF_PileupSimSelector", **kwargs):
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__PileupSimSelector
-    return ISF__PileupSimSelector(name, **kwargs )
-
-def getRandomSimSelector(name="ISF_RandomSimSelector", **kwargs):
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__RandomSimSelector
-    return ISF__RandomSimSelector(name, **kwargs )
+    return CfgMgr.ISF__DefaultSimSelector(name, **kwargs )
 
 def getDefaultParticleKillerSelector(name="ISF_DefaultParticleKillerSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_ParticleKillerSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_ParticleKillerSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getDefaultGeant4Selector(name="ISF_DefaultGeant4Selector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_Geant4SimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getDefaultAFIIGeant4Selector(name="ISF_DefaultAFIIGeant4Selector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_AFIIGeant4SimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_AFIIGeant4SimSvc')
     return getDefaultGeant4Selector(name, **kwargs )
 
 def getDefaultLongLivedGeant4Selector(name="ISF_DefaultLongLivedGeant4Selector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_LongLivedGeant4SimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_LongLivedGeant4SimSvc')
     return getDefaultGeant4Selector(name, **kwargs )
 
 def getFullGeant4Selector(name="ISF_FullGeant4Selector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FullGeant4SimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FullGeant4SimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getPassBackGeant4Selector(name="ISF_PassBackGeant4Selector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_PassBackGeant4SimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_PassBackGeant4SimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getDefaultFastCaloSimSelector(name="ISF_DefaultFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FastCaloSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FastCaloSimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
-def getFastCaloSimPileupSelector(name="ISF_FastCaloSimPileupSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FastCaloSimPileupSvc'))
-    return getPileupSimSelector(name, **kwargs )
-
 def getDefaultLegacyAFIIFastCaloSimSelector(name="ISF_DefaultLegacyAFIIFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_LegacyAFIIFastCaloSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_LegacyAFIIFastCaloSimSvc')
+    return getDefaultSimSelector(name, **kwargs )
+
+def getDefaultFastCaloSimV2Selector(name="ISF_DefaultFastCaloSimV2Selector", **kwargs):
+    kwargs.setdefault("Simulator"   , 'ISF_FastCaloSimSvcV2')
     return getDefaultSimSelector(name, **kwargs )
 
 def getFastHitConvAlgFastCaloSimSelector(name="ISF_FastHitConvAlgFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FastHitConvAlgFastCaloSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FastHitConvAlgFastCaloSimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getFastHitConvAlgLegacyAFIIFastCaloSimSelector(name="ISF_FastHitConvAlgLegacyAFIIFastCaloSimSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FastHitConvAlgLegacyAFIIFastCaloSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FastHitConvAlgLegacyAFIIFastCaloSimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getDefaultFatrasSelector(name="ISF_DefaultFatrasSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FatrasSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FatrasSimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
 def getDefaultFatrasNewExtrapolationSelector(name="ISF_DefaultFatrasNewExtrapolationSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FatrasNewExtrapolationSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FatrasNewExtrapolationSimSvc')
+    return getDefaultSimSelector(name, **kwargs )
+
+def getDefaultParametricSimulationSelector(name="ISF_DefaultParametricSimulationSelector", **kwargs):
+    kwargs.setdefault("Simulator"   , 'ISF_ParametricSimSvc')
     return getDefaultSimSelector(name, **kwargs )
 
-def getFatrasPileupSelector(name="ISF_FatrasPileupSelector", **kwargs): 
-    kwargs.setdefault("PileupBCID"   , [1] )    
-    kwargs.setdefault("Simulator"   , getService('ISF_FatrasPileupSimSvc'))
+### PileUpSimSelector Configurations
+
+def getPileupSimSelector(name="ISF_PileupSimSelector", **kwargs):
+    return CfgMgr.ISF__PileupSimSelector(name, **kwargs )
+
+def getFatrasPileupSelector(name="ISF_FatrasPileupSelector", **kwargs):
+    kwargs.setdefault("PileupBCID"   , [1] )
+    kwargs.setdefault("Simulator"   , 'ISF_FatrasPileupSimSvc')
     return getPileupSimSelector(name, **kwargs )
 
-def getFatrasPileupSelector_noHits(name="ISF_FatrasPileupSelector_noHits", **kwargs):    
-    kwargs.setdefault("PileupBCID"   , [2] )    
-    kwargs.setdefault("Simulator"   , getService('ISF_FatrasPileupSimSvc_noHits'))
+def getFatrasPileupSelector_noHits(name="ISF_FatrasPileupSelector_noHits", **kwargs):
+    kwargs.setdefault("PileupBCID"   , [2] )
+    kwargs.setdefault("Simulator"   , 'ISF_FatrasPileupSimSvc_noHits')
     return getPileupSimSelector(name, **kwargs )
 
+def getFastCaloSimPileupSelector(name="ISF_FastCaloSimPileupSelector", **kwargs):
+    kwargs.setdefault("Simulator"   , 'ISF_FastCaloSimPileupSvc')
+    return getPileupSimSelector(name, **kwargs )
+
+### RandomSimSelector Configurations
+
+def getRandomSimSelector(name="ISF_RandomSimSelector", **kwargs):
+    return CfgMgr.ISF__RandomSimSelector(name, **kwargs )
+
 def getFatrasRandomSelector(name="ISF_FatrasRandomSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_FatrasSimSvc'))
+    kwargs.setdefault("Simulator"   , 'ISF_FatrasSimSvc')
     return getRandomSimSelector(name, **kwargs )
 
+### KinematicSimSelector Configurations
+
 def getElectronGeant4Selector(name="ISF_ElectronGeant4Selector", **kwargs):
     kwargs.setdefault('ParticlePDG'     , 11)
-    kwargs.setdefault('Simulator'       , getService('ISF_Geant4SimSvc'))
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__KinematicSimSelector
-    return ISF__KinematicSimSelector(name, **kwargs)
+    kwargs.setdefault('Simulator'       , 'ISF_Geant4SimSvc')
+    return CfgMgr.ISF__KinematicSimSelector(name, **kwargs)
 
 def getNeutralGeant4Selector(name="ISF_NeutralGeant4Selector", **kwargs):
     kwargs.setdefault('Charge'      , 0)
-    kwargs.setdefault('Simulator'   , getService('ISF_Geant4SimSvc'))
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__KinematicSimSelector
-    return ISF__KinematicSimSelector(name, **kwargs)
+    kwargs.setdefault('Simulator'   , 'ISF_Geant4SimSvc')
+    return CfgMgr.ISF__KinematicSimSelector(name, **kwargs)
 
 def getMuonSelector(name="ISF_MuonSelector", **kwargs):
     kwargs.setdefault('ParticlePDG'     , 13)
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__KinematicSimSelector
-    return ISF__KinematicSimSelector(name, **kwargs)
+    return CfgMgr.ISF__KinematicSimSelector(name, **kwargs)
 
 def getMuonGeant4Selector(name="ISF_MuonGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault('Simulator'       , 'ISF_Geant4SimSvc')
     return getMuonSelector(name, **kwargs)
 
 def getMuonAFIIGeant4Selector(name="ISF_MuonAFIIGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_AFIIGeant4SimSvc'))
+    kwargs.setdefault('Simulator'       , 'ISF_AFIIGeant4SimSvc')
     return getMuonGeant4Selector(name, **kwargs)
 
 def getMuonFatrasSelector(name="ISF_MuonFatrasSelector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_FatrasSimSvc'))
+    kwargs.setdefault('Simulator'       , 'ISF_FatrasSimSvc')
     return getMuonSelector(name, **kwargs)
 
+def getWithinEta5FastCaloSimSelector(name="ISF_WithinEta5FastCaloSimSelector", **kwargs):
+    kwargs.setdefault('Simulator'       , 'ISF_FastCaloSimSvc')
+    kwargs.setdefault('MinPosEta'       , -5.0 )
+    kwargs.setdefault('MaxPosEta'       ,  5.0 )
+    return CfgMgr.ISF__KinematicSimSelector(name, **kwargs)
+
+def getEtaGreater5ParticleKillerSimSelector(name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs):
+    kwargs.setdefault('Simulator'       , 'ISF_ParticleKillerSvc')
+    kwargs.setdefault('MinPosEta'       , -5.0 )
+    kwargs.setdefault('MaxPosEta'       ,  5.0 )
+    kwargs.setdefault('InvertCuts'      , True )
+    return CfgMgr.ISF__KinematicSimSelector(name, **kwargs)
+
+### ConeSimSelector Configurations
+
 def getPhotonConeSelector(name="ISF_PhotonConeSelector", **kwargs):
     kwargs.setdefault('ConeCreatorPDGs'           , [ 22 ] ) # photons
     kwargs.setdefault('ConeCreatorMinPt'          , 20000. ) # 20 GeV
     kwargs.setdefault('ConeSize'                  , 0.6    )
     kwargs.setdefault('CheckConeCreatorAncestors' , False  )
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__ConeSimSelector
-    return ISF__ConeSimSelector(name, **kwargs)
+    return CfgMgr.ISF__ConeSimSelector(name, **kwargs)
 
 def getPhotonConeFatrasSelector(name="ISF_PhotonConeFatrasSelector", **kwargs):
-    kwargs.setdefault('Simulator', getService('ISF_FatrasSimSvc'))
+    kwargs.setdefault('Simulator', 'ISF_FatrasSimSvc')
     return getPhotonConeSelector(name, **kwargs)
 
 def getPhotonConeGeant4Selector(name="ISF_PhotonConeGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator', getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault('Simulator', 'ISF_Geant4SimSvc')
     return getPhotonConeSelector(name, **kwargs)
 
-def getBHadronProductsSimSelector(name="ISF_BHadronProductsSimSelector", **kwargs):
-    kwargs.setdefault('RelativesPDGCode' , [ 511 , 521 , 531 , 541 ,
-                                             5122, 5112, 5132, 5232,
-                                             5212, 5222              ] ) # b hadrons
-    # see HepMC manual for HepMC::GenVertex::particle iterator
-    # 0=parents, 1=family, 2=ancestors, 3=relatives
-    kwargs.setdefault('Relation'         , 2 ) 
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__TruthAssocSimSelector
-    return ISF__TruthAssocSimSelector(name, **kwargs)
-
-def getBHadronProductsGeant4Selector(name="ISF_BHadronProductsGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_Geant4SimSvc'))
-    return getBHadronProductsSimSelector(name, **kwargs)
-
-def getBHadronProductsFatrasSelector(name="ISF_BHadronProductsFatrasSelector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_FatrasSimSvc'))
-    return getBHadronProductsSimSelector(name, **kwargs)
-
-def getTauProductsSimSelector(name="ISF_TauProductsSimSelector", **kwargs):
-    kwargs.setdefault('RelativesPDGCode' , [ 15 ] ) # tau
-    # see HepMC manual for HepMC::GenVertex::particle iterator
-    # 0=parents, 1=family, 2=ancestors, 3=relatives
-    kwargs.setdefault('Relation'         , 0 ) 
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__TruthAssocSimSelector
-    return ISF__TruthAssocSimSelector(name, **kwargs)
-
-def getTauProductsGeant4Selector(name="ISF_TauProductsGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_Geant4SimSvc'))
-    return getTauProductsSimSelector(name, **kwargs)
-
-def getZProductsSimSelector(name="ISF_ZProductsSimSelector", **kwargs):
-    kwargs.setdefault('RelativesPDGCode' , [ 23 ] ) # Z
-    # see HepMC manual for HepMC::GenVertex::particle iterator
-    # 0=parents, 1=family, 2=ancestors, 3=relatives
-    kwargs.setdefault('Relation'         , 0 ) 
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__TruthAssocSimSelector
-    return ISF__TruthAssocSimSelector(name, **kwargs)
-
-def getZProductsGeant4Selector(name="ISF_ZProductsGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_Geant4SimSvc'))
-    return getZProductsSimSelector(name, **kwargs)
-
 def getHiggsLeptonsConeSimSelector(name="ISF_HiggsLeptonsConeSimSelector", **kwargs):
     kwargs.setdefault('ConeCreatorPDGs'              , [ 11 , 13 ] ) # e, mu
     kwargs.setdefault('ConeCreatorMinPt'             , 0.          )
     kwargs.setdefault('ConeSize'                     , 0.4         )
     kwargs.setdefault('CheckConeCreatorAncestors'    , True        )
     kwargs.setdefault('ConeCreatorAncestor'          , [ 24 , 23 ] ) # W , Z
-
     # see HepMC manual for HepMC::GenVertex::particle iterator
     # 0=parents, 1=family, 2=ancestors, 3=relatives
     kwargs.setdefault('ConeCreatorAncestorRelation'  , 1           )
-
-
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__ConeSimSelector
-    return ISF__ConeSimSelector(name, **kwargs)
+    return CfgMgr.ISF__ConeSimSelector(name, **kwargs)
 
 def getHiggsLeptonsConeGeant4Selector(name="ISF_HiggsLeptonsConeGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault('Simulator'       , 'ISF_Geant4SimSvc')
     return getHiggsLeptonsConeSimSelector(name, **kwargs)
 
 def getElectronsMuonsConeSimSelector(name="ISF_ElectronsMuonsConeSimSelector", **kwargs):
     kwargs.setdefault('ConeCreatorPDGs'             , [ 11 , 13 ] ) # e, mu
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__ConeSimSelector
-    return ISF__ConeSimSelector(name, **kwargs)
+    return CfgMgr.ISF__ConeSimSelector(name, **kwargs)
 
 def getHiggsLeptonsConeGeant4CaloSelector(name="ISF_HiggsLeptonsConeGeant4CaloSelector", **kwargs):
     kwargs.setdefault( 'ExtrapolateToCaloEntry', True                           )
@@ -212,7 +182,7 @@ def getHiggsLeptonsConeGeant4CaloSelector(name="ISF_HiggsLeptonsConeGeant4CaloSe
     return getHiggsLeptonsConeGeant4Selector(name, **kwargs)
 
 def getWLeptonsConeGeant4Selector(name="ISF_WLeptonsConeGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'                   , getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault('Simulator'                   , 'ISF_Geant4SimSvc')
     kwargs.setdefault('ConeCreatorMinPt'            , 0.          )
     kwargs.setdefault('ConeSize'                    , 0.4         )
     kwargs.setdefault('CheckConeCreatorAncestors'   , True        )
@@ -225,7 +195,7 @@ def getWLeptonsConeGeant4Selector(name="ISF_WLeptonsConeGeant4Selector", **kwarg
 def getZLeptonsDirectionConeGeant4Selector(name="ISF_ZLeptonsDirectionConeGeant4Selector", **kwargs):
     # this selector picks all particles with a mometum direction
     # within DeltaR<ConeSize relative to the Z decay leopton directions
-    kwargs.setdefault('Simulator'                   , getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault('Simulator'                   , 'ISF_Geant4SimSvc')
     kwargs.setdefault('ConeCreatorMinPt'            , 0.          )
     kwargs.setdefault('ConeSize'                    , 0.4         )
     kwargs.setdefault('CheckConeCreatorAncestors'   , True        )
@@ -242,7 +212,7 @@ def getZLeptonsPositionConeGeant4Selector(name="ISF_ZLeptonsPositionConeGeant4Se
     return getZLeptonsDirectionConeGeant4Selector(name, **kwargs)
 
 def getJPsiLeptonsConeGeant4Selector(name="ISF_JPsiLeptonsConeGeant4Selector", **kwargs):
-    kwargs.setdefault('Simulator'                   , getService('ISF_Geant4SimSvc'))
+    kwargs.setdefault('Simulator'                   , 'ISF_Geant4SimSvc')
     kwargs.setdefault('ConeCreatorMinPt'            , 0.          )
     kwargs.setdefault('ConeSize'                    , 0.4         )
     kwargs.setdefault('CheckConeCreatorAncestors'   , True        )
@@ -252,35 +222,57 @@ def getJPsiLeptonsConeGeant4Selector(name="ISF_JPsiLeptonsConeGeant4Selector", *
     kwargs.setdefault('ConeCreatorAncestorRelation' , 0           )
     return getElectronsMuonsConeSimSelector(name, **kwargs)
 
-def getWithinEta5FastCaloSimSelector(name="ISF_WithinEta5FastCaloSimSelector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_FastCaloSimSvc'))
-    kwargs.setdefault('MinPosEta'       , -5.0 )
-    kwargs.setdefault('MaxPosEta'       ,  5.0 )
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__KinematicSimSelector
-    return ISF__KinematicSimSelector(name, **kwargs)
+### TruthAssocSimSelector configurations
 
-def getEtaGreater5ParticleKillerSimSelector(name="ISF_EtaGreater5ParticleKillerSimSelector", **kwargs):
-    kwargs.setdefault('Simulator'       , getService('ISF_ParticleKillerSvc'))
-    kwargs.setdefault('MinPosEta'       , -5.0 )
-    kwargs.setdefault('MaxPosEta'       ,  5.0 )
-    kwargs.setdefault('InvertCuts'      , True )
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__KinematicSimSelector
-    return ISF__KinematicSimSelector(name, **kwargs)
+def getBHadronProductsSimSelector(name="ISF_BHadronProductsSimSelector", **kwargs):
+    kwargs.setdefault('RelativesPDGCode' , [ 511 , 521 , 531 , 541 ,
+                                             5122, 5112, 5132, 5232,
+                                             5212, 5222              ] ) # b hadrons
+    # see HepMC manual for HepMC::GenVertex::particle iterator
+    # 0=parents, 1=family, 2=ancestors, 3=relatives
+    kwargs.setdefault('Relation'         , 2 )
+    return CfgMgr.ISF__TruthAssocSimSelector(name, **kwargs)
+
+def getBHadronProductsGeant4Selector(name="ISF_BHadronProductsGeant4Selector", **kwargs):
+    kwargs.setdefault('Simulator'       , 'ISF_Geant4SimSvc')
+    return getBHadronProductsSimSelector(name, **kwargs)
+
+def getBHadronProductsFatrasSelector(name="ISF_BHadronProductsFatrasSelector", **kwargs):
+    kwargs.setdefault('Simulator'       , 'ISF_FatrasSimSvc')
+    return getBHadronProductsSimSelector(name, **kwargs)
+
+def getTauProductsSimSelector(name="ISF_TauProductsSimSelector", **kwargs):
+    kwargs.setdefault('RelativesPDGCode' , [ 15 ] ) # tau
+    # see HepMC manual for HepMC::GenVertex::particle iterator
+    # 0=parents, 1=family, 2=ancestors, 3=relatives
+    kwargs.setdefault('Relation'         , 0 )
+    return CfgMgr.ISF__TruthAssocSimSelector(name, **kwargs)
+
+def getTauProductsGeant4Selector(name="ISF_TauProductsGeant4Selector", **kwargs):
+    kwargs.setdefault('Simulator'       , 'ISF_Geant4SimSvc')
+    return getTauProductsSimSelector(name, **kwargs)
+
+def getZProductsSimSelector(name="ISF_ZProductsSimSelector", **kwargs):
+    kwargs.setdefault('RelativesPDGCode' , [ 23 ] ) # Z
+    # see HepMC manual for HepMC::GenVertex::particle iterator
+    # 0=parents, 1=family, 2=ancestors, 3=relatives
+    kwargs.setdefault('Relation'         , 0 )
+    return CfgMgr.ISF__TruthAssocSimSelector(name, **kwargs)
+
+def getZProductsGeant4Selector(name="ISF_ZProductsGeant4Selector", **kwargs):
+    kwargs.setdefault('Simulator'       , 'ISF_Geant4SimSvc')
+    return getZProductsSimSelector(name, **kwargs)
+
+### HistorySimSelector Configurations
 
 def getSubDetStickyGeant4SimSelector(name="ISF_SubDetStickyGeant4SimSelector", **kwargs):
-    kwargs.setdefault('PrevSimSvc'             , getService('ISF_Geant4SimSvc') )
+    kwargs.setdefault('PrevSimSvc'             , 'ISF_Geant4SimSvc')
     kwargs.setdefault('RequiresUnchangedGeoID' , True                           )
-    kwargs.setdefault('Simulator'              , getService('ISF_Geant4SimSvc') )
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__HistorySimSelector
-    return ISF__HistorySimSelector(name, **kwargs)
+    kwargs.setdefault('Simulator'              , 'ISF_Geant4SimSvc')
+    return CfgMgr.ISF__HistorySimSelector(name, **kwargs)
 
 def getGlobalStickyGeant4SimSelector(name="ISF_GlobalStickyGeant4SimSelector", **kwargs):
-    kwargs.setdefault('PrevSimSvc'             , getService('ISF_Geant4SimSvc') )
+    kwargs.setdefault('PrevSimSvc'             , 'ISF_Geant4SimSvc')
     kwargs.setdefault('RequiresUnchangedGeoID' , False                          )
-    kwargs.setdefault('Simulator'              , getService('ISF_Geant4SimSvc') )
-    from ISF_SimulationSelectors.ISF_SimulationSelectorsConf import ISF__HistorySimSelector
-    return ISF__HistorySimSelector(name, **kwargs)
-
-def getDefaultParametricSimulationSelector(name="ISF_DefaultParametricSimulationSelector", **kwargs):
-    kwargs.setdefault("Simulator"   , getService('ISF_ParametricSimSvc'))
-    return getDefaultSimSelector(name, **kwargs )
+    kwargs.setdefault('Simulator'              , 'ISF_Geant4SimSvc')
+    return CfgMgr.ISF__HistorySimSelector(name, **kwargs)
diff --git a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py
index 1ae3f98c33c..7a0f798c203 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py
+++ b/Simulation/ISF/ISF_SimulationSelectors/python/ISF_SimulationSelectorsConfigDb.py
@@ -5,15 +5,7 @@ Configuration database for ISF_SimulationSelectors
 Elmar Ritsch, 10/11/2014
 """
 
-from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorithm, \
-     addTypesToExcludeIfDefaultValue, addNamesToExcludeIfDefaultValue, addFullNamesToExcludeIfDefaultValue, \
-     addPropertiesToExcludeIfDefault, \
-     addTypesToSkipIfNotAvailable, addNamesToSkipIfNotAvailable, addFullNamesToSkipIfNotAvailable, \
-     addTypesOnlyToSkip
-
-from AthenaCommon.Constants import *  # FATAL,ERROR etc.
-import AthenaCommon.SystemOfUnits as Units
-
+from AthenaCommon.CfgGetter import addTool
 
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getElectronGeant4Selector"               , "ISF_ElectronGeant4Selector"              )
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getNeutralGeant4Selector"                , "ISF_NeutralGeant4Selector"               )
@@ -41,6 +33,7 @@ addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getDefaultFastCal
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getFastCaloSimPileupSelector"            , "ISF_FastCaloSimPileupSelector"           )
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getFastHitConvAlgFastCaloSimSelector"    , "ISF_FastHitConvAlgFastCaloSimSelector"   )
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getDefaultLegacyAFIIFastCaloSimSelector" , "ISF_DefaultLegacyAFIIFastCaloSimSelector")
+addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getDefaultFastCaloSimV2Selector"         , "ISF_DefaultFastCaloSimV2Selector"        )
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getFastHitConvAlgLegacyAFIIFastCaloSimSelector" , "ISF_FastHitConvAlgLegacyAFIIFastCaloSimSelector")
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getDefaultFatrasSelector"                , "ISF_DefaultFatrasSelector"               )
 addTool("ISF_SimulationSelectors.ISF_SimulationSelectorsConfig.getDefaultFatrasNewExtrapolationSelector", "ISF_DefaultFatrasNewExtrapolationSelector")
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx
index 029ad552cb6..50dbc44a895 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.cxx
@@ -17,53 +17,53 @@
 #include "ISF_TrackingInterfaces/ITrkExtrapolator.h"
 
 /** Constructor **/
-ISF::ConeSimSelector::ConeSimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p),
-  ConeParticleCuts(),
-  m_absPDGVector(),
-  m_checkRelatives(false),
-  m_relativesVec(),
-  m_relatives(),
-  m_relationProp(),
-  m_relation(HepMC::parents),
-  m_extrapolateToCalo(false),
-  m_extrapolator()
+ISF::ConeSimSelector::ConeSimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
+  , ConeParticleCuts()
+  , m_absPDGVector()
+  , m_checkRelatives(false)
+  , m_relativesVec()
+  , m_relatives()
+  , m_relationProp()
+  , m_relation(HepMC::parents)
+  , m_extrapolateToCalo(false)
+  , m_extrapolator()
 {
-    declareInterface<ISF::ISimulationSelector>(this);
-    
-    // cone options
-    declareProperty( "ConeCreatorPDGs",
-        m_absPDGVector,
-        "Register cones around particles with this PDG code" );
-    declareProperty( "ConeCreatorMinPt",
-        m_cut_minPt,
-        "Register cones around particles with this minimum pT" );
-    declareProperty( "ConeSize",
-        m_cut_coneSize2,
-        "Size of cone around initial particles." );
-    declareProperty( "CheckParticlePosition",
-        m_cut_checkPosition,
-        "Choose if particle position (or momentum direction) has to be within cone." );
-
-
-    declareProperty( "CheckConeCreatorAncestors",
-        m_checkRelatives,
-        "on/off switch to check ancestor particles for cone creation (eg. cone only around e from Z decay)" );
-    declareProperty( "ConeCreatorAncestor",
-        m_relativesVec,
-        "Only ISFParticles which have specified 'Relation' to the given PDGCode are selected." );
-    // as defined in the HepMC manual HepMC::GenVertex::particle iterator
-    declareProperty( "ConeCreatorAncestorRelation",
-        m_relationProp,
-        "Relation to the given PDG codes: 0=parents, 1=family, 2=ancestors, 3=relatives." );
-
-    // track extrapolation to estimate impact point of particle on next sub-detector
-    declareProperty( "ExtrapolateToCaloEntry",
-        m_extrapolateToCalo,
-        "Extrapolate particles to calorimeter entry layer and build cone there" );
-    declareProperty( "Extrapolator", 
-        m_extrapolator,
-        "Extrapolator used for track extrapolation" );   
+  declareInterface<ISF::ISimulationSelector>(this);
+
+  // cone options
+  declareProperty( "ConeCreatorPDGs",
+                   m_absPDGVector,
+                   "Register cones around particles with this PDG code" );
+  declareProperty( "ConeCreatorMinPt",
+                   m_cut_minPt,
+                   "Register cones around particles with this minimum pT" );
+  declareProperty( "ConeSize",
+                   m_cut_coneSize2,
+                   "Size of cone around initial particles." );
+  declareProperty( "CheckParticlePosition",
+                   m_cut_checkPosition,
+                   "Choose if particle position (or momentum direction) has to be within cone." );
+
+
+  declareProperty( "CheckConeCreatorAncestors",
+                   m_checkRelatives,
+                   "on/off switch to check ancestor particles for cone creation (eg. cone only around e from Z decay)" );
+  declareProperty( "ConeCreatorAncestor",
+                   m_relativesVec,
+                   "Only ISFParticles which have specified 'Relation' to the given PDGCode are selected." );
+  // as defined in the HepMC manual HepMC::GenVertex::particle iterator
+  declareProperty( "ConeCreatorAncestorRelation",
+                   m_relationProp,
+                   "Relation to the given PDG codes: 0=parents, 1=family, 2=ancestors, 3=relatives." );
+
+  // track extrapolation to estimate impact point of particle on next sub-detector
+  declareProperty( "ExtrapolateToCaloEntry",
+                   m_extrapolateToCalo,
+                   "Extrapolate particles to calorimeter entry layer and build cone there" );
+  declareProperty( "Extrapolator",
+                   m_extrapolator,
+                   "Extrapolator used for track extrapolation" );
 }
 
 
@@ -77,147 +77,158 @@ ISF::ConeSimSelector::~ConeSimSelector()
 // Athena algtool's Hooks
 StatusCode  ISF::ConeSimSelector::initialize()
 {
-    ATH_MSG_VERBOSE("Initializing ...");
+  ATH_MSG_VERBOSE("Initializing ...");
 
-    // store the square of the cone size (faster comparison)
-    m_cut_coneSize2 *= m_cut_coneSize2;
+  // store the square of the cone size (faster comparison)
+  m_cut_coneSize2 *= m_cut_coneSize2;
+  // convert std::vector to std::set for faster searching
+  m_cut_absPdgs.insert( m_absPDGVector.begin(), m_absPDGVector.end() );
+
+  // check relatives for cone creating particle, in case vector is filled
+  if ( m_checkRelatives) {
     // convert std::vector to std::set for faster searching
-    m_cut_absPdgs.insert( m_absPDGVector.begin(), m_absPDGVector.end() );
-
-    // check relatives for cone creating particle, in case vector is filled
-    if ( m_checkRelatives) {
-      // convert std::vector to std::set for faster searching
-      m_relatives.insert( m_relativesVec.begin(), m_relativesVec.end() );
-      // convert the 'Relation' Python property into a HepMC data type
-      m_relation = HepMCHelper::convertIteratorRange( m_relationProp);
-    }
-    
-    ATH_MSG_VERBOSE( "Initialize successful" );
-    return StatusCode::SUCCESS;
+    m_relatives.insert( m_relativesVec.begin(), m_relativesVec.end() );
+    // convert the 'Relation' Python property into a HepMC data type
+    m_relation = HepMCHelper::convertIteratorRange( m_relationProp);
+  }
+
+  ATH_MSG_VERBOSE( "Initialize successful" );
+  return StatusCode::SUCCESS;
 }
 
 
 StatusCode  ISF::ConeSimSelector::finalize()
 {
-    ATH_MSG_VERBOSE("Finalizing ...");
+  ATH_MSG_VERBOSE("Finalizing ...");
 
-    ATH_MSG_VERBOSE("Finalize successful");
-    return StatusCode::SUCCESS;
+  ATH_MSG_VERBOSE("Finalize successful");
+  return StatusCode::SUCCESS;
 }
 
 
 void ISF::ConeSimSelector::beginEvent()
 {
-    ATH_MSG_VERBOSE("beginEvent being called. Resetting the cone container.");
+  ATH_MSG_VERBOSE("beginEvent being called. Resetting the cone container.");
 
-    ConeSimSelector::resetCones();
+  ConeSimSelector::resetCones();
 }
 
 
 void ISF::ConeSimSelector::endEvent()
 {
-    ATH_MSG_VERBOSE("endEvent being called.");
+  ATH_MSG_VERBOSE("endEvent being called.");
 }
 
 
-void ISF::ConeSimSelector::update(const ISFParticle& particle) {
+void ISF::ConeSimSelector::update(const ISFParticle& particle)
+{
 
   // this method will determine whether or not to create a cone around the given particle
 
   ATH_MSG_VERBOSE("Checking whether cone will be created around particle: " << particle);
 
   // check relatives if required
-  if ( m_checkRelatives ) {
-    // get the truth binding (as HepMC)
-    const TruthBinding* truth = particle.getTruthBinding();
-
-    if (truth) {
-      // get GenParticle from truth binding
-      const HepMC::GenParticle* genParticle = truth->getTruthParticle();
-      if (!genParticle) {
-        // cone conditions not fulfilled
-        return;
-      }
-
-      // test whether any of the pdg codes is found in the genParticle history
-      const HepMC::GenParticle *relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives);
-
-      if (relative) {
-        ATH_MSG_VERBOSE("Current particle has valid relative particle:"
-                        << " (pdg=" << relative->pdg_id() << ","
-                        << " barcode=" << relative->barcode() << ")."
-                        << " Will now check whether cone cuts apply" );
-      }
-      else {
-        // cone conditions not fulfilled
-        return;
-      }
-    } // has truth association
-  } // check relatives
+  if ( m_checkRelatives )
+    {
+      // get the truth binding (as HepMC)
+      const TruthBinding* truth = particle.getTruthBinding();
+
+      if (truth)
+        {
+          // get GenParticle from truth binding
+          const HepMC::GenParticle* genParticle = truth->getTruthParticle();
+          if (!genParticle)
+            {
+              // cone conditions not fulfilled
+              return;
+            }
+
+          // test whether any of the pdg codes is found in the genParticle history
+          const HepMC::GenParticle *relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives);
+
+          if (relative)
+            {
+              ATH_MSG_VERBOSE("Current particle has valid relative particle:"
+                              << " (pdg=" << relative->pdg_id() << ","
+                              << " barcode=" << relative->barcode() << ")."
+                              << " Will now check whether cone cuts apply" );
+            }
+          else
+            {
+              // cone conditions not fulfilled
+              return;
+            }
+        } // has truth association
+    } // check relatives
 
   // do a quick check to see whether passes minimum cuts before extrapolating
   bool passes=checkParticle(particle);
   double eta=particle.momentum().eta();
   double phi=particle.momentum().phi();
 
-  if ( passes ) {
-    ATH_MSG_VERBOSE("Passes minimum cuts");
-    
-    if ( m_extrapolateToCalo ) {
-      
-      ISF::ISFParticle *extrapolatedParticle = m_extrapolator->extrapolate( particle );
-
-      const Amg::Vector3D& initialPos      = particle.position();
-      const Amg::Vector3D& initialMom      = particle.momentum();
-      const Amg::Vector3D& extrapolatedPos = extrapolatedParticle->position();
-      const Amg::Vector3D& extrapolatedMom = extrapolatedParticle->momentum();
-
-      // check if passes cuts
-      passes = ConeParticleCuts::checkAndRegisterCone(particle, extrapolatedMom);
-      eta=extrapolatedMom.eta();
-      phi=extrapolatedMom.phi();
-      
-      ATH_MSG_DEBUG("Initial position: ("
-            <<initialPos.x()<<","
-            <<initialPos.y()<<","
-            <<initialPos.z()<<"), final position: ("
-            <<extrapolatedPos.x()<<","
-            <<extrapolatedPos.y()<<","
-            <<extrapolatedPos.z()<<")");
-      
-      ATH_MSG_DEBUG("Initial eta/phi: ("
-            <<initialMom.eta()<<"/"
-            <<initialMom.phi()<<"), final eta/phi: ("
-            <<extrapolatedMom.eta()<<"/"
-            <<extrapolatedMom.phi()<<")");
-
-      // cleanup
-      delete extrapolatedParticle;
-
+  if ( passes )
+    {
+      ATH_MSG_VERBOSE("Passes minimum cuts");
+
+      if ( m_extrapolateToCalo )
+        {
+
+          ISF::ISFParticle *extrapolatedParticle = m_extrapolator->extrapolate( particle );
+
+          const Amg::Vector3D& initialPos      = particle.position();
+          const Amg::Vector3D& initialMom      = particle.momentum();
+          const Amg::Vector3D& extrapolatedPos = extrapolatedParticle->position();
+          const Amg::Vector3D& extrapolatedMom = extrapolatedParticle->momentum();
+
+          // check if passes cuts
+          passes = ConeParticleCuts::checkAndRegisterCone(particle, extrapolatedMom);
+          eta=extrapolatedMom.eta();
+          phi=extrapolatedMom.phi();
+
+          ATH_MSG_DEBUG("Initial position: ("
+                        <<initialPos.x()<<","
+                        <<initialPos.y()<<","
+                        <<initialPos.z()<<"), final position: ("
+                        <<extrapolatedPos.x()<<","
+                        <<extrapolatedPos.y()<<","
+                        <<extrapolatedPos.z()<<")");
+
+          ATH_MSG_DEBUG("Initial eta/phi: ("
+                        <<initialMom.eta()<<"/"
+                        <<initialMom.phi()<<"), final eta/phi: ("
+                        <<extrapolatedMom.eta()<<"/"
+                        <<extrapolatedMom.phi()<<")");
+
+          // cleanup
+          delete extrapolatedParticle;
+
+        }
+      else
+        {
+          passes = ConeParticleCuts::checkAndRegisterCone(particle);
+          eta=particle.momentum().eta();
+          phi=particle.momentum().phi();
+        }
+
+      if (passes)
+        {
+          ATH_MSG_DEBUG("Particle (eta=" << eta << ", "
+                        << " phi=" << phi << ","
+                        << " pdg=" << particle.pdgCode() << ","
+                        << " barcode=" << particle.barcode() << ")"
+                        << " has passed all cuts. A new simulation cone around it has been created");
+        }
     }
-    else {
-      passes = ConeParticleCuts::checkAndRegisterCone(particle);
-      eta=particle.momentum().eta();
-      phi=particle.momentum().phi();
-    }
-    
-    if (passes) {
-      ATH_MSG_DEBUG("Particle (eta=" << eta << ", " 
-            << " phi=" << phi << ","
-            << " pdg=" << particle.pdgCode() << ","
-            << " barcode=" << particle.barcode() << ")"
-            << " has passed all cuts. A new simulation cone around it has been created");
-    }
-  }
 
 
-  if (!passes) {
-    ATH_MSG_VERBOSE("Particle (eta=" << eta << ", " 
-                    << " phi=" << phi << ","
-                    << " pdg=" << particle.pdgCode() << ","
-                    << " barcode=" << particle.barcode() << ")"
-                    << " did not pass all cuts. NO new simulation cone has been created");
-  }
+  if (!passes)
+    {
+      ATH_MSG_VERBOSE("Particle (eta=" << eta << ", "
+                      << " phi=" << phi << ","
+                      << " pdg=" << particle.pdgCode() << ","
+                      << " barcode=" << particle.barcode() << ")"
+                      << " did not pass all cuts. NO new simulation cone has been created");
+    }
 }
 
 
@@ -227,4 +238,3 @@ bool  ISF::ConeSimSelector::passSelectorCuts(const ISFParticle& isfpart) const
   bool passes = ISF::ConeParticleCuts::insideCone( isfpart );
   return passes;
 }
-
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.h
index b22c118ac4e..e93bb0f2e62 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/ConeSimSelector.h
@@ -18,62 +18,64 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
-namespace ISF {
+namespace ISF
+{
 
   // forward delcarations
   class ITrkExtrapolator;
 
   /** @class ConeSimSelector
-  
+
       This SimulationSelector implementation registers cones around particles that
       are given to the updateInsideSubDet(..) or the updateOutsideSubDet(..) method
       and pass certain cuts (pT, pdg, HepMC ancestor). PassSelectorCuts(..) determines
       whether the given particle is inside such a cone or not.
-  
+
       @author Andreas.Salzburger -at- cern.ch , Elmar.Ritsch -at- cern.ch
-     */
-  class ConeSimSelector : public ISimulationSelector, public ConeParticleCuts {
-      
-    public: 
-     /** Constructor with parameters */
-     ConeSimSelector( const std::string& t, const std::string& n, const IInterface* p );
-
-     /** Destructor */
-     ~ConeSimSelector();
-
-     /** Athena AlgTool initialize */
-     StatusCode  initialize();
-
-     /** Athena AlgTool finalize */
-     StatusCode  finalize();
-
-     /** called at the beginning of each event (used for resetting dynamic selectors) */
-     virtual void beginEvent();
-
-     /** called at the beginning of each event (used for resetting dynamic selectors) */
-     virtual void endEvent();
-
-      /** update internal event representation (create cones in our case)*/
-      virtual void update(const ISFParticle& p );
-
-      /** check whether given particle is within any of the registered cones
-          -> will be used for routing decision*/
-      virtual bool passSelectorCuts(const ISFParticle& particle) const;
-
-    private:
-      std::vector<int>                          m_absPDGVector;  //!< abs(PDG) for particles to create cones around
-      /** ISFParticle has to have a relative which is in this list to create a cone*/
-      bool                                      m_checkRelatives;//!< on/off for checking relatives
-      std::vector<int>                          m_relativesVec;  //!< Python property
-      std::set<int>                             m_relatives;     //!< used during runtime (faster)
-      
-      /** ISFParticle relation to the given pdg codes */
-      int                                       m_relationProp;  //!< Python property
-      HepMC::IteratorRange                      m_relation;      //!< HepMC
-
-      /** Track extrapolation to estimate impact point of particle on next sub-detector*/
-      bool                                      m_extrapolateToCalo; //!< enable/disable
-      ToolHandle<ISF::ITrkExtrapolator>         m_extrapolator;      //!< extrapolator tool
+  */
+  class ConeSimSelector : public ISimulationSelector, public ConeParticleCuts
+  {
+
+  public:
+    /** Constructor with parameters */
+    ConeSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+
+    /** Destructor */
+    ~ConeSimSelector();
+
+    /** Athena AlgTool initialize */
+    StatusCode  initialize() override final;
+
+    /** Athena AlgTool finalize */
+    StatusCode  finalize() override final;
+
+    /** called at the beginning of each event (used for resetting dynamic selectors) */
+    virtual void beginEvent() override final;
+
+    /** called at the beginning of each event (used for resetting dynamic selectors) */
+    virtual void endEvent() override final;
+
+    /** update internal event representation (create cones in our case)*/
+    virtual void update(const ISFParticle& p ) override final;
+
+    /** check whether given particle is within any of the registered cones
+        -> will be used for routing decision*/
+    virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
+
+  private:
+    std::vector<int>                          m_absPDGVector;  //!< abs(PDG) for particles to create cones around
+    /** ISFParticle has to have a relative which is in this list to create a cone*/
+    bool                                      m_checkRelatives;//!< on/off for checking relatives
+    std::vector<int>                          m_relativesVec;  //!< Python property
+    std::set<int>                             m_relatives;     //!< used during runtime (faster)
+
+    /** ISFParticle relation to the given pdg codes */
+    int                                       m_relationProp;  //!< Python property
+    HepMC::IteratorRange                      m_relation;      //!< HepMC
+
+    /** Track extrapolation to estimate impact point of particle on next sub-detector*/
+    bool                                      m_extrapolateToCalo; //!< enable/disable
+    ToolHandle<ISF::ITrkExtrapolator>         m_extrapolator;      //!< extrapolator tool
   };
 
 }
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.cxx
index b8f59cf65bd..61d9d09a8ab 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.cxx
@@ -14,8 +14,8 @@
 #include "GaudiKernel/SystemOfUnits.h"
 
 /** Constructor **/
-ISF::DefaultSimSelector::DefaultSimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p)
+ISF::DefaultSimSelector::DefaultSimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
 {
     declareInterface<ISF::ISimulationSelector>(this);
 }
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.h
index fab66f3bfbf..8dd33bec75c 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/DefaultSimSelector.h
@@ -12,34 +12,34 @@
 // ISF includes
 #include "ISF_Interfaces/ISimulationSelector.h"
 
-namespace ISF {
+namespace ISF
+{
 
   /** @class DefaultSimSelector
-  
+
       This SimlationSelector implementation will select all particles that are handed to it.
       ( passFilter() always returns true )
-  
+
       @author Elmar.Ritsch -at- cern.ch
-     */
-  class DefaultSimSelector : public ISimulationSelector {
-      
-    public: 
-     /** Constructor with parameters */
-     DefaultSimSelector( const std::string& t, const std::string& n, const IInterface* p );
-
-     /** Destructor */
-     ~DefaultSimSelector();
-
-     // Athena algtool's Hooks
-     StatusCode  initialize();
-     StatusCode  finalize();
-
-     /** check whether given particle passes all cuts -> will be used for routing decision*/
-     inline virtual bool passSelectorCuts(const ISFParticle& particle) const;
-
-	  private:
-  }; 
-  
+  */
+  class DefaultSimSelector : public ISimulationSelector
+  {
+
+  public:
+    /** Constructor with parameters */
+    DefaultSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+
+    /** Destructor */
+    ~DefaultSimSelector();
+
+    // Athena algtool's Hooks
+    StatusCode  initialize() override final;
+    StatusCode  finalize() override final;
+
+    /** check whether given particle passes all cuts -> will be used for routing decision*/
+    inline virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
+  };
+
 }
 
 
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.cxx
index f0277cca240..881aaf0c150 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.cxx
@@ -13,19 +13,19 @@
 #include "ISF_Event/ISFParticle.h"
 
 /** Constructor **/
-ISF::HistorySimSelector::HistorySimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p),
-  m_prevSimSvcHandle("UnspecifiedSimulationService", n),
-  m_prevSimSvcID(ISF::fUndefinedSimID),
-  m_checkSameGeoID(false)
+ISF::HistorySimSelector::HistorySimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
+  , m_prevSimSvcHandle("UnspecifiedSimulationService", n)
+  , m_prevSimSvcID(ISF::fUndefinedSimID)
+  , m_checkSameGeoID(false)
 {
   declareInterface<ISF::ISimulationSelector>(this);
 
-  declareProperty( "PrevSimSvc", 
+  declareProperty( "PrevSimSvc",
                    m_prevSimSvcHandle,
                    "Check if particle was recently simulated by the given SimSvc." );
 
-  declareProperty( "RequiresUnchangedGeoID", 
+  declareProperty( "RequiresUnchangedGeoID",
                    m_checkSameGeoID,
                    "Check if GeoID of particle did not change." );
 
@@ -42,10 +42,7 @@ StatusCode  ISF::HistorySimSelector::initialize()
   ATH_MSG_VERBOSE("Initializing ...");
 
   // retrieve SimulationService
-  if ( m_prevSimSvcHandle.retrieve().isFailure() ) {
-    ATH_MSG_FATAL( m_prevSimSvcHandle.propertyName() << ": Failed to retrieve service " << m_prevSimSvcHandle.type());
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( m_prevSimSvcHandle.retrieve() );
   ATH_MSG_INFO( m_prevSimSvcHandle.propertyName() << ": Retrieved service " << m_prevSimSvcHandle.type());
 
   ATH_MSG_VERBOSE("Initialize successful");
@@ -64,18 +61,24 @@ StatusCode  ISF::HistorySimSelector::finalize()
 void ISF::HistorySimSelector::beginEvent()
 {
   // get the simSvcID from the simulation service
-  if (m_prevSimSvcID==ISF::fUndefinedSimID) {
-    m_prevSimSvcID = m_prevSimSvcHandle->simSvcID();
-    if (m_prevSimSvcID==ISF::fUndefinedSimID)
-      ATH_MSG_ERROR( m_prevSimSvcHandle.propertyName() <<
-                     " does not return a proper SimSvcID! Unable to make valid routing decisions" );
-  }
+  if (m_prevSimSvcID==ISF::fUndefinedSimID)
+    {
+      m_prevSimSvcID = m_prevSimSvcHandle->simSvcID();
+      if (m_prevSimSvcID==ISF::fUndefinedSimID)
+        {
+          ATH_MSG_ERROR( m_prevSimSvcHandle.propertyName() <<
+                         " does not return a proper SimSvcID! Unable to make valid routing decisions" );
+        }
+    }
 }
 
-bool  ISF::HistorySimSelector::passSelectorCuts(const ISFParticle& particle) const {
+bool  ISF::HistorySimSelector::passSelectorCuts(const ISFParticle& particle) const
+{
   // pass selector cuts if particle was previously processed by the given SimSvcID
   bool pass = (particle.prevSimID() == m_prevSimSvcID);
-  if (pass && m_checkSameGeoID) pass = particle.prevGeoID() == particle.nextGeoID();
-
+  if (pass && m_checkSameGeoID)
+    {
+      pass = particle.prevGeoID() == particle.nextGeoID();
+    }
   return pass;
 }
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.h
index a5e322f5f57..59ee18aa879 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/HistorySimSelector.h
@@ -16,46 +16,48 @@
 #include "ISF_Interfaces/ISimulationSelector.h"
 #include "ISF_Event/SimSvcID.h"
 
-namespace ISF {
+namespace ISF
+{
 
   // forward declarations
   class ISimulationSvc;
 
 
   /** @class HistorySimSelector
-  
+
       Simplistic simulation selector using the particle's history
-  
+
       @author Elmar.Ritsch -at- cern.ch
-     */
-  class HistorySimSelector : public ISimulationSelector {
-      
-    public: 
-     /** Constructor with parameters */
-     HistorySimSelector( const std::string& t, const std::string& n, const IInterface* p );
+  */
+  class HistorySimSelector : public ISimulationSelector
+  {
 
-     /** Destructor */
-     ~HistorySimSelector();
+  public:
+    /** Constructor with parameters */
+    HistorySimSelector( const std::string& t, const std::string& n, const IInterface* p );
 
-     // Athena algtool's Hooks
-     virtual StatusCode  initialize();
-     virtual StatusCode  finalize();
+    /** Destructor */
+    ~HistorySimSelector();
 
-     /** called at the beginning of each athena event */
-     virtual void beginEvent();
+    // Athena algtool's Hooks
+    virtual StatusCode  initialize() override final;
+    virtual StatusCode  finalize() override final;
 
-     /** check whether given particle passes all cuts -> will be used for routing decision*/
-     virtual bool passSelectorCuts(const ISFParticle& particle) const;
+    /** called at the beginning of each athena event */
+    virtual void beginEvent() override final;
 
-    private:
-     /** will check given particles if they were previously simulated by
-         the SimulationSvc/ID defined in here */
-     ServiceHandle<ISF::ISimulationSvc>          m_prevSimSvcHandle; //!< SimSvc handle
-     SimSvcID                                    m_prevSimSvcID;     //!< same SimSvc ID
+    /** check whether given particle passes all cuts -> will be used for routing decision*/
+    virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
 
-     bool                                        m_checkSameGeoID;   //!< check that geoID did not change
+  private:
+    /** will check given particles if they were previously simulated by
+        the SimulationSvc/ID defined in here */
+    ServiceHandle<ISF::ISimulationSvc>          m_prevSimSvcHandle; //!< SimSvc handle
+    SimSvcID                                    m_prevSimSvcID;     //!< same SimSvc ID
+
+    bool                                        m_checkSameGeoID;   //!< check that geoID did not change
   };
-  
+
 }
 
 #endif //> !ISF_TOOLS_PASSPORTSIMSELECTOR_H
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.cxx
index 01b08e47015..bfcbf9e974b 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.cxx
@@ -10,9 +10,9 @@
 #include "KinematicSimSelector.h"
 
 /** Constructor **/
-ISF::KinematicSimSelector::KinematicSimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p),
-  KinematicParticleCuts()
+ISF::KinematicSimSelector::KinematicSimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
+  , KinematicParticleCuts()
 {
   declareInterface<ISF::ISimulationSelector>(this);
 
@@ -50,6 +50,7 @@ StatusCode  ISF::KinematicSimSelector::finalize()
   return StatusCode::SUCCESS;
 }
 
-bool  ISF::KinematicSimSelector::passSelectorCuts(const ISFParticle& particle) const {
+bool  ISF::KinematicSimSelector::passSelectorCuts(const ISFParticle& particle) const
+{
   return ISF::KinematicParticleCuts::pass(particle);
 }
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.h
index 1628519251d..eca0cac06f8 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/KinematicSimSelector.h
@@ -13,31 +13,33 @@
 #include "ISF_Event/KinematicParticleCuts.h"
 #include "ISF_Interfaces/ISimulationSelector.h"
 
-namespace ISF {
+namespace ISF
+{
 
   /** @class KinematicSimSelector
-  
+
       Simplistic kinematic filter on energy and pseudorapidity.
-  
+
       @author Elmar.Ritsch -at- cern.ch
-     */
-  class KinematicSimSelector : public ISimulationSelector, public KinematicParticleCuts {
-      
-    public: 
-     /** Constructor with parameters */
-     KinematicSimSelector( const std::string& t, const std::string& n, const IInterface* p );
-
-     /** Destructor */
-     ~KinematicSimSelector();
-
-     // Athena algtool's Hooks
-     virtual StatusCode  initialize();
-     virtual StatusCode  finalize();
-     
-     /** check whether given particle passes all cuts -> will be used for routing decision*/
-     virtual bool passSelectorCuts(const ISFParticle& particle) const;
-  }; 
-  
+  */
+  class KinematicSimSelector : public ISimulationSelector, public KinematicParticleCuts
+  {
+
+  public:
+    /** Constructor with parameters */
+    KinematicSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+
+    /** Destructor */
+    ~KinematicSimSelector();
+
+    // Athena algtool's Hooks
+    virtual StatusCode  initialize() override final;
+    virtual StatusCode  finalize() override final;
+
+    /** check whether given particle passes all cuts -> will be used for routing decision*/
+    virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
+  };
+
 }
 
 #endif //> !ISF_TOOLS_KINEMATICSIMSELECTOR_H
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.cxx
index b7099f3626a..f778acc6abf 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.cxx
@@ -14,13 +14,14 @@
 #include "GaudiKernel/SystemOfUnits.h"
 
 /** Constructor **/
-ISF::PileupSimSelector::PileupSimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p),
-  m_npass(0),m_nfail(0)
+ISF::PileupSimSelector::PileupSimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
+  , m_npass(0)
+  , m_nfail(0)
 {
     declareInterface<ISF::ISimulationSelector>(this);
     declareProperty("PileupBCID",m_pileupbcid,
-		   "BICDs to be flagged as being pileup");
+                   "BICDs to be flagged as being pileup");
 }
 
 /** Destructor **/
@@ -32,7 +33,7 @@ ISF::PileupSimSelector::~PileupSimSelector()
 StatusCode  ISF::PileupSimSelector::initialize()
 {
   ATH_MSG_INFO("Initializing with " << m_pileupbcid.size() <<
-	       " BCIDs to be accepted");
+               " BCIDs to be accepted");
   for (std::vector<int>::const_iterator itr=m_pileupbcid.begin();
        itr!=m_pileupbcid.end();++itr)
     ATH_MSG_INFO(" - accept BCID " << *itr);
@@ -41,31 +42,24 @@ StatusCode  ISF::PileupSimSelector::initialize()
 
 StatusCode  ISF::PileupSimSelector::finalize()
 {
-  ATH_MSG_INFO("Finalizing with " << m_npass << " particles accepted and " 
-	       << m_nfail << " rejected by filter");
+  ATH_MSG_INFO("Finalizing with " << m_npass << " particles accepted and "
+               << m_nfail << " rejected by filter");
   return StatusCode::SUCCESS;
 }
 
 /** check whether given particle passes all cuts -> will be used for routing decision*/
 bool  ISF::PileupSimSelector::passSelectorCuts(const ISFParticle& particle) const
 {
-  // test to see if extra barcode BCID is in list to accept
-  // if no ExtraBC present, default to BCID 0
+  int bcid = particle.getBCID();
 
-  int extrabc = particle.getExtraBC();
-  int bcid2=0;
-  if (extrabc>=0) {
-    bcid2=m_bitcalculator.GetBCID(extrabc);
-  }
-  // check if extra BCID is in list
-  for (std::vector<int>::const_iterator itr=m_pileupbcid.begin();
-       itr!=m_pileupbcid.end();++itr) {
-    if ((*itr)==bcid2) {
-      ++m_npass;
+  // test to see if BCID is in list to accept
+  bool isPileup = std::find(begin(m_pileupbcid), end(m_pileupbcid), bcid) != end(m_pileupbcid);
+
+  if (isPileup)
+    {
+      m_npass++;
       return true;
     }
-  }
-  ++m_nfail;
+  m_nfail++;
   return false;
 }
-
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.h
index 2edc83c6f12..8ac793fa804 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/PileupSimSelector.h
@@ -15,41 +15,43 @@
 // Barcode interpretation
 #include "BarcodeServices/BitCalculator.h"
 
-namespace ISF {
+namespace ISF
+{
 
   /** @class PileupSimSelector
-  
+
       This SimlationSelector implementation will select all particles that are handed to it.
       ( passFilter() always returns true )
-  
+
       @author Elmar.Ritsch -at- cern.ch
-     */
-  class PileupSimSelector : public ISimulationSelector {
-      
-    public: 
-     /** Constructor with parameters */
-     PileupSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+  */
+  class PileupSimSelector : public ISimulationSelector
+  {
+
+  public:
+    /** Constructor with parameters */
+    PileupSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+
+    /** Destructor */
+    ~PileupSimSelector();
 
-     /** Destructor */
-     ~PileupSimSelector();
+    // Athena algtool's Hooks
+    StatusCode  initialize() override final;
+    StatusCode  finalize() override final;
 
-     // Athena algtool's Hooks
-     StatusCode  initialize();
-     StatusCode  finalize();
+    /** check whether given particle passes all cuts -> will be used for routing decision*/
+    inline virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
 
-     /** check whether given particle passes all cuts -> will be used for routing decision*/
-     inline virtual bool passSelectorCuts(const ISFParticle& particle) const;
+  private:
+    mutable Barcode::BitCalculator m_bitcalculator;
 
-    private:
-     mutable Barcode::BitCalculator m_bitcalculator;
+    std::vector<int> m_pileupbcid; // vector of BCIDs to select
 
-     std::vector<int> m_pileupbcid; // vector of BCIDs to select
+    mutable int m_npass; // number of particles filter accepts
+    mutable int m_nfail; // number of particles filter rejects
 
-     mutable int m_npass; // number of particles filter accepts
-     mutable int m_nfail; // number of particles filter rejects
+  };
 
-  }; 
-  
 }
 
 
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.cxx
index 03cb13a1a7b..09a1502d839 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.cxx
@@ -16,41 +16,40 @@
 #include "TRandom.h"
 
 /** Constructor **/
-ISF::RandomSimSelector::RandomSimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p),
-  m_random(0)
+ISF::RandomSimSelector::RandomSimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
+  , m_random(0)
 {
-    declareInterface<ISF::ISimulationSelector>(this);
+  declareInterface<ISF::ISimulationSelector>(this);
 
-    m_random = new TRandom(); 
+  m_random = new TRandom();
 }
 
 /** Destructor **/
 ISF::RandomSimSelector::~RandomSimSelector()
 {
-    if (m_random!=NULL) delete m_random;
+  if (m_random!=NULL) delete m_random;
 }
 
 // Athena algtool's Hooks
 StatusCode  ISF::RandomSimSelector::initialize()
 {
-    ATH_MSG_VERBOSE("Initializing ...");
-    return StatusCode::SUCCESS;
+  ATH_MSG_VERBOSE("Initializing ...");
+  return StatusCode::SUCCESS;
 }
 
 StatusCode  ISF::RandomSimSelector::finalize()
 {
-    ATH_MSG_VERBOSE("Finalizing ...");
-    return StatusCode::SUCCESS;
+  ATH_MSG_VERBOSE("Finalizing ...");
+  return StatusCode::SUCCESS;
 }
 
 /** check whether given particle passes all cuts -> will be used for routing decision*/
 bool  ISF::RandomSimSelector::passSelectorCuts(const ISFParticle& particle) const
 {
-  bool pass = (m_random->Uniform()<0.5); 
+  bool pass = (m_random->Uniform()<0.5);
 
   ATH_MSG_VERBOSE("[fatras randomselector] barcode = " << particle.barcode() << " pass = " << pass);
 
   return pass;
 }
-
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.h
index 33b9d3f6bf7..5519375f777 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/RandomSimSelector.h
@@ -14,36 +14,38 @@
 
 class TRandom;
 
-namespace ISF {
+namespace ISF
+{
 
   /** @class RandomSimSelector
-  
+
       This SimlationSelector implementation will select all particles that are handed to it.
       ( passFilter() always returns true )
-  
+
       @author Elmar.Ritsch -at- cern.ch
-     */
-  class RandomSimSelector : public ISimulationSelector {
-      
-    public: 
-     /** Constructor with parameters */
-     RandomSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+  */
+  class RandomSimSelector : public ISimulationSelector
+  {
+
+  public:
+    /** Constructor with parameters */
+    RandomSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+
+    /** Destructor */
+    ~RandomSimSelector();
 
-     /** Destructor */
-     ~RandomSimSelector();
+    // Athena algtool's Hooks
+    StatusCode  initialize() override final;
+    StatusCode  finalize() override final;
 
-     // Athena algtool's Hooks
-     StatusCode  initialize();
-     StatusCode  finalize();
+    /** check whether given particle passes all cuts -> will be used for routing decision*/
+    inline virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
 
-     /** check whether given particle passes all cuts -> will be used for routing decision*/
-     inline virtual bool passSelectorCuts(const ISFParticle& particle) const;
+  private:
 
-    private:
+    mutable TRandom* m_random;
+  };
 
-     mutable TRandom* m_random;
-  }; 
-  
 }
 
 
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx b/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx
index 55c53a90559..e42f69684df 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.cxx
@@ -4,7 +4,7 @@
 
 ///////////////////////////////////////////////////////////////////
 // TruthAssocSimSelector.cxx, (c) ATLAS Detector software
-/////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////
 // class include
 #include "TruthAssocSimSelector.h"
 
@@ -14,12 +14,12 @@
 #include "ISF_Event/TruthBinding.h"
 
 /** Constructor **/
-ISF::TruthAssocSimSelector::TruthAssocSimSelector(const std::string& t, const std::string& n, const IInterface* p) : 
-  ISimulationSelector(t,n,p),
-  m_relativesVec(),
-  m_relatives(),
-  m_relationProp(0),
-  m_relation(HepMC::parents)
+ISF::TruthAssocSimSelector::TruthAssocSimSelector(const std::string& t, const std::string& n, const IInterface* p)
+  : ISimulationSelector(t,n,p)
+  , m_relativesVec()
+  , m_relatives()
+  , m_relationProp(0)
+  , m_relation(HepMC::parents)
 {
   declareInterface<ISF::ISimulationSelector>(this);
 
@@ -64,34 +64,35 @@ StatusCode  ISF::TruthAssocSimSelector::finalize()
 }
 
 
-bool  ISF::TruthAssocSimSelector::passSelectorCuts(const ISFParticle& particle) const {
+bool  ISF::TruthAssocSimSelector::passSelectorCuts(const ISFParticle& particle) const
+{
   // get the truth binding (as HepMC)
   const TruthBinding* truth = particle.getTruthBinding();
-  if (truth) {
-    // get GenParticle from truth binding
-    const HepMC::GenParticle* genParticle = truth->getTruthParticle();
-
-    if (genParticle) {
-      // test whether any of the pdg codes is found in the genParticle history
-      const HepMC::GenParticle* relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives);
-
-      // in case a relative was found
-      if (relative) {
-        // some output
-        ATH_MSG_VERBOSE("Particle (eta=" << particle.momentum().eta() << ", " 
-                        << " phi=" << particle.momentum().phi() << ","
-                        << " pdg=" << particle.pdgCode() << ","
-                        << " barcode=" << particle.barcode() << ")"
-                        << " passes due relative particle"
-                        << " (pdg=" << relative->pdg_id() << ","
-                        << " barcode=" << relative->barcode() << ")" );
-        // selector cuts passed
-        return true;
-      } // found relative
-    } // genParticle present
-  }
+  if (truth)
+    {
+      // get GenParticle from truth binding
+      const HepMC::GenParticle* genParticle = truth->getTruthParticle();
+      if (genParticle)
+        {
+          // test whether any of the pdg codes is found in the genParticle history
+          const HepMC::GenParticle* relative = HepMCHelper::findRealtiveWithPDG( *genParticle, m_relation, m_relatives);
+          // in case a relative was found
+          if (relative)
+            {
+              // some output
+              ATH_MSG_VERBOSE("Particle (eta=" << particle.momentum().eta() << ", "
+                              << " phi=" << particle.momentum().phi() << ","
+                              << " pdg=" << particle.pdgCode() << ","
+                              << " barcode=" << particle.barcode() << ")"
+                              << " passes due relative particle"
+                              << " (pdg=" << relative->pdg_id() << ","
+                              << " barcode=" << relative->barcode() << ")" );
+              // selector cuts passed
+              return true;
+            } // found relative
+        } // genParticle present
+    }
 
   // selector cuts not passed
   return false;
 }
-
diff --git a/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.h b/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.h
index 570a02aba25..9af986bd41b 100644
--- a/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.h
+++ b/Simulation/ISF/ISF_SimulationSelectors/src/TruthAssocSimSelector.h
@@ -19,44 +19,46 @@
 // HepMC includes
 #include "HepMC/IteratorRange.h"
 
-namespace ISF {
+namespace ISF
+{
 
   /** @class TruthAssocSimSelector
-  
+
       SimulationSelector using the TruthAssociation of ISFParticles, eg:
-       * check on parent particle
-       * check on production process
-  
+      * check on parent particle
+      * check on production process
+
       @author Elmar.Ritsch -at- cern.ch
-     */
-  class TruthAssocSimSelector : public ISimulationSelector {
-      
-    public: 
-     /** Constructor with parameters */
-     TruthAssocSimSelector( const std::string& t, const std::string& n, const IInterface* p );
-
-     /** Destructor */
-     ~TruthAssocSimSelector();
-
-     // Athena algtool's Hooks
-     virtual StatusCode  initialize();
-     virtual StatusCode  finalize();
-     
-     /** check whether given particle passes all cuts -> will be used for routing decision*/
-     virtual bool passSelectorCuts(const ISFParticle& particle) const;
-
-    private:
-      /** ISFParticle has to have a relative which is in this list */
-      std::vector<int>                      m_relativesVec; //!< Python property
-      std::set<int>                         m_relatives;    //!< used during runtime (faster)
-
-      
-      /** ISFParticle relation to the given pdg codes */
-      int                                   m_relationProp; //!< Python property
-      HepMC::IteratorRange                  m_relation;     //!< HepMC
-      
-  }; 
-  
+  */
+  class TruthAssocSimSelector : public ISimulationSelector
+  {
+
+  public:
+    /** Constructor with parameters */
+    TruthAssocSimSelector( const std::string& t, const std::string& n, const IInterface* p );
+
+    /** Destructor */
+    ~TruthAssocSimSelector();
+
+    // Athena algtool's Hooks
+    virtual StatusCode  initialize() override final;
+    virtual StatusCode  finalize() override final;
+
+    /** check whether given particle passes all cuts -> will be used for routing decision*/
+    virtual bool passSelectorCuts(const ISFParticle& particle) const override final;
+
+  private:
+    /** ISFParticle has to have a relative which is in this list */
+    std::vector<int>                      m_relativesVec; //!< Python property
+    std::set<int>                         m_relatives;    //!< used during runtime (faster)
+
+
+    /** ISFParticle relation to the given pdg codes */
+    int                                   m_relationProp; //!< Python property
+    HepMC::IteratorRange                  m_relation;     //!< HepMC
+
+  };
+
 }
 
 #endif //> !ISF_TOOLS_TRUTHASSOCSIMSELECTOR_H
-- 
GitLab