diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/CMakeLists.txt b/Reconstruction/RecoAlgs/IsolationAlgs/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..dcaf1d2a4b2b3401c43f6cf1c8bd85b6246a6b7e --- /dev/null +++ b/Reconstruction/RecoAlgs/IsolationAlgs/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################################ +# Package: IsolationAlgs +################################################################################ + +# Declare the package name: +atlas_subdir( IsolationAlgs ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + GaudiKernel + PRIVATE + Calorimeter/CaloEvent + Control/AthContainers + Control/AthenaBaseComps + Event/xAOD/xAODEgamma + Event/xAOD/xAODMuon + Event/xAOD/xAODPrimitives + Reconstruction/RecoTools/RecoToolInterfaces ) + +# External dependencies: +find_package( Boost COMPONENTS filesystem thread system ) + +# Component(s) in the package: +atlas_add_component( IsolationAlgs + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} GaudiKernel CaloEvent AthContainers AthenaBaseComps xAODEgamma xAODMuon xAODPrimitives RecoToolInterfaces ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/*.py ) + diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py index 31e17ca4f58bef2eff98aa9ad754f62d5b4f5246..20845da18a1979ab10a9b957792f3b16025c3a3d 100644 --- a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py +++ b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py @@ -168,10 +168,10 @@ tit.TrackSelectionTool.maxZ0SinTheta = 3 tit.TrackSelectionTool.minPt = 1000 tit.TrackSelectionTool.CutLevel = "Loose" -import ROOT, PyCintex +import ROOT, cppyy # Need to be sure base dict is loaded first. -PyCintex.loadDictionary('xAODCoreRflxDict') -PyCintex.loadDictionary('xAODPrimitivesDict') +cppyy.loadDictionary('xAODCoreRflxDict') +cppyy.loadDictionary('xAODPrimitivesDict') isoPar = ROOT.xAOD.Iso # In fact the default isolations are the same for eg and muons : prepare the list here @@ -236,7 +236,7 @@ class isoGetter ( Configured ) : print traceback.format_exc() return False - print self._isoBuilderHandle + #print self._isoBuilderHandle return True def isoBuilderHandle(self): diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.pyMod b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.pyMod index 5138f7467dfa127655c063b6e7897d0e87d71dae..cc7d28de14049aaecbb6c6fd21d90642504f037c 100644 --- a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.pyMod +++ b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.pyMod @@ -160,10 +160,10 @@ tit.TrackSelectionTool.maxZ0SinTheta = 3 tit.TrackSelectionTool.minPt = 1000 tit.TrackSelectionTool.CutLevel = "TightPrimary" -import ROOT, PyCintex +import ROOT, cppyy # Need to be sure base dict is loaded first. -PyCintex.loadDictionary('xAODCoreRflxDict') -PyCintex.loadDictionary('xAODPrimitivesDict') +cppyy.loadDictionary('xAODCoreRflxDict') +cppyy.loadDictionary('xAODPrimitivesDict') isoPar = ROOT.xAOD.Iso # In fact the default isolations are the same for eg and muons : prepare the list here diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx b/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx index 3964f9a56d2f4e321d6005fded5207cabb5ed79a..16230240a462ddbeb905a274aaf0e575fb6b4d75 100644 --- a/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx +++ b/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx @@ -38,7 +38,8 @@ IsolationBuilder::IsolationBuilder( const std::string& name, ISvcLocator* pSvcLocator ) : - ::AthAlgorithm( name, pSvcLocator ) + ::AthAlgorithm( name, pSvcLocator ), + m_cellColl (nullptr) { // // Property declaration @@ -77,7 +78,8 @@ StatusCode IsolationBuilder::initialize() for (unsigned int ii = 0; ii < nI; ii++) { std::vector<xAOD::Iso::IsolationType> isoTypes; std::vector<SG::AuxElement::Decorator<float>*> Deco; - xAOD::Iso::IsolationFlavour isoFlav; + xAOD::Iso::IsolationFlavour isoFlav = + xAOD::Iso::numIsolationFlavours; for (unsigned int jj = 0; jj < m_egisoInts[ii].size(); jj++) { int egIso = int(m_egisoInts[ii][jj]+0.5); xAOD::Iso::IsolationType isoType = static_cast<xAOD::Iso::IsolationType>(egIso); @@ -133,7 +135,8 @@ StatusCode IsolationBuilder::initialize() for (unsigned int ii = 0; ii < nI; ii++) { std::vector<xAOD::Iso::IsolationType> isoTypes; std::vector<SG::AuxElement::Decorator<float>*> Deco; - xAOD::Iso::IsolationFlavour isoFlav; + xAOD::Iso::IsolationFlavour isoFlav = + xAOD::Iso::numIsolationFlavours; for (unsigned int jj = 0; jj < m_muisoInts[ii].size(); jj++) { int muIso = int(m_muisoInts[ii][jj]+0.5); xAOD::Iso::IsolationType isoType = static_cast<xAOD::Iso::IsolationType>(muIso);