You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// std::cout << "[getMother] number of mothers at stage " << stage << ": " << arrayIds[-stage].size() << std::endl;
569
571
for (auto iPart : arrayIds[-stage]) { // check all the particles that were the mothers at the previous stage, o2-linter: disable=const-ref-in-for-loop (int elements)
570
572
auto particleMother = particlesMC.rawIteratorAt(iPart - particlesMC.offset());
for (auto iMother = particleMother.mothersIds().front(); iMother <= particleMother.mothersIds().back(); ++iMother) { // loop over the mother particles of the analysed particle
573
576
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
@@ -576,10 +579,9 @@ struct RecoDecay {
576
579
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
577
580
// Check mother's PDG code.
578
581
auto pdgParticleIMother = mother.pdgCode(); // PDG code of the mother
579
-
// printf("getMother: ");
580
-
// for (int i = stage; i < 0; i++) // Indent to make the tree look nice.
// Check whether the number of actual final daughters is equal to the number of expected final daughters (i.e. the number of provided prongs).
820
-
// Printf("MC Rec: Number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
821
-
if (!acceptIncompleteReco && arrAllDaughtersIndex.size() != N) {
822
-
// LOG(info) << "MC Rec: Rejected: incorrect number of final daughters: " << arrAllDaughtersIndex.size() << " (expected " << N << ")";
823
-
// Printf("MC Rec: Rejected: incorrect number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
829
+
if (!acceptIncompleteReco && arrAllDaughtersIndex.size() != NDaug) {
830
+
std::cout << "MC Rec: Number of final states " << arrAllDaughtersIndex.size() << " (expected " << NDaug << ")" << std::endl;
831
+
// LOG(info) << "MC Rec: Rejected: incorrect number of final states " << arrAllDaughtersIndex.size() << " (expected " << NDaug << ")";
832
+
// Printf("MC Rec: Rejected: incorrect number of final states %ld (expected %ld)", arrAllDaughtersIndex.size(), NDaug);
833
+
return -1;
834
+
}
835
+
if (forceIncompleteReco && arrAllDaughtersIndex.size() == NDaug) {
836
+
std::cout << "MC Rec: Number of final states " << arrAllDaughtersIndex.size() << "vs Number of daughters " << NDaug << ", expected incomplete reco" << std::endl;
837
+
// LOG(info) << "MC Rec: Rejected: incorrect number of final states " << arrAllDaughtersIndex.size() << " (expected " << NDaug << ")";
838
+
// Printf("MC Rec: Rejected: incorrect number of final states %ld (expected %ld)", arrAllDaughtersIndex.size(), NDaug);
824
839
return -1;
825
840
}
826
841
}
827
842
// Check that the daughter is in the list of final daughters.
828
843
// (Check that the daughter is not a stepdaughter, i.e. particle pointing to the mother while not being its daughter.)
829
844
bool isDaughterFound = false; // Is the index of this prong among the remaining expected indices of daughters?
830
845
for (std::size_t iD = 0; iD < arrAllDaughtersIndex.size(); ++iD) {
if (arrDaughtersIndex[iProng] == arrAllDaughtersIndex[iD]) {
832
848
arrAllDaughtersIndex[iD] = -1; // Remove this index from the array of expected daughters. (Rejects twin daughters, i.e. particle considered twice as a daughter.)
833
849
isDaughterFound = true;
834
850
break;
835
851
}
836
852
}
837
853
if (!isDaughterFound) {
838
-
// Printf("MC Rec: Rejected: bad daughter index: %d not in the list of final daughters", arrDaughtersIndex[iProng]);
854
+
std::cout << "MC Rec: Rejected: bad daughter index: " << arrDaughtersIndex[iProng] << "not in the list of final daughters" << std::endl;
839
855
return -1;
840
856
}
841
857
// Check daughter's PDG code.
842
858
auto pdgParticleI = particleI.pdgCode(); // PDG code of the ith daughter
0 commit comments