Skip to content

Commit a43049a

Browse files
committed
Restore reco decay
1 parent 803a34a commit a43049a

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

Common/Core/RecoDecay.h

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <tuple> // std::apply
2626
#include <utility> // std::move
2727
#include <vector> // std::vector
28-
#include <iostream>
2928

3029
// ROOT includes
3130
#include <TMCProcess.h> // for VMC Particle Production Process
@@ -919,11 +918,7 @@ struct RecoDecay {
919918
}
920919
// Check the PDG code of the particle.
921920
auto pdgCandidate = candidate.pdgCode();
922-
bool print = false; // Print debug messages only if print is true.
923921
// Printf("MC Gen: Candidate PDG: %d", pdgCandidate);
924-
if (std::abs(pdgCandidate) == 413) {
925-
print = true; // Print debug messages for D* candidates.
926-
}
927922
if (pdgCandidate == pdgParticle) { // exact PDG match
928923
sgn = 1;
929924
} else if (acceptAntiParticles && pdgCandidate == -pdgParticle) { // antiparticle PDG match
@@ -934,56 +929,29 @@ struct RecoDecay {
934929
}
935930
// Check the PDG codes of the decay products.
936931
if (N > 0) {
937-
if (print) {
938-
std::cout << "MC Gen: Checking decay products of " << N << " daughters" << std::endl;
939-
// Printf("MC Gen: Checking decay products of %ld daughters", N);
940-
}
941932
// Printf("MC Gen: Checking %d daughters", N);
942933
std::vector<int> arrAllDaughtersIndex; // vector of indices of all daughters
943934
// Check the daughter indices.
944935
if (!candidate.has_daughters()) {
945-
if (print) {
946-
std::cout << "MC Gen: Rejected: bad daughter index range: " << candidate.daughtersIds().front() << "-" << candidate.daughtersIds().back() << std::endl;
947-
// Printf("MC Gen: Rejected: bad daughter index range: %d-%d", candidate.daughtersIds().front(), candidate.daughtersIds().back());
948-
}
949936
// Printf("MC Gen: Rejected: bad daughter index range: %d-%d", candidate.daughtersIds().front(), candidate.daughtersIds().back());
950937
return false;
951938
}
952939
// Check that the number of direct daughters is not larger than the number of expected final daughters.
953940
if constexpr (!checkProcess) {
954941
if (candidate.daughtersIds().back() - candidate.daughtersIds().front() + 1 > static_cast<int>(N)) {
955-
if (print) {
956-
std::cout << "MC Gen: Rejected: too many direct daughters: " << candidate.daughtersIds().back() - candidate.daughtersIds().front() + 1
957-
<< " (expected " << N << " final)" << std::endl;
958-
// Printf("MC Gen: Rejected: too many direct daughters: %d (expected %ld final)", candidate.daughtersIds().back() - candidate.daughtersIds().front() + 1, N);
959-
}
960942
// Printf("MC Gen: Rejected: too many direct daughters: %d (expected %ld final)", candidate.daughtersIds().back() - candidate.daughtersIds().front() + 1, N);
961943
return false;
962944
}
963945
}
964946
// Get the list of actual final daughters.
965947
getDaughters<checkProcess>(candidate, &arrAllDaughtersIndex, arrPdgDaughters, depthMax);
966-
if (print) {
967-
std::cout << "MC Gen: Mother " << candidate.globalIndex() << " has " << arrAllDaughtersIndex.size() << " final daughters:";
968-
// Printf("MC Gen: Mother %ld has %ld final daughters:", candidate.globalIndex(), arrAllDaughtersIndex.size());
969-
for (auto i : arrAllDaughtersIndex) {
970-
std::cout << " " << i;
971-
// Printf(" %d", i);
972-
}
973-
std::cout << std::endl;
974-
// Printf("\n");
975-
}
976948
// printf("MC Gen: Mother %ld has %ld final daughters:", candidate.globalIndex(), arrAllDaughtersIndex.size());
977949
// for (auto i : arrAllDaughtersIndex) {
978950
// printf(" %d", i);
979951
// }
980952
// printf("\n");
981953
// Check whether the number of final daughters is equal to the required number.
982954
if (arrAllDaughtersIndex.size() != N) {
983-
if (print) {
984-
std::cout << "MC Gen: Rejected: incorrect number of final daughters: " << arrAllDaughtersIndex.size() << " (expected " << N << ")" << std::endl;
985-
// Printf("MC Gen: Rejected: incorrect number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
986-
}
987955
// Printf("MC Gen: Rejected: incorrect number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
988956
return false;
989957
}
@@ -1001,10 +969,6 @@ struct RecoDecay {
1001969
for (auto indexDaughterI : arrAllDaughtersIndex) { // o2-linter: disable=const-ref-in-for-loop (int elements)
1002970
auto candidateDaughterI = particlesMC.rawIteratorAt(indexDaughterI - particlesMC.offset()); // ith daughter particle
1003971
auto pdgCandidateDaughterI = candidateDaughterI.pdgCode(); // PDG code of the ith daughter
1004-
if (print) {
1005-
std::cout << "MC Gen: Daughter " << indexDaughterI << " PDG: " << pdgCandidateDaughterI << std::endl;
1006-
// Printf("MC Gen: Daughter %d PDG: %d", indexDaughterI, pdgCandidateDaughterI);
1007-
}
1008972
// Printf("MC Gen: Daughter %d PDG: %d", indexDaughterI, pdgCandidateDaughterI);
1009973
bool isPdgFound = false; // Is the PDG code of this daughter among the remaining expected PDG codes?
1010974
for (std::size_t iProngCp = 0; iProngCp < N; ++iProngCp) {
@@ -1023,10 +987,6 @@ struct RecoDecay {
1023987
*listIndexDaughters = arrAllDaughtersIndex;
1024988
}
1025989
}
1026-
if (print) {
1027-
std::cout << "MC Gen: Accepted: m: " << candidate.globalIndex() << std::endl;
1028-
// Printf("MC Gen: Accepted: m: %ld", candidate.globalIndex());
1029-
}
1030990
// Printf("MC Gen: Accepted: m: %d", candidate.globalIndex());
1031991
if (sign) {
1032992
*sign = sgn;

0 commit comments

Comments
 (0)