Project

General

Profile

Bug #1162

SciFi fails in G4.9.5.p01

Added by Rogers, Chris about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Tracker
Target version:
Start date:
18 October 2012
Due date:
% Done:

100%

Estimated time:
Workflow:
Awaiting Merge

Description

The SciFi fails in G4.9.5.p01 - get an error message like

cr67@ctr ~/MAUS/maus_merge_geant4.9.5 $ python tests/integration/test_simulation/test_geometry/test_geometry.py
F
======================================================================
FAIL: test_geometries (__main__.MapCppSimulationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/integration/test_simulation/test_geometry/test_geometry.py", line 85, in test_geometries
    self.__run_sim(my_file)
  File "tests/integration/test_simulation/test_geometry/test_geometry.py", line 65, in __run_sim
    str(proc.returncode)+". Output in "+outname)
AssertionError: Test geometry failed in Stage2.dat with return code -6. Output in /home/cr67/MAUS/maus_merge_geant4.9.5/tmp//test_geometry_Stage2.dat

----------------------------------------------------------------------

Digging into the referenced log file


-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : GeomSolids0002
      issued by : G4Tubs::SetZHalfLength()
Invalid Z half-length.
Negative Z half-length (0), for solid: Stage2.dat/TrackerSolenoid0.dat/Tracker0.dat/TrackerStation5.dat/Tracker0Station5ViewU.datDoubletCores
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***

I put a print statement into the file that generates the DoubletCores and it reports

Module name: Stage2.dat/TrackerSolenoid0.dat/Tracker0.dat/TrackerStation5.dat/Tracker0Station5ViewU.datDoublet
Module rotation: 
   [ (           1             0             0)
     (           0             1             0)
     (           0             0             1) ]

Doublet length: 0.6273

Files

unitTest.txt (376 KB) unitTest.txt Heidt, Christopher, 31 October 2012 15:27
appTest.txt (167 KB) appTest.txt Heidt, Christopher, 31 October 2012 15:27
ErrorLog.txt (307 KB) ErrorLog.txt Output from run_test.bash on Nov 9 Heidt, Christopher, 09 November 2012 17:19
#1

Updated by Rogers, Chris about 11 years ago

Should say my print statement is

=== modified file 'src/common_cpp/DetModel/SciFi/SciFiPlane.cc'
--- src/common_cpp/DetModel/SciFi/SciFiPlane.cc    2012-10-01 10:56:38 +0000
+++ src/common_cpp/DetModel/SciFi/SciFiPlane.cc    2012-10-18 03:10:33 +0000
@@ -89,13 +89,13 @@
   // G4RotationMatrix* trot = new G4RotationMatrix();
   // G4ThreeVector dir(0, 1, 0);
   // dir = dir*(*trot);
