91 TypeRegexes iparticle_type_regexes {
94 {
"(pt|deta|dphi|energy)"_r, ConstituentsEDMType::CUSTOM_GETTER}
96 TypeRegexes trk_type_regexes {
101 {
"numberOf.*21p9"_r, ConstituentsEDMType::CUSTOM_GETTER},
102 {
"numberOf.*"_r, ConstituentsEDMType::UCHAR},
103 {
"btagIp_(d0|z0SinTheta)Uncertainty"_r, ConstituentsEDMType::FLOAT},
104 {
"(numberDoF|chiSquared|qOverP|theta)"_r, ConstituentsEDMType::FLOAT},
105 {
"(^.*[_])?(d|z)0.*"_r, ConstituentsEDMType::CUSTOM_GETTER},
106 {
"(log_)?(ptfrac|dr|pt).*"_r, ConstituentsEDMType::CUSTOM_GETTER},
107 {
"(deta|dphi)"_r, ConstituentsEDMType::CUSTOM_GETTER},
108 {
"phi|theta|qOverP"_r, ConstituentsEDMType::FLOAT},
109 {
"(phi|theta|qOverP)Uncertainty"_r, ConstituentsEDMType::CUSTOM_GETTER},
110 {
"leptonID"_r, ConstituentsEDMType::CHAR}
117 SortRegexes trk_sort_regexes {
118 {
".*absSd0sort"_r, ConstituentsSortOrder::ABS_D0_SIGNIFICANCE_DESCENDING},
119 {
".*sd0sort"_r, ConstituentsSortOrder::D0_SIGNIFICANCE_DESCENDING},
120 {
".*ptsort"_r, ConstituentsSortOrder::PT_DESCENDING},
121 {
".*absD0DescendingSort"_r, ConstituentsSortOrder::ABS_D0_DESCENDING},
123 SelRegexes trk_select_regexes {
124 {
".*_ip3d_.*"_r, ConstituentsSelection::IP3D_2018},
125 {
".*_dipsTightUpgrade_.*"_r, ConstituentsSelection::DIPS_TIGHT_UPGRADE},
126 {
".*_dipsLooseUpgrade_.*"_r, ConstituentsSelection::DIPS_LOOSE_UPGRADE},
128 {
".*_dipsLoose202102_.*"_r, ConstituentsSelection::DIPS_LOOSE_202102},
129 {
".*_loose202102NoIpCuts_.*"_r, ConstituentsSelection::LOOSE_202102_NOIP},
130 {
".*_r22default_.*"_r, ConstituentsSelection::R22_DEFAULT},
131 {
".*_r22loose_.*"_r, ConstituentsSelection::R22_LOOSE},
134 if (
name.find(
"tracks") != std::string::npos){
136 if (flip_config == FlipTagConfig::FLIP_SIGN || flip_config == FlipTagConfig::NEGATIVE_IP_ONLY){
137 flip_sequences=
std::regex(
".*signed_[dz]0.*");
139 if (flip_config == FlipTagConfig::SIMPLE_FLIP){
140 flip_sequences=
std::regex(
"(.*signed_[dz]0.*)|d0|z0SinTheta");
142 config = get_track_input_config(
143 name, input_variables,
144 trk_type_regexes, trk_sort_regexes, trk_select_regexes,
145 flip_sequences, flip_config);
147 config.output_name =
"tracks";
149 else if (
name.find(
"flows") != std::string::npos){
150 config = get_iparticle_input_config(
151 name, input_variables,
152 iparticle_type_regexes);
153 config.type = ConstituentsType::IPARTICLE;
154 config.output_name =
"flows";
157 throw std::runtime_error(
158 "Unknown constituent type: " +
name +
". Only tracks and flows are supported."