Download presentation
Presentation is loading. Please wait.
Published byAshley Underwood Modified over 6 years ago
1
The tracking Present situation Short term actions Long term actions
FUTURE
2
GeanE Status
3
The Crash See thread Bugs, Fixes, Releases: genfit/geane
Problem: after the update to the new external packages it happens often this kind of crash when running geane event 307 *** Break *** floating point exception Using host libthread_db library "/lib/tls/libthread_db.so.1". Attaching to program: /proc/27679/exe, process 27679 [Thread debugging using libthread_db enabled] [New Thread (LWP 27679)] 0x00a8d7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 ... #10 0x081b6fe5 in xmm55_ (a=0x8601f20, b=0x8601fe8, c=0x8601fe8) at matx55/xmm55.F:42 #11 0x08267fca in trprfn_ (x1=0x85d32d8, p1=0x85d32e4, h1=0x85d32f0, x2=0x85d3314, p2=0x85d3320, h2=0x85d332c, r=0xbfe2523c, at erpremc/trprfn.F:376 #12 0x08260e82 in erprop_ () at erdecks/erprop.F:76 #13 0x08263d65 in ertrch_ () at erdecks/ertrch.F:429 #14 0x08264cd1 in ertrgo_ () at erdecks/ertrgo.F:249 #15 0x d in ertrak_ (x1=0xc9623f0, p1=0xc9623fc, x2=0xc962364, p2=0xc962370, _chopt=2) at erdecks/ertrak.F:242 #16 0x08341e7f in TGeant3::Ertrak (this=0xfa13a10, x1=0xc9623f0, p1=0xc9623fc, x2=0xc962364, p2=0xc962370, ipa=6, chopt=0xfe296a8 "LE") at TGeant3/TGeant3.cxx:5402 #17 0x047924a8 in FairGeanePro::FindPCA (... But xmm55.F does only a multiplication of two 5 X 5 matrices!
4
The Crash - investigation
1° set: events (5 files of 2000 m- each), p 1 GeV/c, f [0°, 360°], q[20°, 140°] 2° set: events (5 files of 2000 m- each), p 1 GeV/c, f [-45°, 45°], q [25.5°, 26.5°], TESTS Magnetic field: some IFIELD = 0 some FIELDM ≠ 20 kG Double to single precision Memory problem Compiler: tried compiling with g77 Difference old/new geant3: ertrch.F changes To be changed but not relevant The problem is not here Test Succesfull! No crash with g77 Test Succesfull! No crash with old ertrch.F
5
ALFA2 = sin2 of the angle between the P and H field vectors
The “real” error turns out to be in routine erpremc/trprfn.F that performs: * *** ERROR PROPAGATION ALONG A PARTICLE TRAJECTORY IN A MAGNETIC FIELD * ROUTINE ASSUMES THAT IN THE INTERVAL (X1,X2) THE QUANTITIES 1/P * AND (HX,HY,HZ) ARE CONSTANT. * *** CHECK WHETHER H*ALFA/P IS TOO DIFFERENT AT X1 AND X2 * IF(HA2.NE.0.) THEN GAM=(H2(1)*T2(1)+H2(2)*T2(2)+H2(3)*T2(3))/HA2 ELSE GAM=(H1(1)*T1(1)+H1(2)*T1(2)+H1(3)*T1(3))/HA1 ENDIF ALFA2=1.-GAM**2 DH2=(H1(1)*PM1-H2(1)*PM2)**2+ 1 (H1(2)*PM1-H2(2)*PM2)**2+ 1 (H1(3)*PM1-H2(3)*PM2)**2 IF(DH2*ALFA2.GT.DELHP6**2) GO TO 903 At a certain point there is a check whether the curvature of the track inside the step is too big ALFA2 = sin2 of the angle between the P and H field vectors DH2 is proportional to H/P 1/R 903 IERR=3 C IF(INIT.NE.0) GO TO 30 * WRITE (LOUT, 998) DH2,ALFA2,XL 998 FORMAT('0',' *** S/R TRPROP DELTA(H*ALFA/P)',5X 1,'EXCEEDS TOLERANCE '/'0',3E12.5//' ********** ',///) INIT=1 GO TO 30 the GO TO 903 leads us here, where the message *** Error in subr. TRPROP 3 called bysubr. ERPROP*** is printed out, and then we go back into the code via GO TO 30
6
IF(DH2*ALFA2.GT.DELHP6**2) GO TO 903
* *** DEFINE AVERAGE MAGNETIC FIELD AND GRADIENT PM12=(PM1+PM2)*0.5 P12=1./(2.*PM12) HN(1)=(H1(1)*PM1+H2(1)*PM2)*P12*CH*CFACT8 HN(2)=(H1(2)*PM1+H2(2)*PM2)*P12*CH*CFACT8 HN(3)=(H1(3)*PM1+H2(3)*PM2)*P12*CH*CFACT8 ** skip ** PAV = .5*(PA1+PA2) Q = - HM/PAV THETA = Q*XL SINT = SIN(THETA) COST = COS(THETA) … and other variables GO TO 903 statement skips this part of the code, where some variables (in green) are filled up with a value. RECALL 903 IERR=3 C IF(INIT.NE.0) GO TO 30 * WRITE (LOUT, 998) DH2,ALFA2,XL 998 FORMAT('0',' *** S/R TRPROP DELTA(H*ALFA/P)',5X 1,'EXCEEDS TOLERANCE '/'0',3E12.5//' ********** ',///) INIT=1 GO TO 30 * *** COMPLETE TRANSFORMATION MATRIX BETWEEN ERRORS AT X1 AND X2 * *** FIELD GRADIENT PERPENDICULAR TO TRACK IS PRESENTLY NOT * *** TAKEN INTO ACCOUNT * 30 CONTINUE QP =Q *PAV ANV = -(HN(1)*U2(1)+HN(2)*U2(2) ) ANU = (HN(1)*V2(1)+HN(2)*V2(2)+HN(3)*V2(3)) OMCOST = 1.-COST TMSINT = THETA-SINT … Here some variables not filled are used: all of them keep the previous step value, except for Q (…conflict with ZEBRA ??)
7
This explains why the error remained undetected up to now
Why the crash? The crash results related to the changes in ertrch.F: they let the case IF(DH2*ALFA2.GT.DELHP6**2) GO TO 903 be more frequent , probably because a change in the stepping has been made In old GeanE this condition never (or very rarely) happens and some compilers did not detect it This explains why the error remained undetected up to now
8
Conclusions (on the crash)
The changes in ertrch.F of the last GeanE version (Filippi and Piano) sometimes allow too big steps This must be corrected 2. Too big steps activate a wrong procedure in the old GeanE. Perhaps this condition in trprfn.F could happen also without the changed ertrch.F under some conditions (e. g. low momenta, very inhomogeneous magnetic field) This has been fixed just now by us by skipping the step
9
Possible solutions At present, we propose:
to fix the media_pnd.geo file (m.f. map must be read in each medium!!) get rid of the new ertrch.F routine and go back to the old one to correct the new GeanE (with a skip of the step updating) to avoid crashes There is another possibility get rid of the ‘E’ (exact) option in the propagation. In non-exact case the trprop.F routine substitutes the trprfn.F one without bugs.
10
Tests have been performed on the same set of events where we saw the crash and all the simulations ended without crashing In the meanwhile: the ertrch.F has to be checked and fixed where needed we will investigate a more robust patch, for trprfn.F
11
Momenta reconstructed on the first MVD plane (with Kalman)
Old GEanE without correction new GeanE with correction
12
Rapid corrections GeanE: TO DO list
BUG FIXES AND THINGS TO BE ADDED (Lia and A.R.): Fix bug to prevent crash in xmm55 Some comments needed to explain the functions (e.g. in the helix (SC) from/to parabola (SD) contructors sometimes the transformation is not possible and it must be explained) (improve the failure procedure) PropagateToLength(0) must be fixed to propagate to track length = 0 Add the option 'O’ to perform the tracking only of the mean values without the errors Add the covariance matrix in MARS (6X6) in FairTrackParH Check the tracking along the z axis Investigate the failure when propagating to virtual detector planes Check tracking of low momentum particles Rapid corrections
13
FINALLY, IN THE INTERFACE BETWEEN GEANE AND GENFIT:
A MORE GENERAL IDEA: A general “restyling” of FairGeanePro is needed in some points, to uniform the function names and optimize them: for example PropagateToPCA(pca)/PropagateToPCA(pca, dir) to be unified in one! FINALLY, IN THE INTERFACE BETWEEN GEANE AND GENFIT: GeaneTrackRep::getPosMomCov has to be commented and uploaded on svn repository Exception of getMom in PndGenfitAdapters (see thread: Bugs, Fixes, Releases: Bug in GenfitTrack2PndTrack): to be put within a “try&catch”.
14
TODO list BUG FIXES AND THINGS TO BE ADDED:
Check on the tracking of any charged particle and of neutral particles In the helix <--> parabola contructors sometimes the transformation is not possible and it fails: a comment is needed to explain why (it is due to the SD/SC transformation failure) PropagateToLength(0) must be fixed (peraphs in FORTRAN) to be able to propagate to track length = 0 (i.e. don’ t move) Check the option 'O’ (= only); it should perform the tracking only of the mean values without the errors. If it is so, a function to use it must be added to the interface Add the covariance matrix in MARS (6X6) in FairTrackParH Check the tracking along the z axis Fix bug to prevent crash (e.g. in xmm55)
15
PropagateToPCA(pca)/PropagateToPCA(pca, dir) to be unified in one!
A MORE GENERAL IDEA: A general “restyling” of FairGeanePro is needed in some points, to uniform the function names and optimize them: for example PropagateToPCA(pca)/PropagateToPCA(pca, dir) to be unified in one!
16
FINALLY, IN THE INTERFACE BETWEEN GEANE AND GENFIT:
I wrote the GeaneTrackRep::getPosMomCov function but there is a problem in the transformation to MARS, which may fail sometimes due to MARS/SD/SC transformations a comment is needed (and I will put the implementation in svn) Exception of getMom in PndGenfitAdapters (see thread: Bugs, Fixes, Releases: Bug in GenfitTrack2PndTrack); we should decide whether to put it within a “try&catch” or to handle the exceptions directly inside getPos/Mom/PosMom/PosMomCov? Bug in SPU still need to be corrected (see forthcoming posts in the forum)
17
Long term actions How much long? I think about a period of six months (depending on man power) 1. tracking for electrons/positrons 2. Kalman filter for electrons/positrons 3. Implementation of GEANT 4E
18
Tracking of electrons/positrons
19
Bremsstrahlung Tracking for electrons
20
Bremsstrahlung Tracking for electrons GEANE is OK for the mean value
21
Improvements (done) Tracking for electrons New error calculation in energy loss for heavy particles (truncated Landau and Urban) New error calculation for bremsstrahlung The effects are only in the energy pulls, because only the (1,1) element of the covariance matrix is involved
22
Bremsstrahlung 1/p distribution has no variance!
Tracking for electrons 1/p distribution has no variance! We use the 1 s E interval transformed in 1/E The covariance matrix for bremsstrahlung was absent in the original GEANE Implemented in the last GEANE version (last summer) Tests with electrons have to be done However, this is not enough for KALMAN
23
KALMAN filter requires
gaussian shapes. How to proceed??
24
Beyond Kalman: not gauusian models (electrons)
28
3. GEANT4E
31
six months (depending on man power)
Long term actions six months (depending on man power) tracking for electrons/positrons: New error calculation for bremsstrahlung (present since last summer in geane, to be tested with e- and with Kalman). The effects are only in the energy pulls, because only the (1,1) element of the covariance matrix is involved Kalman filter for electrons/positrons: with e+e- the Gaussian sum filter must be tested Implementation of geant4e: it has been released and needs to be tested within the pandaroot framework
32
FUTURE Join different detectors Track merging Vertex fit + track fit
Vertex fit + track fit+kinematics
33
Backup slides
34
SUMMARY To accomplish the TODO list is urgent
electron/positron tracking bremsstrahlung treated with Gaussian Sum Filter (GSF) from Kalman to GSF for global fit for electrons GEANT4E implementation FUTURE: Join different detectors ….. now Shor t term future
35
GEANE for PANDA modified
with the the a-tail Original GEANE
36
Tracking for electrons
37
Improvements (done) large thicknesses
in GEANE and GEANT4E the energy loss uncertainty is valid only for large thicknesses the Urban distribution for very thin absorbers reproduces well the data in the case of PANDA straw tubes for thin absorbers, we truncate the Landau distribution and the d-ray tail of the Urban distribution to take into account the core of these distributions during the tracking the straggling for electrons (bremsstrahlung) has been also included
38
Next steps Global fit e PID
Track merging between detectors under different PID Kinematics fitting under various hypothesis Vertex+kinematics optimized with Lagrange Multipliers
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.