32 m_egammaCalibrationModel(
"es2022_R22_PRE"),
33 m_electronEffTriggerFile(
"SetMe"),
34 m_electronEffTriggerLooseFile(
"SetMe"),
35 m_electronEffSFTriggerFile(
"SetMe"),
36 m_electronEffSFTriggerLooseFile(
"SetMe"),
37 m_electronEffSFRecoFile(
"SetMe"),
38 m_electronEffSFIDFile(
"SetMe"),
39 m_electronEffSFIDLooseFile(
"SetMe"),
40 m_electronEffSFIsoFile(
"SetMe"),
41 m_electronEffSFIsoLooseFile(
"SetMe"),
42 m_electronEffSFChargeIDFile(
"SetMe"),
43 m_electronEffSFChargeIDLooseFile(
"SetMe"),
44 m_electronEffSFChargeMisIDFile(
"SetMe"),
45 m_electronEffSFChargeMisIDLooseFile(
"SetMe") {
86 ATH_MSG_INFO(
"top::EgammaCPTools: no need to initialise anything on truth DxAOD");
87 return StatusCode::SUCCESS;
93 m_config->setPrintEgammaCalibModelWarning(
true);
106 "top::EgammaCPTools: no need to initialise anything since using neither electrons nor fwd electrons nor photons");
109 return StatusCode::SUCCESS;
130 return StatusCode::SUCCESS;
141 const std::string egamma_calib_name =
"EgammaCalibrationAndSmearingTool";
142 if (asg::ToolStore::contains<IEgammaCalibTool>(egamma_calib_name)) {
146 top::check(asg::setProperty(egammaCalibrationAndSmearingTool,
148 "Failed to set ESModel for " + egamma_calib_name);
149 top::check(asg::setProperty(egammaCalibrationAndSmearingTool,
150 "decorrelationModel",
152 "Failed to set decorrelationModel for " + egamma_calib_name);
154 if (
m_config->forceRandomRunNumber() > 0) {
155 top::check(asg::setProperty(egammaCalibrationAndSmearingTool,
"randomRunNumber",
m_config->forceRandomRunNumber()),
"Cannot set randomRunNumber for the egamma tools");
158 top::check(asg::setProperty(egammaCalibrationAndSmearingTool,
159 "useFastSim",
m_config->isAFII() ? 1 : 0),
160 "Failed to set useFastSim to true for" + egamma_calib_name);
161 top::check(egammaCalibrationAndSmearingTool->initialize(),
162 "Failed to initialize " + egamma_calib_name);
170 const std::string fudgeName =
"PhotonFudgeTool";
172 if (!asg::ToolStore::contains<IFudgeTool>(fudgeName)) {
173 std::string configFilePath =
"EGammaVariableCorrection/TUNE23/ElPhVariableNominalCorrection.conf";
183 ATH_MSG_WARNING(
"PhotonEfficiencies - Currently there are no recommendations for FastSimulation photons");
184 ATH_MSG_WARNING(
"PhotonEfficiencies - Therefore we are advised to treat FastSim as FullSim for configuration");
193 const std::string photonSFName =
"AsgPhotonEfficiencyCorrectionTool";
194 if (asg::ToolStore::contains<IPhotonEffTool>(photonSFName)) {
195 m_photonEffSF = asg::ToolStore::get<IPhotonEffTool>(photonSFName);
199 top::check(asg::setProperty(photonEffSF,
"ForceDataType", data_type),
200 "Failed to set ForceDataType for " + photonSFName);
202 "Failed to initialize " + photonSFName);
211 std::set<std::string> photon_isolations = {
216 for (
const std::string& isoWP : photon_isolations) {
217 std::string photonIsoSFName =
"AsgPhotonEfficiencyCorrectionTool_IsoSF" + isoWP;
218 if (!asg::ToolStore::contains<IPhotonEffTool>(photonIsoSFName)) {
221 top::check(asg::setProperty(photonIsoSFTool,
"ForceDataType", data_type),
222 "Failed to set ForceDataType for " + photonIsoSFName);
223 top::check(asg::setProperty(photonIsoSFTool,
"IsoKey", isoWP),
224 "Failed to set IsoKey for " + photonIsoSFName);
226 "Failed to initialize " + photonIsoSFName);
231 return StatusCode::SUCCESS;
236 if (!
m_config->isMC())
return StatusCode::SUCCESS;
239 std::string electron_data_dir =
"ElectronEfficiencyCorrection/";
248 std::string electronID =
m_config->electronID();
249 if (electronID.find(
"LH") != std::string::npos) electronID.replace(electronID.find(
"LH"), 2,
"LLH");
250 std::string electronIDLoose =
m_config->electronIDLoose();
251 if (electronIDLoose.find(
"LH") != std::string::npos) electronIDLoose.replace(electronIDLoose.find(
"LH"), 2,
"LLH");
255 if(electronIsolation ==
"PLImprovedTight" || electronIsolation ==
"PLImprovedVeryTight"){
256 if(!(electronID ==
"TightLLH" || electronID ==
"MediumLLH")){
257 ATH_MSG_ERROR(
"Combination of electron PLIV WP and ID WP not available. Try MediumLH or TightLH.");
258 return StatusCode::FAILURE;
261 if(electronIsolationLoose ==
"PLImprovedTight" || electronIsolationLoose ==
"PLImprovedVeryTight"){
262 if(!(electronIDLoose ==
"TightLLH" || electronIDLoose ==
"MediumLLH")){
263 ATH_MSG_ERROR(
"Combination of loose electron PLIV WP and ID WP not available. Try MediumLH or TightLH.");
264 return StatusCode::FAILURE;
267 if(electronIsolation ==
"PLImprovedTight" || electronIsolation ==
"PLImprovedVeryTight" || electronIsolationLoose ==
"PLImprovedTight" || electronIsolationLoose ==
"PLImprovedVeryTight"){
269 ATH_MSG_ERROR(
"electron PLIV WPs are only available for FullSim.");
270 return StatusCode::FAILURE;
272 ATH_MSG_WARNING(
"Trigger SFs for PLIV isolation unavailable. Proceeding without online Isolation.");
279 std::vector<std::string> inExpID;
280 if(
m_config->electronIDSFFilePath() !=
"Default"){
281 m_config->setPrintEIDFileWarning(
true);
285 std::vector<std::string> inExpIDLoose;
286 if(
m_config->electronIDSFFileLoosePath() !=
"Default"){
287 m_config->setPrintEIDFileWarning(
true);
288 inExpIDLoose.push_back(
electronSFFilePath(
"EXPID_Loose", electronID, electronIsolation));
293 std::vector<std::string> inPLViso;
294 if (electronIsolation ==
"PLVTight" || electronIsolation ==
"PLVLoose") {
305 std::vector<std::string> inPLVisoLoose;
306 if (electronIsolationLoose ==
"PLVTight" || electronIsolationLoose ==
"PLVLoose") {
315 std::string trigger_string =
"";
317 if (
m_config->elTrigEffConfig() !=
" " ) {
318 trigger_string =
m_config->elTrigEffConfig();
321 ATH_MSG_ERROR(
"EgammaCPTools::setupScaleFactors, ElectronTriggerEfficiencyConfig not set, unable to retrieve SFs");
322 return StatusCode::FAILURE;
326 const std::string elSFPrefix =
"AsgElectronEfficiencyCorrectionTool_";
328 ATH_MSG_INFO(
"Setting up Electrons SF tool for TOTAL correlation model");
339 electronIDLoose,
"",
"",
dataType,
"TOTAL",
"",
"");
344 (!(electronIsolation ==
"PLImprovedTight" || electronIsolation ==
"PLImprovedVeryTight")) ? electronIsolation :
"",
349 (!(electronIsolationLoose ==
"PLImprovedTight" || electronIsolationLoose ==
"PLImprovedVeryTight")) ? electronIsolationLoose :
"",
354 (!(electronIsolation ==
"PLImprovedTight" || electronIsolation ==
"PLImprovedVeryTight")) ? electronIsolation :
"",
355 "Eff_" + trigger_string,
dataType,
"TOTAL",
"",
359 (!(electronIsolationLoose ==
"PLImprovedTight" || electronIsolationLoose ==
"PLImprovedVeryTight")) ? electronIsolationLoose :
"",
360 "Eff_" + trigger_string,
dataType,
"TOTAL",
"",
"");
362 if (electronIsolation ==
"PLVTight" || electronIsolation ==
"PLVLoose") {
365 else if(electronIsolation ==
"None" || electronIsolation ==
"")
m_electronEffSFIso =
nullptr;
368 electronIsolation,
"",
dataType,
"TOTAL",
"",
"");
370 if (electronIsolationLoose ==
"PLVTight" || electronIsolationLoose ==
"PLVLoose") {
376 electronIDLoose, electronIsolationLoose,
"",
dataType,
"TOTAL",
"",
381 "Requested Electrons SF tool for " <<
m_config->electronEfficiencySystematicModel() <<
" correlation model");
383 if (
m_config->electronEfficiencySystematicModel() !=
"TOTAL") {
385 "Setting up Electrons SF tool for " <<
m_config->electronEfficiencySystematicModel() <<
" correlation model");
387 const std::string elSFPrefixCorrModel = elSFPrefix +
"CorrModel_";
390 "Reconstruction",
"",
"",
"",
dataType,
391 m_config->electronEfficiencySystematicModelNToys(),
392 m_config->electronEfficiencySystematicModelToySeed(),
393 m_config->electronEfficiencySystematicModel(),
394 m_config->electronEfficiencySystematicModelEtaBinning(),
395 m_config->electronEfficiencySystematicModelEtBinning());
399 m_config->electronEfficiencySystematicModelNToys(),
400 m_config->electronEfficiencySystematicModelToySeed(),
401 m_config->electronEfficiencySystematicModel(),
402 m_config->electronEfficiencySystematicModelEtaBinning(),
403 m_config->electronEfficiencySystematicModelEtBinning());
405 m_config->electronEfficiencySystematicModel(),
406 m_config->electronEfficiencySystematicModelEtaBinning(),
407 m_config->electronEfficiencySystematicModelEtBinning());
413 m_config->electronEfficiencySystematicModelNToys(),
414 m_config->electronEfficiencySystematicModelToySeed(),
415 m_config->electronEfficiencySystematicModel(),
416 m_config->electronEfficiencySystematicModelEtaBinning(),
417 m_config->electronEfficiencySystematicModelEtBinning());
420 m_config->electronEfficiencySystematicModel(),
421 m_config->electronEfficiencySystematicModelEtaBinning(),
422 m_config->electronEfficiencySystematicModelEtBinning());
427 (!(electronIsolation ==
"PLImprovedTight" || electronIsolation ==
"PLImprovedVeryTight")) ? electronIsolation :
"",
429 m_config->electronEfficiencySystematicModelNToys(),
430 m_config->electronEfficiencySystematicModelToySeed(),
431 m_config->electronEfficiencySystematicModel(),
432 m_config->electronEfficiencySystematicModelEtaBinning(),
433 m_config->electronEfficiencySystematicModelEtBinning());
437 (!(electronIsolationLoose ==
"PLImprovedTight" || electronIsolationLoose ==
"PLImprovedVeryTight")) ? electronIsolationLoose :
"",
439 m_config->electronEfficiencySystematicModelNToys(),
440 m_config->electronEfficiencySystematicModelToySeed(),
441 m_config->electronEfficiencySystematicModel(),
442 m_config->electronEfficiencySystematicModelEtaBinning(),
443 m_config->electronEfficiencySystematicModelEtBinning());
447 (!(electronIsolation ==
"PLImprovedTight" || electronIsolation ==
"PLImprovedVeryTight")) ? electronIsolation :
"",
449 m_config->electronEfficiencySystematicModelNToys(),
450 m_config->electronEfficiencySystematicModelToySeed(),
451 m_config->electronEfficiencySystematicModel(),
452 m_config->electronEfficiencySystematicModelEtaBinning(),
453 m_config->electronEfficiencySystematicModelEtBinning());
457 (!(electronIsolationLoose ==
"PLImprovedTight" || electronIsolationLoose ==
"PLImprovedVeryTight")) ? electronIsolationLoose :
"",
459 m_config->electronEfficiencySystematicModelNToys(),
460 m_config->electronEfficiencySystematicModelToySeed(),
461 m_config->electronEfficiencySystematicModel(),
462 m_config->electronEfficiencySystematicModelEtaBinning(),
463 m_config->electronEfficiencySystematicModelEtBinning());
465 if (electronIsolation ==
"PLVTight" || electronIsolation ==
"PLVLoose") {
467 m_config->electronEfficiencySystematicModel(),
468 m_config->electronEfficiencySystematicModelEtaBinning(),
469 m_config->electronEfficiencySystematicModelEtBinning());
474 electronID, electronIsolation,
"",
dataType,
475 m_config->electronEfficiencySystematicModelNToys(),
476 m_config->electronEfficiencySystematicModelToySeed(),
477 m_config->electronEfficiencySystematicModel(),
478 m_config->electronEfficiencySystematicModelEtaBinning(),
479 m_config->electronEfficiencySystematicModelEtBinning());
481 if (electronIsolationLoose ==
"PLVTight" || electronIsolationLoose ==
"PLVLoose") {
483 m_config->electronEfficiencySystematicModel(),
484 m_config->electronEfficiencySystematicModelEtaBinning(),
485 m_config->electronEfficiencySystematicModelEtBinning());
492 electronIsolationLoose,
"",
dataType,
493 m_config->electronEfficiencySystematicModelNToys(),
494 m_config->electronEfficiencySystematicModelToySeed(),
495 m_config->electronEfficiencySystematicModel(),
496 m_config->electronEfficiencySystematicModelEtaBinning(),
497 m_config->electronEfficiencySystematicModelEtBinning());
515 ATH_MSG_INFO(
"Finished setting up forward Electrons SF tool");
520 if (
m_config->useElectronChargeIDSelection()
521 && electronIsolation !=
"PLVTight" && electronIsolation !=
"PLVLoose"
522 && electronIsolationLoose !=
"PLVTight" && electronIsolationLoose !=
"PLVLoose"
523 && electronIsolation !=
"PLImprovedTight" && electronIsolation !=
"PLImprovedVeryTight"
524 && electronIsolationLoose !=
"PLImprovedTight" && electronIsolationLoose !=
"PLImprovedVeryTight") {
529 if (
m_config->applyTightSFsInLooseTree())
533 std::vector<std::string> inChargeID {
536 std::vector<std::string> inChargeIDLoose {
557 return StatusCode::SUCCESS;
562 const int& data_type,
563 const std::string& correlation_model,
564 const std::string& correlationModelEtaBinning,
565 const std::string& correlationModelEtBinning) {
568 if (asg::ToolStore::contains<IAsgElectronEfficiencyCorrectionTool>(
name)) {
569 tool = asg::ToolStore::get<IAsgElectronEfficiencyCorrectionTool>(
name);
574 "Failed to set CorrectionFileNameList to " +
name);
576 "Failed to set ForceDataType to " +
name);
577 top::check(asg::setProperty(
tool,
"CorrelationModel", correlation_model),
578 "Failed to set CorrelationModel to " +
name);
579 if (correlationModelEtaBinning !=
"" && correlationModelEtaBinning !=
"default") this->
setCorrelationModelBinning(tool,
"UncorrEtaBinsUser", correlationModelEtaBinning);
580 if (correlationModelEtBinning !=
"" && correlationModelEtBinning !=
"default") this->
setCorrelationModelBinning(tool,
"UncorrEtBinsUser", correlationModelEtBinning);
582 top::check(asg::setProperty(
tool,
"OutputLevel", MSG::INFO),
"Failed to set OutputLevel to " +
name);
590 const std::string& binningName,
const std::string&
binning) {
591 std::vector<std::string>
tokens;
595 "EgammaCPTools::setupElectronSFToolWithMap, correlation model " << binningName <<
596 " binning must be in the form XXX:YYY:WWW:ZZZ...");
598 std::vector<float>
bins;
599 for (
unsigned int i = 0;
i <
tokens.size();
i++) {
603 value = std::stof(token);
606 throw std::invalid_argument {
607 "EgammaCPTools::setupElectronSFToolWithMap, correlation model " + binningName +
608 " binning must be in the for XXX:YYY:WWW:ZZZ, couldn't convert correctly to float"
613 ATH_MSG_INFO(
" ---> electron SF tools will use " << binningName <<
" bins:");
616 bins),
"Failed to set correlation model " + binningName +
" binning to " +
binning);
620 const std::string& ToysName,
const int&
number) {
623 number),
"Failed to set correlation model " + ToysName );
629 const std::string& reco_key,
const std::string& ID_key,
630 const std::string& ISO_key,
const std::string& trigger_key,
631 const int& data_type,
632 const int& correlationModelNToys,
633 const int& correlationModelToySeed,
634 const std::string& correlation_model,
635 const std::string& correlationModelEtaBinning,
636 const std::string& correlationModelEtBinning) {
638 std::string iso_key = ISO_key;
641 if (iso_key ==
"PLVTight" || iso_key ==
"PLVLoose") iso_key =
"";
643 std::string infoStr =
"Configuring : name=" +
name +
" map=" + map_path +
" reco_key=" + reco_key +
" ID_key=" +
644 ID_key +
" iso_key=" + iso_key +
" trigger_key=" + trigger_key +
"data_type=" +
646 " correlation_model=" + correlation_model +
" etaBinning=" + correlationModelEtaBinning +
648 correlationModelEtBinning;
651 if (asg::ToolStore::contains<IAsgElectronEfficiencyCorrectionTool>(
name)) {
652 tool = asg::ToolStore::get<IAsgElectronEfficiencyCorrectionTool>(
name);
655 if (map_path !=
"UseEgammaRecommended") {
657 top::check(asg::setProperty(
tool,
"MapFilePath", map_path),
"Failed to set MapFilePath to " +
name);
660 top::check(asg::setProperty(
tool,
"ForceDataType", data_type),
"Failed to set ForceDataType to " +
name);
663 correlation_model),
"Failed to set CorrelationModel to " +
name);
666 tool,
"UncorrEtaBinsUser", correlationModelEtaBinning);
668 tool,
"UncorrEtBinsUser", correlationModelEtBinning);
672 tool,
"NumberOfToys", correlationModelNToys);
675 tool,
"MCToySeed", correlationModelToySeed);
679 if (reco_key !=
"" && reco_key !=
"None") {
681 top::check(asg::setProperty(
tool,
"RecoKey", reco_key),
"Failed to set RecoKey to " +
name);
683 if (ID_key !=
"" && ID_key !=
"None") {
686 top::check(asg::setProperty(
tool,
"IdKey", id_key),
"Failed to set IdKey to " +
name);
688 if (iso_key !=
"" && iso_key !=
"None") {
690 top::check(asg::setProperty(
tool,
"IsoKey", iso_key),
"Failed to set IsoKey to " +
name);
692 if (trigger_key !=
"" && trigger_key !=
"None") {
694 top::check(asg::setProperty(
tool,
"TriggerKey", trigger_key),
"Failed to set TriggerKey to " +
name);
706 const std::string& reco_key,
const std::string& ID_key,
707 const std::string& ISO_key,
const std::string& trigger_key,
708 const int& data_type,
709 const std::string& correlation_model,
710 const std::string& correlationModelEtaBinning,
711 const std::string& correlationModelEtBinning) {
713 std::string iso_key = ISO_key;
716 if (iso_key ==
"PLVTight" || iso_key ==
"PLVLoose") iso_key =
"";
719 if (!
m_config->isRun3() && (trigger_key !=
"" && trigger_key !=
"None")) {
720 if (iso_key ==
"Tight_VarRad") iso_key =
"FCTight";
723 if( (iso_key ==
"PLImprovedTight" || iso_key ==
"PLImprovedVeryTight") &&
m_config->useElectronChargeIDSelection() ){
724 ATH_MSG_INFO(
"ECIDS tool and PLImproved* isolation detected, switching to combined isolation SFs.");
728 std::string infoStr =
"Configuring : name=" +
name +
" map=" + map_path +
" reco_key=" + reco_key +
" ID_key=" +
729 ID_key +
" iso_key=" + iso_key +
" trigger_key=" + trigger_key +
"data_type=" +
731 " correlation_model=" + correlation_model +
" etaBinning=" + correlationModelEtaBinning +
733 correlationModelEtBinning;
736 if (asg::ToolStore::contains<IAsgElectronEfficiencyCorrectionTool>(
name)) {
737 tool = asg::ToolStore::get<IAsgElectronEfficiencyCorrectionTool>(
name);
741 top::check(asg::setProperty(
tool,
"MapFilePath",
"ElectronEfficiencyCorrection/2015_2018/rel21.2/Precision_Summer2020_v1/map4.txt"),
"Failed to set MapFilePath to " +
name);
743 if (map_path !=
"UseEgammaRecommended") {
745 top::check(asg::setProperty(
tool,
"MapFilePath", map_path),
"Failed to set MapFilePath to " +
name);
749 top::check(asg::setProperty(
tool,
"ForceDataType", data_type),
"Failed to set ForceDataType to " +
name);
752 correlation_model),
"Failed to set CorrelationModel to " +
name);
755 tool,
"UncorrEtaBinsUser", correlationModelEtaBinning);
757 tool,
"UncorrEtBinsUser", correlationModelEtBinning);
760 if (reco_key !=
"" && reco_key !=
"None") {
762 top::check(asg::setProperty(
tool,
"RecoKey", reco_key),
"Failed to set RecoKey to " +
name);
764 if (ID_key !=
"" && ID_key !=
"None") {
767 top::check(asg::setProperty(
tool,
"IdKey", id_key),
"Failed to set IdKey to " +
name);
769 if (iso_key !=
"" && iso_key !=
"None") {
771 top::check(asg::setProperty(
tool,
"IsoKey", iso_key),
"Failed to set IsoKey to " +
name);
773 if (trigger_key !=
"" && trigger_key !=
"None") {
775 top::check(asg::setProperty(
tool,
"TriggerKey", trigger_key),
"Failed to set TriggerKey to " +
name);
777 top::check(asg::setProperty(
tool,
"OutputLevel", MSG::INFO),
"Failed to set OutputLevel to " +
name);
784 const std::string& ISO) {
785 bool isPliv = (ISO ==
"PLImprovedTight" || ISO ==
"PLImprovedVeryTight");
786 const std::string el_calib_path =
"ElectronEfficiencyCorrection/2015_2025/rel22.2/2022_Summer_Prerecom_v1/";
790 if (
type ==
"reco") {
791 ATH_MSG_ERROR(
"Moved to using egamma maps for configuring scale factor tools - electronSFMapFilePath");
792 }
else if (
type ==
"ID") {
793 ATH_MSG_ERROR(
"Moved to using egamma maps for configuring scale factor tools - electronSFMapFilePath");
794 }
else if (
type ==
"triggerSF") {
795 ATH_MSG_ERROR(
"Moved to using egamma maps for configuring scale factor tools - electronSFMapFilePath");
796 }
else if (
type ==
"triggerEff") {
797 ATH_MSG_ERROR(
"Moved to using egamma maps for configuring scale factor tools - electronSFMapFilePath");
798 }
else if (
type ==
"ChargeID") {
800 "The requested ID WP (" +
ID +
801 ") is not supported for electron ChargeID SFs! Try TightLH or MediumLH instead.");
802 if (ISO !=
"FCTight" && ISO !=
"Gradient" && ISO !=
"PLImprovedTight" && ISO !=
"PLImprovedVeryTight")
ATH_MSG_ERROR(
"The requested ISO WP (" + ISO +
") is not supported for electron ChargeID SFs! Try FCTight, Gradient, or PLImproved(Very)Tight instead.");
803 file_path += (isPliv) ?
"isolation/efficiencySF.Isolation." :
"additional/efficiencySF.ChargeID.";
808 file_path += (isPliv) ?
"ECIDS.root" :
"_ECIDSloose.root";
810 }
else if (
type ==
"PLV") {
811 if (
ID !=
"MediumLLH" &&
ID !=
"TightLLH")
813 "The requested ID WP (" +
ID +
814 ") is not supported for PLV SFs! try TightLH or MediumLH instead."
816 file_path =
"/ElectronEfficiencyCorrection/2015_2018/rel21.2/Precision_Summer2020_v1/isolation/";
817 file_path +=
"efficiencySF.Isolation.MediumLHorTightLH_d0z0_v13_isol";
819 if (ISO ==
"PLVTight" &&
m_config->useElectronChargeIDSelection()) {
821 "ECIDS tool and PLVTight isolation detected, switching to combined isolation SFs."
826 }
else if (
type ==
"ChargeMisID") {
828 std::string iso = ISO;
829 if (iso ==
"None") iso =
"";
831 if (
ID ==
"LooseAndBLayerLLH") iso =
"";
836 if (iso !=
"" && iso !=
"PLVTight" && iso !=
"PLVLoose" && iso !=
"PLImprovedTight" && iso !=
"PLImprovedVeryTight")
file_path +=
"_" + iso;
837 if (iso ==
"PLVTight" || iso ==
"PLVLoose" || iso ==
"PLImprovedTight" || iso ==
"PLImprovedVeryTight") {
839 ATH_MSG_WARNING(
"The requested ISO WP (" + iso +
") is not supported for electron ChargeMisID SFs! Will set up a dummy tool and set the SFs to one.");
841 if (
m_config->useElectronChargeIDSelection()) {
842 if (
ID !=
"MediumLLH" &&
ID !=
"TightLLH")
ATH_MSG_WARNING(
"The requested ID WP (" +
ID +
") is not supported for electron ECIDS+ChargeMisID SFs! Try TightLH or MediumLH instead. Will now switch to regular ChargeMisID SFs.");
843 else if (iso !=
"FCTight" && iso !=
"Gradient")
ATH_MSG_WARNING(
"The requested ISO WP (" + iso +
") is not supported for electron ECIDS+ChargeMisID SFs! Try FCTight or Gradient instead. Will now switch to regular ChargeMisID SFs.");
848 }
else if (
type ==
"EXPID"){
850 }
else if (
type ==
"EXPID_Loose"){
861 const std::string el_calib_path =
"UseEgammaRecommended";
863 if (
type ==
"FWDID") {
864 return PathResolverFindCalibFile(
"ElectronEfficiencyCorrection/2015_2017/rel21.2/Consolidation_September2018_v1/map3.txt");
867 return el_calib_path;
876 std::string working_point =
"";
878 if (
type ==
"LooseAndBLayerLLH" ||
type ==
"LooseBLayer") {
879 working_point =
"LooseBLayer";
881 if (
type ==
"MediumLLH" ||
type ==
"Medium") {
882 working_point =
"Medium";
884 if (
type ==
"TightLLH" ||
type ==
"Tight") {
885 working_point =
"Tight";
887 if (
type ==
"FwdLoose" ||
type ==
"FwdMedium" ||
type ==
"FwdTight") working_point =
type;
889 if (
type.find(
"Pflow") != std::string::npos) {
890 ATH_MSG_WARNING(
"You selected a Pflow isolation WP for at least one of your electron collections - BE WARNED THAT THESE ARE NOT YET READY TO BE RELEASED FOR USE IN PHYSICS ANALYSES AND OF COURSE DON'T HAVE ASSOCIATED SCALE FACTORS YET!!!");
891 if (
type ==
"PflowLoose") working_point =
"FCLoose";
892 if (
type ==
"PflowTight") working_point =
"FCTight";
894 if (
type ==
"Tight_VarRad") working_point =
"Tight_VarRad";
895 if (
type ==
"Loose_VarRad") working_point =
"Loose_VarRad";
896 if (
type ==
"Tight") working_point =
"FCTight";
897 if (
type ==
"Loose") working_point =
"FCLoose";
898 if (
type ==
"HighPtCaloOnly") working_point =
"FCHighPtCaloOnly";
899 if (
type ==
"TightTrackOnly") {
900 ATH_MSG_WARNING(
"You selected the TightTrackOnly isolation WP for at least one of your electron collections - BE WARNED THAT THESE ARE NOT YET READY TO BE RELEASED FOR USE IN PHYSICS ANALYSES AND OF COURSE DON'T HAVE ASSOCIATED SCALE FACTORS YET!!! Setting to \"Gradient\" SFs to allow the code to run");
901 working_point =
"Gradient";
903 if (
type ==
"TightTrackOnly_FixedRad") {
904 ATH_MSG_WARNING(
"You selected the TightTrackOnly_FixedRad isolation WP for at least one of your electron collections - BE WARNED THAT THESE ARE NOT YET READY TO BE RELEASED FOR USE IN PHYSICS ANALYSES AND OF COURSE DON'T HAVE ASSOCIATED SCALE FACTORS YET!!! Setting to \"Gradient\" SFs to allow the code to run");
905 working_point =
"Gradient";
907 if (
type ==
"FCTight" ||
type ==
"FCLoose" ||
type ==
"FCHighPtCaloOnly" ||
type ==
"Gradient" ||
type ==
"PLVTight" ||
type ==
"PLVLoose" ||
type ==
"PLImprovedTight" ||
type ==
"PLImprovedVeryTight") working_point =
type;
909 return working_point;