Re: 'divide by zero' during reconstruction

From: Aaron Joseph Maschinot (ajmasch@MIT.EDU)
Date: Mon Jan 07 2002 - 08:46:28 EST


Hello, Jason:

I just ran your analysis program on a data file of 38000 events that I
had, and it went through fine. My bet would be that some event in your
data files has a value of 0, which you are then dividing by in your
ntpIn[9] to nptIn[12] assignment statements. When this happens, root
isn't always smart enough to tell you which line the error happened in,
and, true to what Adrian said, it often will just give you the line number
of the starting line of the loop in which the error occurred.

If you would like to check whether of not you have a "troublesome event"
with a zero value in it, put a few lines of code immediately before the
nptIn[9] statement explicitly checking this, e.g.:

if(fabs(ntpIn[0])<0.001){
  cout <<"\n\n AHA!!!!!\n"<<ntpIn[0]<<\n\n;
  break;
}

or similarly for other variables...

Cheers,

Aaron



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:28 EST