37 StatusCode::enableFailure();
38 using namespace asg::msgSelectorCheck;
40 setMsgLevel(MSG::INFO);
45 std::string mapfileName{};
47 std::string recokey{};
49 std::string triggerkey{};
57 using namespace boost::program_options;
58 options_description
desc{
"Options" };
59 desc.add_options()(
"help,h",
"Help screen")(
61 value<int>(&inputlevel)->default_value(
static_cast<int>(MSG::INFO)),
62 "message level")(
"file,f",
63 value<std::string>(&
fileName)->default_value(
""),
65 "runno,r", value<int>(&
runno)->required(),
"run number: Required")(
66 "eta,e", value<float>(&
eta)->required(),
"eta: Required")(
67 "pt,p", value<float>(&
pt)->required(),
"pt: Required")(
69 value<std::string>(&
type)->required(),
70 "Simulation type: Required")(
72 value<std::string>(&
model)->default_value(
"FULL"),
73 "Correlation Model FULL (default),SIMPLIFIED,TOTAL,COMBMCTOYS")(
75 value<std::string>(&recokey)->default_value(
""),
76 "Reco working point Key")(
78 value<std::string>(&mapfileName)->default_value(
""),
79 "Map file name")(
"keyid,d",
80 value<std::string>(&idkey)->default_value(
""),
81 "Identification working point Key")(
83 value<std::string>(&isokey)->default_value(
""),
84 "Isolation working point Key")(
86 value<std::string>(&triggerkey)->default_value(
""),
87 "Trigger working point Key");
91 if (vm.count(
"help")) {
102 if (!(
type ==
"FullSim" ||
type ==
"AtlFast2")) {
110 if (!(
model ==
"COMBMCTOYS" ||
model ==
"FULL" ||
model ==
"SIMPLIFIED" ||
121 setMsgLevel(mylevel);
132 "AsgElectronEfficiencyCorrectionTool/ElEffCorrectionTool");
136 ElEffCorrectionTool.setProperty(
"CorrectionFileNameList",
inputFiles));
138 if (!mapfileName.empty()) {
139 ANA_CHECK(ElEffCorrectionTool.setProperty(
"MapFilePath", mapfileName));
141 if (!recokey.empty()) {
142 ANA_CHECK(ElEffCorrectionTool.setProperty(
"RecoKey", recokey));
144 if (!idkey.empty()) {
145 ANA_CHECK(ElEffCorrectionTool.setProperty(
"IdKey", idkey));
147 if (!isokey.empty()) {
148 ANA_CHECK(ElEffCorrectionTool.setProperty(
"IsoKey", isokey));
150 if (!triggerkey.empty()) {
151 ANA_CHECK(ElEffCorrectionTool.setProperty(
"TriggerKey", triggerkey));
153 ANA_CHECK(ElEffCorrectionTool.setProperty(
"ForceDataType", (
int)SimType));
154 ANA_CHECK(ElEffCorrectionTool.setProperty(
"OutputLevel", mylevel));
155 ANA_CHECK(ElEffCorrectionTool.setProperty(
"CorrelationModel",
model));
156 ANA_CHECK(ElEffCorrectionTool.initialize());
157 if (mylevel < MSG::INFO) {
158 asg::ToolStore::dumpToolConfig();
165 std::vector<std::pair<double, double>> pt_eta{ {
pt,
eta } };
175 int index = ElEffCorrectionTool->systUncorrVariationIndex(
el);
180 bool isToys =
model.find(
"TOY") != std::string::npos;
185 ElEffCorrectionTool,
el, nominalSF, totalPos, totalNeg, isToys) ==
189 <<
" : eta = " <<
el.eta() <<
" : Bin index = "
190 <<
index <<
" : SF = " << nominalSF <<
" + "
191 << totalPos <<
" - " << totalNeg <<
" <===");