16 parseTriggerString(L1Phase1_thresholds);
19 TrigTauInfo::TrigTauInfo(
const std::string&
trigger,
const std::map<std::string, float>& L1Phase1_thresholds,
const std::map<std::string, uint64_t>& L1Phase1_threshold_patterns)
22 parseTriggerString(L1Phase1_thresholds, L1Phase1_threshold_patterns);
28 parseTriggerString(L1Phase1ThrMap_eTAU, L1Phase1ThrMap_jTAU);
36 if(clean_trigger.size() > 3 && clean_trigger.rfind(
"L1_", 0) == 0) {
37 clean_trigger =
"L1" + clean_trigger.substr(3);
40 std::vector<std::string> sections;
51 std::regex l1_tau_rgx(
"(\\d*)(e|j|c|)TAU(\\d+)(L|M|T|HL|HM|HT|H|IM|I|)");
52 std::regex l1_toposeparate_rgx(
"^(\\d{0,2})(DETA|DPHI)(\\d{0,2})$");
53 std::regex topo_rgx(
"^.*(invm|dR|deta|dphi)AB.*$");
54 std::vector<std::regex*> all_regexes = {&tau_rgx, &elec_rgx, &muon_rgx, &gamma_rgx, &jet_rgx, &met_rgx, &l1_rgx};
56 std::regex tau_type_rgx(
"^(ptonly|tracktwoMVA|tracktwoMVABDT|tracktwoLLP|trackLRT)$");
59 std::regex_token_iterator<std::string::iterator> rend;
62 std::vector<std::string>
leg;
63 for(
size_t i = 0;
i < sections.size();
i++) {
64 leg.push_back(sections[
i]);
67 if(
i == sections.size() - 1 || (std::any_of(all_regexes.begin(), all_regexes.end(), [§ions,
i](
const std::regex*
rgx) { return std::regex_match(sections[i+1], *rgx); }))) {
69 if(std::regex_match(
leg[0],
match, tau_rgx)) {
70 size_t multiplicity =
match[1].str() ==
"" ? 1 : std::stoi(
match[1].
str());
72 auto itr = find_if(
leg.begin(),
leg.end(), [tau_type_rgx](
const std::string&
s) { return std::regex_match(s, tau_type_rgx); });
73 std::string
type = itr !=
leg.end() ? *itr :
"";
75 for(
size_t j = 0; j < multiplicity; j++) {
79 }
else if(std::regex_match(
leg[0],
match, elec_rgx)) {
80 size_t multiplicity =
match[1].str() ==
"" ? 1 : std::stoi(
match[1].
str());
83 }
else if(std::regex_match(
leg[0],
match, muon_rgx)) {
84 size_t multiplicity =
match[1].str() ==
"" ? 1 : std::stoi(
match[1].
str());
87 }
else if(std::regex_match(
leg[0],
match, gamma_rgx)) {
88 size_t multiplicity =
match[1].str() ==
"" ? 1 : std::stoi(
match[1].
str());
91 }
else if(std::regex_match(
leg[0],
match, jet_rgx)) {
92 size_t multiplicity =
match[1].str() ==
"" ? 1 : std::stoi(
match[1].
str());
95 }
else if(std::regex_match(
leg[0],
match, met_rgx)) {
98 }
else if(std::regex_match(
leg[0],
match, noalg_rgx)) {
100 }
else if(std::regex_match(
leg[0], l1_rgx)) {
101 for(
size_t j = 0; j <
leg.size(); j++) {
102 if(std::regex_match(
leg[j], topo_rgx))
continue;
105 if(
leg[j].
find(
'-') != std::string::npos || std::regex_match(
leg[j], l1_toposeparate_rgx)) {
108 if(
leg[0] ==
"L1TAU60" &&
leg[j] ==
"DR-TAU12ITAU12I")
leg[j] =
"TAU12IM";
109 else if(
leg.size() == 1 && (
leg[0] ==
"L1DR-TAU20ITAU12I" ||
leg[0] ==
"L1DR-TAU20ITAU12I-J25")) {
111 leg[0] =
"L1TAU20IM";
112 leg.push_back(
"TAU12IM");
133 std::regex_token_iterator<std::string::iterator> rgx_iter(
m_L1Item.begin(),
m_L1Item.end(), l1_tau_rgx);
134 while(rgx_iter != rend) {
135 std::string
s = *rgx_iter;
136 std::regex_match(
s,
match, l1_tau_rgx);
137 size_t multiplicity =
match[1].str() ==
"" ? 1 : std::stoi(
match[1].
str());
138 std::string item_type =
match[2].str();
140 std::string item_isolation =
match[4].str();
143 if(remove_L1_phase1_thresholds && (item_type ==
"e" || item_type ==
"j" || item_type ==
"c"))
threshold = -1;
145 for(
size_t j = 0; j < multiplicity; j++) {
193 if(item_type ==
"eTAU" || item_type ==
"cTAU") {
195 }
else if(item_type ==
"jTAU") {