37 int headIndex = pHead->
index();
38 particleMask[headIndex] =
true;
46 int decayIndex = decayVtx->
index();
47 vertexMask[decayIndex] =
true;
48 unsigned int nParents = decayVtx->nIncomingParticles();
49 unsigned int nChildren = decayVtx->nOutgoingParticles();
53 for (
unsigned int i=0;
i<nParents; ++
i) {
54 if (decayVtx->incomingParticle(
i)==
nullptr)
continue;
55 int idabs = std::abs(decayVtx->incomingParticle(
i)->pdgId());
56 isHadVtx = isHadVtx && (idabs<6 || idabs==21);
58 for (
unsigned int i=0;
i<nChildren; ++
i) {
59 if (decayVtx->outgoingParticle(
i)==
nullptr)
continue;
60 int idabs = std::abs(decayVtx->outgoingParticle(
i)->pdgId());
61 isHadVtx = isHadVtx && ((idabs>=80 && idabs<1000000) ||
65 if( !isHadVtx || keepHadVtx ){
67 for (
unsigned int i=0;
i<nChildren; ++
i) {
68 if (decayVtx->outgoingParticle(
i)==
nullptr)
continue;
69 int childIndex = decayVtx->outgoingParticle(
i)->index();
77 int prodIndex = prodVtx->
index();
78 vertexMask[prodIndex] =
true;
79 unsigned int nParents = prodVtx->nIncomingParticles();
80 unsigned int nSiblings = prodVtx->nOutgoingParticles();
81 unsigned int nChildren = nSiblings;
85 for (
unsigned int i=0;
i<nParents; ++
i) {
86 if (prodVtx->incomingParticle(
i)==
nullptr)
continue;
87 int idabs = std::abs(prodVtx->incomingParticle(
i)->pdgId());
88 isHadVtx = isHadVtx && (idabs<6 || idabs==21);
90 for (
unsigned int i=0;
i<nChildren; ++
i) {
91 if (prodVtx->outgoingParticle(
i)==
nullptr)
continue;
92 int idabs = std::abs(prodVtx->outgoingParticle(
i)->pdgId());
93 isHadVtx = isHadVtx && ((idabs>=80 && idabs<1000000) ||
97 if( !isHadVtx || keepHadVtx ){
99 for (
unsigned int i=0;
i<nParents; ++
i) {
100 if (prodVtx->incomingParticle(
i)==
nullptr)
continue;
101 int parentIndex = prodVtx->incomingParticle(
i)->index();
102 particleMask[parentIndex] =
true;
105 for (
unsigned int i=0;
i<nSiblings; ++
i) {
106 if (prodVtx->outgoingParticle(
i)==
nullptr)
continue;
107 int siblingIndex = prodVtx->outgoingParticle(
i)->index();
108 particleMask[siblingIndex] =
true;