Gdml geometries in geant4

Can someone help me with CAD to GDML geometries? I have converted .stl file into .gdml using Cadmesh but am not able to understand how I can specify material and optical properties. Also, do I need to make multiple .gdml if I have different materials? Consider: if I have a scintillator detector, do I need multiple .gdml for the reflector, lightguide, or sensor?

Hello,

Do I need to make multiple .gdml if I have different materials?
Do I need multiple .gdml for the reflector, lightguide, or sensor?

No, a GDML file can contain multiple geometries and materials.

I recommend you take a look into
examples/extended/persistency/gdml/G02

It shows how you can read a GDML or STEP file to build your geometry and then export it to a GDML file. (Of course you can use CadMesh to read your STEP file into Geant)

The process would be:
-read STEP file into Geant
-assign materials
-export geometry from Geant to GDML

Regards
Max