25TLorentzVector
getTLV_reco(edm4hep::ReconstructedParticleData reco_part);
26TLorentzVector
getTLV_MC(edm4hep::MCParticleData MC_part);
48 edm4hep::ReconstructedParticleData sublead =
particle_1;
87ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
88merge_pairs(ROOT::VecOps::RVec<RecoParticlePair> pairs);
89int get_n_pairs(ROOT::VecOps::RVec<RecoParticlePair> pairs);
90ROOT::VecOps::RVec<RecoParticlePair>
97ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
99ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
104bool ZZllvvFilter(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
105 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids);
106bool WWlvlvFilter(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
107 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
108 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
112bool isPhoton(edm4hep::MCParticleData truth_part);
113bool isLep(edm4hep::MCParticleData truth_part);
114bool isLightLep(edm4hep::MCParticleData truth_part);
115bool isNeutrino(edm4hep::MCParticleData truth_part);
116bool isQuark(edm4hep::MCParticleData truth_part);
117bool isZ(edm4hep::MCParticleData truth_part);
118bool isW(edm4hep::MCParticleData truth_part);
119bool isTau(edm4hep::MCParticleData truth_part);
120bool isH(edm4hep::MCParticleData truth_part);
121bool isb(edm4hep::MCParticleData truth_part);
122bool isHadron(edm4hep::MCParticleData truth_part);
123bool isTop(edm4hep::MCParticleData truth_part);
124bool isGluon(edm4hep::MCParticleData truth_part);
125bool isc(edm4hep::MCParticleData truth_part);
126bool iss(edm4hep::MCParticleData truth_part);
127bool isMuon(edm4hep::MCParticleData truth_part);
129 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
130 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
132 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
133 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
135 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
136 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids);
138 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
139 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids);
142ROOT::VecOps::RVec<edm4hep::MCParticleData>
143getTruthZll(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
144 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids);
147ROOT::VecOps::RVec<RecoParticlePair>
148getOSPairs(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> leptons_in);
150 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> electrons_in,
151 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> muons_in);
155 ROOT::VecOps::RVec<RecoParticlePair> electron_pairs,
156 ROOT::VecOps::RVec<RecoParticlePair> muon_pairs);
157ROOT::VecOps::RVec<RecoParticlePair>
158getLeadingPair(ROOT::VecOps::RVec<RecoParticlePair> electron_pairs,
159 ROOT::VecOps::RVec<RecoParticlePair>
163ROOT::VecOps::RVec<RecoParticlePair>
164getPairs(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particles_in);
166 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particles_in);
167ROOT::VecOps::RVec<MCParticlePair>
168getPairs(ROOT::VecOps::RVec<edm4hep::MCParticleData> particles_in);
172 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particles_in);
175ROOT::VecOps::RVec<bool>
177 ROOT::VecOps::RVec<edm4hep::ParticleIDData> pid,
178 ROOT::VecOps::RVec<float> values,
int algoIndex);
179ROOT::VecOps::RVec<edm4hep::MCParticleData>
180getBhadron(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
181 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
182ROOT::VecOps::RVec<edm4hep::MCParticleData>
183getChadron(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
184 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
185ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
186get_tagged_jets(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> jets,
187 ROOT::VecOps::RVec<edm4hep::ParticleIDData> jet_tags,
188 ROOT::VecOps::RVec<podio::ObjectID> jet_tags_indices,
189 ROOT::VecOps::RVec<float> jet_tags_values,
int algoIndex);
190ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
192 ROOT::VecOps::RVec<int> index,
193 ROOT::VecOps::RVec<edm4hep::ParticleIDData> pid,
194 ROOT::VecOps::RVec<float> values,
int algoIndex);
198 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts,
199 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_particles,
201ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
202get_tau_jets(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> jets,
203 ROOT::VecOps::RVec<int> index,
204 ROOT::VecOps::RVec<edm4hep::ParticleIDData> pid,
205 ROOT::VecOps::RVec<float> tag_values,
int algoIndex);
206ROOT::VecOps::RVec<edm4hep::MCParticleData>
207getTruthTauHads(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
208 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
209 ROOT::VecOps::RVec<podio::ObjectID> parent_ids, TString type);
210ROOT::VecOps::RVec<edm4hep::MCParticleData>
211getTruthTau(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
212 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
213 ROOT::VecOps::RVec<podio::ObjectID> parent_ids, TString type);
214ROOT::VecOps::RVec<edm4hep::MCParticleData>
215getTruthTauLeps(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
216 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
217 ROOT::VecOps::RVec<podio::ObjectID> parent_ids, TString type);
220ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
221sel_isolated(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> sel_parts,
222 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> check_parts,
223 float dR_thres = 0.4);
229 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_1,
230 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_2);
231ROOT::VecOps::RVec<edm4hep::MCParticleData>
233 ROOT::VecOps::RVec<edm4hep::MCParticleData> particle_2);
237ROOT::VecOps::RVec<float>
238get_mT(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_1,
239 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_2);
240ROOT::VecOps::RVec<float>
241get_mT_new(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_1,
242 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_2);
243ROOT::VecOps::RVec<float>
244get_m_pseudo(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> Z_ll_pair,
245 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET_obj);
246ROOT::VecOps::RVec<float>
247get_mT_pseudo(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> Z_ll_pair,
248 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET_obj);
249TLorentzVector
getTLV_MET(edm4hep::ReconstructedParticleData met_object);
265 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_1,
266 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_2,
267 TString type =
"dR");
269 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_1,
270 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET_obj,
271 TString type =
"dR");
273ROOT::VecOps::RVec<float>
275 TString type =
"dR");
276ROOT::VecOps::RVec<float>
278 TString type =
"dR");
281ROOT::VecOps::RVec<float>
282get_HT2(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_1,
283 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> particle_2);
284ROOT::VecOps::RVec<float>
285get_HT_wInv(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET,
286 ROOT::VecOps::RVec<RecoParticlePair> ll_pair,
287 ROOT::VecOps::RVec<RecoParticlePair> bb_pair);
288ROOT::VecOps::RVec<float>
289get_HT_true(ROOT::VecOps::RVec<RecoParticlePair> ll_pair,
290 ROOT::VecOps::RVec<RecoParticlePair> bb_pair);
291ROOT::VecOps::RVec<float>
get_HT2_ratio(ROOT::VecOps::RVec<float> HT2,
292 ROOT::VecOps::RVec<float> HT_wInv);
293ROOT::VecOps::RVec<float>
295 ROOT::VecOps::RVec<float> HT_true,
bool doSqrt =
true);
298ROOT::VecOps::RVec<RecoParticlePair>
300 ROOT::VecOps::RVec<RecoParticlePair> bb_pair);
301ROOT::VecOps::RVec<float>
302get_mlb_reco(ROOT::VecOps::RVec<RecoParticlePair> lb_pairs);
303ROOT::VecOps::RVec<float>
305 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET);
308ROOT::VecOps::RVec<float>
309get_pzeta_vis(ROOT::VecOps::RVec<RecoParticlePair> lepton_pair);
310ROOT::VecOps::RVec<float>
312 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET);
313ROOT::VecOps::RVec<float>
get_dzeta(ROOT::VecOps::RVec<float> pzeta_miss,
314 ROOT::VecOps::RVec<float> pzeta_vis,
315 float factor = 0.85);
318ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
319build_HZZ(ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> Z_ll_pair,
320 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET_obj);
324 edm4hep::MCParticleData truth_part,
325 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
326 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids);
329ROOT::VecOps::RVec<edm4hep::MCParticleData>
330get_truth_Higgs(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
331 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
332 TString decay =
"ZZ");
333ROOT::VecOps::RVec<edm4hep::MCParticleData>
335 ROOT::VecOps::RVec<podio::ObjectID> daughter_ids,
336 TString decay =
"ZZ");
340 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
341 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
343 edm4hep::MCParticleData truth_part,
344 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
345 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
347 edm4hep::MCParticleData truth_part,
348 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
349 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
351 edm4hep::MCParticleData truth_part,
352 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
353 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
355 edm4hep::MCParticleData truth_part,
356 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
357 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
359 edm4hep::MCParticleData truth_part,
360 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
361 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles);
362ROOT::VecOps::RVec<edm4hep::MCParticleData>
363getLepsFromTau(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
364 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
365ROOT::VecOps::RVec<edm4hep::MCParticleData>
366getLepsFromW(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
367 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
368ROOT::VecOps::RVec<edm4hep::MCParticleData>
369getLepsFromZ(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
370 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
371ROOT::VecOps::RVec<edm4hep::MCParticleData>
372getPhotonsFromH(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
373 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
375 ROOT::VecOps::RVec<edm4hep::MCParticleData> leps_from_tau);
376ROOT::VecOps::RVec<edm4hep::MCParticleData>
377getTruthEle(ROOT::VecOps::RVec<edm4hep::MCParticleData> leps_from_tau);
378ROOT::VecOps::RVec<edm4hep::MCParticleData>
379getTruthMu(ROOT::VecOps::RVec<edm4hep::MCParticleData> leps_from_tau);
383 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> visible_particle,
384 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET);
386 ROOT::VecOps::RVec<edm4hep::MCParticleData> visible_particle,
387 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> MET);
389 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> ll_pair_merged,
390 ROOT::VecOps::RVec<float> x1, ROOT::VecOps::RVec<float> x2);
392 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> bb_pair_merged,
393 ROOT::VecOps::RVec<float> mtautau_col);
398 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts_to_match,
399 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_parts_all,
400 float dR_thres = 0.1);
406 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> test_parts,
407 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_parts_all,
408 float dR_min = 0.3,
float pT_min = 0.5,
bool exclude_light_leps =
true);
410ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
411filter_lightLeps(ROOT::VecOps::RVec<int> recind, ROOT::VecOps::RVec<int> mcind,
412 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco,
413 ROOT::VecOps::RVec<edm4hep::MCParticleData> mc);
416ROOT::VecOps::RVec<edm4hep::MCParticleData>
417getNusFromW(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
418 ROOT::VecOps::RVec<podio::ObjectID> parent_ids);
419ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
420getTruthMETObj(ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_particles,
421 ROOT::VecOps::RVec<podio::ObjectID> parent_ids,
422 TString type =
"hww_only");
426 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts,
427 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_particles,
428 float dR_thres = 0.1);
429ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
431 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts,
432 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_particles,
433 float dR_thres = 0.1);
434ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
436 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts,
437 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts_exc,
438 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_particles,
439 float dR_thres = 0.1);
441 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_parts,
442 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_particles,
443 float dR_thres = 0.1);
444ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
446 edm4hep::MCParticleData truth_part_to_match,
447 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> check_reco_parts,
448 float dR_thres = 0.1);
450 edm4hep::ReconstructedParticleData reco_part_to_match,
451 ROOT::VecOps::RVec<edm4hep::MCParticleData> check_mc_parts,
452 float dR_thres = 0.1);
454 edm4hep::MCParticleData truth_part_to_match,
455 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> check_reco_parts,
456 float dR_thres = 0.1);
457ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
459 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_leps_to_match,
460 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_electrons,
461 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_muons,
462 float dR_thres = 0.1);
464 ROOT::VecOps::RVec<edm4hep::MCParticleData> truth_leps_to_match,
465 ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> reco_parts,
466 int pdg_ID,
float dR_thres = 0.1);
477ROOT::VecOps::RVec<T>
get(
const ROOT::VecOps::RVec<int> &index,
478 const ROOT::VecOps::RVec<T> &in) {
479 ROOT::VecOps::RVec<T> result;
480 result.reserve(index.size());
481 for (
size_t i = 0; i < index.size(); ++i) {
483 result.push_back(in[index[i]]);