//=============================================================================
// Return all daughters of particles in a vector
//=============================================================================
bool ParticleDescendants::addDaughters(const LHCb::Particle::ConstVector& mothers, 
                                       LHCb::Particle::ConstVector& Parts){
  if ( mothers.empty() ) return false ;
  bool found = false ;
  for ( LHCb::Particle::ConstVector::const_iterator i = mothers.begin() ; i!=mothers.end() ; ++i){
    found = ( addDaughters( *i, Parts) || found );
  }
  return found ;
}  
//=============================================================================
// Return all daughters of particles in a vector
//=============================================================================
bool ParticleDescendants::addDaughters(const LHCb::Particle* M, 
                                       LHCb::Particle::ConstVector& Parts){
  if ( 0==M ) return false;
  if ( M->isBasicParticle() ) return false;  
  const LHCb::Particle::ConstVector dauts = M->daughtersVector();
  Parts.insert(Parts.end(),dauts.begin(),dauts.end());
  verbose() << "Added " << dauts.size() << " daughters" << endmsg ;
  return (!dauts.empty());
  
}