Skip to content
Snippets Groups Projects
Commit 2d8ddad8 authored by Weitao Wang's avatar Weitao Wang
Browse files

new function for highpt unc sagitta correction

parent 35cb5a30
No related branches found
No related tags found
1 merge request!78627Draft: new function for highpt uncertianty of muon sagitta correction
......@@ -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 };
......
......@@ -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")
{
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment