2424#include < cstdio>
2525#include < utility> // std::move
2626#include < vector> // std::vector
27- #include < iostream>
2827
2928// ROOT includes
3029#include < TMCProcess.h> // for VMC Particle Production Process
@@ -905,11 +904,7 @@ struct RecoDecay {
905904 }
906905 // Check the PDG code of the particle.
907906 auto pdgCandidate = candidate.pdgCode ();
908- bool print = false ; // Print debug messages only if print is true.
909907 // Printf("MC Gen: Candidate PDG: %d", pdgCandidate);
910- if (std::abs (pdgCandidate) == 413 ) {
911- print = true ; // Print debug messages for D* candidates.
912- }
913908 if (pdgCandidate == pdgParticle) { // exact PDG match
914909 sgn = 1 ;
915910 } else if (acceptAntiParticles && pdgCandidate == -pdgParticle) { // antiparticle PDG match
@@ -920,56 +915,29 @@ struct RecoDecay {
920915 }
921916 // Check the PDG codes of the decay products.
922917 if (N > 0 ) {
923- if (print) {
924- std::cout << " MC Gen: Checking decay products of " << N << " daughters" << std::endl;
925- // Printf("MC Gen: Checking decay products of %ld daughters", N);
926- }
927918 // Printf("MC Gen: Checking %d daughters", N);
928919 std::vector<int > arrAllDaughtersIndex; // vector of indices of all daughters
929920 // Check the daughter indices.
930921 if (!candidate.has_daughters ()) {
931- if (print) {
932- std::cout << " MC Gen: Rejected: bad daughter index range: " << candidate.daughtersIds ().front () << " -" << candidate.daughtersIds ().back () << std::endl;
933- // Printf("MC Gen: Rejected: bad daughter index range: %d-%d", candidate.daughtersIds().front(), candidate.daughtersIds().back());
934- }
935922 // Printf("MC Gen: Rejected: bad daughter index range: %d-%d", candidate.daughtersIds().front(), candidate.daughtersIds().back());
936923 return false ;
937924 }
938925 // Check that the number of direct daughters is not larger than the number of expected final daughters.
939926 if constexpr (!checkProcess) {
940927 if (candidate.daughtersIds ().back () - candidate.daughtersIds ().front () + 1 > static_cast <int >(N)) {
941- if (print) {
942- std::cout << " MC Gen: Rejected: too many direct daughters: " << candidate.daughtersIds ().back () - candidate.daughtersIds ().front () + 1
943- << " (expected " << N << " final)" << std::endl;
944- // Printf("MC Gen: Rejected: too many direct daughters: %d (expected %ld final)", candidate.daughtersIds().back() - candidate.daughtersIds().front() + 1, N);
945- }
946928 // Printf("MC Gen: Rejected: too many direct daughters: %d (expected %ld final)", candidate.daughtersIds().back() - candidate.daughtersIds().front() + 1, N);
947929 return false ;
948930 }
949931 }
950932 // Get the list of actual final daughters.
951933 getDaughters<checkProcess>(candidate, &arrAllDaughtersIndex, arrPdgDaughters, depthMax);
952- if (print) {
953- std::cout << " MC Gen: Mother " << candidate.globalIndex () << " has " << arrAllDaughtersIndex.size () << " final daughters:" ;
954- // Printf("MC Gen: Mother %ld has %ld final daughters:", candidate.globalIndex(), arrAllDaughtersIndex.size());
955- for (auto i : arrAllDaughtersIndex) {
956- std::cout << " " << i;
957- // Printf(" %d", i);
958- }
959- std::cout << std::endl;
960- // Printf("\n");
961- }
962934 // printf("MC Gen: Mother %ld has %ld final daughters:", candidate.globalIndex(), arrAllDaughtersIndex.size());
963935 // for (auto i : arrAllDaughtersIndex) {
964936 // printf(" %d", i);
965937 // }
966938 // printf("\n");
967939 // Check whether the number of final daughters is equal to the required number.
968940 if (arrAllDaughtersIndex.size () != N) {
969- if (print) {
970- std::cout << " MC Gen: Rejected: incorrect number of final daughters: " << arrAllDaughtersIndex.size () << " (expected " << N << " )" << std::endl;
971- // Printf("MC Gen: Rejected: incorrect number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
972- }
973941 // Printf("MC Gen: Rejected: incorrect number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
974942 return false ;
975943 }
@@ -987,10 +955,6 @@ struct RecoDecay {
987955 for (auto indexDaughterI : arrAllDaughtersIndex) { // o2-linter: disable=const-ref-in-for-loop (int elements)
988956 auto candidateDaughterI = particlesMC.rawIteratorAt (indexDaughterI - particlesMC.offset ()); // ith daughter particle
989957 auto pdgCandidateDaughterI = candidateDaughterI.pdgCode (); // PDG code of the ith daughter
990- if (print) {
991- std::cout << " MC Gen: Daughter " << indexDaughterI << " PDG: " << pdgCandidateDaughterI << std::endl;
992- // Printf("MC Gen: Daughter %d PDG: %d", indexDaughterI, pdgCandidateDaughterI);
993- }
994958 // Printf("MC Gen: Daughter %d PDG: %d", indexDaughterI, pdgCandidateDaughterI);
995959 bool isPdgFound = false ; // Is the PDG code of this daughter among the remaining expected PDG codes?
996960 for (std::size_t iProngCp = 0 ; iProngCp < N; ++iProngCp) {
@@ -1009,10 +973,6 @@ struct RecoDecay {
1009973 *listIndexDaughters = arrAllDaughtersIndex;
1010974 }
1011975 }
1012- if (print) {
1013- std::cout << " MC Gen: Accepted: m: " << candidate.globalIndex () << std::endl;
1014- // Printf("MC Gen: Accepted: m: %ld", candidate.globalIndex());
1015- }
1016976 // Printf("MC Gen: Accepted: m: %d", candidate.globalIndex());
1017977 if (sign) {
1018978 *sign = sgn;
0 commit comments