The following code is unreachable in the loop but left commented for further review else if(leading_jet_found && subleading_jet_found && !third_jet_found){ tlj.SetPxPyPzE(jet->px(),jet->py(),jet->pz(),jet->e()); //only saves leading jet third_jet_found = true; break; }
163 {
164
165
166 const bool exclude_topdecay = true;
167 std::vector<fastjet::PseudoJet> vec_status62;
168
170
171
172
174
175
176
178
181
183 {
184 continue;
185 }
186
187
188 if (exclude_topdecay)
189 {
191 {
192 topParent = topParent->
parent(0);
194 {
197 }
199 }
200 }
201
202
205 vec_status62.push_back(tmp);
206 }
207
208 }
209 }
210
211
212 fastjet::JetDefinition
jetDef(fastjet::antikt_algorithm, Rparam, fastjet::E_scheme, fastjet::Best);
213
214 std::vector <fastjet::PseudoJet> inclusivePertJet62, sortedPertJet62;
215
216 fastjet::ClusterSequence clustSeqPertJet62(vec_status62, jetDef);
217
218 inclusivePertJet62 = clustSeqPertJet62.inclusive_jets(pt_min * 1000.);
219 sortedPertJet62 = fastjet::sorted_by_pt(inclusivePertJet62);
220
221
222 if(inclusivePertJet62.size()==0){
223
224 return false;
225 }
226
227 if (inclusivePertJet62.size()!=0)
228 {
229
230 for (
long unsigned int i = 0;
i < ttbarDecayProducts.size(); ++
i)
231 {
232 for (
long unsigned int j = 0;
j < sortedPertJet62.size(); ++
j)
233 {
234 if (sortedPertJet62.at(j).delta_R(ttbarDecayProducts[i]) <= 0.4
235 && std::abs(decayProduct_pdgID[i]) != 11
236 && std::abs(decayProduct_pdgID[i]) != 12
237 && std::abs(decayProduct_pdgID[i]) != 13
238 && std::abs(decayProduct_pdgID[i]) != 14
239
240 && std::abs(decayProduct_pdgID[i]) != 16
241 )
242 {
243
244 sortedPertJet62.erase(sortedPertJet62.begin() + j);
245
247 }
248 }
249
250 }
251
252 bool leading_jet_found = false;
253
254
255
256
257
258
259
260 for (std::vector<fastjet::PseudoJet>::iterator jet = sortedPertJet62.begin(); jet != sortedPertJet62.end(); ++jet)
261 {
262 if(!leading_jet_found){
263 lj.SetPxPyPzE(jet->px(),jet->py(),jet->pz(),jet->e());
264 leading_jet_found = true;
265 }
266 else {
267 slj.SetPxPyPzE(jet->px(),jet->py(),jet->pz(),jet->e());
268
269
270
271 break;
272 }
280 }
281 }
282
283
284 if (lj.Pt() >= pt_min*1000.) return true;
285
286 return false;
287
288 }
const TruthParticle_v1 * parent(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
int absPdgId() const
Absolute PDG ID code (often useful).
size_t nParents() const
Number of parents of this particle.
size_t nChildren() const
Number of children of this particle.
std::set< std::string > exclude
list of directories to be excluded
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses