Skip to content
Snippets Groups Projects
Commit a835180b authored by Joseph Boudreau's avatar Joseph Boudreau
Browse files

To deal with mutable materials such as a gas mixture, the GeoLogVol now has a...

To deal with mutable materials such as a gas mixture, the GeoLogVol now has a method to update the material
parent ce302dfe
No related branches found
No related tags found
1 merge request!320Deal with mutable materials such as a gas mixture.
Pipeline #7374927 failed
......@@ -38,6 +38,11 @@ class GeoLogVol : public RCBase
return m_material;
}
// In some cases (gases, liquids) materials be updated?
void setMaterial (const GeoMaterial *newMaterial) {
m_material=newMaterial;
}
protected:
virtual ~GeoLogVol() = default;
......
......@@ -294,13 +294,14 @@ void KitchenSinkPlugin::create(GeoVPhysVol *world, bool /*publish*/) {
double height=platformHeight/2.0+barThickness/2.0+flangeThickness/2.0+barThickness;
double xHalfLength=leftRightLegSeparation/2.0-barWidth1/2.0-cutoutWidth/2.0-barWidth2/2.0 ;
const GeoBox *wBox = new GeoBox(xHalfLength, cutoutDepth/2.0 ,barThickness/2.0);
const GeoLogVol *wLog = new GeoLogVol("WLog", wBox, Aluminium);
GeoLogVol *wLog = new GeoLogVol("WLog", wBox, Aluminium);
GeoPhysVol *wPhys = new GeoPhysVol(wLog);
GeoTransform *wTransform = new GeoTransform(
GeoTrf::Translate3D(-(61.0+11.0/16.0+4.0)/2.0+xHalfLength+4,0,height)
);
world->add(wTransform);
world->add(wPhys);
wLog->setMaterial(Stainless);
}
//--------------------------------------//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment