diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/EnumDef.h b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/EnumDef.h index 34e70db8ea2b685c016ebf096cd7efc386d85556..c095eb877b923f348bcfdba21738ed2cb3cf7b56 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/EnumDef.h +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/EnumDef.h @@ -13,7 +13,7 @@ namespace MCP { enum class TrackType{ CB, ID, ME }; // This is for SagittaCorrection, there are two different types of error terms - enum class SagittaCorrection{ Nominal, Datastat__1up, Residual__1up }; + enum class SagittaCorrection{ Nominal, Datastat__1up, Residual__1up, PtExtra__1up }; // This for the calibration constants of the Scale and Resolution Corrections, s0/s1/r0/r1/r2 enum class ScaleResCorrection{ Nominal, SystErr__1up, SystErr__1down }; diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/CalibInitializer.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/CalibInitializer.cxx index 47c0455c484b016cab35289fd64c08af3c78cb47..79f858875ed1d59d04cb2cbcb2fce2833bb31320 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/CalibInitializer.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/CalibInitializer.cxx @@ -24,6 +24,7 @@ namespace MCP { calibMap[SagittaCorrection::Nominal] = std::make_shared<CalibContainer>(path, "p" + trackType + "_0"); calibMap[SagittaCorrection::Datastat__1up] = std::make_shared<CalibContainer>(path, "p" + trackType + "_statError"); calibMap[SagittaCorrection::Residual__1up] = std::make_shared<CalibContainer>(path, "p" + trackType + "_1"); + calibMap[SagittaCorrection::PtExtra__1up] = std::make_shared<CalibContainer>(path, "p" + trackType + "_ptExtra"); } else if(correctionType == "mc") { diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibIntSagittaTool.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibIntSagittaTool.cxx index e15dc2e19d5b07839d42138b2f7d335da6df6787..2d7637f4c5dfc06e13e649390db1fc74cba6d2db 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibIntSagittaTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibIntSagittaTool.cxx @@ -245,47 +245,14 @@ namespace CP // Till it reach 450 GeV and then to flatten it. // The value is chosen in an arbitrary fashion. To be replaced and fixed, once we have a better idea of double corr = 0; - double deltas = 0.00002; - if (eta > 2 || (eta > -2 && eta < -1.05)) { - if (pT > 450.0) - corr += std::abs(450.0 - 45) / 100 * deltas; // Above 450 GeV flat - else - corr += std::abs(pT - 45) / 100 * deltas; - } - if (eta < -2 || (eta < 2 && eta> 1.5)) { - if (pT > 450.0) - corr += std::abs(450.0 - 45) / 200 * deltas; // Above 450 GeV flat - else - corr += std::abs(pT - 45) / 200 * deltas; - } - // additional uncertainties for 2022 data - if (m_release.value().find("Recs2023") != std::string::npos) { - if ( (trk.year==MCP::DataYear::Data22) && pT > 100.0) { - if (eta < 0 && eta> -0.5) corr += 2.1*deltas; - else if (eta < -1.05) corr += 1.1*deltas; - else if (eta > 0.5 ) corr += 0.8*deltas; - } - } else { - if ( trk.year==MCP::DataYear::Data22 ) { - if (eta > -2 && eta < -1.05) corr = corr*2.5; - if (eta < -2) corr = corr*6; - if (eta > 1.5 && eta < 2) { - if (pT > 450.0) - corr += std::abs(450.0 - 45) / 80 * deltas; // Above 450 GeV flat - else - corr += std::abs(pT - 45) / 80 * deltas; - } - if (eta > 1.05 && eta < 1.5) { - if (pT > 450.0) - corr += std::abs(450.0 - 45) / 40 * deltas; // Above 450 GeV flat - else - corr += std::abs(pT - 45) / 40 * deltas; - } - } - } + //double deltas = 0.00002; + double deltas = corrMap->at(MCP::SagittaCorrection::PtExtra__1up)->getCalibConstant(trk); + if (pT > 450.0) + corr += std::abs(450.0 - 45) * deltas; // Above 450 GeV flat + else + corr += std::abs(pT - 45) * deltas; ATH_MSG_VERBOSE("Deltas corr: "<<deltas); - corrections.push_back(corr*scale); ATH_MSG_VERBOSE("final corr: "<<corr);