-  /*
+  
   std::cerr << "Module name: " << doubletName << "\n" 
             << "Module rotation: " << *(trot) << "\n" 
-            // << "Plane direction: " << dir << "\n" 
+            << "Doublet length: " << doubletThickness << "\n" 
             << "Mother Logical Volume is: " << mlv->GetLogicalVolume()->GetName() << "\n" 
             << "Mothers rotation is: "      << *(mlv->GetRotation()) << "\n";
-  */
+  
   // this is a fibre
   solidDoublet = new G4Tubs(doubletName, 0.0,
                             tr, doubletThickness / 2.0,
#2

Updated by Heidt, Christopher about 11 years ago

I can't seem to recreate this error. I pulled down a new version of the MAUS trunk on Wed 24th, installed it using /thrid_party/install_build_test_geant4.9.5.p01.bash, and sourced it using env.sh followed by env_geant4.9.5.p01.sh. Tests did turn up errors that look to be style errors, but no geometry errors. I took a look at the tmp//test_geometry_Stage2.dat log file that was created, and didn't see any errors.

Advice?

#3

Updated by Rogers, Chris about 11 years ago

Can you turn verbose_level to 0 and then look at the output, check that it says geant 4.9.5.p01 when it loads geant4? i.e. that the installation went okay...

#4

Updated by Heidt, Christopher about 11 years ago

The Geant version is correct, a few other errors showing up. It looks like all the test were not running due to errors, I ran both the unit test and application test separate. I've logged the outputs so you can take a look at them. It may be that I can not recreate your problem because the tests are quitting too early.

#5

Updated by Rogers, Chris about 11 years ago

Okay, I'll have a dig... not sure why your nosetests should fail with those funny errors though.

#6

Updated by Rogers, Chris about 11 years ago

Humm. So on your test job, we have

Check that we can run simulate_mice, convert to root, convert back to ... Globals manager
Placing BeamLine.dat of type Box position: (0,0,-10283) rotationVector: (0,0,1) angle: 0 volume: 209.641 m^3  material: Galactic
Placing TrackerSolenoid0.dat of type Cylinder position: (0,0,-4783) rotationVector: (0,0,1) angle: 0 volume: 4.2312 m^3  material: Galactic
Placing AbsorberFocusCoil.dat68 of type Cylinder position: (0,0,-2750) rotationVector: (0,0,1) angle: 0 volume: 1.53151 m^3  material: Galactic
Placing RFCouplingCoilUp.dat of type Cylinder position: (0,0,-1375) rotationVector: (0,0,1) angle: 0 volume: 2.56453 m^3  material: Galactic
Placing AbsorberFocusCoil.dat87 of type Cylinder position: (0,0,0) rotationVector: (0,0,1) angle: 0 volume: 1.53151 m^3  material: Galactic
Placing RFCouplingCoilDown.dat of type Cylinder position: (0,0,1375) rotationVector: (0,0,1) angle: 0 volume: 2.56453 m^3  material: Galactic
Placing AbsorberFocusCoil.dat of type Cylinder position: (0,0,2750) rotationVector: (0,0,1) angle: 0 volume: 1.53151 m^3  material: Galactic
Placing SpecVirt.dat of type Cylinder position: (0,0,4783) rotationVector: (0,0,1) angle: 0 volume: 2.82743e-08 m^3  material: Galactic
Placing TrackerSolenoid1.dat of type Cylinder position: (0,0,4783) rotationVector: (0,0,1) angle: 0 volume: 4.2312 m^3  material: Galactic
Placing TOF2.dat of type Box position: (0,0,6524.5) rotationVector: (0,0,1) angle: 0 volume: 0.5625 m^3  material: AIR
Setting the phase ............

but on the test server we have

Check that we can run simulate_mice, convert to root, convert back to ... Placing BeamLine.dat of type Box position: (0,0,-10283) rotationVector: (0,0,1) angle: 0 volume: 209.641 m^3  material: Galactic
Placing TrackerSolenoid0.dat of type Cylinder position: (0,0,-4783) rotationVector: (0,0,1) angle: 0 volume: 4.2312 m^3  material: Galactic
Placing AbsorberFocusCoil.dat68 of type Cylinder position: (0,0,-2750) rotationVector: (0,0,1) angle: 0 volume: 1.53151 m^3  material: Galactic
Placing RFCouplingCoilUp.dat of type Cylinder position: (0,0,-1375) rotationVector: (0,0,1) angle: 0 volume: 2.56453 m^3  material: Galactic
Placing AbsorberFocusCoil.dat87 of type Cylinder position: (0,0,0) rotationVector: (0,0,1) angle: 0 volume: 1.53151 m^3  material: Galactic
Placing RFCouplingCoilDown.dat of type Cylinder position: (0,0,1375) rotationVector: (0,0,1) angle: 0 volume: 2.56453 m^3  material: Galactic
Placing AbsorberFocusCoil.dat of type Cylinder position: (0,0,2750) rotationVector: (0,0,1) angle: 0 volume: 1.53151 m^3  material: Galactic
Placing SpecVirt.dat of type Cylinder position: (0,0,4783) rotationVector: (0,0,1) angle: 0 volume: 2.82743e-08 m^3  material: Galactic
Placing TrackerSolenoid1.dat of type Cylinder position: (0,0,4783) rotationVector: (0,0,1) angle: 0 volume: 4.2312 m^3  material: Galactic
Placing TOF2.dat of type Box position: (0,0,6524.5) rotationVector: (0,0,1) angle: 0 volume: 0.5625 m^3  material: AIR
Setting the phase .
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : GeomSolids0002
      issued by : G4Tubs::SetZHalfLength()
Invalid Z half-length.
Negative Z half-length (0), for solid: Stage6.dat/TrackerSolenoid0.dat/Tracker0.dat/TrackerStation5.dat/Tracker0Station5ViewU.datDoubletCores
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------

Could you post the file tmp/test_geometry_Stage2.dat? I'm looking at the test server error message like:

======================================================================
FAIL: For each "Configuration" file, check that we can load it - by calling
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/MAUS_geant4.9.5.p01/tests/integration/test_simulation/test_geometry/test_geometry.py", line 85, in test_geometries
    self.__run_sim(my_file)
  File "/home/jenkins/workspace/MAUS_geant4.9.5.p01/tests/integration/test_simulation/test_geometry/test_geometry.py", line 65, in __run_sim
    str(proc.returncode)+". Output in "+outname)
