21 indices_matched.clear();
39 vector<array<float,3>> jets;
40 for (
unsigned int i=0;
i<eta.size(); ++
i) {
41 jets.push_back({pt[
i],eta[
i],phi[
i]});
44 for (
auto jet : jets) {
45 pt_truth .push_back(jet[0]);
46 eta_truth .push_back(jet[1]);
47 phi_truth .push_back(jet[2]);
51 vector<array<float,3>> jets;
52 for (
unsigned int i=0;
i<eta.size(); ++
i) {
53 jets.push_back({pt[
i],eta[
i],phi[
i]});
59 for (
auto jet : jets) {
61 pt_reco .push_back(jet[0]);
62 eta_reco .push_back(jet[1]);
63 phi_reco .push_back(jet[2]);
69 indices_matched.clear();
71 vector<bool> is_matched (eta_reco.size(),
false);
86 for (
unsigned int T=0;
T<eta_truth.size();++
T) {
89 bool found_match {
false };
90 for (
unsigned int R=0;
R<eta_reco.size();++
R) {
91 if (pt_reco[
R]<min_pT_reco)
continue;
93 if (is_matched[
R])
continue;
94 float dphi = fabs(phi_truth[
T]-phi_reco[R]);
95 while (dphi>M_PI) dphi = fabs(dphi - 2*M_PI);
96 const float deta = eta_truth[
T]-eta_reco[
R];
97 const float R2_comp = deta*deta + dphi*
dphi;
100 is_matched[
R] =
true;
101 indices_matched.push_back({
T,R});
107 if (!found_match) indices_miss.push_back(
T);
109 for (
unsigned int R=0;R<eta_reco.size();++
R) {
110 if (pt_reco[R]<min_pT_reco)
continue;
111 if (!is_matched[R]) indices_fake.push_back(R);
113 return {
static_cast<unsigned int>(indices_matched.size()),
114 static_cast<unsigned int>(indices_miss.size()),
115 static_cast<unsigned int>(indices_fake.size())};