Detector construction

Dears, I need your help how to explanation and proceed in the construction of a detector.
I am confusing how I can put the materials, for a AISI 316L stainless steel(capsule with density of 8.03g/cm) and AISI 316L stainless steel(cable with density of 4.81g/cm3)
I write for the capsule
G4Material* matsteel = new G4Material( “Stainless steel”, d = 8.03*g/cm3, = 5),
now, my question is the only difference between the cable and the capsule is in density so how I can proceed for the cable? let me repeat what I did in the capsule except the density or you recommend me another way.

I believe as long as the composition of each element/isotope in the two is same, all you got to do is change the density.

Thank dear for your reaction.
shall i proceed like this
G4Material* matsteel = new G4Material( “Stainless steel”, d = 4.81g/cm3, = 5),
and is it necessary to repeat the percentage composition of the elements again under this?

I believe so, and yes, you’d need to add elements again for the fractional mass you are choosing.

  1. Do not re-use the same name for the two different materials. That will confuse the way Geant4’s lookup table works.

  2. There is a constructor defined in G4Material.hh which allows you to define a “copy” of a material with a different density:

  // Constructor to create a material from the base material
  G4Material(const G4String& name,                              //its name
                   G4double  density,                           //density
             const G4Material* baseMaterial,                    //base material
                   G4State   state    = kStateUndefined,        //solid,gas
                   G4double  temp     = NTP_Temperature,        //temperature
                   G4double  pressure = CLHEP::STP_Pressure);   //pressure

@mkelsey: I overlooked that the material names are same in the original post, thanks for noticing that!

Thank you very much for the insightful recommendation!