129 TypeRegexes electron_type_regexes {
131 {
"(deltaEta1|deltaPhiRescaled2|"
132 "ftag_energyOverP|Rhad|Rhad1|"
133 "Eratio|weta2|Rphi|Reta|wtots1|f1|f3|pt|eta|phi)"_r, ConstituentsEDMType::FLOAT},
135 {
"(ftag_.*|ptfrac|ptrel|dr)"_r, ConstituentsEDMType::CUSTOM_GETTER},
137 {
"(numberOf.*|d0.*|abs_eta|qOverP|eProbabilityHT)"_r, ConstituentsEDMType::CUSTOM_GETTER}
139 TypeRegexes hits_type_regexes {
142 {
"(j|a|b)"_r, ConstituentsEDMType::CUSTOM_GETTER}
144 TypeRegexes flow_type_regexes {
147 {
"(pt|deta|dphi|dr|energy|isCharged)"_r, ConstituentsEDMType::CUSTOM_GETTER}
149 TypeRegexes trk_type_regexes {
154 {
"numberOf.*21p9"_r, ConstituentsEDMType::CUSTOM_GETTER},
155 {
"numberOf.*"_r, ConstituentsEDMType::UCHAR},
156 {
"btagIp_(d0|z0SinTheta)Uncertainty"_r, ConstituentsEDMType::FLOAT},
157 {
"(numberDoF|chiSquared|qOverP|theta)"_r, ConstituentsEDMType::FLOAT},
158 {
"(^.*[_])?(d|z)0.*"_r, ConstituentsEDMType::CUSTOM_GETTER},
159 {
"(log_)?(ptfrac|dr|pt).*"_r, ConstituentsEDMType::CUSTOM_GETTER},
160 {
"(deta|dphi)"_r, ConstituentsEDMType::CUSTOM_GETTER},
161 {
"phi|theta|qOverP"_r, ConstituentsEDMType::FLOAT},
162 {
"(phi|theta|qOverP)Uncertainty"_r, ConstituentsEDMType::CUSTOM_GETTER},
163 {
"(leptonID|muon_quality)"_r, ConstituentsEDMType::CHAR},
164 {
"(pT_wrtJet|pZ_wrtJet|EFrac_wrtJet).*"_r, ConstituentsEDMType::CUSTOM_GETTER},
165 {
"muon_(qOverPratio|momentumBalanceSignificance|scatteringNeighbourSignificance)"_r, ConstituentsEDMType::FLOAT},
166 {
"lifetimeSigned.*"_r, ConstituentsEDMType::CUSTOM_GETTER}
173 SortRegexes trk_sort_regexes {
174 {
".*absSd0sort"_r, ConstituentsSortOrder::ABS_D0_SIGNIFICANCE_DESCENDING},
175 {
".*sd0sort"_r, ConstituentsSortOrder::D0_SIGNIFICANCE_DESCENDING},
176 {
".*ptsort"_r, ConstituentsSortOrder::PT_DESCENDING},
177 {
".*absD0DescendingSort"_r, ConstituentsSortOrder::ABS_D0_DESCENDING},
179 SelRegexes trk_select_regexes {
180 {
".*_ip3d_.*"_r, ConstituentsSelection::IP3D_2018},
181 {
".*_dipsTightUpgrade_.*"_r, ConstituentsSelection::DIPS_TIGHT_UPGRADE},
182 {
".*_dipsLooseUpgrade_.*"_r, ConstituentsSelection::DIPS_LOOSE_UPGRADE},
184 {
".*_dipsLoose202102_.*"_r, ConstituentsSelection::DIPS_LOOSE_202102},
185 {
".*_loose202102NoIpCuts_.*"_r, ConstituentsSelection::LOOSE_202102_NOIP},
186 {
".*_r22default_.*"_r, ConstituentsSelection::R22_DEFAULT},
187 {
".*_r22loose_.*"_r, ConstituentsSelection::R22_LOOSE},
191 SelRegexes electron_select_regexes {
192 {
".*_r22default.*"_r, ConstituentsSelection::R22_DEFAULT}
195 if (
name.find(
"tracks") != std::string::npos){
197 if (flip_config == FlipTagConfig::FLIP_SIGN || flip_config == FlipTagConfig::NEGATIVE_IP_ONLY){
198 flip_sequences=
std::regex(
".*signed_[dz]0.*");
200 if (flip_config == FlipTagConfig::SIMPLE_FLIP){
201 flip_sequences=
std::regex(
"(.*signed_[dz]0.*)|d0|z0SinTheta");
203 config = get_track_input_config(
204 name, input_variables,
205 trk_type_regexes, trk_sort_regexes, trk_select_regexes,
206 flip_sequences, flip_config);
208 config.output_name =
"tracks";
210 else if (
name.find(
"flows") != std::string::npos){
211 config = get_flow_input_config(
212 name, input_variables,
214 config.type = ConstituentsType::FLOW_ELEMENT;
215 config.output_name =
"flows";
217 else if (
name.find(
"hits") != std::string::npos){
219 name, input_variables,
221 config.type = ConstituentsType::HIT;
222 config.output_name =
"hits";
224 else if (
name.find(
"electrons") != std::string::npos){
226 name, input_variables,
227 electron_type_regexes,
228 electron_select_regexes);
229 config.type = ConstituentsType::ELECTRON;
230 config.output_name =
"electrons";
233 throw std::runtime_error(
234 "Unknown constituent type: " +
name +
". Only tracks, flows, hits and electrons are supported."