diff --git a/PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h b/PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h index 4b30f0a30604bd1c5c61786b423d53021dda88b9..3b69f2bc36fc5e6825026e532d7a34fba34cdb21 100644 --- a/PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h +++ b/PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // Asg wrapper around the MissingMassCalculator @@ -33,8 +33,8 @@ namespace HistInfoV2 namespace MMCCalibrationSetV2 { - enum e { MMC2015HIGHMASS=0, UPGRADE, LFVMMC2012, MMC2019, MAXMMCCALIBRATIONSET }; - const std::string name[MAXMMCCALIBRATIONSET]={ "MMC2015HIGHMASS", "UPGRADE", "LFVMMC2012", "MMC2019"}; + enum e { MMC2015HIGHMASS=0, UPGRADE, LFVMMC2012, MMC2016MC15C, MMC2019, MAXMMCCALIBRATIONSET }; + const std::string name[MAXMMCCALIBRATIONSET]={ "MMC2015HIGHMASS", "UPGRADE", "LFVMMC2012", "MMC2016MC15C", "MMC2019"}; } namespace MMCFitMethodV2 diff --git a/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassCalculatorV2.cxx b/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassCalculatorV2.cxx index 66d23255d74a2f0678882c8edff3152a01c27d6a..6446141ecbd094ad1259d3513c34fca8a12e12c2 100644 --- a/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassCalculatorV2.cxx +++ b/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassCalculatorV2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // vim: ts=8 sw=2 @@ -2089,6 +2089,7 @@ int MissingMassCalculatorV2::TailCleanUp(const TLorentzVector &vis1, { if (m_mmcCalibrationSet == MMCCalibrationSetV2::MMC2015HIGHMASS || + m_mmcCalibrationSet == MMCCalibrationSetV2::MMC2016MC15C || m_mmcCalibrationSet == MMCCalibrationSetV2::MMC2019 || m_mmcCalibrationSet == MMCCalibrationSetV2::UPGRADE) return pass_code; // don't use TailCleanup for 8 & 13 TeV data @@ -3168,7 +3169,8 @@ Nprong_tau2==3) type_visTau2=3; // set to 3p0n for now, see above // T. Davidek: hack for lep-lep -- subtract lepton pT both for muon and // electron - if (m_mmcCalibrationSet == MMCCalibrationSetV2::MMC2019 && + if ((m_mmcCalibrationSet == MMCCalibrationSetV2::MMC2016MC15C || + m_mmcCalibrationSet == MMCCalibrationSetV2::MMC2019) && preparedInput.m_vistau1.M() < 0.12 && preparedInput.m_vistau2.M() < 0.12) { // lep-lep channel if (preparedInput.m_SumEt > preparedInput.m_vistau1.Pt()) preparedInput.m_SumEt -= preparedInput.m_vistau1.Pt(); diff --git a/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassProb.cxx b/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassProb.cxx index 9abb759034016e698301c39bd0cc610c55162ac2..2fed6c16e6d9a6833d48109e0137ecf9ac224cc3 100644 --- a/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassProb.cxx +++ b/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassProb.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // Class handling the probability calculation of the MissingMassCalculator @@ -1052,6 +1052,7 @@ double MissingMassProb::dTheta3d_probabilityFast(MissingMassInput& preparedInput { if(m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012 + || m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C || m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS) myDelThetaParam[i]=dTheta3Dparam(i,tau_code,P_tau,s_fit_param[1][tau_code][i]); } @@ -1089,8 +1090,9 @@ double MissingMassProb::myDelThetaHadFunc(double *x, double *par) const double sigmaL=par[4]; if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS - || m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE - || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012){ + || m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C + || m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE + || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012){ const double norm=sqrt(2.0*TMath::Pi()); const double g1=TMath::Gaus(arg,mean,sigmaG)/norm; const double g2=TMath::Landau(arg_L,mpv,sigmaL)/norm; @@ -1133,15 +1135,17 @@ double MissingMassProb::dTheta3Dparam(const int & parInd, const int & tau_type, if(parInd==0) { if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS - || m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE - || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012){ + || m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C + || m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE + || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012){ return (par[0]+par[1]*P_tau+par[2]*pow(P_tau,2)+par[3]*pow(P_tau,3)+par[4]*pow(P_tau,4))*0.00125; } } else { // parInd==0 if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS - || m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE - || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012){ + || m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C + || m_mmcCalibrationSet==MMCCalibrationSetV2::UPGRADE + || m_mmcCalibrationSet==MMCCalibrationSetV2::LFVMMC2012){ if(tau_type==0) return par[0]*(exp(-par[1]*P_tau)+par[2]/P_tau)+par[3]+par[4]*P_tau; else return par[0]*(exp(-par[1]*sqrt(P_tau))+par[2]/P_tau)+par[3]+par[4]*P_tau; } @@ -1358,7 +1362,8 @@ void MissingMassProb::MET(MissingMassInput& preparedInput){ if(preparedInput.m_Njet25==0)//0-jet { // placeholder for 2019 tune - if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019){ + if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C || + m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019){ if(preparedInput.m_MetVec.Mod()<20.0) // 0-jet low MET case { if(std::abs(preparedInput.m_DelPhiTT)>2.95 && m_allowUseHT) // use mHt only if dPhi(lep-tau)>2.95 @@ -1403,7 +1408,7 @@ void MissingMassProb::MET(MissingMassInput& preparedInput){ preparedInput.m_METsigmaL = sigma; } } // high MET - } // MMC2019 + } // MMC2016MC15C or MMC2019 // 2015 high-mass tune; avergare MET resolution for Mh=600,1000 mass points else if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS) { @@ -1429,8 +1434,9 @@ void MissingMassProb::MET(MissingMassInput& preparedInput){ // MET resolution can't be perfect in presence of other objects (i.e., electrons, jets, taus), so assume minSumEt=5.0 for now sigma= preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset; } - //2019 - else if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) + //2016 mc15c or 2019 + else if (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C || + m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) { double x = preparedInput.m_DelPhiTT; double dphi_scale = x > 0.3 ? 0.9429 - 0.059*x + 0.054*x*x : 0.728; @@ -1467,7 +1473,9 @@ void MissingMassProb::MET(MissingMassInput& preparedInput){ preparedInput.m_METsigmaL=sigma; } - else if(preparedInput.m_Njet25==0 && m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) + else if(preparedInput.m_Njet25==0 && + (m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C || + m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019)) { double sigmaSyst=0.10; // 10% systematics for now (be conservative) double x = preparedInput.m_DelPhiTT; @@ -1507,7 +1515,8 @@ void MissingMassProb::MET(MissingMassInput& preparedInput){ // MET resolution can't be perfect in presence of other objects (i.e., electrons, jets, taus), so assume minSumEt=5.0 for now double sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : std::abs(METoffset); - if(m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) { + if(m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C || + m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) { double x = preparedInput.m_DelPhiTT; double dphi_scale = x > 0.6 ? 1.42047 - 0.666644*x + 0.199986*x*x : 1.02; METoffset = 1.19769*(1.0+preparedInput.m_METresSyst*sigmaSyst); @@ -1559,7 +1568,9 @@ void MissingMassProb::MET(MissingMassInput& preparedInput){ preparedInput.m_METsigmaL = sigma; } // end of MMC2015HIGHMASS - if(m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) // 2019 leplep + if(m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2016MC15C || + m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2019) + // 2016 MC15c + 2019 leplep { m_UseHT=false; double sigmaSyst=0.10; // 10% systematics for now (be conservative) diff --git a/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassToolV2.cxx b/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassToolV2.cxx index a523e87dfa3162e95eadeb14fed19c6c74e48015..537888d99cbc859721fea847ff6f6b876f20397d 100644 --- a/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassToolV2.cxx +++ b/PhysicsAnalysis/TauID/DiTauMassTools/Root/MissingMassToolV2.cxx @@ -53,6 +53,8 @@ StatusCode MissingMassToolV2::initialize() aset = MMCCalibrationSetV2::UPGRADE; } else if (m_calib_set == "LFV") { aset = MMCCalibrationSetV2::LFVMMC2012; + } else if (m_calib_set == "2016MC15C") { + aset = MMCCalibrationSetV2::MMC2016MC15C; } else if (m_calib_set == "2019") { aset = MMCCalibrationSetV2::MMC2019; } else {