Wave diffraction on periodic media is ubiquitous in optics. In particular, fiber Bragg gratings, i.e gratings imprinted directly in a fiber core are essential components widely used for example in telecommunication devices and integrated fiber laser. In close analogy with these optical devices, we study the scattering of a guided matter wavepacket on a finite size lattice that realizes a Bragg reflector. We then present the trapping of a Bose-Einstein condensate in a Bragg cavity that originates from the envelope of the lattice. We observe oscillations inside the cavity and partial tunneling out of the cavity for narrow classes of velocity. This technique allows to characterize new types of tunnel barriers in position space equivalent to submicronic repulsive barriers. Finally, we study the scattering of matter waves on an amplitude-modulated optical lattice, and analyse the transmissivity across this structure. We describe the complex dynamics at play within the Floquet-Bloch framework and the use of this technique to realize a new type of tunable velocity filter that does not rely on any specific internal state configuration.