Get the beam as vector of vectors.
Function to know if material was specified by name or composition.