126 {
127 int tid = 6*topcharge, wid = 24*topcharge, bid = 5*topcharge,
gid = 21,
wildcard = 0;
128
129 int i_top = -1;
130 Vec4 p_top, p_b, p_g, p_g1, p_g2;
131 for (
int i = 0;
i <
e.size();
i++)
132 if (e[i].id() == tid) {
135 }
136 if (i_top == -1) return -1.0;
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154 vector<Vec4> momenta;
155 vector<int> positions;
156
157
158 if (
match_decay(i_top, e, std::vector<int> {wid, bid}, positions, momenta,
false) ) {
160 int i_b = positions[1];
161
162 if (
match_decay(i_b, e, std::vector<int> {bid,
gid}, positions, momenta) )
164
165 else
168 }
169
170 else if (
match_decay(i_top, e, std::vector<int> {wid, bid,
gid}, positions, momenta,
false) ) {
172 int i_b = positions[1], i_g = positions[2];
173
174 if (
match_decay(i_b, e, std::vector<int> {bid,
gid}, positions, momenta) )
176
177 else
179
182
183 else
184 h2 = -1;
186 }
187
188 else {
190 }
191 }
bool match_decay(int iparticle, const Event &e, const std::vector< int > &ids, std::vector< int > &positions, std::vector< Vec4 > &momenta, bool exitOnExtraLegs=true)