26 bool isLargeR =
false;
28 isLargeR = TString(
argv[1]).EqualTo(
"true",TString::kIgnoreCase) || TString(
argv[1]).EqualTo(
"largeR",TString::kIgnoreCase) || TString(
argv[1]).EqualTo(
"large-R",TString::kIgnoreCase);
30 StatusCode::enableFailure();
34 if (!isLargeR &&
tool->setProperty(
"JetDefinition",
"AntiKt4EMTopo").isFailure())
36 if (isLargeR &&
tool->setProperty(
"JetDefinition",
"AntiKt10LCTopoTrimmedPtFrac5SmallR20").isFailure())
39 if (
tool->setProperty(
"MCType",
"MC15").isFailure())
43 if (!isLargeR &&
tool->setProperty(
"ConfigFile",
"JES_2015/Moriond2016/JES2015_AllNuisanceParameters.config").isFailure())
46 if (isLargeR &&
tool->setProperty(
"ConfigFile",
"UJ_2015/Moriond2016/UJ2015_WZTagging_medium.config").isFailure())
49 if (
tool->setScaleToGeV().isFailure())
51 if (
tool->initialize().isFailure())
80 std::vector<std::string>
categories =
tool->getComponentCategories();
81 for (
size_t iCat = 0; iCat <
categories.size(); ++iCat)
83 printf(
"Category %s:\n",
categories.at(iCat).c_str());
84 std::vector<std::string> compInCategory =
tool->getComponentNamesInCategory(
categories.at(iCat));
85 for (
size_t iComp = 0; iComp < compInCategory.size(); ++iComp)
86 printf(
"\t\t%s\n",compInCategory.at(iComp).c_str());
94 printf(
"\nRecommended systematics (%zux2+1=%zu%s):\n",recommendedSystematics.
size(),sysList.size(),recommendedSystematics.
size()*2+1==sysList.size()?
"":
" FAILED");
95 for (
size_t iSyst = 0; iSyst < sysList.size(); ++iSyst)
96 if (sysList.at(iSyst).name() ==
"")
97 printf(
"\t%40s\n",
"NOMINAL");
99 printf(
"\t%40s%s",sysList.at(iSyst).name().c_str(),iSyst%2==0?
"\n":
"");
108 printf(
"Recognizes JET_Flavor_Response__continuous: %s\n",
tool->isAffectedBySystematic(
CP::SystematicVariation(
"JET_Flavor_Response__continuous"))?
"true":
"false");
109 printf(
"Recognizes JET_Flavor_Response: %s\n",
tool->isAffectedBySystematic(
CP::SystematicVariation(
"JET_Flavor_Response"))?
"true":
"false");
120 IsBjet(*
jet) =
false;
131 printf(
"Trying (Flavor_Response)x(-1.5) + (PunchThrough_MC15)x(+1.5)\n");
135 if (
tool->applySystematicVariation(*syst) != StatusCode::SUCCESS)
140 printf(
"%20s: (pT,eta) = (%.0f,%.1f)",
"below eta boundary",
jet->pt(),
jet->eta());
143 printf(
" --> (%.0f,%.1f)\n",
jet->pt(),
jet->eta());
150 if (
tool->applySystematicVariation(*syst) != StatusCode::SUCCESS)
155 printf(
"%20s: (pT,eta) = (%.0f,%.1f)",
"(Flavor)x(+1.5)",
jet->pt(),
jet->eta());
158 printf(
" --> (%.0f,%.1f)\n",
jet->pt(),
jet->eta());
162 printf(
"%20s: (pT,eta) = (%.0f,%.1f)",
"exact eta boundary",
jet->pt(),
jet->eta());
165 printf(
" --> (%.0f,%.1f)\n",
jet->pt(),
jet->eta());
169 printf(
"%20s: (pT,eta) = (%.0f,%.1f)",
"Nsegments=0",
jet->pt(),
jet->eta());
172 printf(
" --> (%.0f,%.1f)\n",
jet->pt(),
jet->eta());
176 Nsegments(*
jet) = 20;
177 printf(
"%20s: (pT,eta) = (%.0f,%.1f)",
"Nsegments=20",
jet->pt(),
jet->eta());
181 printf(
" --> (%.0f,%.1f)\n",
jet->pt(),
jet->eta());
187 printf(
"Recognizes JET_Rtrk_Baseline__continuous: %s\n",
tool->isAffectedBySystematic(
CP::SystematicVariation(
"JET_Rtrk_Baseline__continuous"))?
"true":
"false");
188 printf(
"Recognizes JET_Rtrk_Baseline: %s\n",
tool->isAffectedBySystematic(
CP::SystematicVariation(
"JET_Rtrk_Baseline"))?
"true":
"false");
193 printf(
"Trying (Rtrk_Baseline)x(-1.5) + (Rtrk_Modelling)x(+1.5)\n");
197 if (
tool->applySystematicVariation(*syst) != StatusCode::SUCCESS)
207 printf(
"%20s: (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f)",
"Normal W/Z jet",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet));
210 printf(
" --> (%.0f,%.1f,%.1f,%.0f,%0.1f)\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet));
229 printf(
"Validity of (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f) : %s\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet), (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::Ok) ?
"ok" : (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::OutOfValidityRange) ?
"invalid" :
"ERROR");
231 printf(
"Validity of (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f) : %s\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet), (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::Ok) ?
"ok" : (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::OutOfValidityRange) ?
"invalid" :
"ERROR");
233 printf(
"Validity of (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f) : %s\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet), (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::Ok) ?
"ok" : (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::OutOfValidityRange) ?
"invalid" :
"ERROR");
235 printf(
"Validity of (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f) : %s\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet), (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::Ok) ?
"ok" : (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::OutOfValidityRange) ?
"invalid" :
"ERROR");
237 printf(
"Validity of (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f) : %s\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet), (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::Ok) ?
"ok" : (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::OutOfValidityRange) ?
"invalid" :
"ERROR");
239 printf(
"Validity of (pT,eta,phi,m,D2) = (%.0f,%.1f,%.1f,%.0f,%.1f) : %s\n",
jet->pt(),
jet->eta(),
jet->phi(),
jet->m(),accD2(*
jet), (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::Ok) ?
"ok" : (
tool->applyCorrection(*
jet,*eInfo) ==
CP::CorrectionCode::OutOfValidityRange) ?
"invalid" :
"ERROR");