From 6add44e8e07c14e20f03ef6124f5d7e2a0122d63 Mon Sep 17 00:00:00 2001
From: local1 <local1@localhost.localdomain>
Date: Tue, 9 May 2017 15:51:16 +0200
Subject: [PATCH] corrected units

---
 NPSimulation/Core/MyMagneticField.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/NPSimulation/Core/MyMagneticField.cc b/NPSimulation/Core/MyMagneticField.cc
index 7c3cbb90b..739142ad9 100644
--- a/NPSimulation/Core/MyMagneticField.cc
+++ b/NPSimulation/Core/MyMagneticField.cc
@@ -25,9 +25,9 @@
 MyMagneticField::MyMagneticField(const G4ThreeVector& FieldVector)
 {
   
-  fFieldComponents[0]= FieldVector.x()*tesla;
-  fFieldComponents[1]= FieldVector.y()*tesla;
-  fFieldComponents[2]= FieldVector.z()*tesla;
+  fFieldComponents[0]= FieldVector.x();
+  fFieldComponents[1]= FieldVector.y();
+  fFieldComponents[2]= FieldVector.z();
 
   //rmax = std::sqrt(625.)*cm;
   rbore = 49.*cm; // bore radius  !! 49 instead of 50 to avoid issues at volume boundaries
@@ -41,7 +41,6 @@ MyMagneticField::MyMagneticField(const G4ThreeVector& FieldVector)
    Bz0=fFieldComponents[2]; // nominal field
    //G4cout << "FieldVector.z()=" << FieldVector.z() << G4endl;
    //G4cout << "tesla=" << tesla << " megavolt*ns/mm2" << G4endl;
-   G4cout << "Bz0=" << Bz0 << " megavolt*ns/mm2 (default units)" << G4endl;
    G4cout << "Bz0=" << Bz0/tesla << " tesla" << G4endl;
    //G4cout << "zbore=" << zbore << " mm (default units)" << G4endl;
    //G4cout << "rbore=" << rbore << " mm (default units)" << G4endl;
-- 
GitLab