diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx index 29958ae6bf57c0b3052c3d96dac8f98bb69b7827..ff5c0643b4f09270f67f6a97ad2a47055cf38e5f 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -208,8 +208,7 @@ bool SelectionCutAbsCharge::accept(const xAOD::TauJet& xTau, for( unsigned int iCharge = 0; iCharge < m_tTST->m_vAbsCharges.size(); iCharge++ ) { if ( std::abs( xTau.charge() ) == m_tTST->m_vAbsCharges.at(iCharge) ) - { - acceptData.setCutResult( "AbsCharge", true ); + {acceptData.setCutResult( "AbsCharge", true ); return true; } } @@ -488,12 +487,18 @@ SelectionCutBDTEleScore::SelectionCutBDTEleScore(TauSelectionTool* tTST) { m_hHistCutPre = CreateControlPlot("hEleBDT_pre","EleBDT_pre;BDTEleScore; events",100,0,1); m_hHistCut = CreateControlPlot("hEleBDT_cut","EleBDT_cut;BDTEleScore; events",100,0,1); - m_sEleBDTDecorationName = "BDTEleScoreSigTrans"; + m_sEleBDTDecorationName = "BDTEleScoreSigTrans_retuned"; } //______________________________________________________________________________ void SelectionCutBDTEleScore::fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) { + if (!xTau.isAvailable< float >(m_sEleBDTDecorationName)) + { + throw std::runtime_error(("Decoration " + m_sEleBDTDecorationName + " is not available in input sample. " + + "\nThis may be due to an old p-tag. Please consider using a different eleBDT working point, e.g. ELEIDBDTOLDLOOSE or ELEIDBDTOLDMEDIUM" + + "\nFor further information please refer to the README:\nhttps://gitlab.cern.ch/atlas/athena/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst\n").c_str() ); + } SG::AuxElement::ConstAccessor<float> accEleBDT(m_sEleBDTDecorationName); hHist.Fill(accEleBDT(xTau)); } @@ -509,7 +514,14 @@ bool SelectionCutBDTEleScore::accept(const xAOD::TauJet& xTau, asg::AcceptData& acceptData) { // check EleBDTscore, if tau has a EleBDT score in one of the regions requiered then return true; false otherwise + if (!xTau.isAvailable< float >(m_sEleBDTDecorationName)) + { + throw std::runtime_error (("Decoration " + m_sEleBDTDecorationName + " is not available in input sample. " + + "\nThis may be due to an old p-tag. Please consider using a different eleBDT working point, e.g. ELEIDBDTOLDLOOSE or ELEIDBDTOLDMEDIUM" + + "\nFor further information please refer to the README:\nhttps://gitlab.cern.ch/atlas/athena/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst\n").c_str()); + } SG::AuxElement::ConstAccessor<float> accEleBDT(m_sEleBDTDecorationName); + float fEleBDTScore = accEleBDT(xTau); unsigned int iNumEleBDTRegion = m_tTST->m_vEleBDTRegion.size()/2; // apply EleBDTscore cut only to 1-prong taus @@ -536,6 +548,14 @@ SelectionCutEleBDTWP::SelectionCutEleBDTWP(TauSelectionTool* tTST) : SelectionCut("CutEleBDTWP", tTST), m_sEleBDTDecorationName ("BDTEleScoreSigTrans") { + m_sEleBDTDecorationName = "BDTEleScoreSigTrans_retuned"; + + if (m_tTST->m_iEleBDTWP == int(ELEIDBDTOLDLOOSE) || + m_tTST->m_iEleBDTWP == int(ELEIDBDTOLDMEDIUM)) + { + m_sEleBDTDecorationName = "BDTEleScoreSigTrans"; + } + m_hHistCutPre = CreateControlPlot("hEleBDTWP_pre","EleBDTWP_pre;; events",6,-.5,5.5); m_hHistCut = CreateControlPlot("hEleBDTWP_cut","EleBDTWP_cut;; events",6,-.5,5.5); // only proceed if histograms are defined @@ -558,6 +578,13 @@ SelectionCutEleBDTWP::SelectionCutEleBDTWP(TauSelectionTool* tTST) //______________________________________________________________________________ void SelectionCutEleBDTWP::fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) { + if (!xTau.isAvailable< float >(m_sEleBDTDecorationName)) + { + throw std::runtime_error(("Decoration " + m_sEleBDTDecorationName + " is not available in input sample. " + + "\nThis may be due to an old p-tag. Please consider using a different eleBDT working point, e.g. ELEIDBDTOLDLOOSE or ELEIDBDTOLDMEDIUM" + + "\nFor further information please refer to the README:\nhttps://gitlab.cern.ch/atlas/athena/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst\n").c_str()); + } + SG::AuxElement::ConstAccessor<float> accEleBDT(m_sEleBDTDecorationName); float fEleBDTScore = accEleBDT(xTau); @@ -576,8 +603,22 @@ bool SelectionCutEleBDTWP::accept(const xAOD::TauJet& xTau, asg::AcceptData& acceptData) { // check EleBDTscore, if tau passes EleBDT working point then return true; false otherwise - SG::AuxElement::ConstAccessor<float> accEleBDT(m_sEleBDTDecorationName); - float fEleBDTScore = accEleBDT(xTau); + + float fEleBDTScore = 0.; + if (!(m_tTST->m_iEleBDTWP == ELEIDNONE || m_tTST->m_iEleBDTWP == ELEIDNONEUNCONFIGURED)) + { + if (!xTau.isAvailable< float >(m_sEleBDTDecorationName)) + { + throw std::runtime_error(("Decoration " + m_sEleBDTDecorationName + " is not available in input sample. " + + "\nThis may be due to an old p-tag. Please consider using a different eleBDT working point, e.g. ELEIDBDTOLDLOOSE or ELEIDBDTOLDMEDIUM" + + "\nFor further information please refer to the README:\nhttps://gitlab.cern.ch/atlas/athena/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst").c_str()); + } + else + { + SG::AuxElement::ConstAccessor<float> accEleBDT(m_sEleBDTDecorationName); + fEleBDTScore = accEleBDT(xTau); + } + } bool bPass = false; switch (m_tTST->m_iEleBDTWP) @@ -594,6 +635,15 @@ bool SelectionCutEleBDTWP::accept(const xAOD::TauJet& xTau, case ELEIDBDTMEDIUM: if (fEleBDTScore > 0.15) bPass = true; break; + case ELEIDBDTTIGHT: + if (fEleBDTScore > 0.25) bPass = true; + break; + case ELEIDBDTOLDLOOSE: + if (fEleBDTScore > 0.05) bPass = true; + break; + case ELEIDBDTOLDMEDIUM: + if (fEleBDTScore > 0.15) bPass = true; + break; default: m_tTST->msg() << MSG::WARNING << "The electron ID working point with the enum "<<m_tTST->m_iEleBDTWP<<" is not available" << endmsg; break; diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx index a3dffb162b5d486a12070ba38d69f8d3874d8db5..eb19c62b7b239ebea5881a143c1731022d4816d0 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx @@ -135,7 +135,7 @@ StatusCode TauEfficiencyCorrectionsTool::initializeWithTauSelectionTool() if ( m_tTauSelectionTool->m_iEleBDTWP == ELEIDBDTMEDIUM) m_iOLRLevel = ELEBDTMEDIUMPLUSVETO; if ( m_tTauSelectionTool->m_iEleBDTWP == ELEIDBDTTIGHT) - m_iOLRLevel = ELEBDTIGHTPLUSVETO; + m_iOLRLevel = ELEBDTTIGHTPLUSVETO; } else if (!(m_tTauSelectionTool->m_iSelectionCuts & CutEleOLR) and m_tTauSelectionTool->m_bEleOLR and m_tTauSelectionTool->m_iSelectionCuts & CutEleBDTWP ) @@ -146,7 +146,7 @@ StatusCode TauEfficiencyCorrectionsTool::initializeWithTauSelectionTool() if ( m_tTauSelectionTool->m_iEleBDTWP == ELEIDBDTMEDIUM) m_iOLRLevel = ELEBDTMEDIUM; if ( m_tTauSelectionTool->m_iEleBDTWP == ELEIDBDTTIGHT) - m_iOLRLevel = ELEBDTIGHT; + m_iOLRLevel = ELEBDTTIGHT; } // use electron OLR scale factors if TauSelectionTool applies electron OLR @@ -1236,9 +1236,9 @@ std::string TauEfficiencyCorrectionsTool::ConvertEleOLRToString(const int& iLeve case ELETIGHTLLHOLR: return "EleTightLLHOLR"; break; - case ELEBDTIGHTPLUSVETO: + case ELEBDTTIGHTPLUSVETO: return "eleBDTTightPlusVeto"; - case ELEBDTIGHT: + case ELEBDTTIGHT: return "eleBDTTight"; case ELEBDTMEDIUMPLUSVETO: return "eleBDTMediumPlusVeto"; diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx index 791c86e8a10a6b5acad74c470ff8e9242ef5c8ba..8ee073838130c997f846920ba91bfb7c461b9913 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx @@ -1,7 +1,7 @@ #ifndef XAOD_STANDALONE /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // EDM include(s): @@ -28,7 +28,7 @@ TauOverlappingElectronLLHDecorator::TauOverlappingElectronLLHDecorator( const st , m_bElectonsAvailable(true) , m_hCutValues(0) , m_bEleOLRMatchAvailable(false) - , m_bNewEvent(false) + , m_bNewEvent(true) // , m_sElectronPhotonSelectorToolsConfigFile("ElectronPhotonSelectorTools/offline/mc15_20150224/ElectronLikelihoodLooseOfflineConfig2015.conf") , m_sElectronPhotonSelectorToolsConfigFile("ElectronPhotonSelectorTools/offline/mc15_20150712/ElectronLikelihoodLooseOfflineConfig2015.conf") , m_sEleOlrPassDecorationName("ele_olr_pass_fix") @@ -185,15 +185,6 @@ StatusCode TauOverlappingElectronLLHDecorator::decorate(const xAOD::TauJet& xTau return StatusCode::SUCCESS; } -//______________________________________________________________________________ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -StatusCode TauOverlappingElectronLLHDecorator::initializeEvent() -{ - return beginEvent(); -} -#pragma GCC diagnostic pop - //=================================PRIVATE-PART================================= //______________________________________________________________________________ float TauOverlappingElectronLLHDecorator::getCutVal(float fEta, float fPt) const diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx index 24a6b5f0b7c65287e5e7d050bfb98edadddf1a8f..305a73a22b52cc3ea2796d6daee584e6901fcf81 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // Local include(s): @@ -412,6 +412,7 @@ StatusCode TauSelectionTool::initialize() return StatusCode::SUCCESS; } + //______________________________________________________________________________ StatusCode TauSelectionTool::beginEvent() { @@ -632,6 +633,8 @@ int TauSelectionTool::convertStrToEleBDTWP(const std::string& sEleBDTWP) else if (sEleBDTWP == "ELEIDBDTLOOSE") return int(ELEIDBDTLOOSE); else if (sEleBDTWP == "ELEIDBDTMEDIUM") return int(ELEIDBDTMEDIUM); else if (sEleBDTWP == "ELEIDBDTTIGHT") return int(ELEIDBDTTIGHT); + else if (sEleBDTWP == "ELEIDBDTOLDLOOSE") return int(ELEIDBDTOLDLOOSE); + else if (sEleBDTWP == "ELEIDBDTOLDMEDIUM") return int(ELEIDBDTOLDMEDIUM); ATH_MSG_ERROR( "electron ID working point "<<sEleBDTWP<<" is unknown, the cut EleBDTWP will not accept any tau!" ); return -1; @@ -720,6 +723,12 @@ std::string TauSelectionTool::convertEleBDTWPToStr(int iEleBDTWP) case ELEIDBDTTIGHT: return "ELEIDBDTTIGHT"; break; + case ELEIDBDTOLDLOOSE: + return "ELEIDBDTOLDLOOSE"; + break; + case ELEIDBDTOLDMEDIUM: + return "ELEIDBDTOLDMEDIUM"; + break; default: ATH_MSG_ERROR( "ID working point with enum "<<iEleBDTWP<<" is unknown, the cut EleBDTWP will not accept any tau!" ); break; diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h index b703ba55f12d4d1ba35ff3a72a6f96c99cd95ba8..812d58d4235dc96d69f13dbbca5302240f5fbe8a 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TAUANALYSISTOOLS_ENUMS_H @@ -8,12 +8,8 @@ /* author: Dirk Duschinger mail: dirk.duschinger@cern.ch - documentation in: ../README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst -*/ + documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst +W*/ namespace TauAnalysisTools { @@ -47,11 +43,13 @@ typedef enum e_JETID typedef enum e_ELEID { ELEIDNONEUNCONFIGURED = 0, - ELEIDNONE = 1, - ELEIDBDTLOOSE = 2, - ELEIDBDTMEDIUM = 3, - ELEIDBDTTIGHT = 4, - ELEIDOTHER = 5 + ELEIDNONE = 1, + ELEIDBDTLOOSE = 2, + ELEIDBDTMEDIUM = 3, + ELEIDBDTTIGHT = 4, + ELEIDBDTOLDLOOSE = 5, + ELEIDBDTOLDMEDIUM = 6, + ELEIDOTHER = 7 } ELEID; typedef enum @@ -68,8 +66,8 @@ typedef enum ELEMEDIUMLLHOLR = 8, ELETIGHTLLHOLR = 9, - ELEBDTIGHTPLUSVETO = 10, - ELEBDTIGHT = 11, + ELEBDTTIGHTPLUSVETO = 10, + ELEBDTTIGHT = 11, ELEBDTMEDIUMPLUSVETO = 12, ELEBDTMEDIUM = 13, ELEBDTLOOSEPLUSVETO = 14, @@ -117,6 +115,8 @@ enum EfficiencyCorrectionType // SFEleIDJet = 21, // SFEleIDElectron = 22, // SFEleIDMuon = 23, + + SFDecayMode = 24, }; enum EfficiencyCorrectionSystematicType diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h index b19240af3b0f60d77fda3ff1ee07ab7a8d538868..5299e133fe97b9ba5904a5631fae3a938649ac9d 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h @@ -10,11 +10,8 @@ /* author: Dirk Duschinger mail: dirk.duschinger@cern.ch - documentation in: ../README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst + documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauOverlappingElectronLLHDecorator.rst + */ @@ -37,8 +34,6 @@ class ITauOverlappingElectronLLHDecorator public: - virtual StatusCode initializeEvent() __attribute__ ((deprecated("This function is deprecated. Please remove it from your code.\nFor further information please refer to the README:\nhttps://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-TauOverlappingElectronLLHDecorator.rst"))) = 0; - virtual StatusCode decorate(const xAOD::TauJet& xTau) const = 0; virtual StatusCode setEleOlrPassDecorationName(const std::string& name) = 0; virtual StatusCode setEleOlrLhScoreDecorationName(const std::string& name) = 0; diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h index 4096bfa2c365ac5c69082f67db0b38087c050f4a..477482444b2f1e528b4d721d92e1a1c1794bb54c 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TAUANALYSISTOOLS_ITAUONSELECTIONTOOL_H @@ -10,11 +10,7 @@ /* author: Dirk Duschinger mail: dirk.duschinger@cern.ch - documentation in: ../README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst + documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst */ // Framework include(s): @@ -57,7 +53,6 @@ public: /// Write control histograms to output file virtual void writeControlHistograms() = 0; - }; // class ITauSelectionTool } // namespace TauAnalysisTools diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h index 3c933e70d2b9e1b1c4efd10f474d380390ef117c..ee62981efeb9436debc528366e991cf5289b66c0 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TAUANALYSISTOOLS_SELECTIONCUTS_H @@ -10,11 +10,7 @@ /* author: Dirk Duschinger mail: dirk.duschinger@cern.ch - documentation in: ../README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst + documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst */ // Framework include(s): @@ -155,6 +151,7 @@ private: virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) override; }; + class SelectionCutJetIDWP : public SelectionCut { diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h index 2caaa1bed2aefd308b426aadfd6b2a32f321cacd..fc094b02bd28e8d002d0dbaefd490ecdaab19d31 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h @@ -1,5 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#define sSharedFilesVersion "00-02-62" +#ifndef TAUANALYSISTOOLS_SHAREDFILESVERSION_H +#define TAUANALYSISTOOLS_SHAREDFILESVERSION_H + +/// Version of the calibration files +static const char *const sSharedFilesVersion = "00-03-16"; + +#endif // TAUANALYSISTOOLS_SHAREDFILESVERSION_H diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h index 586e7b31b2f01aa655cac64c190d760adb7352dc..9f47d491c51c19a5d21ea6b363c56ea5be8de217 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h @@ -1,22 +1,22 @@ -#ifndef XAOD_STANDALONE - // Dear emacs, this is -*- c++ -*- - /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +/* +TauOverlappingElectronLLHDecorator depends on an EGamma tool which is +not avaible in AnalysisBase. To make TauAnalysisTools compiel, this +class is ignored in AnalysisBase. +*/ +#ifndef XAOD_STANDALONE + #ifndef TAUANALYSISTOOLS_TAUOVERLAPPINGELECTRONLLHDECORATOR_H #define TAUANALYSISTOOLS_TAUOVERLAPPINGELECTRONLLHDECORATOR_H /* author: Dirk Duschinger mail: dirk.duschinger@cern.ch - documentation in: ../README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst + documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauOverlappingElectronLLHDecorator.rst */ // Framework include(s): @@ -58,8 +58,6 @@ public: /// Function initialising the tool virtual StatusCode initialize(); - virtual StatusCode initializeEvent() __attribute__ ((deprecated("This function is deprecated. Please remove it from your code.\nFor further information please refer to the README:\nhttps://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-TauOverlappingElectronLLHDecorator.rst"))); - virtual StatusCode decorate(const xAOD::TauJet& xTau) const; virtual StatusCode setEleOlrPassDecorationName(const std::string& name); diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h index 3c249a52823f58b8d7bafc36b6a8edc9398343d7..dd2b607b878f78504e85b1727f9643d690e26200 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TAUANALYSISTOOLS_TAUSELECTIONTOOL_H @@ -10,11 +10,7 @@ /* author: Dirk Duschinger mail: dirk.duschinger@cern.ch - documentation in: ../README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst - or - https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst + documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst */ // Framework include(s): diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst index c0ac6d7648248f430891b69a814970c33fa90acf..aee43179d0d508e895be8efeec0be5bd85e95978 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst @@ -3,9 +3,11 @@ TauSelectionTool ================ :authors: Dirk Duschinger, David Kirchmeier -:contact: dirk.duschinger@cern.ch, david.kirchmeier@cern.ch +:contact: guillermo.nicolas.hamity@cern.ch, dirk.duschinger@cern.ch, david.kirchmeier@cern.ch -.. contents:: Table of contents +.. contents:: Table of contents + +**NOTE:** The eleBDT working points were updated to the new re-tuned eleBDT scores. These are only available in new derivations with AODfix (since 21.2.54.0, p3759). In cases where an electron veto is needed and older derivations are used, you may have to switch the ELEIDBDTOLDLOOSE or ELEIDBDTOLDMEDIUM working points. See the below ``CutEleBDTWP`` table with all eleBDT working points. ------------ Introduction @@ -25,35 +27,9 @@ The tool at least needs to be created and initialized like:: This creates the tool with the recommended cuts, which are defined in the default config file -/afs/cern.ch/atlas/www/GROUPS/DATABASE/GroupData/TauAnalysisTools/00-00-30/Selection/recommended_selection_mc15.conf +/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/TauAnalysisTools/00-00-30/Selection/recommended_selection_mc15.conf (or in newer versions). ------------------- -Release Check ------------------- - -Since TauAnalysisTools-00-02-43 an automatic release check is implemented. -For samples which are not AODFix (before 20.7.8.5, excluding 20.7.8.2) the electron overlap removal is re-run. For AODFix samples (20.7.8.5 and above) -the available electron overlap removal is used. One can turn off this release -check via:: - - TauSelTool.setProperty("IgnoreAODFixCheck", true); - -In that case one can force the electron overlap-removal to be -re-calculated via:: - - TauSelTool.setProperty("RecalcEleOLR", true); - -**Note:** that in case one wants to use the electron overlap-removal `EleOLR` in - not AOD fixed samples it - is recommended to run the `TauOverlappingElectronLLHDecorator - <README-TauOverlappingElectronLLHDecorator.rst>`_ before calling the *accept* - function of the TauSelectionTool. However, if this is not done, the tool uses - the TauOverlappingElectronLLHDecorator internally to decorate the tau with the - electron likelihood score. In this case it is recommended to call - intializeEvent() in each new event, otherwise the electron container will be - retrieved for each tau, which is overhead and much slower. - ------------------ Tool configuration ------------------ @@ -140,7 +116,7 @@ setup: - accepting taus with the given absolute charge - if ``AbsCharge`` is configured, ``AbsCharges`` configuration wont be considered - * - ``CutNTracks`` + * - ``CutNTrack`` - ``NTracks`` - ``std::vector<size_t>`` - accepting taus with a set of track multiplicities, each value in the vector will be accepted @@ -152,23 +128,41 @@ setup: - accepting taus with the given track multiplicity - if ``NTrack`` is configured, ``NTracks`` configuration wont be considered - * - ``CutJetBDTScore`` - - ``JetBDTRegion`` + * - ``CutJetBDTScoreSigTrans`` + - ``JetBDTSigTransRegion`` - ``std::vector<double>`` - accepting taus within jet BDT score regions, each `odd` in the vector is a lower bound, each `even` is an upper bound - - + - ``JetBDTSigTrans`` is a transformed BDT score and provides flat ID efficiencies with respect to pT and pile-up. * - - - ``JetBDTMin`` + - ``JetBDTSigTransMin`` - ``double`` - accepting taus with a jet BDT score above a lower bound - - if ``JetBDTMin`` is configured, ``JetBDTRegion`` configuration wont be considered + - if ``JetBDTMin`` is configured, ``JetBDTRegion`` configuration wont be considered. ``JetBDTSigTrans`` is a transformed BDT score and provides flat ID efficiencies with respect to pT and pile-up. * - - - ``JetBDTMax`` + - ``JetBDTSigTransMax`` - ``double`` - accepting taus with a jet BDT score below an upper bound - - if ``JetBDTMax`` is configured, ``JetBDTRegion`` configuration wont be considered + - if ``JetBDTMax`` is configured, ``JetBDTRegion`` configuration wont be considered. ``JetBDTSigTrans`` is a transformed BDT score and provides flat ID efficiencies with respect to pT and pile-up. + + * - ``CutJetRNNScoreSigTrans`` + - ``JetRNNSigTransRegion`` + - ``std::vector<double>`` + - accepting taus within jet RNN score regions, each `odd` in the vector is a lower bound, each `even` is an upper bound + - ``JetRNNSigTrans`` is a transformed RNN score and provides flat ID efficiencies with respect to pT and pile-up. + + * - + - ``JetRNNSigTransMin`` + - ``double`` + - accepting taus with a jet RNN score above a lower bound + - if ``JetRNNMin`` is configured, ``JetRNNRegion`` configuration wont be considered. ``JetRNNSigTrans`` is a transformed RNN score and provides flat ID efficiencies with respect to pT and pile-up. + + * - + - ``JetRNNSigTransMax`` + - ``double`` + - accepting taus with a jet RNN score below an upper bound + - if ``JetRNNMax`` is configured, ``JetRNNRegion`` configuration wont be considered. ``JetRNNSigTrans`` is a transformed RNN score and provides flat ID efficiencies with respect to pT and pile-up. * - ``CutJetIDWP`` - ``JetIDWP`` @@ -229,14 +223,17 @@ Currently implemented working points for ``CutJetIDWP`` are: * - JETIDNONE - no cut at all + * - JETIDBDTVERYLOOSE + - passing BDT very loose working point, ID efficiency 95% + * - JETIDBDTLOOSE - - passing BDT loose working point + - passing BDT loose working point, ID efficiency 85% (75%) for 1-prong (3-prong) * - JETIDBDTMEDIUM - - passing BDT medium working point + - passing BDT medium working point, ID efficiency 75% (60%) for 1-prong (3-prong) * - JETIDBDTTIGHT - - passing BDT tight working point + - passing BDT tight working point, ID efficiency 60% (45%) for 1-prong (3-prong) * - JETIDBDTLOOSENOTTIGHT - passing BDT loose but not BDT tight working point @@ -250,31 +247,51 @@ Currently implemented working points for ``CutJetIDWP`` are: * - JETIDBDTNOTLOOSE - not passing BDT loose working point - * - JETIDBDTVERYLOOSE - - passing BDT very loose working point, new since release 21 - * - JETBDTBKGLOOSE - - loose background working point, new since release 21 + - loose background working point * - JETBDTBKGMEDIUM - - medium background working point, new since release 21 + - medium background working point * - JETBDTBKGTIGHT - - tight background working point, new since release 21 + - tight background working point + + * - JETIDRNNVERYLOOSE + - passing RNN very loose working point, ID efficiency 95% + + * - JETIDRNNLOOSE + - passing RNN loose working point, ID efficiency 85% (75%) for 1-prong (3-prong) + + * - JETIDRNNMEDIUM + - passing RNN medium working point, ID efficiency 75% (60%) for 1-prong (3-prong) + + * - JETIDRNNTIGHT + - passing RNN tight working point, ID efficiency 60% (45%) for 1-prong (3-prong) + and for ``CutEleBDTWP``: .. list-table:: :header-rows: 1 + :widths: 5 30 * - Electron veto working points - description * - ELEIDBDTLOOSE - - BDT loose electron veto + - BDT loose electron veto (BDTEleScoreSigTrans_retuned > 0.05), available in new derivations with AODfix (since 21.2.54.0, p3759) * - ELEIDBDTMEDIUM - - BDT medium electron veto + - BDT medium electron veto (BDTEleScoreSigTrans_retuned > 0.15), available in new derivations with AODfix (since 21.2.54.0, p3759) + + * - ELEIDBDTTIGHT + - BDT tight electron veto (BDTEleScoreSigTrans_retuned > 0.25), available in new derivations with AODfix (since 21.2.54.0, p3759) + + * - ELEIDBDTOLDLOOSE + - old BDT loose electron veto (BDTEleScoreSigTrans > 0.05) + + * - ELEIDBDTOLDMEDIUM + - old BDT medium electron veto (BDTEleScoreSigTrans > 0.15) If one wants to use a different setup one has three options: @@ -342,40 +359,6 @@ configured, the tool will accept any tau. However, configuration can be achieved as described in the `previous section <README-TauSelectionTool.rst#overwrite-particular-cut-setups-or-the-list-of-cuts-to-be-executed>`_. -Other tool configurations for the electron overlap removal -========================================================== - -The electron overlap removal uses pT and eta (of the leading track) dependent -thresholds stored in a root file. The input file can be set via:: - - TauSelTool.setProperty("EleOLRFilePath", "PATH/TO/FILE"); - -Currently the following official input files are available in -``/afs/cern.ch/atlas/www/GROUPS/DATABASE/GroupData``: - -.. list-table:: - :header-rows: 1 - - * - file - - description - - * - TauAnalysisTools/<latest tag>/Selection/eveto_cutvals.root - - 95% signal efficiency, loose working point - - * - TauAnalysisTools/<latest tag>/Selection/eveto_cutvals_90.root - - 90% signal efficiency, medium working point - - * - TauAnalysisTools/<latest tag>/Selection/eveto_cutvals_85.root - - 85% signal efficiency, tight working point - -Use at least ``00-01-09`` for the ``<latest tag>``. - -The electron overlap removal further depends on the electron container. If for -some reason the electron container name differs from the default -(``Electrons``), just change the property ``ElectronContainerName`` to the -relevant container name:: - - TauSelTool.setProperty("ElectronContainerName", "MY/ELECTRON/CONTAINER/NAME"); ---------------- Tool application @@ -455,12 +438,6 @@ FAQ **Note:** only the cuts in the last line will be processed - -#. **Question:** How can I use different working points for the electron overlap - removal. - - **Answer:** This is described in this `section <README-TauSelectionTool.rst#other-tool-configurations-for-the-electron-overlap-removal>`_ - #. **Question**: After cutting on EleOLR there are still taus with rather large likelihood scores.