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
[Common, PWGHF, Event Filtering] Implement specific method to tag prompt/nonprompt charm hadrons (#966)
* Add function to check origin of charm hadrons
* Use check origin method to tag prompt/nonprompt charm hadrons
* Change name of method and move enum from HFSecondaryVertex to RecoDecay
* Pass bool by value
* Move enum inside RecoDecay class
* Fix comment and remove unnecessary include
* Resotre include in HFSecondaryVertex.h
arrayIds.push_back(initVec); // the first vector contains the index of the original particle
937
+
938
+
while (arrayIds[-stage].size() > 0) {
939
+
// vector of mother indices for the current stage
940
+
std::vector<longint> arrayIdsStage{};
941
+
for (auto& iPart : arrayIds[-stage]) { // check all the particles that were the mothers at the previous stage
942
+
auto particleMother = particlesMC.rawIteratorAt(iPart - particlesMC.offset());
943
+
if (particleMother.has_mothers()) {
944
+
for (auto iMother = particleMother.mothersIds().front(); iMother <= particleMother.mothersIds().back(); ++iMother) { // loop over the mother particles of the analysed particle
945
+
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
946
+
continue;
947
+
}
948
+
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
949
+
// Check mother's PDG code.
950
+
auto PDGParticleIMother = std::abs(mother.pdgCode()); // PDG code of the mother
951
+
// printf("getMother: ");
952
+
// for (int i = stage; i < 0; i++) // Indent to make the tree look nice.
0 commit comments