00001 #include "GenDecay/NucVisitor.h" 00002 #include "GenDecay/NucState.h" 00003 #include "GenDecay/NucDecay.h" 00004 00005 #include <vector> 00006 using namespace std; 00007 using namespace GenDecay; 00008 00009 NucVisitor::NucVisitor(double min_br) 00010 : m_minBranchFraction(min_br) 00011 { 00012 } 00013 00014 NucVisitor::~NucVisitor() {} 00015 00016 void NucVisitor::descend(NucState* state) 00017 { 00018 if (m_countMap[state]) return; 00019 m_countMap[state] += 1; 00020 00021 vector<NucDecay*> &decays = state->decays(); 00022 for (size_t ind=0; ind < decays.size(); ++ind) { 00023 00024 if (decays[ind]->fraction < m_minBranchFraction) continue; 00025 00026 NucDecay* decay = decays[ind]; 00027 NucState* daughter = decay->daughter; 00028 if (this->visit(state,daughter,decay)) { 00029 descend(daughter); 00030 } 00031 } 00032 }