Re: Proposed patch for GEANE.

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 1 Jun 2010 12:48:38 +0200


Hi Lia and Alberto,

Thanks for sending this patch. It is now in the SVN trunk. I had to apply it by hand due to some version mismatch, but it was quite easy. I had to make a change in trprfn.F to bypass a compiler warning.

Could you check that the SVN trunk is OK and really reflects your changes?

Rene

Lia Lavezzi wrote:
> Dear Rene Brun,
> I work in the computing group of the PANDA collaboration. As you
> might know we are using GEANE as track follower within our VMC. While
> using it to develop our code, we found some instabilities and we worked
> out some solutions I describe down here. In attachment you find the patch
> we created containing these fixes: we would like to propose to apply these
> changes to the official GEANE release.
>
> The patch contains the following corrections:
>
> 1. fix for IERR = 3 error - trprfn.F/erprop.F
> In case of IERR = 3 error, i.e. "H*ALFA/P AT X1 AND X2 DIFFER TOO MUCH",
> there was a GOTO pointing back to a part of code where uninitialised
> variables were used. This used to produce a crash.
> Our solution is to skip the step where IERR = 3, getting rid of the wrong
> GOTO, but to update the initial point position, momentum and magnetic
> field value as well.
>
> 1.b In addition, related to this point, we put a new flag in the common
> ERTRIO1, NOPRNT, to select whether printing or not the error messages
> about IERR, that in some cases could be annoying.
> By default the printings are there, but if the user sets the flag NOPRNT
> to 1 they are skipped.
>
> 2. fix for crash in electron tracking - erland.F
> A crash happens, though very rarely, in the part recently inserted to
> include bremsstrahlung
> LX = 1.442695*STEP/RADL
> EMB=E/(2**LX)
> S2B=E*E*(1/3**LX - 1/4**LX)
> SB=SQRT(ABS(S2B))
> DEDXB = 1.2*SB
> The calculation of **LX fails when LX is too big (i.e. in thick materials,
> where RADL is small, or when big STEPs are performed): our solution is to
> put DEDXB = 0 and recalculate it only for LX < 25.
>
> 3. fix for missing virtual detector planes - ertrch.F
> In the code there is a check to understand whether in a step the plane is
> reached or not: if the step is too big and the ending point is on the
> other side of the plane the step size is reduced so that the ending point
> of the plane is on the plane itself (or near to it within a certain
> precision). The statement says IF(STEP.GE.ASCL1) and STEP is the step
> size, ASCL1 the distance between the starting point and the plane.
> Sometimes it happens that the ending point is right before the plane, so
> that STEP is not "greater or equal" to ASCL1, but their difference is very
> small (of the order of -10^-7). In this case GEANE acts as there is enough
> space to perform this step and then tries another one before reaching the
> plane but doing this it fails in one of the checks it does at the
> beginning of the step. It compares some quantities with the variable PREC
> (of the order of 10^-4) and there is the failure: we have too small
> quantities here (our 10^-7/-8)! Moreover it looks for geometrical
> boundaries, but we are talking about virtual detector planes and it does
> not find them and so it decides to perform too big steps and it does not
> find the plane: ever!
> Our solution: the idea is to consider the plane as reached if the distance
> of the ending point to/from the plane is less than PREC.
>
> 4. There are, in addition:
> - a couple of corrections to our previously sent patch
> - a fix in TGeant3/TGeant3.h, where in the struct Ertrio the variable
> iepred was not set up as a vector, while in the corresponding FORTRAN
> COMMON ERTRIO it is IEPRED[MXPRED].
>
> The patch has been deeply tested by us in Pavia and has been distributed
> to the PANDA computing group to have a feedback from a large group of
> people in case there were problems with it.
>
> Our last tests were done on geant3 rev. 250, by inserting it in the
> pandaroot framework. I know there is now rev. 251 but I saw the changes
> between these two revisions do not affect GEANE, so there should be no
> need to re-check the patch again.
>
> All tests ended succesfully, so we would ask you to please consider these
> changes for the official release.
>
> For any question or clarification don' t hesitate to write us!
>
> Thank you very much,
> Best regards,
> Lia Lavezzi.
Received on Tue Jun 01 2010 - 12:48:42 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 16 2010 - 11:25:01 CEST