diff --git a/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx b/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx index 4b2ea4de6ae64c23e759580f3e14567f3b78ec13..60168c8a08b4f51f5cfa6aac48eeb2706505c381 100644 --- a/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx +++ b/Reconstruction/PanTau/PanTauAlgs/Root/PanTauProcessor.cxx @@ -246,8 +246,8 @@ StatusCode PanTau::PanTauProcessor::executePanTau(xAOD::TauJet& pTau, xAOD: void PanTau::PanTauProcessor::fillDefaultValuesToTau(xAOD::TauJet* tauJet) { - //default four momentum set to previous calibration state: TauEtaCalib - TLorentzVector defaultP4 = tauJet->p4(xAOD::TauJetParameters::TauEtaCalib); + //default four momentum set to previous calibration state: TauEnergyScale + TLorentzVector defaultP4 = tauJet->p4(); tauJet->setP4(xAOD::TauJetParameters::PanTauCellBased, defaultP4.Pt(), defaultP4.Eta(), defaultP4.Phi(), defaultP4.M()); //charged diff --git a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py index 0868a8ec7684d4cf0f08bcc49a2fcfab131ac44c..4af9f47c078b17468e847d5d0b8f1e3c63fbadab 100644 --- a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py +++ b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py @@ -97,8 +97,6 @@ def getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix=''): from tauRecTools.tauRecToolsConf import TauCalibrateLC TauCalibrateLC = TauCalibrateLC(name = _name, calibrationFile = "TES_MC16a_prelim.root", - doEnergyCorrection = correctEnergy, - doAxisCorrection = correctAxis, doPtResponse = True, Key_vertexInputContainer = _DefaultVertexContainer ) diff --git a/Reconstruction/tauRec/python/TauRecBuilder.py b/Reconstruction/tauRec/python/TauRecBuilder.py index fc5db0cff396c58cdfb7f5306d7cba77868c9531..babd167eec2061a3a996ab6ce0b68b65cd4fe17e 100644 --- a/Reconstruction/tauRec/python/TauRecBuilder.py +++ b/Reconstruction/tauRec/python/TauRecBuilder.py @@ -67,7 +67,7 @@ class TauRecCoreBuilder ( TauRecConfigured ) : if not doMVATrackClassification and doRNNTrackClassification: tools.append(taualgs.getTauTrackRNNClassifier()) if jobproperties.Beam.beamType()!="cosmics": - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) tools.append(taualgs.getCellVariables()) tools.append(taualgs.getElectronVetoVars()) diff --git a/Reconstruction/tauRec/python/TauRecRunner.py b/Reconstruction/tauRec/python/TauRecRunner.py index f87386826433f927eb51a839615740b0de05d4d6..e019d11f5865cbc058a7aef66dbc27ff468c59ef 100644 --- a/Reconstruction/tauRec/python/TauRecRunner.py +++ b/Reconstruction/tauRec/python/TauRecRunner.py @@ -56,8 +56,6 @@ class TauRecRunner ( TauRecRunConfigured ) : tools.append(taualgs.getTauCommonCalcVars()) tools.append(taualgs.getTauSubstructure()) - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) - # PanTau: if tauFlags.doPanTau() : import PanTauAlgs.JobOptions_Main_PanTau as pantau diff --git a/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx b/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx index 557b5203d509a54d48cd7467e2d8f96330753ceb..911af3962d57083f4e233e0219819a8c20059f43 100644 --- a/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx +++ b/Reconstruction/tauRecTools/Root/CombinedP4FromRecoTaus.cxx @@ -110,7 +110,7 @@ StatusCode CombinedP4FromRecoTaus::initialize() { StatusCode CombinedP4FromRecoTaus::execute(xAOD::TauJet& tau) const { - TLorentzVector combinedP4(tau.p4(xAOD::TauJetParameters::TauEtaCalib)); + TLorentzVector combinedP4(tau.p4(xAOD::TauJetParameters::TauEnergyScale)); // used to store immediate results Variables variables; @@ -162,10 +162,10 @@ bool CombinedP4FromRecoTaus::getUseCaloPtFlag(const xAOD::TauJet& tau) const { xAOD::TauJetParameters::DecayMode decayMode = getDecayMode(tau); int decayModeIndex = getDecayModeIndex(decayMode); - int etaIndex = getEtaIndex(tau.etaTauEtaCalib()); + int etaIndex = getEtaIndex(tau.etaTauEnergyScale()); - double caloSigma = tau.ptTauEtaCalib() * getCaloResolution(tau.ptTauEtaCalib(), decayModeIndex, etaIndex); - double deltaEt = tau.ptFinalCalib() - tau.ptTauEtaCalib(); + double caloSigma = tau.ptTauEnergyScale() * getCaloResolution(tau.ptTauEnergyScale(), decayModeIndex, etaIndex); + double deltaEt = tau.ptFinalCalib() - tau.ptTauEnergyScale(); bool useCaloPt = false; @@ -426,7 +426,7 @@ double CombinedP4FromRecoTaus::getCombinedEt(const double& caloEt, TLorentzVector CombinedP4FromRecoTaus::getCombinedP4(const xAOD::TauJet& tau, Variables& variables) const { - const TLorentzVector& caloP4 = tau.p4(xAOD::TauJetParameters::TauEtaCalib); + const TLorentzVector& caloP4 = tau.p4(xAOD::TauJetParameters::TauEnergyScale); const TLorentzVector& panTauP4 = tau.p4(xAOD::TauJetParameters::PanTauCellBased); ATH_MSG_DEBUG("Four momentum at calo TES, pt: " << caloP4.Pt() << " eta: " << caloP4.Eta() << diff --git a/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx b/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx index 9bd524bbf030079d0a193077876501880568478b..69e753f80878985ae839cf1c710826bb519d0553 100644 --- a/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx +++ b/Reconstruction/tauRecTools/Root/TauCalibrateLC.cxx @@ -17,10 +17,7 @@ TauCalibrateLC::TauCalibrateLC(const std::string& name) : TauRecToolBase(name) { declareProperty("calibrationFile", m_calibrationFile = ""); - declareProperty("doEnergyCorrection", m_doEnergyCorr = false); declareProperty("doPtResponse", m_doPtResponse = false); - declareProperty("doAxisCorrection", m_doAxisCorr = false); - declareProperty("usePantauAxis", m_usePantauAxis = false); declareProperty("isCaloOnly", m_isCaloOnly = false); } @@ -94,7 +91,6 @@ StatusCode TauCalibrateLC::initialize() { m_calibFunc[i].resize(m_nEtaBins); } - for (int i = 0; i < s_nProngBins; i++) { histo = dynamic_cast<TH1*>(file->Get(tmpSlopKey[i])); // get pile-up slope histograms if (histo) { @@ -137,119 +133,85 @@ StatusCode TauCalibrateLC::execute(xAOD::TauJet& pTau) const int prongBin = 1; //Mp if (pTau.nTracks() <= 1) prongBin = 0; //1p - // set tau energy scale - if (m_doEnergyCorr) { - - // get detector axis values - double absEta = std::abs( pTau.etaDetectorAxis() ); - int etaBin = m_etaBinHist->GetXaxis()->FindBin(absEta) - 1; + // get detector axis values + double absEta = std::abs( pTau.etaDetectorAxis() ); + int etaBin = m_etaBinHist->GetXaxis()->FindBin(absEta) - 1; - if (etaBin>=m_nEtaBins) etaBin = m_nEtaBins-1; // correction from last bin should be applied on all taus outside stored eta range + if (etaBin>=m_nEtaBins) etaBin = m_nEtaBins-1; // correction from last bin should be applied on all taus outside stored eta range - int nVertex = 0; + int nVertex = 0; - // Obtain pileup - if (inTrigger()) { // online: retrieved from EventInfo - SG::ReadDecorHandle<xAOD::EventInfo, float> eventInfoDecorHandle( m_aveIntPerXKey ); - if (!eventInfoDecorHandle.isPresent()) { - ATH_MSG_WARNING ( "EventInfo decoration not available! Will set nVertex = " << m_averageNPV ); - nVertex = m_averageNPV; - } - else { - nVertex = eventInfoDecorHandle(0); - ATH_MSG_DEBUG("AvgInteractions object in tau candidate = " << nVertex); - } - } - else { // offline: count the primary vertex container - SG::ReadHandle<xAOD::VertexContainer> vertexInHandle( m_vertexInputContainer ); - if (!vertexInHandle.isValid()) { - ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << vertexInHandle.key()); - return StatusCode::FAILURE; + // Obtain pileup + if (inTrigger()) { // online: retrieved from EventInfo + SG::ReadDecorHandle<xAOD::EventInfo, float> eventInfoDecorHandle( m_aveIntPerXKey ); + if (!eventInfoDecorHandle.isPresent()) { + ATH_MSG_WARNING ( "EventInfo decoration not available! Will set nVertex = " << m_averageNPV ); + nVertex = m_averageNPV; + } + else { + nVertex = eventInfoDecorHandle(0); + ATH_MSG_DEBUG("AvgInteractions object in tau candidate = " << nVertex); + } + } + else { // offline: count the primary vertex container + SG::ReadHandle<xAOD::VertexContainer> vertexInHandle( m_vertexInputContainer ); + if (!vertexInHandle.isValid()) { + ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << vertexInHandle.key()); + return StatusCode::FAILURE; + } + const xAOD::VertexContainer * vxContainer = vertexInHandle.cptr(); + for (const auto vertex : *vxContainer) { + if (vertex->vertexType() == xAOD::VxType::PileUp) { + ++nVertex; } - const xAOD::VertexContainer * vxContainer = vertexInHandle.cptr(); - for (const auto vertex : *vxContainer) { - if (vertex->vertexType() == xAOD::VxType::PileUp) { - ++nVertex; - } - } - ATH_MSG_DEBUG("calculated nVertex " << nVertex ); } + ATH_MSG_DEBUG("calculated nVertex " << nVertex ); + } - double calibConst = 1.0; + double calibConst = 1.0; - double slopeNPV = m_slopeNPVHist[prongBin]->GetBinContent(etaBin + 1); - double offset = slopeNPV * (nVertex - m_averageNPV); + double slopeNPV = m_slopeNPVHist[prongBin]->GetBinContent(etaBin + 1); + double offset = slopeNPV * (nVertex - m_averageNPV); - // energy response parameterized as a function of pileup-corrected E_LC - double energyLC = pTau.p4(xAOD::TauJetParameters::DetectorAxis).E() / GeV; - if(m_doPtResponse) energyLC = pTau.ptDetectorAxis() / GeV; + // energy response parameterized as a function of pileup-corrected E_LC + double energyLC = pTau.p4(xAOD::TauJetParameters::DetectorAxis).E() / GeV; + if(m_doPtResponse) energyLC = pTau.ptDetectorAxis() / GeV; - if (energyLC <= 0) { - ATH_MSG_DEBUG("tau energy at LC scale is " << energyLC << "--> set energy=0.001"); - pTau.setP4(0.001, pTau.eta(), pTau.phi(), pTau.m()); - return StatusCode::SUCCESS; - } + if (energyLC <= 0) { + ATH_MSG_DEBUG("tau energy at LC scale is " << energyLC << "--> set energy=0.001"); + pTau.setP4(0.001, pTau.eta(), pTau.phi(), pTau.m()); + return StatusCode::SUCCESS; + } - if (energyLC - offset <= 0) { - ATH_MSG_DEBUG("after pile-up correction energy would be = " << energyLC - offset << " --> setting offset=0 now!"); - offset = 0; - } + if (energyLC - offset <= 0) { + ATH_MSG_DEBUG("after pile-up correction energy would be = " << energyLC - offset << " --> setting offset=0 now!"); + offset = 0; + } - // apply offset correction - double energyPileupCorr = energyLC - offset; + // apply offset correction + double energyPileupCorr = energyLC - offset; - if (energyPileupCorr > 0 and energyPileupCorr < 10000) // from 0 to 10 TeV - { - calibConst = m_calibFunc[prongBin][etaBin]->Eval(energyPileupCorr); + if (energyPileupCorr > 0 and energyPileupCorr < 10000) // from 0 to 10 TeV + { + calibConst = m_calibFunc[prongBin][etaBin]->Eval(energyPileupCorr); - if (calibConst <= 0) { - ATH_MSG_DEBUG("calibration constant = " << calibConst); - ATH_MSG_DEBUG("prongBin = " << prongBin); - ATH_MSG_DEBUG("etaBin = " << etaBin); - ATH_MSG_DEBUG("energyPileupCorr = " << energyPileupCorr); - ATH_MSG_DEBUG("energyLC = " << energyLC); - calibConst = 1.0; - } + if (calibConst <= 0) { + ATH_MSG_DEBUG("calibration constant = " << calibConst); + ATH_MSG_DEBUG("prongBin = " << prongBin); + ATH_MSG_DEBUG("etaBin = " << etaBin); + ATH_MSG_DEBUG("energyPileupCorr = " << energyPileupCorr); + ATH_MSG_DEBUG("energyLC = " << energyLC); + calibConst = 1.0; } + } - double energyFinal = energyPileupCorr / calibConst; + double energyFinal = energyPileupCorr / calibConst; - if (not m_doPtResponse) energyFinal /= std::cosh(pTau.eta()) ; - pTau.setP4( energyFinal * GeV, pTau.eta(), pTau.phi(), pTau.m()); - - ATH_MSG_DEBUG("Energy at LC scale = " << energyLC << " pile-up offset " << offset << " calib. const. = " << calibConst << " final energy = " << energyFinal); - - pTau.setP4(xAOD::TauJetParameters::TauEnergyScale, pTau.pt(), pTau.eta(), pTau.phi(), pTau.m()); - pTau.setDetail(xAOD::TauJetParameters::TESCalibConstant, static_cast<float>( calibConst ) ); - pTau.setDetail(xAOD::TauJetParameters::TESOffset, static_cast<float>( offset * GeV ) ); - - } - - // final tau axis - if (m_doAxisCorr) { - - // get tau intermediate axis values - double eta = pTau.etaIntermediateAxis(); - double absEta = std::abs(eta); - double etaCorr = eta; - - double phi = pTau.phiIntermediateAxis(); - double phiCorr = phi; - - // TauCalibrateLC should then only be called after Pantau !! - if(m_usePantauAxis && std::abs(pTau.etaPanTauCellBased()) < 111) { - etaCorr = pTau.etaPanTauCellBased(); - phiCorr = pTau.phiPanTauCellBased(); - } - else if (absEta) { - etaCorr = (eta / absEta)*(absEta - m_etaCorrectionHist->GetBinContent(m_etaCorrectionHist->GetXaxis()->FindBin(absEta))); - } - - ATH_MSG_DEBUG("eta " << eta << "; corrected eta = " << etaCorr << " ; phi " << phi << "; corrected phi " << phiCorr ); - pTau.setP4( pTau.e() / std::cosh( etaCorr ), etaCorr, phiCorr, pTau.m()); - pTau.setP4(xAOD::TauJetParameters::TauEtaCalib, pTau.pt(), pTau.eta(), pTau.phi(), pTau.m()); - } - + if (not m_doPtResponse) energyFinal /= std::cosh(pTau.eta()) ; + pTau.setP4( energyFinal * GeV, pTau.eta(), pTau.phi(), pTau.m()); + pTau.setP4(xAOD::TauJetParameters::TauEnergyScale, pTau.pt(), pTau.eta(), pTau.phi(), pTau.m()); + ATH_MSG_DEBUG("Energy at LC scale = " << energyLC << " pile-up offset " << offset << " calib. const. = " << calibConst << " final energy = " << energyFinal); + if (m_isCaloOnly == true && inTrigger()) { pTau.setP4(xAOD::TauJetParameters::TrigCaloOnly, pTau.pt(), pTau.eta(), pTau.phi(), pTau.m()); } diff --git a/Reconstruction/tauRecTools/tauRecTools/TauCalibrateLC.h b/Reconstruction/tauRecTools/tauRecTools/TauCalibrateLC.h index 4b3b441498ddb80440ad5067c23bbfa48ab26258..7e9dc8941152613bb9ab0f9ed8b4aed15da88d11 100644 --- a/Reconstruction/tauRecTools/tauRecTools/TauCalibrateLC.h +++ b/Reconstruction/tauRecTools/tauRecTools/TauCalibrateLC.h @@ -49,10 +49,7 @@ class TauCalibrateLC : public TauRecToolBase { double m_averageNPV=0; std::string m_calibrationFile; //!< energy calibration file - bool m_doEnergyCorr; //!< switch for energy correction bool m_doPtResponse; //!< switch for pt response vs pt, if false, use E response vs E - bool m_doAxisCorr; //!< switch for eta correction - bool m_usePantauAxis; //!< switch for overwriting calo (eta,phi) with Pantau (eta,phi) bool m_isCaloOnly; //!< switch for CaloOnly corrections SG::ReadDecorHandleKey<xAOD::EventInfo> m_aveIntPerXKey {this, diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py index 551d1853df1860e15f6f9708e7205047783043e2..b695a47bdc19c8834167160fcaf9142baa4e4ec0 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py @@ -110,30 +110,25 @@ def getTauAxis(): ######################################################################## # Tau energy calibration -def getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='', caloOnly=False): +def getEnergyCalibrationLC(caloOnly=False): - _name = sPrefix +'EnergyCalibrationLC' + postfix + _name = sPrefix +'EnergyCalibrationLC' if _name in cached_instances: return cached_instances[_name] - -## calibFileName = "TES2015_LC_online.root" calibFileName = "TES2016_LC_online.root" if caloOnly: -## calibFileName = "TES2015_LC_online.root" calibFileName = "TES2016_LC_online_inc.root" from tauRecTools.tauRecToolsConf import TauCalibrateLC TauCalibrateLC = TauCalibrateLC(name = _name, - calibrationFile = calibFileName, - doEnergyCorrection = correctEnergy, - doAxisCorrection = correctAxis) + calibrationFile = calibFileName) TauCalibrateLC.isCaloOnly = caloOnly #Need to empty the vertex key collection in the trigger case TauCalibrateLC.Key_vertexInputContainer = "" - + cached_instances[_name] = TauCalibrateLC return TauCalibrateLC diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py index 8585bf1ba90a0f8c786acf15594fd8e0b25103f3..4298178c422686c294b37c28b66a5ba4c01f852f 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py @@ -34,7 +34,7 @@ class TrigTauRecMerged_Tau (TrigTauRecMerged) : tools.append(taualgs.getTauVertexFinder(doUseTJVA=False)) #don't use TJVA by default tools.append(taualgs.getTauAxis()) tools.append(taualgs.getTauTrackFinder()) - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) tools.append(taualgs.getCellVariables(cellConeSize=0.4)) #tools.append(taualgs.getElectronVetoVars()) #needed? @@ -90,7 +90,7 @@ class TrigTauRecMerged_Tau2012 (TrigTauRecMerged) : tools.append(taualgs.getTauVertexFinder(doUseTJVA=False)) #don't use TJVA by default tools.append(taualgs.getTauAxis()) tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=2)) - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) tools.append(taualgs.getCellVariables(cellConeSize=0.2)) #cellConeSize 0.2!! @@ -98,7 +98,8 @@ class TrigTauRecMerged_Tau2012 (TrigTauRecMerged) : tools.append(taualgs.getTauVertexVariables()) tools.append(taualgs.getTauCommonCalcVars()) tools.append(taualgs.getTauSubstructure()) - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) + # deprecated + #tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) for tool in tools: tool.inTrigger = True @@ -143,7 +144,7 @@ class TrigTauRecMerged_TauPreselection (TrigTauRecMerged) : # Count tracks with deltaZ0 cut of 2mm for 2016 and 1mm for 2017-2018 (see ATR-15845) tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=1, noSelector=False)) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # tools.append(taualgs.getElectronVetoVars()) @@ -205,7 +206,7 @@ class TrigTauRecMerged_TauFTK (TrigTauRecMerged) : # Insert bypass later? tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=2, noSelector = False)) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # tools.append(taualgs.getElectronVetoVars()) @@ -260,7 +261,7 @@ class TrigTauRecMerged_TauCaloOnly (TrigTauRecMerged) : # Set LC energy scale (0.2 cone) and intermediate axis (corrected for vertex: useless at trigger) tools.append(taualgs.getTauAxis()) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy', caloOnly=True)) + tools.append(taualgs.getEnergyCalibrationLC(caloOnly=True)) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) @@ -304,7 +305,7 @@ class TrigTauRecMerged_TauCaloOnlyMVA (TrigTauRecMerged) : # Set LC energy scale (0.2 cone) and intermediate axis (corrected for vertex: useless at trigger) tools.append(taualgs.getTauAxis()) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy', caloOnly=True)) + tools.append(taualgs.getEnergyCalibrationLC(caloOnly=True)) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # Compute MVA TES (ATR-17649), stores MVA TES as default tau pt() @@ -356,7 +357,7 @@ class TrigTauRecMerged_TauPrecision (TrigTauRecMerged) : # Count tracks with deltaZ0 cut of 2mm for 2016 and 1mm for 2017-2018 (see ATR-15845) tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=1)) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # tools.append(taualgs.getElectronVetoVars()) @@ -440,7 +441,7 @@ class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMerged) : tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=0.75, prefix='TrigTauTightDZ_')) # Calibrate to calo TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) if doMVATES: # Compute MVA TES (ATR-17649), stores MVA TES as default tau pt() diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py index be60ad27e4a24f046fa17391226a45f4d285d841..3eba0a9e3e0f4d882bb877bdd6469587b32c4de3 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfigMT.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from TrigTauRec.TrigTauRecConf import TrigTauRecMergedMT from TrigTauRec.TrigTauRecMonitoring import tauMonitoringCaloOnly @@ -23,7 +23,7 @@ class TrigTauRecMerged_TauCaloOnly (TrigTauRecMergedMT) : # Set LC energy scale (0.2 cone) and intermediate axis (corrected for vertex: useless at trigger) tools.append(taualgs.getTauAxis()) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy', caloOnly=True)) + tools.append(taualgs.getEnergyCalibrationLC(caloOnly=True)) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) @@ -56,7 +56,7 @@ class TrigTauRecMerged_TauCaloOnlyMVA (TrigTauRecMergedMT) : # Set LC energy scale (0.2 cone) and intermediate axis (corrected for vertex: useless at trigger) tools.append(taualgs.getTauAxis()) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy', caloOnly=True)) + tools.append(taualgs.getEnergyCalibrationLC(caloOnly=True)) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # Compute MVA TES (ATR-17649), stores MVA TES as default tau pt() @@ -95,7 +95,7 @@ class TrigTauRecMerged_TauPreselection (TrigTauRecMergedMT) : # Count tracks with deltaZ0 cut of 2mm for 2016 and 1mm for 2017-2018 (see ATR-15845) tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=1, noSelector=False)) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # Variables combining tracking and calorimeter information @@ -138,7 +138,7 @@ class TrigTauRecMerged_TauPrecision (TrigTauRecMergedMT) : # Count tracks with deltaZ0 cut of 2mm for 2016 and 1mm for 2017-2018 (see ATR-15845) tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=1)) # Calibrate to TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies tools.append(taualgs.getCellVariables(cellConeSize=0.2)) # Lifetime variables @@ -207,7 +207,7 @@ class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMergedMT) : tools.append(taualgs.getTauTrackClassifier()) # Calibrate to calo TES - tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) + tools.append(taualgs.getEnergyCalibrationLC()) if doMVATES: # Compute MVA TES (ATR-17649), stores MVA TES as default tau pt()