162 {
163
164
165 const bool exclude_topdecay = true;
166 std::vector<fastjet::PseudoJet> vec_status62;
167
169
170
171
173
174
175
177
180
182 {
183 continue;
184 }
185
186
187 if (exclude_topdecay)
188 {
190 {
191 topParent = topParent->
parent(0);
193 {
196 }
198 }
199 }
200
201
204 vec_status62.push_back(tmp);
205 }
206
207 }
208 }
209
210
211 fastjet::JetDefinition
jetDef(fastjet::antikt_algorithm, Rparam, fastjet::E_scheme, fastjet::Best);
212
213 std::vector <fastjet::PseudoJet> inclusivePertJet62, sortedPertJet62;
214
215 fastjet::ClusterSequence clustSeqPertJet62(vec_status62, jetDef);
216
217 inclusivePertJet62 = clustSeqPertJet62.inclusive_jets(pt_min * 1000.);
218 sortedPertJet62 = fastjet::sorted_by_pt(inclusivePertJet62);
219
220
221 if(inclusivePertJet62.size()==0){
222
223 return false;
224 }
225
226 if (inclusivePertJet62.size()!=0)
227 {
228
229 for (
long unsigned int i = 0;
i < ttbarDecayProducts.size(); ++
i)
230 {
231 for (
long unsigned int j = 0;
j < sortedPertJet62.size(); ++
j)
232 {
233 if (sortedPertJet62[j].
delta_R(ttbarDecayProducts[i]) <= 0.4
234 && abs(decayProduct_pdgID[i]) != 11
235 && abs(decayProduct_pdgID[i]) != 12
236 && abs(decayProduct_pdgID[i]) != 13
237 && abs(decayProduct_pdgID[i]) != 14
238
239 && abs(decayProduct_pdgID[i]) != 16
240 )
241 {
242
243 sortedPertJet62.erase(sortedPertJet62.begin() + j);
244
246 }
247 }
248
249 }
250
251 bool leading_jet_found = false;
252 bool subleading_jet_found = false;
253 bool third_jet_found = false;
254
255 for (std::vector<fastjet::PseudoJet>::iterator jet = sortedPertJet62.begin(); jet != sortedPertJet62.end(); ++jet)
256 {
257 if(!leading_jet_found){
258 lj.SetPxPyPzE(jet->px(),jet->py(),jet->pz(),jet->e());
259 leading_jet_found = true;
260 }
261 else if(leading_jet_found && !subleading_jet_found){
262 slj.SetPxPyPzE(jet->px(),jet->py(),jet->pz(),jet->e());
263 subleading_jet_found = true;
264 break;
265 }
266 else if(leading_jet_found && subleading_jet_found && !third_jet_found){
267 tlj.SetPxPyPzE(jet->px(),jet->py(),jet->pz(),jet->e());
268 third_jet_found = true;
269 break;
270 }
271 }
272 }
273
274
275 if (lj.Pt() >= pt_min*1000.) return true;
276
277 return false;
278
279 }
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
delta_R(eta1, phi1, eta2, phi2)