AssertionError: Test geometry failed in Stage2.dat with return code -6. Output in /home/jenkins/workspace/MAUS_geant4.9.5.p01/tmp//test_geometry_Stage2.dat

----------------------------------------------------------------------
#7

Updated by Rogers, Chris about 11 years ago

Nb: the test server command is

bash third_party/install_build_test_geant4.9.5.p01.bash

I disabled the build for now while we investigate (I was going to run some checks like valgrind server side)

#8

Updated by Rogers, Chris about 11 years ago

Valgrind doesn't report anything fishy... hohum...

#9

Updated by Rogers, Chris about 11 years ago

Just to be clear, branch name is

bzr+ssh://bazaar.launchpad.net/%2Bbranch/maus/merge/
#10

Updated by Heidt, Christopher about 11 years ago

Thanks, starting download.

#11

Updated by Heidt, Christopher about 11 years ago

Found the error, and think I've corrected it. The problem seems to be we were laying down fibers incorrectly. Instead of laying the fibers down one next to another, we were spacing them out to fill the total available space. A difference of only microns, but on caused the last fiber to over shoot the end of the plane a hair and default to 0 length.

I'm running test now, hopefully this checks out. If it does check out I'll then push to the merge branch and the tracker_devel branch.

#12

Updated by Rogers, Chris about 11 years ago

Happy that you've fixed it - even happier that you found a physics bug! This would certainly effect track reconstruction in this fibre, maybe in the whole tracker (Geant4 behaviour is unpredictable when volumes overlap - it can cause G4 to ignore physics volumes, which is bad).

#13

Updated by Heidt, Christopher about 11 years ago

Passed the test at tests/integration/test_simulation/test_geometry/test_geometry.py, but a new error popped up when running tests/run_test.bash (see below). However, this seems unrelated to this issue, so I'm inclined to push my changes. I thought it would be better to wait and see if you agree with my assessment of this new issue before I went through with a push.

Check we can import libxml2 ... ok
Check we can import libxslt ... ok

======================================================================
FAIL: test_run_test_cpp_unit (test_cpp_unit.CppUnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/build/test_cpp_unit.py", line 18, in test_run_test_cpp_unit
    self.assertEqual(cpp_test, 0, 'Failed cpp tests with '+str(cpp_test))
AssertionError: Failed cpp tests with 256

----------------------------------------------------------------------
Ran 411 tests in 596.399s

FAILED (failures=1)
#14

Updated by Rogers, Chris about 11 years ago

This is a fail on one of the C++ unit tests. Could you include a full test log so I can see which test is failing?

The C++ unit tests are what come out from all of the green/black/red text like

[--------] some text
[RUN     ] also
[      OK] here

Cheers

#15

Updated by Heidt, Christopher about 11 years ago

Old error fixed, new errors up. This time I'm almost certain it is nothing that I have done.

======================================================================
ERROR: Check that beam maker generates uniform t distribution correctly
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/tests/integration/test_simulation/test_beam_maker/test_beam_maker.py", line 270, in test_uniform_time
    BIN_SIM, 'pid')[-11]
