[d2n-analysis-talk] BB TDC cuts

Brad Sawatzky brads at jlab.org
Wed May 26 11:05:40 EDT 2010


On Wed, 26 May 2010, MATTHEW R POSIK wrote:

> On Wed, May 26, 2010 at 10:15 AM, Brad Sawatzky <brads at jlab.org> wrote:
> 
> > On Sat, 22 May 2010, posik at jlab.org wrote:
> >
> > > So I think I finally got the BB cer multihit TDCs working right. I
> > > just use TString cuts for all hits in the TDC. For example the
> > > beam line side has 6 hits, so I do something like
> > >
> > > TString tdc1_1 =
> > > "DL.BBcerT01[Ndata.DL.BBcerT01-1]>xx&&DL.BBcerT01[Ndata.DL.BBcerT01-1]<xx"
> >
> > What happens when Ndata.DL.BBcerTxx==0?  Will it attempt to index with
> > '-1' or do you watch for that condition prior to invoking this cut?
> 
> Yes, I took this condition in to account by appending the condition
> Ndata.DLBBcerTxx!=0 to all 20 TDCs.

You should not just add Ndata.DLBBcerTxx!=0 to the end of the Cut
string.  The software must still evaluate all of the bogus [-1] indexes.
If those memory locations are out of scope, then you can segfault or
throw some other error.  Same problem if you try to invoke a cut for
"hit 6" when there are less than 6 hits -- in either case you're
indexing beyond the scope of the array.  That kind of code is just
begging for trouble :-)

[ . . . ]
> Following the suggestion of this site
> http://root.cern.ch/phpBB3//viewtopic.php?p=34643&sid=0337d028a3147d554b6b650c9474eddd
> I was able to fix that problem. I think this cut is now correctly working.

It looks like the default limit is 1000.  Are you really intending to
generating a cut with more than 1000 comparisons?  How big do you have
to set it?

-- Brad

-- 
Brad Sawatzky, PhD <brads at jlab.org>  -<>-  Jefferson Lab / Hall C / C111
Ph: 757-269-5947  -<>-  Fax: 757-269-5235  -<>- Pager: brads-page at jlab.org
The most exciting phrase to hear in science, the one that heralds new
  discoveries, is not "Eureka!" but "That's funny..."   -- Isaac Asimov


More information about the d2n-analysis-talk mailing list