- jwebb's home page
- Posts
- 2019
- 2018
- 2017
- 2016
- 2015
- 2014
- 2013
- November (1)
- October (1)
- September (1)
- July (1)
- June (1)
- April (1)
- March (3)
- February (1)
- January (1)
- 2012
- 2011
- December (2)
- September (3)
- August (5)
- July (6)
- June (6)
- May (1)
- April (5)
- March (5)
- February (2)
- January (2)
- 2010
- December (3)
- October (3)
- September (2)
- August (2)
- June (2)
- May (4)
- April (4)
- March (2)
- February (4)
- January (10)
- 2009
- 2008
- 2007
- 2006
- July (1)
- My blog
- Post new blog entry
- All blogs
Bug in TPCEGEO2
There is a bug in tpcegeo2.g. The bug results in two holes in the TPC FEE cards being placed at an incorrect location. This bug should have negligible impact on any existing simulations, but we document it here. The bug occurs on line 256
Fill TROV ! cards in row 1 sec=1 ! inner nhp ={0,2, 2,3,3,3, 3,4,4,4, 4,5,2,5, 5,6} !no of holes/plane hx ={0.0, 0.0, 0.0, 0.0; 0.0, 0.0, 0.0, 0.0, 0.0, -5.17, 5.17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -6.21, 6.21, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -7.79, 0.0, 7.79, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -8.34, 0.0, 8.34, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -9.38, 0.0, 9.38, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -10.50, 0.0, 10.50, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -11.97,-4.05, 4.05, 11.97, 0.0, 0.0, 0.0, 0.0, 0.0; -12.70,-4.32, 4.32, 12.70, 0.0, 0.0, 0.0, 0.0, 0.0; -13.70,-4.63, 4.63, 13.70, 0.0, 0.0, 0.0, 0.0, 0.0; -14.67,-4.98, 4.98, 14.67, 0.0, 0.0, 0.0, 0.0, 0.0; -15.86,-7.91, 0.0, 7.91, 15.86, 0.0, 0.0, 0.0, 0.0; -16.95,16.95, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0; -18.37,-8.99, 0.0, 8.99, 18.37, 0.0, 0.0, 0.0, 0.0; -19.11,-9.76, 0.0, 9.76, 19.11, 0.0, 0.0, 0.0, 0.0; -20.15,-12.08, -4.05, 4.05, 12.08, 20.15,0.0, 0.0, 0.0} ! x of holes
The code is filling a 2D array dimensioned as TROT_HX(9,16). The semi-colon in the middle of the first row terminates the first row and begins the second row... Thus, the resulting fortran code looks like
TROV_HX(1,2)=0.0 256 TROV_HX(2,2)=0.0 257 TROV_HX(3,2)=0.0 257 TROV_HX(4,2)=0.0 257 TROV_HX(5,2)=0.0 257 TROV_HX(6,2)=-5.17 257 TROV_HX(7,2)=5.17 257 TROV_HX(8,2)=0.0 257 TROV_HX(9,2)=0.0 257 TROV_HX(10,2)=0.0 257 TROV_HX(11,2)=0.0 257 TROV_HX(12,2)=0.0 257 TROV_HX(13,2)=0.0 257 TROV_HX(14,2)=0.0
resulting in an offset of the hole locations by 5 elements, and an overwrite of the next 5 elements in the array. (Those elements are written subsequently with the correct values from the next row).
Groups:
- jwebb's blog
- Login or register to post comments