From d7f28de9a5195ed32e99156938cbce62d718c6e4 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Tue, 20 Jun 2017 20:57:38 +0200
Subject: [PATCH] bug fix in material utilities ( MaterialManager(Volume v))

---
 UtilityApps/src/graphicalMaterialScan.cpp | 2 +-
 UtilityApps/src/materialScan.cpp          | 2 +-
 UtilityApps/src/print_materials.cpp       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/UtilityApps/src/graphicalMaterialScan.cpp b/UtilityApps/src/graphicalMaterialScan.cpp
index 163940966..5efa32bdf 100644
--- a/UtilityApps/src/graphicalMaterialScan.cpp
+++ b/UtilityApps/src/graphicalMaterialScan.cpp
@@ -138,7 +138,7 @@ int main_wrapper(int argc, char** argv)   {
 
   Vector3D p0, p1; // the two points between which material is calculated
 
-  MaterialManager matMgr(description.world()) ;
+  MaterialManager matMgr(description.world().volume() ) ;
 
   for (unsigned int isl=0; isl<nslice; isl++) { // loop over slices
 
diff --git a/UtilityApps/src/materialScan.cpp b/UtilityApps/src/materialScan.cpp
index 18a1b1d16..91a33806d 100644
--- a/UtilityApps/src/materialScan.cpp
+++ b/UtilityApps/src/materialScan.cpp
@@ -57,7 +57,7 @@ int main_wrapper(int argc, char** argv)   {
   description.fromCompact(inFile);
   direction = (p1-p0).unit();
 
-  MaterialManager matMgr( description.world() ) ;
+  MaterialManager matMgr( description.world().volume()  ) ;
   const MaterialVec& materials = matMgr.materialsBetween(p0, p1);
   double sum_x0 = 0;
   double sum_lambda = 0;
diff --git a/UtilityApps/src/print_materials.cpp b/UtilityApps/src/print_materials.cpp
index 1b53e454c..77efd6eff 100644
--- a/UtilityApps/src/print_materials.cpp
+++ b/UtilityApps/src/print_materials.cpp
@@ -58,7 +58,7 @@ int main_wrapper(int argc, char** argv ){
   Vector3D p0( x0, y0, z0 ) ;
   Vector3D p1( x1, y1, z1 ) ;
 
-  MaterialManager matMgr( description.world() ) ;
+  MaterialManager matMgr( description.world().volume() ) ;
 
   const MaterialVec& materials = matMgr.materialsBetween( p0 , p1  ) ;
 	
-- 
GitLab