Adding density of material

Hello, everyone.

How to add density of material:

Error: no matching function for call to ‘createMaterial(const char [34], double)’
G4Material* material = G4NCrystal::createMaterial (“ncplugin-SANSND_nanodiamond.ncmat”, 0.658 g/cm3);

Best regards,
Eyvaz

This is a call to an API of the NCrystal library (GitHub - mctools/ncrystal: NCrystal : a library for thermal neutron transport in crystals) which is not part of Geant4. It’s probably best to address the question to their Issues board.

Geant4’s own API for materials is covered in the Detector/Materials section of the Application Developer Guide

Okay, thank you for your reply!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.