KeyError: -11

======================================================================
FAIL: Check that we can generate a binomial distribution for event number
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/tests/integration/test_simulation/test_beam_maker/test_beam_maker.py", line 157, in test_binomial
    self.assertGreater(ks_value, 1e-3)
AssertionError: 0.0 not greater than 0.001
-------------------- >> begin captured stdout << ---------------------
0 0.0 0.0
1 121.576654591 1000.0
2 270.170343535 0.0
3 285.179807064 0.0
4 190.119871376 0.0
5 89.7788281499 0.0
6 31.92136112 0.0
7 8.86704475554 0.0
8 1.97045439012 0.0
9 0.355776487105 0.0
10 0.0527076277193 0.0
11 0.00644204338791 0.0
12 0.000650711453324 0.0
13 5.42259544437e-05 0.0
14 3.7077575688e-06 0.0
15 2.059865316e-07 0.0
16 9.15495696e-09 0.0
17 3.1788045e-10 0.0
18 8.3106e-12 0.0
19 1.539e-13 0.0
20 1.8e-15 0.0
binomial ks_value 0.0

--------------------- >> end captured stdout << ----------------------

======================================================================
FAIL: Check that the weight of each sub-beam is close to the expected weight
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/tests/integration/test_simulation/test_beam_maker/test_beam_maker.py", line 203, in test_gaussian
    self.assertLess(abs(bunch.mean([key])[key]-value), sigma+1.)
AssertionError: 99.91820426515577 not less than 3.4192338252275007

======================================================================
FAIL: Check that beam maker generates sawtooth t distribution correctly
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/tests/integration/test_simulation/test_beam_maker/test_beam_maker.py", line 263, in test_sawtooth_time
    self.assertGreater(ks_value, 1e-3)
AssertionError: 0.0 not greater than 0.001
-------------------- >> begin captured stdout << ---------------------
sawtooth t ks_value 0.0

--------------------- >> end captured stdout << ----------------------

======================================================================
FAIL: Check that the weight of each sub-beam is close to the expected weight
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/tests/integration/test_simulation/test_beam_maker/test_beam_maker.py", line 176, in test_weighting
    sum_weights**0.5 )
AssertionError: 100.0 not less than 31.622776601683793
-------------------- >> begin captured stdout << ---------------------
-13 1000.0 900.0 31.6227766017

--------------------- >> end captured stdout << ----------------------

======================================================================
FAIL: Test that the GRID batch script works
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/ppd/mice/heidt/geant_test/merge/tests/integration/test_utilities/test_execute_against_data/test_execute_against_data.py", line 159, in test_main_success
    self.assertTrue(os.path.isfile(file_name), file_name)
AssertionError: 03541_recon.root
-------------------- >> begin captured stdout << ---------------------
Cleaning test directory
Found 03541.tar so not going to download
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/download.log
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/batch.log
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/sim.log
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/reco.log
removing dir /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/downloads
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/OnMon.03541.root
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/OnScalers.03541.root
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/OnScalers.03541.txt
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/03541.md5
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/03541.000
removing file /opt/ppd/mice/heidt/geant_test/merge/tmp/test_batch/03541_recon.root
Unpacking for testing

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 53 tests in 1606.385s

FAILED (SKIP=24, errors=1, failures=5)
#16

Updated by Rogers, Chris about 11 years ago

Can you make a test job? Instructions at Jenkins and you may need a login to the test server, let me know and I can set one up.

#17

Updated by Heidt, Christopher about 11 years ago

  • Workflow changed from New Issue to Awaiting Merge

Passed Jenkins, and is now passing tests on my machine as well. Looks ready to merge, updated code at lp:~cheid001/maus/devel.

#18

Updated by Rogers, Chris about 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Merge in r845

#19

Updated by Rogers, Chris about 11 years ago

  • Target version changed from Future MAUS release to MAUS-v0.4.1

Also available in: Atom PDF