Characterization of matter and on site qualification of materials through X-Ray Diffraction