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;
555
557
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)
556
558
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
559
562
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
@@ -562,10 +565,9 @@ struct RecoDecay {
562
565
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
563
566
// Check mother's PDG code.
564
567
auto pdgParticleIMother = mother.pdgCode(); // PDG code of the mother
565
-
// printf("getMother: ");
566
-
// 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).
806
-
// Printf("MC Rec: Number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
807
-
if (!acceptIncompleteReco && arrAllDaughtersIndex.size() != N) {
808
-
// LOG(info) << "MC Rec: Rejected: incorrect number of final daughters: " << arrAllDaughtersIndex.size() << " (expected " << N << ")";
809
-
// Printf("MC Rec: Rejected: incorrect number of final daughters: %ld (expected %ld)", arrAllDaughtersIndex.size(), N);
815
+
if (!acceptIncompleteReco && arrAllDaughtersIndex.size() != NDaug) {
816
+
std::cout << "MC Rec: Number of final states " << arrAllDaughtersIndex.size() << " (expected " << NDaug << ")" << std::endl;
817
+
// LOG(info) << "MC Rec: Rejected: incorrect number of final states " << arrAllDaughtersIndex.size() << " (expected " << NDaug << ")";
818
+
// Printf("MC Rec: Rejected: incorrect number of final states %ld (expected %ld)", arrAllDaughtersIndex.size(), NDaug);
819
+
return -1;
820
+
}
821
+
if (forceIncompleteReco && arrAllDaughtersIndex.size() == NDaug) {
822
+
std::cout << "MC Rec: Number of final states " << arrAllDaughtersIndex.size() << "vs Number of daughters " << NDaug << ", expected incomplete reco" << std::endl;
823
+
// LOG(info) << "MC Rec: Rejected: incorrect number of final states " << arrAllDaughtersIndex.size() << " (expected " << NDaug << ")";
824
+
// Printf("MC Rec: Rejected: incorrect number of final states %ld (expected %ld)", arrAllDaughtersIndex.size(), NDaug);
810
825
return -1;
811
826
}
812
827
}
813
828
// Check that the daughter is in the list of final daughters.
814
829
// (Check that the daughter is not a stepdaughter, i.e. particle pointing to the mother while not being its daughter.)
815
830
bool isDaughterFound = false; // Is the index of this prong among the remaining expected indices of daughters?
816
831
for (std::size_t iD = 0; iD < arrAllDaughtersIndex.size(); ++iD) {
if (arrDaughtersIndex[iProng] == arrAllDaughtersIndex[iD]) {
818
834
arrAllDaughtersIndex[iD] = -1; // Remove this index from the array of expected daughters. (Rejects twin daughters, i.e. particle considered twice as a daughter.)
819
835
isDaughterFound = true;
820
836
break;
821
837
}
822
838
}
823
839
if (!isDaughterFound) {
824
-
// Printf("MC Rec: Rejected: bad daughter index: %d not in the list of final daughters", arrDaughtersIndex[iProng]);
840
+
std::cout << "MC Rec: Rejected: bad daughter index: " << arrDaughtersIndex[iProng] << "not in the list of final daughters" << std::endl;
825
841
return -1;
826
842
}
827
843
// Check daughter's PDG code.
828
844
auto pdgParticleI = particleI.pdgCode(); // PDG code of the ith daughter
0 commit comments