diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/CMakeLists.txt b/PhysicsAnalysis/EventTag/EventTagAlgs/CMakeLists.txt index ef2261762f0fabd7e3c5c9c4f49296ad5d7b9f73..43a7e5687eafbab6f9d512bfe26c473342bb0695 100644 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/CMakeLists.txt +++ b/PhysicsAnalysis/EventTag/EventTagAlgs/CMakeLists.txt @@ -18,8 +18,7 @@ atlas_depends_on_subdirs( PUBLIC PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools PhysicsAnalysis/EventTag/EventTagUtils PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools - PhysicsAnalysis/MuonID/MuonTagTools - PhysicsAnalysis/TauID/TauTagTools ) + PhysicsAnalysis/MuonID/MuonTagTools ) # External dependencies: find_package( CLHEP ) @@ -36,11 +35,10 @@ atlas_add_component( EventTagAlgs src/PhotonTagBuilder.cxx src/RawInfoSummaryTagBuilder.cxx src/TagBuilderBase.cxx - src/TauJetTagBuilder.cxx src/EventSplitter.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GaudiKernel TagEvent StoreGateLib SGtests xAODEventInfo AnalysisTriggerEvent ElectronPhotonTagToolsLib EventTagUtilsLib JetMissingEtTagToolsLib MuonTagToolsLib TauTagToolsLib ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GaudiKernel TagEvent StoreGateLib SGtests xAODEventInfo AnalysisTriggerEvent ElectronPhotonTagToolsLib EventTagUtilsLib JetMissingEtTagToolsLib MuonTagToolsLib ) # Install files from the package: atlas_install_headers( EventTagAlgs ) diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h b/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h index ecc5c3d507af756681a82619db840b0cc42ea450..26bf2ca7197b5dda53a50078f7dcbae6072ea690 100644 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h +++ b/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.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 */ /** @@ -23,7 +23,6 @@ EventTagAlgs contains the following algs/files: - MuonTagBuilder ... builder for Muon - ParticleJetTagBuilder ... builder for ParticleJet - PhotonTagBuilder ... builder for Photon -- TauJetTagBuilder ... builder for TauJet - EventTag_jobOptions.py ... contains all builder job options - It is possible to customize what goes in the TAG at runtime: look in EventTagFlags.py diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/share/EventTag_jobOptions.py b/PhysicsAnalysis/EventTag/EventTagAlgs/share/EventTag_jobOptions.py index 78f73c49363a8674a92345955a50c97f431077ed..078c7025e2303797a30b49dde0c6f7ea485ff6bb 100755 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/share/EventTag_jobOptions.py +++ b/PhysicsAnalysis/EventTag/EventTagAlgs/share/EventTag_jobOptions.py @@ -28,12 +28,9 @@ if EventTagFlags.doMuon(): except Exception: print traceback.format_exc() print "ERROR could not load MuonTagBuilder_jobOptions.py" + if EventTagFlags.doTauJet(): - try: - include( "EventTagAlgs/TauJetTagBuilder_jobOptions.py" ) - except Exception: - print traceback.format_exc() - print "ERROR could not load TauJetTagBuilder_jobOptions.py" + print("WARNING: TauJet no longer supported, get in touch with TauCP") if EventTagFlags.doParticleJet(): try: diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/share/TauJetTagBuilder_jobOptions.py b/PhysicsAnalysis/EventTag/EventTagAlgs/share/TauJetTagBuilder_jobOptions.py deleted file mode 100755 index c9ccef0f0832dbc21315548d0377bc6bb88cef49..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/share/TauJetTagBuilder_jobOptions.py +++ /dev/null @@ -1,15 +0,0 @@ -from EventTagAlgs.EventTagGlobal import EventTagGlobal - -if not EventTagGlobal.InitEventTagBuilder: - raise RunTimeError('EventTagBuilder has not been initialized') - -include ( "TauTagTools/TauJetTagTool_jobOptions.py" ) - -from EventTagAlgs.EventTagAlgsConf import TauJetTagBuilder -TauJetTagBuilder = TauJetTagBuilder( - name = "TauJetTagBuilder", - TauJetTagTool = TauJetTagTool, - AttributeList = EventTagGlobal.AttributeList, - MaxNumber = 4, - CheckAttribute = True) -topSequence += TauJetTagBuilder diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/src/TauJetTagBuilder.cxx b/PhysicsAnalysis/EventTag/EventTagAlgs/src/TauJetTagBuilder.cxx deleted file mode 100755 index 92639fe7aa241fe5d941abe8dc140864569b18d9..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/src/TauJetTagBuilder.cxx +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TauJetTagBuilder.h" - -#include "TagEvent/TauJetAttributeNames.h" - -#include "TagEvent/TagFragmentCollection.h" - -#include "AthenaPoolUtilities/AthenaAttributeListSpecification.h" -#include "AthenaPoolUtilities/TagAthenaAttributeList.h" - -#include <sstream> - -TauJetTagBuilder::TauJetTagBuilder( const std::string& name, ISvcLocator* pSvcLocator ) - : AthAlgorithm(name, pSvcLocator), - TagBuilderBase(), - m_tauJetTagTool("TauJetTagTool", this) { - declareProperty("TauJetTagTool", m_tauJetTagTool); - declareProperty("AttributeList", m_attributeListName); - declareProperty("MaxNumber", m_MAX_NUMBER = 2); - declareProperty("CheckAttribute", m_check = true); -} - - -TauJetTagBuilder::~TauJetTagBuilder() -{} - - -StatusCode TauJetTagBuilder::initialize() -{ - ATH_MSG_DEBUG( "Initializing " << name() ); - - ATH_CHECK( m_tauJetTagTool.retrieve() ); - - // define attributes - ATH_MSG_DEBUG( "Defining the attribute list specification." ); - - std::map<std::string,AthenaAttributeType> attrMap; - ATH_CHECK( m_tauJetTagTool->attributeSpecification(attrMap, m_MAX_NUMBER) ); - - std::map<std::string,AthenaAttributeType>::iterator bMap = attrMap.begin(); - std::map<std::string,AthenaAttributeType>::iterator eMap = attrMap.end(); - - /** remove un-wanted attributes from the map and fill the attribute list */ - for (; bMap != eMap; ++bMap) { - bool check = checkAttribute((*bMap).first, TauJetAttributeNames, TauID::NtauJetAttr, TauID::NumTauJet); - if (check) { - //m_attrMap[(*bMap).first] = ((*bMap).second).typeName(); - addAttribute( (*bMap).first, (*bMap).second ); - } else { - ATH_MSG_WARNING( "Removing " << (*bMap).first << " from the attribute List: not in TAG EDM" ); - } - } - - return StatusCode::SUCCESS; -} - - -StatusCode TauJetTagBuilder::execute() { - ATH_MSG_DEBUG( "Executing " << name() ); - - /** retrieve TagAthenaAttributeList */ - TagAthenaAttributeList* attribList; - ATH_CHECK( evtStore()->retrieve( attribList, m_attributeListName) ); - - /** clear the TauJetTagCollection and ask the tool to fill it */ - TagFragmentCollection tauJetTagColl; - StatusCode sc = m_tauJetTagTool->execute( tauJetTagColl, m_MAX_NUMBER ); - if (sc.isFailure()) { - ATH_MSG_WARNING( "Cannot Execute TauJetTagToool" ); - } else fillAttribute(attribList, tauJetTagColl); - - // decrease number of builders - TagBuilderBase::decNumOfBuilder(); - - // if this is the last builder, lock the Attribute List - if (TagBuilderBase::lastBuilder()) - sc = evtStore()->setConst(attribList); - - if (sc.isFailure()) - { - ATH_MSG_WARNING( "Could not set const to attribList" ); - } - - ATH_MSG_DEBUG( "Finished" << name() ); - - return StatusCode::SUCCESS; -} - - -StatusCode TauJetTagBuilder::finalize() -{ - return StatusCode::SUCCESS; -} diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/src/TauJetTagBuilder.h b/PhysicsAnalysis/EventTag/EventTagAlgs/src/TauJetTagBuilder.h deleted file mode 100755 index ce350da2d08648aacb716611b850fb7bfeef1c6b..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/src/TauJetTagBuilder.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef EVENTTAGALGS_TAUJETTAGBUILDER_H -#define EVENTTAGALGS_TAUJETTAGBUILDER_H - -/** - Tag Builder for TauJet -*/ - -#include "TauTagTools/TauJetTagTool.h" - -#include "GaudiKernel/ToolHandle.h" -#include "AthenaBaseComps/AthAlgorithm.h" -#include "EventTagAlgs/TagBuilderBase.h" - -class TauJetTagBuilder : public AthAlgorithm, public TagBuilderBase -{ -public: - - //! Standard constructor. - TauJetTagBuilder(const std::string& name, ISvcLocator* pSvcLocator); - - //! Destructor. - ~TauJetTagBuilder(); - - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); - -private: - - //! Attribute list name - std::string m_attributeListName; - - //! number of particles - int m_MAX_NUMBER; - - //! TauJet Tag Tool - ToolHandle<TauJetTagTool> m_tauJetTagTool; -}; - -#endif diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/src/components/EventTagBuilder_entries.cxx b/PhysicsAnalysis/EventTag/EventTagAlgs/src/components/EventTagBuilder_entries.cxx index 2f208cd48ef1a5cf46aca7efeda6b2ea6e50ca9b..c996be3f32524c88816c24942a0d04d1df929585 100644 --- a/PhysicsAnalysis/EventTag/EventTagAlgs/src/components/EventTagBuilder_entries.cxx +++ b/PhysicsAnalysis/EventTag/EventTagAlgs/src/components/EventTagBuilder_entries.cxx @@ -5,7 +5,6 @@ #include "../GlobalTriggerTagBuilder.h" #include "../MuonTagBuilder.h" #include "../PhotonTagBuilder.h" -#include "../TauJetTagBuilder.h" #include "../MissingETTagBuilder.h" #include "../ParticleJetTagBuilder.h" @@ -19,7 +18,6 @@ DECLARE_COMPONENT( GlobalEventTagBuilder ) DECLARE_COMPONENT( GlobalTriggerTagBuilder ) DECLARE_COMPONENT( MuonTagBuilder ) DECLARE_COMPONENT( PhotonTagBuilder ) -DECLARE_COMPONENT( TauJetTagBuilder ) DECLARE_COMPONENT( ParticleJetTagBuilder ) DECLARE_COMPONENT( MissingETTagBuilder ) diff --git a/PhysicsAnalysis/TauID/TauTagTools/CMakeLists.txt b/PhysicsAnalysis/TauID/TauTagTools/CMakeLists.txt deleted file mode 100644 index 8ff3a7276e57219c06c3a6002b87c1b2f4098a8c..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################ -# Package: TauTagTools -################################################################################ - -# Declare the package name: -atlas_subdir( TauTagTools ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Database/AthenaPOOL/AthenaPoolUtilities - GaudiKernel - PhysicsAnalysis/EventTag/TagEvent - PhysicsAnalysis/TauID/TauAnalysisTools - PRIVATE - Control/StoreGate - Event/xAOD/xAODTau - PhysicsAnalysis/AnalysisCommon/AnalysisUtils ) - -# External dependencies: -find_package( CLHEP ) - -# Component(s) in the package: -atlas_add_library( TauTagToolsLib - src/*.cxx - PUBLIC_HEADERS TauTagTools - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES AthenaBaseComps AthenaPoolUtilities GaudiKernel TagEvent StoreGateLib SGtests AnalysisUtilsLib TauAnalysisToolsLib - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} xAODTau ) - -atlas_add_component( TauTagTools - src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GaudiKernel TagEvent StoreGateLib SGtests xAODTau AnalysisUtilsLib TauTagToolsLib ) - -# Install files from the package: -atlas_install_joboptions( share/*.py ) - diff --git a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h b/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h deleted file mode 100755 index f914f591c64dad77b3ed67b3cd1bb90ccbb05df3..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauIdentificationTagTool.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TAUIDENTIFICATIONTAGTOOL_H -#define TAUIDENTIFICATIONTAGTOOL_H - -/***************************************************************************** -Name : TauIdentificationTagTool.h -Package : offline/PhysicsAnalysis/TauID/TauTagTools -Author : Ketevi A. Assamagan -Created : January 2006 -Purpose : build the TauIdentification Tag object - AnalysisTag.h. - The TauIdentification Analysis Tag fragment is built here - Different tau identification method information can be encoded in this word -*****************************************************************************/ - -#include "AthenaBaseComps/AthAlgTool.h" -#include "TagEvent/TagFragmentCollection.h" -#include "AthenaPoolUtilities/AthenaAttributeSpecification.h" - -#include <map> - -/** Interface ID for TauIdentificationTagTool*/ -static const InterfaceID IID_TauIdentificationTagTool("TauIdentificationTagTool", 1, 0); - -class TauIdentificationTagTool : public AthAlgTool { - -public: - - /** Standard Constructor */ - TauIdentificationTagTool(const std::string& type, const std::string& name, const IInterface* parent); - - /** AlgTool and IAlgTool interface methods */ - static const InterfaceID& interfaceID( ) { return IID_TauIdentificationTagTool; }; - - /** Overriding initialize, finalize and execute */ - virtual StatusCode initialize(); - virtual StatusCode attributeSpecification(std::map<std::string, AthenaAttributeType>& attrMap, const int max); - virtual StatusCode execute(TagFragmentCollection& tauIdTagCol, const int max); - virtual StatusCode finalize(); - -private: - - /** Properties */ - std::string m_tauJetContainerName; - double m_tauJetPtCut; - double m_likelihood; - double m_hadEnergyFrac; - }; - -#endif // TAUIDENTIFICATIONTAGTOOL_H - diff --git a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h b/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h deleted file mode 100755 index c47efe345ef44fd47473f8a77b6e74038153e198..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/TauTagTools/TauJetTagTool.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TAUJETTAGTOOL_H -#define TAUJETTAGTOOL_H - -/***************************************************************************** -Name : TauJetTagTool.h -Package : offline/PhysicsAnalysis/TauID/TauTagTools -Purpose : build the TauJet Tag objects - TauJetTagCollection.h. - The TauJet Tag fragment is built here -*****************************************************************************/ - -// Framework includes -#include "GaudiKernel/ToolHandle.h" -#include "AthenaBaseComps/AthAlgTool.h" - -#include "TagEvent/TagFragmentCollection.h" -#include "AthenaPoolUtilities/AthenaAttributeSpecification.h" -#include "TauAnalysisTools/ITauSelectionTool.h" - -#include <map> - -/** Interface ID for TauJetTagTool*/ -static const InterfaceID IID_TauJetTagTool("TauJetTagTool", 1, 0); - -class TauJetTagTool : public AthAlgTool { - -public: - - /** Standard Constructor */ - TauJetTagTool(const std::string& type, const std::string& name, const IInterface* parent); - - /** AlgTool and IAlgTool interface methods */ - static const InterfaceID& interfaceID( ) { return IID_TauJetTagTool; }; - - /** Overriding initialize, finalize and execute */ - virtual StatusCode initialize(); - virtual StatusCode attributeSpecification(std::map<std::string,AthenaAttributeType>& attrMap, const int max); - virtual StatusCode execute(TagFragmentCollection& tauJetTagCol, const int max); - virtual StatusCode finalize(); - -private: - - /** Properties */ - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_eleBDTLoose; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_eleBDTMedium; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_eleBDTTight; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_muonVeto; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_jetBDTLoose; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_jetBDTMedium; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_jetBDTTight; - // ToolHandle<TauAnalysisTools::ITauSelectionTool> m_jetLLHLoose; - // ToolHandle<TauAnalysisTools::ITauSelectionTool> m_jetLLHMedium; - // ToolHandle<TauAnalysisTools::ITauSelectionTool> m_jetLLHTight; - ToolHandle<TauAnalysisTools::ITauSelectionTool> m_eleOLR; - - double m_tauJetPtCut; - - std::string m_containerName; - - /** the attribute names */ - std::vector<std::string> m_ptStr; - std::vector<std::string> m_etaStr; - std::vector<std::string> m_phiStr; - std::vector<std::string> m_ntrkStr; - std::vector<std::string> m_pidStr; - }; - -#endif // TAUJETTAGTOOL_H - diff --git a/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h b/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h deleted file mode 100644 index 40246eb08cf3be8e879f0c06d7383e41abf6c091..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** -@page TauTagTools_page TauTagTools - -@section TauTagTools_introductionTauTagTools Introduction -This package contains the alg tools for building the tag fragments for TauJet and Tau identification - -@section TauTagTools_packagecontentTauTagTools Package Contents -TauTagTools contains the following tools: - -- TauIdenitificationTagTool ... tool for Tau identification TAG fragment -- TauJetTagTool ...tool for TauJet TAG fragment - -- for questions and comments: ketevi@bnl.gov - - - -*/ diff --git a/PhysicsAnalysis/TauID/TauTagTools/share/TauIdentificationTagTool_jobOptions.py b/PhysicsAnalysis/TauID/TauTagTools/share/TauIdentificationTagTool_jobOptions.py deleted file mode 100755 index 86187c950991e51434fe9212847b0762558a43ca..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/share/TauIdentificationTagTool_jobOptions.py +++ /dev/null @@ -1,12 +0,0 @@ -include.block ("TauTagTools/TauIdentificationTagTool_jobOptions.py") - -########### Tau Identification tag options ################ - -from TauTagTools.TauTagToolsConf import \ -TauIdentificationTagTool as ConfiguredTauIdTagTool -TauIdentificationTagTool=ConfiguredTauIdTagTool( - Container = "TauJets", - EtCut = 15.0*GeV, - Likelihood = -6.0, - HadEnergyFrac = 0.9) -ToolSvc += TauIdentificationTagTool diff --git a/PhysicsAnalysis/TauID/TauTagTools/share/TauJetTagTool_jobOptions.py b/PhysicsAnalysis/TauID/TauTagTools/share/TauJetTagTool_jobOptions.py deleted file mode 100755 index b87dbf34439a1e7201bfe20a973bbad8ff925335..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/share/TauJetTagTool_jobOptions.py +++ /dev/null @@ -1,82 +0,0 @@ - -include.block ("TauTagTools/TauJetTagTool_jobOptions.py") - -########### TauJet tag options ################ - -from TauAnalysisTools.TauAnalysisToolsConf import TauAnalysisTools__TauSelectionTool - -# NB: numerical values for SelectionCuts argument are defined here: -# https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-00-01-03/TauAnalysisTools/TauSelectionTool.h#L53 - -EleBDTLooseTauSelectionTool = TauAnalysisTools__TauSelectionTool("EleBDTLooseTauSelectionTool") -EleBDTLooseTauSelectionTool.SelectionCuts = 1<<8 # CutEleBDTWP -EleBDTLooseTauSelectionTool.EleBDTWP = 2 # ELEIDBDTLOOSE -ToolSvc += EleBDTLooseTauSelectionTool - -EleBDTMediumTauSelectionTool = TauAnalysisTools__TauSelectionTool("EleBDTMediumTauSelectionTool") -EleBDTMediumTauSelectionTool.SelectionCuts = 1<<8 # CutEleBDTWP -EleBDTMediumTauSelectionTool.EleBDTWP = 3 # ELEIDBDTMEDIUM -ToolSvc += EleBDTMediumTauSelectionTool - -EleBDTTightTauSelectionTool = TauAnalysisTools__TauSelectionTool("EleBDTTightTauSelectionTool") -EleBDTTightTauSelectionTool.SelectionCuts = 1<<8 # CutEleBDTWP -EleBDTTightTauSelectionTool.EleBDTWP = 4 # ELEIDBDTTIGHT -ToolSvc += EleBDTTightTauSelectionTool - -MuonVetoTauSelectionTool = TauAnalysisTools__TauSelectionTool("MuonVetoTauSelectionTool") -MuonVetoTauSelectionTool.SelectionCuts = 1<<9 # CutMuonVeto -ToolSvc += MuonVetoTauSelectionTool - -JetBDTSigLooseTauSelectionTool = TauAnalysisTools__TauSelectionTool("JetBDTSigLooseTauSelectionTool") -JetBDTSigLooseTauSelectionTool.SelectionCuts = 1<<6 # CutJetIDWP -JetBDTSigLooseTauSelectionTool.JetIDWP = 2 # JETIDBDTLOOSE -ToolSvc += JetBDTSigLooseTauSelectionTool - -JetBDTSigMediumTauSelectionTool = TauAnalysisTools__TauSelectionTool("JetBDTSigMediumTauSelectionTool") -JetBDTSigMediumTauSelectionTool.SelectionCuts = 1<<6 # CutJetIDWP -JetBDTSigMediumTauSelectionTool.JetIDWP = 3 # JETIDBDTMEDIUM -ToolSvc += JetBDTSigMediumTauSelectionTool - -JetBDTSigTightTauSelectionTool = TauAnalysisTools__TauSelectionTool("JetBDTSigTightTauSelectionTool") -JetBDTSigTightTauSelectionTool.SelectionCuts = 1<<6 # CutJetIDWP -JetBDTSigTightTauSelectionTool.JetIDWP = 4 # JETIDBDTTIGHT -ToolSvc += JetBDTSigTightTauSelectionTool - -# JetLLHSigLooseTauSelectionTool = TauAnalysisTools__TauSelectionTool("JetLLHSigLooseTauSelectionTool") -# JetLLHSigLooseTauSelectionTool.SelectionCuts = 1<<6 # CutJetIDWP -# JetLLHSigLooseTauSelectionTool.JetIDWP = 7 # JETIDLLHLOOSE -# ToolSvc += JetLLHSigLooseTauSelectionTool - -# JetLLHSigMediumTauSelectionTool = TauAnalysisTools__TauSelectionTool("JetLLHSigMediumTauSelectionTool") -# JetLLHSigMediumTauSelectionTool.SelectionCuts = 1<<6 # CutJetIDWP -# JetLLHSigMediumTauSelectionTool.JetIDWP = 8 # JETIDLLHMEDIUM -# ToolSvc += JetLLHSigMediumTauSelectionTool - -# JetLLHSigTightTauSelectionTool = TauAnalysisTools__TauSelectionTool("JetLLHSigTightTauSelectionTool") -# JetLLHSigTightTauSelectionTool.SelectionCuts = 1<<6 # CutJetIDWP -# JetLLHSigTightTauSelectionTool.JetIDWP = 9 # JETIDLLHTIGHT -# ToolSvc += JetLLHSigTightTauSelectionTool - -EleOLRTauSelectionTool = TauAnalysisTools__TauSelectionTool("EleOLRTauSelectionTool") -EleOLRTauSelectionTool.SelectionCuts = 1<<10 # CutEleOLR -EleOLRTauSelectionTool.EleOLR = True -ToolSvc += EleOLRTauSelectionTool - -from TauTagTools.TauTagToolsConf import \ -TauJetTagTool as ConfiguredTauJetTagTool -TauJetTagTool=ConfiguredTauJetTagTool( - Container = "TauJets", - EtCut = 20.0*GeV, - EleBDTLooseTauSelectionTool = EleBDTLooseTauSelectionTool, - EleBDTMediumTauSelectionTool = EleBDTMediumTauSelectionTool, - EleBDTTightTauSelectionTool = EleBDTTightTauSelectionTool, - MuonVetoTauSelectionTool = MuonVetoTauSelectionTool, - JetBDTSigLooseTauSelectionTool = JetBDTSigLooseTauSelectionTool, - JetBDTSigMediumTauSelectionTool = JetBDTSigMediumTauSelectionTool, - JetBDTSigTightTauSelectionTool = JetBDTSigTightTauSelectionTool, - # JetLLHSigLooseTauSelectionTool = JetLLHSigLooseTauSelectionTool, - # JetLLHSigMediumTauSelectionTool = JetLLHSigMediumTauSelectionTool, - # JetLLHSigTightTauSelectionTool = JetLLHSigTightTauSelectionTool, - EleOLRTauSelectionTool = EleOLRTauSelectionTool - ) -ToolSvc += TauJetTagTool diff --git a/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx b/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx deleted file mode 100755 index b2acfcfd0da6db7fb3d0b8a3c7f6e3de808b6563..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/src/TauIdentificationTagTool.cxx +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/***************************************************************************** -Name : TauIdentificationTagTool.cxx -Package : offline/PhysicsAnalysis/TauID/TauTagTools -Author : Ketevi A. Assamagan -Created : January 2006 -Purpose : create a TauIdentificationTag - word to encode tauJet specific informations -*****************************************************************************/ - -#include "Gaudi/Property.h" -#include "CLHEP/Units/SystemOfUnits.h" - -#include "TauTagTools/TauIdentificationTagTool.h" -#include "TagEvent/TauIdentificationAttributeNames.h" -#include "AthenaPoolUtilities/AthenaAttributeSpecification.h" - -/** the constructor */ -TauIdentificationTagTool::TauIdentificationTagTool (const std::string& type, const std::string& name, - const IInterface* parent) : - AthAlgTool( type, name, parent ) { - - /** TauJet AOD Container Names */ - declareProperty("Container", m_tauJetContainerName = "TauJetCollection"); - - /** selection cut - modifiable in job options */ - declareProperty("EtCut", m_tauJetPtCut = 15.0*CLHEP::GeV); - declareProperty("Likelihood", m_likelihood = -6.0); - declareProperty("HadEnergyFrac",m_hadEnergyFrac = 0.9); - - declareInterface<TauIdentificationTagTool>( this ); -} - -/** initialization - called once at the begginning */ -StatusCode TauIdentificationTagTool::initialize() { - ATH_MSG_DEBUG( "in intialize()" ); - return StatusCode::SUCCESS; -} - -/** build the attribute list - called in initialize */ -StatusCode TauIdentificationTagTool::attributeSpecification(std::map<std::string,AthenaAttributeType>& attrMap, - const int max) { - - ATH_MSG_DEBUG( "in attributeSpecification()" ); - - /** specifiy the TauId the attributes */ - - attrMap[ TauIdAttributeNames[0] ] = AthenaAttributeType("unsigned int", TauIdAttributeUnitNames[0] , TauIdAttributeGroupNames[0] ); - - /** add more stuff if necessary */ - for (int i=0; i<max; ++i) {} - - return StatusCode::SUCCESS; -} - -/** execute - called on every event */ -StatusCode TauIdentificationTagTool::execute(TagFragmentCollection& tauIdTagCol, const int max) { - - ATH_MSG_DEBUG( "in execute()" ); - - /** fill the TauIdPhys analysis tag */ - - unsigned int fragment = 0x0; - tauIdTagCol.insert( TauIdAttributeNames[0], fragment ); - - /** add more stuff if necessary */ - for (int i=0; i<max; ++i) {} - - return StatusCode::SUCCESS; -} - -/** finialize - called once at the end */ -StatusCode TauIdentificationTagTool::finalize() { - ATH_MSG_DEBUG( "in finalize()" ); - return StatusCode::SUCCESS; -} diff --git a/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx b/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx deleted file mode 100755 index 75d0d88bf573eca4463a267f8c4f5d5317f9e00f..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/src/TauJetTagTool.cxx +++ /dev/null @@ -1,213 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/***************************************************************************** -Name : TauJetTagTool.cxx -Package : offline/PhysicsAnalysis/TauID/TauTagTools -Purpose : create a collection of TauJetTag - -*****************************************************************************/ - -#include "Gaudi/Property.h" - -#include "StoreGate/StoreGateSvc.h" - -#include "xAODTau/TauJetContainer.h" - -#include "TauTagTools/TauJetTagTool.h" -#include "TagEvent/TauJetAttributeNames.h" -#include "AnalysisUtils/AnalysisMisc.h" -#include "AthenaPoolUtilities/AthenaAttributeSpecification.h" - -#include "TauAnalysisTools/ITauSelectionTool.h" - -#include <sstream> - -//using namespace Analysis; - -/** the constructor */ -TauJetTagTool::TauJetTagTool (const std::string& type, const std::string& name, - const IInterface* parent) : - AthAlgTool( type, name, parent ), - m_eleBDTLoose(), - m_eleBDTMedium(), - m_eleBDTTight(), - m_muonVeto(), - m_jetBDTLoose(), - m_jetBDTMedium(), - m_jetBDTTight(), - // m_jetLLHLoose(), - // m_jetLLHMedium(), - // m_jetLLHTight(), - m_eleOLR(), - m_tauJetPtCut(15000.), - m_containerName() -{ - - /** TauJet AOD Container Name */ - declareProperty("Container", m_containerName); - - /** selection cut of Pt */ - declareProperty("EtCut", m_tauJetPtCut = 15.0*CLHEP::GeV); - - /** selection tool */ - declareProperty("EleBDTLooseTauSelectionTool", m_eleBDTLoose ); - declareProperty("EleBDTMediumTauSelectionTool", m_eleBDTMedium); - declareProperty("EleBDTTightTauSelectionTool", m_eleBDTTight ); - declareProperty("MuonVetoTauSelectionTool", m_muonVeto ); - declareProperty("JetBDTSigLooseTauSelectionTool", m_jetBDTLoose ); - declareProperty("JetBDTSigMediumTauSelectionTool", m_jetBDTMedium); - declareProperty("JetBDTSigTightTauSelectionTool", m_jetBDTTight ); - // declareProperty("JetLLHSigLooseTauSelectionTool", m_jetLLHLoose ); - // declareProperty("JetLLHSigMediumTauSelectionTool", m_jetLLHMedium); - // declareProperty("JetLLHSigTightTauSelectionTool", m_jetLLHTight ); - declareProperty("EleOLRTauSelectionTool", m_eleOLR ); - - declareInterface<TauJetTagTool>( this ); -} - -/** initialization - called once at the begginning */ -StatusCode TauJetTagTool::initialize() { - ATH_MSG_DEBUG( "in intialize()" ); - ATH_CHECK(m_eleBDTLoose.retrieve()); - ATH_CHECK(m_eleBDTMedium.retrieve()); - ATH_CHECK(m_eleBDTTight.retrieve()); - ATH_CHECK(m_muonVeto.retrieve()); - ATH_CHECK(m_jetBDTLoose.retrieve()); - ATH_CHECK(m_jetBDTMedium.retrieve()); - ATH_CHECK(m_jetBDTTight.retrieve()); - ATH_CHECK(m_eleOLR.retrieve()); - return StatusCode::SUCCESS; -} - -/** finalize - called once at the end */ -StatusCode TauJetTagTool::finalize() { - ATH_MSG_DEBUG( "in finalize()" ); - return StatusCode::SUCCESS; -} - -/** build the attribute list - called in initialize */ -StatusCode TauJetTagTool::attributeSpecification(std::map<std::string,AthenaAttributeType>& attrMap, - const int max) { - - ATH_MSG_DEBUG( "in attributeSpecification()" ); - - - /** specifiy the TauJet the attributes */ - - /** number of TauJet */ - attrMap[ TauJetAttributeNames[TauID::NTau] ] = AthenaAttributeType("unsigned int", TauJetAttributeUnitNames[TauID::NTau], TauJetAttributeGroupNames[TauID::NTau]); - - std::ostringstream os; - for (int i=1; i<= max; ++i) { - - /** pt */ - os.str(""); - os << TauJetAttributeNames[TauID::Pt] << std::dec << i; - attrMap[ os.str() ] = AthenaAttributeType("float", TauJetAttributeUnitNames[TauID::Pt], TauJetAttributeGroupNames[TauID::Pt]); - m_ptStr.push_back( os.str() ); - - - /** eta */ - os.str(""); - os << TauJetAttributeNames[TauID::Eta] << std::dec << i; - attrMap[ os.str() ] = AthenaAttributeType("float", TauJetAttributeUnitNames[TauID::Eta], TauJetAttributeGroupNames[TauID::Eta]); - m_etaStr.push_back( os.str() ); - - - /** phi */ - os.str(""); - os << TauJetAttributeNames[TauID::Phi] << std::dec << i; - attrMap[ os.str() ] = AthenaAttributeType("float", TauJetAttributeUnitNames[TauID::Phi], TauJetAttributeGroupNames[TauID::Phi]); - m_phiStr.push_back( os.str() ); - - - /** PID bitmask */ - os.str(""); - os << TauJetAttributeNames[TauID::PID] << std::dec << i; - attrMap[ os.str() ] = AthenaAttributeType("unsigned int", TauJetAttributeUnitNames[TauID::PID], TauJetAttributeGroupNames[TauID::PID]); - m_pidStr.push_back( os.str() ); - - - } - - return StatusCode::SUCCESS; -} - -/** execute - called on every event */ -StatusCode TauJetTagTool::execute(TagFragmentCollection& tauJetTagColl, const int max) { - - ATH_MSG_DEBUG( "in execute()" ); - - /** retrieve the AOD tauJet container */ - const xAOD::TauJetContainer *tauJetContainer; - StatusCode sc = evtStore()->retrieve( tauJetContainer, m_containerName); - if (sc.isFailure()) { - ATH_MSG_WARNING( "No AOD TauJet container found in SG" ); - return StatusCode::SUCCESS; - } - ATH_MSG_DEBUG( "AOD TauJet container successfully retrieved" ); - - xAOD::TauJetContainer userContainer( SG::VIEW_ELEMENTS ); - userContainer = *tauJetContainer; - AnalysisUtils::Sort::pT( &userContainer ); - - /** make the selection */ - int i=0; - xAOD::TauJetContainer::const_iterator tauJetItr = userContainer.begin(); - xAOD::TauJetContainer::const_iterator tauJetItrE = userContainer.end(); - - for (; tauJetItr != tauJetItrE && i< max; ++tauJetItr) { - - ATH_MSG_DEBUG( "Before the tau selection" ); - - bool select = ( (*tauJetItr)->pt() > m_tauJetPtCut ) && // pt cut - ( (*tauJetItr)->nTracks()==1 || (*tauJetItr)->nTracks()==3 ) && // 1 or 3 tracks - ( fabs((*tauJetItr)->charge()) == 1.0 ) && // right charge - ( m_jetBDTLoose->accept(**tauJetItr) ); // loose BDT preselection - - if ( select ) { - - ATH_MSG_DEBUG( "Filling selected tau" ); - - /** pt */ - tauJetTagColl.insert( m_ptStr[i], (*tauJetItr)->pt() * (*tauJetItr)->charge() ); - - /** eta */ - tauJetTagColl.insert( m_etaStr[i], (*tauJetItr)->eta() ); - - /** phi */ - tauJetTagColl.insert( m_phiStr[i], (*tauJetItr)->phi() ); - - /** PID */ - unsigned int pid = 0; - if ((*tauJetItr)->nTracks()==1) pid |= 1<<0; - if ((*tauJetItr)->nTracks()==3) pid |= 1<<1; - - if (m_eleBDTLoose->accept(**tauJetItr)) pid |= 1<<8; - if (m_eleBDTMedium->accept(**tauJetItr)) pid |= 1<<9; - if (m_eleBDTTight->accept(**tauJetItr)) pid |= 1<<10; - if (m_muonVeto->accept(**tauJetItr)) pid |= 1<<11; - if (m_jetBDTLoose->accept(**tauJetItr)) pid |= 1<<17; - if (m_jetBDTMedium->accept(**tauJetItr)) pid |= 1<<12; - if (m_jetBDTTight->accept(**tauJetItr)) pid |= 1<<13; - // if (m_jetLLHLoose->accept(**tauJetItr)) pid |= 1<<14; - // if (m_jetLLHMedium->accept(**tauJetItr)) pid |= 1<<15; - // if (m_jetLLHTight->accept(**tauJetItr)) pid |= 1<<16; - if (m_eleOLR->accept(**tauJetItr)) pid |= 1<<18; - - tauJetTagColl.insert( m_pidStr[i], pid ); - - /** we got one more tau written */ - i++; - - } - - } - - /** number of selected TauJet */ - tauJetTagColl.insert(TauJetAttributeNames[TauID::NTau], i); - - return StatusCode::SUCCESS; -} diff --git a/PhysicsAnalysis/TauID/TauTagTools/src/components/TauTagTools_entries.cxx b/PhysicsAnalysis/TauID/TauTagTools/src/components/TauTagTools_entries.cxx deleted file mode 100644 index bd6eae00175f75a14c82d06b07abd2da3e8f74b9..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauTagTools/src/components/TauTagTools_entries.cxx +++ /dev/null @@ -1,8 +0,0 @@ -#include "TauTagTools/TauIdentificationTagTool.h" -#include "TauTagTools/TauJetTagTool.h" - - -DECLARE_COMPONENT( TauIdentificationTagTool ) -DECLARE_COMPONENT( TauJetTagTool ) - -